Lines Matching refs:fp

60 oprintf(FILE *fp, const char *format, ...)
65 (void) vfprintf(fp, format, ap);
71 desc_printf(const char *d, FILE *fp, const char *format, ...)
76 (void) vfprintf(fp, format, ap);
80 (void) fprintf(fp, " (%s)\n", d);
82 (void) fprintf(fp, "\n");
86 flag_printf(FILE *fp, const char *s, uint_t flags, size_t bits,
91 oprintf(fp, " %s: 0x%x\n", s, flags);
101 desc_printf(flag_desc(f), fp, "\t%s", n);
103 desc_printf(flag_desc(f), fp, "\t0x%x", f);
108 flag64_printf(FILE *fp, const char *s, uint64_t flags, size_t bits,
113 oprintf(fp, " %s: 0x%llx\n", s, (u_longlong_t)flags);
123 desc_printf(flag_desc(f), fp, "\t%s", n);
125 desc_printf(flag_desc(f), fp, "\t0x%llx", f);
130 id_printf(FILE *fp, const char *s, id_t id)
134 oprintf(fp, "%sNone\n", s);
137 oprintf(fp, "%sNot Supported\n", s);
140 oprintf(fp, "%s%u\n", s, (uint_t)id);
178 print_smbios(smbios_hdl_t *shp, FILE *fp)
185 oprintf(fp, "Entry Point Anchor Tag: %*.*s\n",
189 oprintf(fp, "Entry Point Checksum: 0x%x\n", ep.smbe_ecksum);
190 oprintf(fp, "Entry Point Length: %u\n", ep.smbe_elen);
191 oprintf(fp, "Entry Point Version: %u.%u\n",
193 oprintf(fp, "Max Structure Size: %u\n", ep.smbe_maxssize);
194 oprintf(fp, "Entry Point Revision: 0x%x\n", ep.smbe_revision);
196 oprintf(fp, "Entry Point Revision Data:");
198 oprintf(fp, " 0x%02x", ep.smbe_format[i]);
199 oprintf(fp, "\n");
201 oprintf(fp, "Intermediate Anchor Tag: %*.*s\n",
205 oprintf(fp, "Intermediate Checksum: 0x%x\n", ep.smbe_icksum);
206 oprintf(fp, "Structure Table Length: %u\n", ep.smbe_stlen);
207 oprintf(fp, "Structure Table Address: 0x%x\n", ep.smbe_staddr);
208 oprintf(fp, "Structure Table Entries: %u\n", ep.smbe_stnum);
209 oprintf(fp, "DMI BCD Revision: 0x%x\n", ep.smbe_bcdrev);
213 print_common(const smbios_info_t *ip, FILE *fp)
216 oprintf(fp, " Manufacturer: %s\n", ip->smbi_manufacturer);
218 oprintf(fp, " Product: %s\n", ip->smbi_product);
220 oprintf(fp, " Version: %s\n", ip->smbi_version);
222 oprintf(fp, " Serial Number: %s\n", ip->smbi_serial);
224 oprintf(fp, " Asset Tag: %s\n", ip->smbi_asset);
226 oprintf(fp, " Location Tag: %s\n", ip->smbi_location);
228 oprintf(fp, " Part Number: %s\n", ip->smbi_part);
232 print_bios(smbios_hdl_t *shp, FILE *fp)
238 oprintf(fp, " Vendor: %s\n", b.smbb_vendor);
239 oprintf(fp, " Version String: %s\n", b.smbb_version);
240 oprintf(fp, " Release Date: %s\n", b.smbb_reldate);
241 oprintf(fp, " Address Segment: 0x%x\n", b.smbb_segment);
242 oprintf(fp, " ROM Size: %u bytes\n", b.smbb_romsize);
243 oprintf(fp, " Image Size: %u bytes\n", b.smbb_runsize);
245 flag64_printf(fp, "Characteristics",
250 flag_printf(fp, "Characteristics Extension Byte 1",
257 flag_printf(fp, "Characteristics Extension Byte 2",
264 oprintf(fp, " Version Number: %u.%u\n",
269 oprintf(fp, " Embedded Ctlr Firmware Version Number: %u.%u\n",
275 print_system(smbios_hdl_t *shp, FILE *fp)
282 oprintf(fp, " UUID: ");
284 oprintf(fp, "%02x", s.smbs_uuid[i]);
286 oprintf(fp, "-");
288 oprintf(fp, "\n");
291 fp, " Wake-Up Event: 0x%x", s.smbs_wakeup);
293 oprintf(fp, " SKU Number: %s\n", s.smbs_sku);
294 oprintf(fp, " Family: %s\n", s.smbs_family);
298 print_bboard(smbios_hdl_t *shp, id_t id, FILE *fp)
305 oprintf(fp, " Chassis: %u\n", (uint_t)b.smbb_chassis);
307 flag_printf(fp, "Flags", b.smbb_flags, sizeof (b.smbb_flags) * NBBY,
311 fp, " Board Type: 0x%x", b.smbb_type);
325 oprintf(fp, "\n");
328 oprintf(fp, " Contained Handle: %u\n", hdl);
334 print_chassis(smbios_hdl_t *shp, id_t id, FILE *fp)
341 oprintf(fp, " OEM Data: 0x%x\n", c.smbc_oemdata);
342 oprintf(fp, " SKU number: %s\n",
344 oprintf(fp, " Lock Present: %s\n", c.smbc_lock ? "Y" : "N");
347 fp, " Chassis Type: 0x%x", c.smbc_type);
350 fp, " Boot-Up State: 0x%x", c.smbc_bustate);
353 fp, " Power Supply State: 0x%x", c.smbc_psstate);
356 fp, " Thermal State: 0x%x", c.smbc_thstate);
358 oprintf(fp, " Chassis Height: %uu\n", c.smbc_uheight);
359 oprintf(fp, " Power Cords: %u\n", c.smbc_cords);
362 oprintf(fp, " Element Records: %u\n", elem_cnt);
375 oprintf(fp, "\n");
380 desc_printf(smbios_type_name(type & 0x7f), fp,
385 desc_printf(smbios_bboard_type_desc(type), fp,
394 print_processor(smbios_hdl_t *shp, id_t id, FILE *fp)
403 fp, " Family: %u", p.smbp_family);
407 fp, " Family Ext: %u", p.smbp_family2);
409 oprintf(fp, " CPUID: 0x%llx\n", (u_longlong_t)p.smbp_cpuid);
412 fp, " Type: %u", p.smbp_type);
415 fp, " Socket Upgrade: %u", p.smbp_upgrade);
417 oprintf(fp, " Socket Status: %s\n",
422 fp, " Processor Status: %u", status);
425 oprintf(fp, " Supported Voltages:");
428 oprintf(fp, " 5.0V");
431 oprintf(fp, " 3.3V");
434 oprintf(fp, " 2.9V");
437 oprintf(fp, "\n");
439 oprintf(fp, " Supported Voltages: %.1fV\n",
445 oprintf(fp, " Core Count: %u\n", p.smbp_corecount);
447 oprintf(fp, " Core Count: %u\n", p.smbp_corecount2);
449 oprintf(fp, " Core Count: Unknown\n");
454 oprintf(fp, " Cores Enabled: %u\n",
457 oprintf(fp, " Cores Enabled: %u\n",
461 oprintf(fp, " Cores Enabled: Unknown\n");
466 oprintf(fp, " Thread Count: %u\n",
469 oprintf(fp, " Thread Count: %u\n",
473 oprintf(fp, " Thread Count: Unknown\n");
477 flag_printf(fp, "Processor Characteristics",
484 oprintf(fp, " External Clock Speed: %uMHz\n", p.smbp_clkspeed);
486 oprintf(fp, " External Clock Speed: Unknown\n");
489 oprintf(fp, " Maximum Speed: %uMHz\n", p.smbp_maxspeed);
491 oprintf(fp, " Maximum Speed: Unknown\n");
494 oprintf(fp, " Current Speed: %uMHz\n", p.smbp_curspeed);
496 oprintf(fp, " Current Speed: Unknown\n");
498 id_printf(fp, " L1 Cache: ", p.smbp_l1cache);
499 id_printf(fp, " L2 Cache: ", p.smbp_l2cache);
500 id_printf(fp, " L3 Cache: ", p.smbp_l3cache);
504 print_cache(smbios_hdl_t *shp, id_t id, FILE *fp)
510 oprintf(fp, " Level: %u\n", c.smba_level);
511 oprintf(fp, " Maximum Installed Size: %u bytes\n", c.smba_maxsize);
514 oprintf(fp, " Installed Size: %u bytes\n", c.smba_size);
516 oprintf(fp, " Installed Size: Not Installed\n");
519 oprintf(fp, " Speed: %uns\n", c.smba_speed);
521 oprintf(fp, " Speed: Unknown\n");
523 flag_printf(fp, "Supported SRAM Types",
528 fp, " Current SRAM Type: 0x%x", c.smba_ctype);
531 fp, " Error Correction Type: %u", c.smba_etype);
534 fp, " Logical Cache Type: %u", c.smba_ltype);
537 fp, " Associativity: %u", c.smba_assoc);
540 fp, " Mode: %u", c.smba_mode);
543 fp, " Location: %u", c.smba_location);
545 flag_printf(fp, "Flags", c.smba_flags, sizeof (c.smba_flags) * NBBY,
550 print_port(smbios_hdl_t *shp, id_t id, FILE *fp)
556 oprintf(fp, " Internal Reference Designator: %s\n", p.smbo_iref);
557 oprintf(fp, " External Reference Designator: %s\n", p.smbo_eref);
560 fp, " Internal Connector Type: %u", p.smbo_itype);
563 fp, " External Connector Type: %u", p.smbo_etype);
566 fp, " Port Type: %u", p.smbo_ptype);
570 print_slot(smbios_hdl_t *shp, id_t id, FILE *fp)
578 oprintf(fp, " Reference Designator: %s\n", s.smbl_name);
579 oprintf(fp, " Slot ID: 0x%x\n", s.smbl_id);
582 fp, " Type: 0x%x", s.smbl_type);
585 fp, " Width: 0x%x", s.smbl_width);
588 fp, " Usage: 0x%x", s.smbl_usage);
591 fp, " Length: 0x%x", s.smbl_length);
593 flag_printf(fp, "Slot Characteristics 1",
597 flag_printf(fp, "Slot Characteristics 2",
604 oprintf(fp, " Segment Group: %u\n", s.smbl_sg);
605 oprintf(fp, " Bus Number: %u\n", s.smbl_bus);
606 oprintf(fp, " Device/Function Number: %u\n", s.smbl_df);
610 print_obdevs_ext(smbios_hdl_t *shp, id_t id, FILE *fp)
625 oprintf(fp, " Reference Designator: %s\n", oe.smboe_name);
626 oprintf(fp, " Device Enabled: %s\n", enabled == B_TRUE ? "true" :
628 oprintf(fp, " Device Type: %s\n", type);
629 oprintf(fp, " Device Type Instance: %u\n", oe.smboe_dti);
630 oprintf(fp, " Segment Group Number: %u\n", oe.smboe_sg);
631 oprintf(fp, " Bus Number: %u\n", oe.smboe_bus);
632 oprintf(fp, " Device/Function Number: %u\n", oe.smboe_df);
636 print_obdevs(smbios_hdl_t *shp, id_t id, FILE *fp)
645 oprintf(fp, " %s\n", argv[i].smbd_name);
650 print_strtab(smbios_hdl_t *shp, id_t id, FILE *fp)
659 oprintf(fp, " %s\n", argv[i]);
664 print_lang(smbios_hdl_t *shp, id_t id, FILE *fp)
670 oprintf(fp, " Current Language: %s\n", l.smbla_cur);
671 oprintf(fp, " Language String Format: %u\n", l.smbla_fmt);
672 oprintf(fp, " Number of Installed Languages: %u\n", l.smbla_num);
673 oprintf(fp, " Installed Languages:\n");
675 print_strtab(shp, id, fp);
680 print_evlog(smbios_hdl_t *shp, id_t id, FILE *fp)
687 oprintf(fp, " Log Area Size: %lu bytes\n", (ulong_t)ev.smbev_size);
688 oprintf(fp, " Header Offset: %lu\n", (ulong_t)ev.smbev_hdr);
689 oprintf(fp, " Data Offset: %lu\n", (ulong_t)ev.smbev_data);
692 fp, " Data Access Method: %u", ev.smbev_method);
694 flag_printf(fp, "Log Flags",
699 fp, " Log Header Format: %u", ev.smbev_format);
701 oprintf(fp, " Update Token: 0x%x\n", ev.smbev_token);
702 oprintf(fp, " Data Access Address: ");
708 oprintf(fp, "Index Address 0x%x, Data Address 0x%x\n",
713 oprintf(fp, "0x%x\n", ev.smbev_addr.eva_gpnv);
716 oprintf(fp, "0x%x\n", ev.smbev_addr.eva_addr);
719 oprintf(fp, " Type Descriptors:\n");
722 oprintf(fp, " %u: Log Type 0x%x, Data Type 0x%x\n", i,
729 print_bytes(const uint8_t *data, size_t size, FILE *fp)
737 oprintf(fp, "\n offset: 0 1 2 3 4 5 6 7 8 9 a b c d e f "
741 oprintf(fp, " %#4lx: ", (ulong_t)row * 16);
746 oprintf(fp, " ");
748 oprintf(fp, "%02x", x);
754 oprintf(fp, " ");
755 oprintf(fp, " ");
760 oprintf(fp, " %s\n", buf);
763 oprintf(fp, "\n");
767 print_memarray(smbios_hdl_t *shp, id_t id, FILE *fp)
774 fp, " Location: %u", ma.smbma_location);
777 fp, " Use: %u", ma.smbma_use);
780 fp, " ECC: %u", ma.smbma_ecc);
782 oprintf(fp, " Number of Slots/Sockets: %u\n", ma.smbma_ndevs);
783 id_printf(fp, " Memory Error Data: ", ma.smbma_err);
784 oprintf(fp, " Max Capacity: %llu bytes\n",
789 print_memdevice(smbios_hdl_t *shp, id_t id, FILE *fp)
795 id_printf(fp, " Physical Memory Array: ", md.smbmd_array);
796 id_printf(fp, " Memory Error Data: ", md.smbmd_error);
799 oprintf(fp, " Total Width: %u bits\n", md.smbmd_twidth);
801 oprintf(fp, " Total Width: Unknown\n");
804 oprintf(fp, " Data Width: %u bits\n", md.smbmd_dwidth);
806 oprintf(fp, " Data Width: Unknown\n");
810 oprintf(fp, " Size: Unknown\n");
813 oprintf(fp, " Size: Not Populated\n");
816 oprintf(fp, " Size: %llu bytes\n",
821 fp, " Form Factor: %u", md.smbmd_form);
824 oprintf(fp, " Set: None\n");
826 oprintf(fp, " Set: Unknown\n");
828 oprintf(fp, " Set: %u\n", md.smbmd_set);
832 fp, " Rank: %u", md.smbmd_rank);
834 oprintf(fp, " Rank: Unknown\n");
838 fp, " Memory Type: %u", md.smbmd_type);
840 flag_printf(fp, "Flags", md.smbmd_flags, sizeof (md.smbmd_flags) * NBBY,
844 oprintf(fp, " Speed: %u MHz\n", md.smbmd_speed);
846 oprintf(fp, " Speed: Unknown\n");
849 oprintf(fp, " Configured Speed: %u MHz\n", md.smbmd_clkspeed);
851 oprintf(fp, " Configured Speed: Unknown\n");
853 oprintf(fp, " Device Locator: %s\n", md.smbmd_dloc);
854 oprintf(fp, " Bank Locator: %s\n", md.smbmd_bloc);
857 oprintf(fp, " Minimum Voltage: %.2fV\n",
860 oprintf(fp, " Minimum Voltage: Unknown\n");
864 oprintf(fp, " Maximum Voltage: %.2fV\n",
867 oprintf(fp, " Maximum Voltage: Unknown\n");
871 oprintf(fp, " Configured Voltage: %.2fV\n",
874 oprintf(fp, " Configured Voltage: Unknown\n");
879 print_memarrmap(smbios_hdl_t *shp, id_t id, FILE *fp)
885 id_printf(fp, " Physical Memory Array: ", ma.smbmam_array);
886 oprintf(fp, " Devices per Row: %u\n", ma.smbmam_width);
888 oprintf(fp, " Physical Address: 0x%llx\n Size: %llu bytes\n",
893 print_memdevmap(smbios_hdl_t *shp, id_t id, FILE *fp)
899 id_printf(fp, " Memory Device: ", md.smbmdm_device);
900 id_printf(fp, " Memory Array Mapped Address: ", md.smbmdm_arrmap);
902 oprintf(fp, " Physical Address: 0x%llx\n Size: %llu bytes\n",
905 oprintf(fp, " Partition Row Position: %u\n", md.smbmdm_rpos);
906 oprintf(fp, " Interleave Position: %u\n", md.smbmdm_ipos);
907 oprintf(fp, " Interleave Data Depth: %u\n", md.smbmdm_idepth);
911 print_hwsec(smbios_hdl_t *shp, FILE *fp)
918 fp, " Power-On Password Status: %u", h.smbh_pwr_ps);
920 fp, " Keyboard Password Status: %u", h.smbh_kbd_ps);
922 fp, " Administrator Password Status: %u", h.smbh_adm_ps);
924 fp, " Front Panel Reset Status: %u", h.smbh_pan_ps);
928 print_boot(smbios_hdl_t *shp, FILE *fp)
935 fp, " Boot Status Code: 0x%x", b.smbt_status);
938 oprintf(fp, " Boot Data (%lu bytes):\n", (ulong_t)b.smbt_size);
939 print_bytes(b.smbt_data, b.smbt_size, fp);
944 print_ipmi(smbios_hdl_t *shp, FILE *fp)
951 fp, " Type: %u", i.smbip_type);
953 oprintf(fp, " BMC IPMI Version: %u.%u\n",
956 oprintf(fp, " i2c Bus Slave Address: 0x%x\n", i.smbip_i2c);
957 oprintf(fp, " NV Storage Device Bus ID: 0x%x\n", i.smbip_bus);
958 oprintf(fp, " BMC Base Address: 0x%llx\n", (u_longlong_t)i.smbip_addr);
959 oprintf(fp, " Interrupt Number: %u\n", i.smbip_intr);
960 oprintf(fp, " Register Spacing: %u\n", i.smbip_regspacing);
962 flag_printf(fp, "Flags", i.smbip_flags, sizeof (i.smbip_flags) * NBBY,
967 print_extprocessor(smbios_hdl_t *shp, id_t id, FILE *fp)
977 oprintf(fp, " Processor: %u\n", ep.smbpe_processor);
978 oprintf(fp, " FRU: %u\n", ep.smbpe_fru);
979 oprintf(fp, " Initial APIC ID count: %u\n\n", ep.smbpe_n);
982 oprintf(fp, " Logical Strand %u: Initial APIC ID: %u\n", i,
988 print_extport(smbios_hdl_t *shp, id_t id, FILE *fp)
997 oprintf(fp, " Chassis Handle: %u\n", epo.smbporte_chassis);
998 oprintf(fp, " Port Connector Handle: %u\n", epo.smbporte_port);
999 oprintf(fp, " Device Type: %u\n", epo.smbporte_dtype);
1000 oprintf(fp, " Device Handle: %u\n", epo.smbporte_devhdl);
1001 oprintf(fp, " PHY: %u\n", epo.smbporte_phy);
1005 print_pciexrc(smbios_hdl_t *shp, id_t id, FILE *fp)
1014 oprintf(fp, " Component ID: %u\n", pcie.smbpcie_bb);
1015 oprintf(fp, " BDF: 0x%x\n", pcie.smbpcie_bdf);
1019 print_extmemarray(smbios_hdl_t *shp, id_t id, FILE *fp)
1028 oprintf(fp, " Physical Memory Array Handle: %u\n", em.smbmae_ma);
1029 oprintf(fp, " Component Parent Handle: %u\n", em.smbmae_comp);
1030 oprintf(fp, " BDF: 0x%x\n", em.smbmae_bdf);
1034 print_extmemdevice(smbios_hdl_t *shp, id_t id, FILE *fp)
1044 oprintf(fp, " Memory Device Handle: %u\n", emd.smbmdeve_md);
1045 oprintf(fp, " DRAM Channel: %u\n", emd.smbmdeve_drch);
1046 oprintf(fp, " Number of Chip Selects: %u\n", emd.smbmdeve_ncs);
1049 oprintf(fp, " Chip Select: %u\n", emd.smbmdeve_cs[i]);
1054 print_struct(smbios_hdl_t *shp, const smbios_struct_t *sp, void *fp)
1068 oprintf(fp, "%-5s %-4s %s\n", "ID", "SIZE", "TYPE");
1070 oprintf(fp, "%-5u %-4lu",
1074 oprintf(fp, " %s (type %u)", s, sp->smbstr_type);
1077 oprintf(fp, " %s+%u (type %u)", "SMB_TYPE_OEM_LO",
1080 oprintf(fp, " %u", sp->smbstr_type);
1083 oprintf(fp, " (%s)\n", s);
1085 oprintf(fp, "\n");
1091 oprintf(fp, "\n");
1092 print_common(&info, fp);
1097 oprintf(fp, "\n");
1098 print_bios(shp, fp);
1101 oprintf(fp, "\n");
1102 print_system(shp, fp);
1105 oprintf(fp, "\n");
1106 print_bboard(shp, sp->smbstr_id, fp);
1109 oprintf(fp, "\n");
1110 print_chassis(shp, sp->smbstr_id, fp);
1113 oprintf(fp, "\n");
1114 print_processor(shp, sp->smbstr_id, fp);
1117 oprintf(fp, "\n");
1118 print_cache(shp, sp->smbstr_id, fp);
1121 oprintf(fp, "\n");
1122 print_port(shp, sp->smbstr_id, fp);
1125 oprintf(fp, "\n");
1126 print_slot(shp, sp->smbstr_id, fp);
1129 oprintf(fp, "\n");
1130 print_obdevs(shp, sp->smbstr_id, fp);
1134 oprintf(fp, "\n");
1135 print_strtab(shp, sp->smbstr_id, fp);
1138 oprintf(fp, "\n");
1139 print_lang(shp, sp->smbstr_id, fp);
1142 oprintf(fp, "\n");
1143 print_evlog(shp, sp->smbstr_id, fp);
1146 oprintf(fp, "\n");
1147 print_memarray(shp, sp->smbstr_id, fp);
1150 oprintf(fp, "\n");
1151 print_memdevice(shp, sp->smbstr_id, fp);
1154 oprintf(fp, "\n");
1155 print_memarrmap(shp, sp->smbstr_id, fp);
1158 oprintf(fp, "\n");
1159 print_memdevmap(shp, sp->smbstr_id, fp);
1162 oprintf(fp, "\n");
1163 print_hwsec(shp, fp);
1166 oprintf(fp, "\n");
1167 print_boot(shp, fp);
1170 oprintf(fp, "\n");
1171 print_ipmi(shp, fp);
1174 oprintf(fp, "\n");
1175 print_obdevs_ext(shp, sp->smbstr_id, fp);
1178 oprintf(fp, "\n");
1179 print_extprocessor(shp, sp->smbstr_id, fp);
1182 oprintf(fp, "\n");
1183 print_extport(shp, sp->smbstr_id, fp);
1186 oprintf(fp, "\n");
1187 print_pciexrc(shp, sp->smbstr_id, fp);
1190 oprintf(fp, "\n");
1191 print_extmemarray(shp, sp->smbstr_id, fp);
1194 oprintf(fp, "\n");
1195 print_extmemdevice(shp, sp->smbstr_id, fp);
1202 print_bytes(sp->smbstr_data, sp->smbstr_size, fp);
1204 oprintf(fp, "\n");
1246 usage(FILE *fp)
1248 (void) fprintf(fp, "Usage: %s "
1251 (void) fprintf(fp,