Lines Matching refs:stp

204 smb_info_strptr(const smb_struct_t *stp, uint8_t off, int *n)  in smb_info_strptr()  argument
206 const uint8_t *sp = (const uint8_t *)(uintptr_t)stp->smbst_hdr; in smb_info_strptr()
208 if (off != 0 && sp + off < stp->smbst_end) { in smb_info_strptr()
210 return (smb_strptr(stp, sp[off])); in smb_info_strptr()
213 return (smb_strptr(stp, 0)); in smb_info_strptr()
248 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_common() local
252 if (stp == NULL) in smbios_info_common()
256 if (isp->is_type == stp->smbst_hdr->smbh_type) in smbios_info_common()
260 ip->smbi_manufacturer = smb_info_strptr(stp, isp->is_manu, &n); in smbios_info_common()
261 ip->smbi_product = smb_info_strptr(stp, isp->is_product, &n); in smbios_info_common()
262 ip->smbi_version = smb_info_strptr(stp, isp->is_version, &n); in smbios_info_common()
263 ip->smbi_serial = smb_info_strptr(stp, isp->is_serial, &n); in smbios_info_common()
264 ip->smbi_asset = smb_info_strptr(stp, isp->is_asset, &n); in smbios_info_common()
265 ip->smbi_location = smb_info_strptr(stp, isp->is_location, &n); in smbios_info_common()
266 ip->smbi_part = smb_info_strptr(stp, isp->is_part, &n); in smbios_info_common()
295 ip->smbi_location = smb_info_strptr(stp, in smbios_info_common()
311 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_contains() local
318 if (stp == NULL) { in smbios_info_contains()
323 if (isp->is_type == stp->smbst_hdr->smbh_type) in smbios_info_contains()
330 cnt = *((uint8_t *)(uintptr_t)stp->smbst_hdr + isp->is_contc); in smbios_info_contains()
331 cp = (id_t *)((uintptr_t)stp->smbst_hdr + isp->is_contv); in smbios_info_contains()
349 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BIOS); in smbios_info_bios() local
352 if (stp == NULL) in smbios_info_bios()
355 if (stp->smbst_hdr->smbh_len < sizeof (smb_bios_t) - sizeof (uint8_t)) in smbios_info_bios()
358 bip = (smb_bios_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_bios()
364 bp->smbb_vendor = smb_strptr(stp, bip->smbbi_vendor); in smbios_info_bios()
365 bp->smbb_version = smb_strptr(stp, bip->smbbi_version); in smbios_info_bios()
367 bp->smbb_reldate = smb_strptr(stp, bip->smbbi_reldate); in smbios_info_bios()
376 if (stp->smbst_hdr->smbh_len >= sizeof (smb_bios_t)) { in smbios_info_bios()
378 bp->smbb_nxcflags = stp->smbst_hdr->smbh_len - in smbios_info_bios()
438 return (stp->smbst_hdr->smbh_hdl); in smbios_info_bios()
444 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM); in smbios_info_system() local
447 if (stp == NULL) in smbios_info_system()
450 smb_info_bcopy(stp->smbst_hdr, &si, sizeof (si)); in smbios_info_system()
453 sip->smbs_uuid = ((smb_system_t *)stp->smbst_hdr)->smbsi_uuid; in smbios_info_system()
456 sip->smbs_sku = smb_strptr(stp, si.smbsi_sku); in smbios_info_system()
457 sip->smbs_family = smb_strptr(stp, si.smbsi_family); in smbios_info_system()
459 return (stp->smbst_hdr->smbh_hdl); in smbios_info_system()
465 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_bboard() local
468 if (stp == NULL) in smbios_info_bboard()
471 if (stp->smbst_hdr->smbh_type != SMB_TYPE_BASEBOARD) in smbios_info_bboard()
474 smb_info_bcopy(stp->smbst_hdr, &bb, sizeof (bb)); in smbios_info_bboard()
488 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_chassis() local
493 if (stp == NULL) in smbios_info_chassis()
496 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CHASSIS) in smbios_info_chassis()
499 smb_info_bcopy(stp->smbst_hdr, ch, sizeof (buf)); in smbios_info_chassis()
528 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor() local
531 if (stp == NULL) in smbios_info_processor()
534 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR) in smbios_info_processor()
537 smb_info_bcopy(stp->smbst_hdr, &p, sizeof (p)); in smbios_info_processor()
575 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_cache() local
578 if (stp == NULL) in smbios_info_cache()
581 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CACHE) in smbios_info_cache()
584 smb_info_bcopy(stp->smbst_hdr, &c, sizeof (c)); in smbios_info_cache()
622 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_port() local
625 if (stp == NULL) in smbios_info_port()
628 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PORT) in smbios_info_port()
631 smb_info_bcopy(stp->smbst_hdr, &p, sizeof (p)); in smbios_info_port()
634 pop->smbo_iref = smb_strptr(stp, p.smbpo_iref); in smbios_info_port()
635 pop->smbo_eref = smb_strptr(stp, p.smbpo_eref); in smbios_info_port()
647 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_slot() local
650 if (stp == NULL) in smbios_info_slot()
653 if (stp->smbst_hdr->smbh_type != SMB_TYPE_SLOT) in smbios_info_slot()
656 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_slot()
659 sp->smbl_name = smb_strptr(stp, s.smbsl_name); in smbios_info_slot()
677 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs_ext() local
680 if (stp == NULL) in smbios_info_obdevs_ext()
683 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVEXT) in smbios_info_obdevs_ext()
686 smb_info_bcopy(stp->smbst_hdr, &obe, sizeof (obe)); in smbios_info_obdevs_ext()
689 oep->smboe_name = smb_strptr(stp, obe.smbobe_name); in smbios_info_obdevs_ext()
702 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs() local
706 if (stp == NULL) in smbios_info_obdevs()
709 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVS) in smbios_info_obdevs()
712 op = (smb_obdev_t *)((uintptr_t)stp->smbst_hdr + sizeof (smb_header_t)); in smbios_info_obdevs()
713 m = (stp->smbst_hdr->smbh_len - sizeof (smb_header_t)) / sizeof (*op); in smbios_info_obdevs()
717 obp->smbd_name = smb_strptr(stp, op->smbob_name); in smbios_info_obdevs()
734 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_strtab() local
738 if (stp == NULL) in smbios_info_strtab()
741 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR && in smbios_info_strtab()
742 stp->smbst_hdr->smbh_type != SMB_TYPE_SYSCONFSTR && in smbios_info_strtab()
743 stp->smbst_hdr->smbh_type != SMB_TYPE_LANG) in smbios_info_strtab()
746 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_strtab()
750 argv[i] = smb_strptr(stp, i + 1); in smbios_info_strtab()
758 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_LANG); in smbios_info_lang() local
761 if (stp == NULL) in smbios_info_lang()
764 smb_info_bcopy(stp->smbst_hdr, &l, sizeof (l)); in smbios_info_lang()
767 lp->smbla_cur = smb_strptr(stp, l.smblang_cur); in smbios_info_lang()
771 return (stp->smbst_hdr->smbh_hdl); in smbios_info_lang()
777 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_EVENTLOG); in smbios_info_eventlog() local
781 if (stp == NULL) in smbios_info_eventlog()
784 if (stp->smbst_hdr->smbh_len < sizeof (smb_sel_t) - sizeof (uint8_t)) in smbios_info_eventlog()
787 sel = (smb_sel_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_eventlog()
788 len = stp->smbst_hdr->smbh_len - sizeof (smb_sel_t) + sizeof (uint8_t); in smbios_info_eventlog()
808 return (stp->smbst_hdr->smbh_hdl); in smbios_info_eventlog()
814 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarray() local
817 if (stp == NULL) in smbios_info_memarray()
820 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAY) in smbios_info_memarray()
823 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarray()
845 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarrmap() local
848 if (stp == NULL) in smbios_info_memarrmap()
851 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAYMAP) in smbios_info_memarrmap()
854 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarrmap()
875 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevice() local
878 if (stp == NULL) in smbios_info_memdevice()
881 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICE) in smbios_info_memdevice()
884 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevice()
909 mdp->smbmd_dloc = smb_strptr(stp, m.smbmdev_dloc); in smbios_info_memdevice()
910 mdp->smbmd_bloc = smb_strptr(stp, m.smbmdev_bloc); in smbios_info_memdevice()
932 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevmap() local
935 if (stp == NULL) in smbios_info_memdevmap()
938 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICEMAP) in smbios_info_memdevmap()
941 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevmap()
965 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SECURITY); in smbios_info_hwsec() local
968 if (stp == NULL) in smbios_info_hwsec()
971 smb_info_bcopy(stp->smbst_hdr, &hs, sizeof (hs)); in smbios_info_hwsec()
979 return (stp->smbst_hdr->smbh_hdl); in smbios_info_hwsec()
985 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BOOT); in smbios_info_boot() local
986 const smb_boot_t *b = (smb_boot_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_boot()
988 if (stp == NULL) in smbios_info_boot()
994 bp->smbt_size = stp->smbst_hdr->smbh_len - sizeof (smb_boot_t); in smbios_info_boot()
997 return (stp->smbst_hdr->smbh_hdl); in smbios_info_boot()
1003 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_IPMIDEV); in smbios_info_ipmi() local
1006 if (stp == NULL) in smbios_info_ipmi()
1009 smb_info_bcopy(stp->smbst_hdr, &i, sizeof (i)); in smbios_info_ipmi()
1053 return (stp->smbst_hdr->smbh_hdl); in smbios_info_ipmi()
1059 const smb_struct_t *stp = shp->sh_structs; in smbios_has_oemstr() local
1063 for (i = 0; i < shp->sh_nstructs; i++, stp++) { in smbios_has_oemstr()
1064 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR) in smbios_has_oemstr()
1067 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_has_oemstr()
1069 if (strcmp(smb_strptr(stp, j + 1), oemstr) == 0) in smbios_has_oemstr()
1103 const smb_struct_t *stp; in smb_get_sn() local
1118 if ((stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM)) == NULL || in smb_get_sn()
1119 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s1) == SMB_ERR) in smb_get_sn()
1123 if ((stp = smb_lookup_type(shp, SMB_TYPE_CHASSIS)) == NULL || in smb_get_sn()
1124 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s3) == SMB_ERR) in smb_get_sn()
1157 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extprocessor() local
1160 if (stp == NULL) in smbios_info_extprocessor()
1163 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PROCESSOR) in smbios_info_extprocessor()
1166 exp = (smb_processor_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extprocessor()
1180 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extport() local
1183 if (stp == NULL) in smbios_info_extport()
1186 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PORT) in smbios_info_extport()
1189 ep = (smb_port_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extport()
1205 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_pciexrc() local
1208 if (stp == NULL) in smbios_info_pciexrc()
1211 if (stp->smbst_hdr->smbh_type != SUN_OEM_PCIEXRC) in smbios_info_pciexrc()
1214 smb_info_bcopy(stp->smbst_hdr, &rc, sizeof (rc)); in smbios_info_pciexrc()
1226 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemarray() local
1229 if (stp == NULL) in smbios_info_extmemarray()
1232 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMARRAY) in smbios_info_extmemarray()
1235 smb_info_bcopy(stp->smbst_hdr, &exma, sizeof (exma)); in smbios_info_extmemarray()
1249 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemdevice() local
1252 if (stp == NULL) in smbios_info_extmemdevice()
1255 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMDEVICE) in smbios_info_extmemdevice()
1258 smb_info_bcopy(stp->smbst_hdr, &exmd, sizeof (exmd)); in smbios_info_extmemdevice()