Lines Matching refs:buf
611 #define PRINT_YORN(buf, what, val) \
612 sprintf((buf), FORMAT, (what), (val) ? "yes" : "no");
613 #define PRINT_ENABLED(buf, what, val) \
614 sprintf((buf), FORMAT, (what), (val) ? "enabled" : "disabled");
615 #define PRINT_ENABLED_NA(buf, what, val) \
616 sprintf((buf), FORMAT, (what), (val) ? "enabled" : "n/a");
617 #define PRINT_VAL(buf, what, val) \
619 sprintf((buf), FORMAT, (what), "n/a"); \
624 sprintf((buf), FORMAT_N, (what), x/10, (x < 0 ? -x : x)%10); \
631 * @param buf where to append the human readable string
636 dumpCpuInfo(char *buf, cpu_vars_t *v) {
638 if (v == NULL || buf == NULL) {
639 return buf;
641 buf[0] = '\0';
642 strcat(buf, "########################################################\n");
643 buf += strlen(buf);
644 sprintf(buf, "CPU #%d", v->chipId);
646 buf += strlen(buf);
647 sprintf(buf, " INACCURATE TEMPERATURE VALUES (erratum %d)!",
650 buf += strlen(buf);
651 strcat(buf, "\n########################################################\n");
652 buf += strlen(buf);
653 sprintf(buf, FORMAT, "Silicon CPU Revision", v->revision);
654 buf += strlen(buf) - 1;
655 sprintf(buf, " (%02x-%02x)\n", v->xfamilyModel, v->modelStepping);
656 buf += strlen(buf);
657 sprintf(buf, FORMAT, "Family", cat_range_map[v->catIdx].name);
658 buf += strlen(buf) - 1;
659 sprintf(buf, " (ebx=0x%08x)\n", v->ebx);
660 buf += strlen(buf);
661 buf[0] = '\n'; buf++; buf[0] = '\0';
663 PRINT_ENABLED_NA(buf, "Thermtrip", v->flags & HTC_THERMTRIP)
664 buf += strlen(buf);
665 PRINT_YORN(buf, "HTC capable", v->flags & HTC_CAPABLE)
666 buf += strlen(buf);
667 PRINT_VAL(buf, "T Case/Die Max [C]", v->t_case_max)
668 buf += strlen(buf);
669 PRINT_VAL(buf, "T Diode Offset [C]", v->diode_offset)
670 buf += strlen(buf);
671 buf[0] = '\n'; buf++; buf[0] = '\0';
673 PRINT_ENABLED(buf, "HTC", v->limits[HTC].flags & TC_ENABLED)
674 buf += strlen(buf);
675 PRINT_YORN(buf, "HTC slew-controlled", v->limits[HTC].flags & TC_SLEWED)
676 buf += strlen(buf);
677 PRINT_VAL(buf, "HTC Limit [C]", v->limits[HTC].tcrit)
678 buf += strlen(buf);
679 PRINT_VAL(buf, "HTC Hysteresis [C]", v->limits[HTC].threshold)
680 buf += strlen(buf);
681 buf[0] = '\n'; buf++; buf[0] = '\0';
684 PRINT_ENABLED(buf, stc ? "STC" : "LHTC", v->limits[STC].flags & TC_ENABLED)
685 buf += strlen(buf);
686 PRINT_YORN(buf, stc ? "STC slew-controlled" : "LHTC slew-controlled",
688 buf += strlen(buf);
689 PRINT_VAL(buf, stc ? "STC Limit [C]" : "LHTC Limit [C]",
691 buf += strlen(buf);
692 PRINT_VAL(buf, stc ? "STC Hysteresis [C]" : "LHTC Hysteresis [C]",
694 return (buf + strlen(buf));
701 * @param buf where to append the human readable string
707 dumpTctrl(char *buf, PCI_HDL pci_hdl, cpu_vars_t *v) {
709 if (v == NULL || buf == NULL || v == NULL) {
710 return buf;
712 buf[0] = '\0';
715 PRINT_VAL(buf, "T control [C]", t)
720 PRINT_VAL(buf, "T control Core 0 [C]", t)
721 buf += strlen(buf);
724 PRINT_VAL(buf, "T control Core 1 [C]", t)
729 PRINT_VAL(buf, "T control [C]", t)
731 return (buf + strlen(buf));