1437Smws /* 2437Smws * CDDL HEADER START 3437Smws * 4437Smws * The contents of this file are subject to the terms of the 5437Smws * Common Development and Distribution License, Version 1.0 only 6437Smws * (the "License"). You may not use this file except in compliance 7437Smws * with the License. 8437Smws * 9437Smws * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10437Smws * or http://www.opensolaris.org/os/licensing. 11437Smws * See the License for the specific language governing permissions 12437Smws * and limitations under the License. 13437Smws * 14437Smws * When distributing Covered Code, include this CDDL HEADER in each 15437Smws * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16437Smws * If applicable, add the following below this CDDL HEADER, with the 17437Smws * fields enclosed by brackets "[]" replaced with your own identifying 18437Smws * information: Portions Copyright [yyyy] [name of copyright owner] 19437Smws * 20437Smws * CDDL HEADER END 21437Smws */ 22437Smws 23437Smws /* 24*1222Smws * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25437Smws * Use is subject to license terms. 26437Smws */ 27437Smws 28437Smws /* 29437Smws * This header file defines the implementation structures for the SMBIOS access 30437Smws * library, libsmbios, and an equivalent kernel module. Clients should use 31437Smws * the <smbios.h> or <sys/smbios.h> header files to access DMTF SMBIOS 32437Smws * information, NOT these underlying implementation structures from the spec. 33437Smws * In short, do not user this header file or these routines for any purpose. 34437Smws */ 35437Smws 36437Smws #ifndef _SYS_SMBIOS_IMPL_H 37437Smws #define _SYS_SMBIOS_IMPL_H 38437Smws 39437Smws #pragma ident "%Z%%M% %I% %E% SMI" 40437Smws 41437Smws #include <sys/smbios.h> 42437Smws #include <sys/sysmacros.h> 43437Smws 44437Smws #ifdef _KERNEL 45437Smws #include <sys/systm.h> 46437Smws #else 47437Smws #include <strings.h> 48437Smws #include <stddef.h> 49437Smws #endif 50437Smws 51437Smws #ifdef __cplusplus 52437Smws extern "C" { 53437Smws #endif 54437Smws 55437Smws #pragma pack(1) 56437Smws 57437Smws typedef struct smb_header { 58437Smws uint8_t smbh_type; /* structure type (SMB_TYPE_* value) */ 59437Smws uint8_t smbh_len; /* length in bytes of formatted area */ 60437Smws uint16_t smbh_hdl; /* structure handle */ 61437Smws } smb_header_t; 62437Smws 63437Smws typedef struct smb_bios { 64437Smws smb_header_t smbbi_hdr; /* structure header */ 65437Smws uint8_t smbbi_vendor; /* bios vendor string */ 66437Smws uint8_t smbbi_version; /* bios version string */ 67437Smws uint16_t smbbi_segment; /* segment location of bios address */ 68437Smws uint8_t smbbi_reldate; /* bios release date */ 69437Smws uint8_t smbbi_romsize; /* bios rom size (64k * (n + 1)) */ 70437Smws uint64_t smbbi_cflags; /* bios characteristics */ 71437Smws uint8_t smbbi_xcflags[1]; /* bios characteristics extensions */ 72437Smws } smb_bios_t; 73437Smws 74437Smws typedef struct smb_system { 75437Smws smb_header_t smbsi_hdr; /* structure header */ 76437Smws uint8_t smbsi_manufacturer; /* manufacturer */ 77437Smws uint8_t smbsi_product; /* product name */ 78437Smws uint8_t smbsi_version; /* version */ 79437Smws uint8_t smbsi_serial; /* serial number */ 80437Smws uint8_t smbsi_uuid[16]; /* UUID */ 81437Smws uint8_t smbsi_wakeup; /* wake-up type */ 82437Smws uint8_t smbsi_sku; /* SKU number */ 83437Smws uint8_t smbsi_family; /* family */ 84437Smws } smb_system_t; 85437Smws 86437Smws typedef struct smb_bboard { 87437Smws smb_header_t smbbb_hdr; /* structure header */ 88437Smws uint8_t smbbb_manufacturer; /* manufacturer */ 89437Smws uint8_t smbbb_product; /* product name */ 90437Smws uint8_t smbbb_version; /* version */ 91437Smws uint8_t smbbb_serial; /* serial number */ 92437Smws uint8_t smbbb_asset; /* asset tag */ 93437Smws uint8_t smbbb_flags; /* feature flags */ 94437Smws uint8_t smbbb_location; /* location in chassis */ 95437Smws uint16_t smbbb_chassis; /* chassis handle */ 96437Smws uint8_t smbbb_type; /* board type */ 97437Smws uint8_t smbbb_cn; /* number of contained handles */ 98437Smws uint16_t smbbb_cv[1]; /* array of contained handles */ 99437Smws } smb_bboard_t; 100437Smws 101437Smws typedef struct smb_chassis { 102437Smws smb_header_t smbch_hdr; /* structure header */ 103437Smws uint8_t smbch_manufacturer; /* manufacturer */ 104437Smws uint8_t smbch_type; /* type */ 105437Smws uint8_t smbch_version; /* version */ 106437Smws uint8_t smbch_serial; /* serial number */ 107437Smws uint8_t smbch_asset; /* asset tag */ 108437Smws uint8_t smbch_bustate; /* boot-up state */ 109437Smws uint8_t smbch_psstate; /* power supply state */ 110437Smws uint8_t smbch_thstate; /* thermal state */ 111437Smws uint8_t smbch_security; /* security state */ 112437Smws uint32_t smbch_oemdata; /* OEM-specific data */ 113437Smws uint8_t smbch_uheight; /* enclosure height */ 114437Smws uint8_t smbch_cords; /* number of power cords */ 115437Smws uint8_t smbch_cn; /* number of contained records */ 116437Smws uint8_t smbch_cm; /* size of contained records */ 117437Smws uint8_t smbch_cv[1]; /* array of contained records */ 118437Smws } smb_chassis_t; 119437Smws 120437Smws #define SMB_CHT_LOCK 0x80 /* lock bit within smbch_type */ 121437Smws 122437Smws typedef struct smb_processor { 123437Smws smb_header_t smbpr_hdr; /* structure header */ 124437Smws uint8_t smbpr_socket; /* socket designation */ 125437Smws uint8_t smbpr_type; /* processor type (see <smbios.h>) */ 126437Smws uint8_t smbpr_family; /* processor family (see <smbios.h>) */ 127437Smws uint8_t smbpr_manufacturer; /* manufacturer */ 128437Smws uint64_t smbpr_cpuid; /* processor cpuid information */ 129437Smws uint8_t smbpr_version; /* version */ 130437Smws uint8_t smbpr_voltage; /* voltage */ 131437Smws uint16_t smbpr_clkspeed; /* external clock speed in MHz */ 132437Smws uint16_t smbpr_maxspeed; /* maximum speed in MHz */ 133437Smws uint16_t smbpr_curspeed; /* current speed in MHz */ 134437Smws uint8_t smbpr_status; /* status (see <smbios.h>) */ 135437Smws uint8_t smbpr_upgrade; /* upgrade */ 136437Smws uint16_t smbpr_l1cache; /* L1 cache handle (if any) */ 137437Smws uint16_t smbpr_l2cache; /* L2 cache handle (if any) */ 138437Smws uint16_t smbpr_l3cache; /* L3 cache handle (if any) */ 139437Smws uint8_t smbpr_serial; /* serial number */ 140437Smws uint8_t smbpr_asset; /* asset tag */ 141437Smws uint8_t smbpr_part; /* part number */ 142437Smws } smb_processor_t; 143437Smws 144437Smws typedef struct smb_cache { 145437Smws smb_header_t smbca_hdr; /* structure header */ 146437Smws uint8_t smbca_socket; /* socket designation */ 147437Smws uint16_t smbca_config; /* cache configuration */ 148437Smws uint16_t smbca_maxsize; /* maximum installed size */ 149437Smws uint16_t smbca_size; /* installed size */ 150437Smws uint16_t smbca_stype; /* supported SRAM type */ 151437Smws uint16_t smbca_ctype; /* current SRAM type */ 152437Smws uint8_t smbca_speed; /* speed in nanoseconds */ 153437Smws uint8_t smbca_etype; /* error correction type */ 154437Smws uint8_t smbca_ltype; /* logical cache type */ 155437Smws uint8_t smbca_assoc; /* associativity */ 156437Smws } smb_cache_t; 157437Smws 158*1222Smws /* 159*1222Smws * Convert encoded cache size to bytes: DSP0134 Section 3.3.8 explains the 160*1222Smws * encoding. The highest bit is 0 for 1k units, 1 for 64k units, and this 161*1222Smws * macro decodes the value into bytes for exporting to our clients. 162*1222Smws */ 163*1222Smws #define SMB_CACHE_SIZE(s) (((s) & 0x8000) ? \ 164*1222Smws ((uint32_t)((s) & 0x7FFF) * 64 * 1024) : ((uint32_t)(s) * 1024)) 165437Smws 166437Smws #define SMB_CACHE_CFG_MODE(c) (((c) >> 8) & 3) 167437Smws #define SMB_CACHE_CFG_ENABLED(c) (((c) >> 7) & 1) 168437Smws #define SMB_CACHE_CFG_LOCATION(c) (((c) >> 5) & 3) 169437Smws #define SMB_CACHE_CFG_SOCKETED(c) (((c) >> 3) & 1) 170437Smws #define SMB_CACHE_CFG_LEVEL(c) (((c) & 7) + 1) 171437Smws 172437Smws typedef struct smb_port { 173437Smws smb_header_t smbpo_hdr; /* structure header */ 174437Smws uint8_t smbpo_iref; /* internal reference designator */ 175437Smws uint8_t smbpo_itype; /* internal connector type */ 176437Smws uint8_t smbpo_eref; /* external reference designator */ 177437Smws uint8_t smbpo_etype; /* external connector type */ 178437Smws uint8_t smbpo_ptype; /* port type */ 179437Smws } smb_port_t; 180437Smws 181437Smws typedef struct smb_slot { 182437Smws smb_header_t smbsl_hdr; /* structure header */ 183437Smws uint8_t smbsl_name; /* reference designation */ 184437Smws uint8_t smbsl_type; /* slot type */ 185437Smws uint8_t smbsl_width; /* slot data bus width */ 186437Smws uint8_t smbsl_usage; /* current usage */ 187437Smws uint8_t smbsl_length; /* slot length */ 188437Smws uint16_t smbsl_id; /* slot ID */ 189437Smws uint8_t smbsl_ch1; /* slot characteristics 1 */ 190437Smws uint8_t smbsl_ch2; /* slot characteristics 2 */ 191437Smws } smb_slot_t; 192437Smws 193437Smws typedef struct smb_obdev { 194437Smws uint8_t smbob_type; /* encoded type and enable bit */ 195437Smws uint8_t smbob_name; /* descriptiong string */ 196437Smws } smb_obdev_t; 197437Smws 198437Smws #define SMB_OBT_ENABLED 0x80 /* enable bit within smbob_type */ 199437Smws 200437Smws typedef struct smb_strtab { 201437Smws smb_header_t smbtb_hdr; /* structure header */ 202437Smws uint8_t smbtb_count; /* number of strings */ 203437Smws } smb_strtab_t; 204437Smws 205437Smws typedef struct smb_lang { 206437Smws smb_header_t smblang_hdr; /* structure header */ 207437Smws uint8_t smblang_num; /* number of installed languages */ 208437Smws uint8_t smblang_flags; /* flags */ 209437Smws uint8_t smblang_resv[15]; /* reserved for future use */ 210437Smws uint8_t smblang_cur; /* current language string */ 211437Smws } smb_lang_t; 212437Smws 213437Smws typedef struct smb_sel { 214437Smws smb_header_t smbsel_hdr; /* structure header */ 215437Smws uint16_t smbsel_len; /* log area length */ 216437Smws uint16_t smbsel_hdroff; /* header offset */ 217437Smws uint16_t smbsel_dataoff; /* data offset */ 218437Smws uint8_t smbsel_method; /* access method */ 219437Smws uint8_t smbsel_status; /* status flags */ 220437Smws uint32_t smbsel_token; /* change token */ 221437Smws uint32_t smbsel_addr; /* access method address */ 222437Smws uint8_t smbsel_format; /* header format */ 223437Smws uint8_t smbsel_typec; /* number of type descriptors */ 224437Smws uint8_t smbsel_typesz; /* size of each type descriptor */ 225437Smws uint8_t smbsel_typev[1]; /* array of type descriptors */ 226437Smws } smb_sel_t; 227437Smws 228437Smws typedef struct smb_memarray { 229437Smws smb_header_t smbmarr_hdr; /* structure header */ 230437Smws uint8_t smbmarr_loc; /* location */ 231437Smws uint8_t smbmarr_use; /* use */ 232437Smws uint8_t smbmarr_ecc; /* error detect/correct mechanism */ 233437Smws uint32_t smbmarr_cap; /* maximum capacity */ 234437Smws uint16_t smbmarr_err; /* error handle */ 235437Smws uint16_t smbmarr_ndevs; /* number of slots or sockets */ 236437Smws } smb_memarray_t; 237437Smws 238437Smws typedef struct smb_memarrmap { 239437Smws smb_header_t smbamap_hdr; /* structure header */ 240437Smws uint32_t smbamap_start; /* starting address in kilobytes */ 241437Smws uint32_t smbamap_end; /* ending address in kilobytes */ 242437Smws uint16_t smbamap_array; /* physical memory array handle */ 243437Smws uint8_t smbamap_width; /* partition width */ 244437Smws } smb_memarrmap_t; 245437Smws 246437Smws typedef struct smb_memdevice { 247437Smws smb_header_t smbmdev_hdr; /* structure header */ 248437Smws uint16_t smbmdev_array; /* array handle */ 249437Smws uint16_t smbmdev_error; /* error handle */ 250437Smws uint16_t smbmdev_twidth; /* total width */ 251437Smws uint16_t smbmdev_dwidth; /* data width */ 252437Smws uint16_t smbmdev_size; /* size in either K or MB */ 253437Smws uint8_t smbmdev_form; /* form factor */ 254437Smws uint8_t smbmdev_set; /* device set */ 255437Smws uint8_t smbmdev_dloc; /* device locator */ 256437Smws uint8_t smbmdev_bloc; /* bank locator */ 257437Smws uint8_t smbmdev_type; /* memory type */ 258437Smws uint16_t smbmdev_flags; /* detail flags */ 259437Smws uint16_t smbmdev_speed; /* speed in MHz */ 260437Smws uint8_t smbmdev_manufacturer; /* manufacturer */ 261437Smws uint8_t smbmdev_serial; /* serial number */ 262437Smws uint8_t smbmdev_asset; /* asset tag */ 263437Smws uint8_t smbmdev_part; /* part number */ 264437Smws } smb_memdevice_t; 265437Smws 266437Smws #define SMB_MDS_KBYTES 0x8000 /* size in specified in kilobytes */ 267437Smws 268437Smws typedef struct smb_memdevmap { 269437Smws smb_header_t smbdmap_hdr; /* structure header */ 270437Smws uint32_t smbdmap_start; /* starting address in kilobytes */ 271437Smws uint32_t smbdmap_end; /* ending address in kilobytes */ 272437Smws uint16_t smbdmap_device; /* memory device handle */ 273437Smws uint16_t smbdmap_array; /* memory array mapped address handle */ 274437Smws uint8_t smbdmap_rpos; /* row position */ 275437Smws uint8_t smbdmap_ipos; /* interleave position */ 276437Smws uint8_t smbdmap_idepth; /* interleave depth */ 277437Smws } smb_memdevmap_t; 278437Smws 279437Smws typedef struct smb_battery { 280437Smws smb_header_t smbbat_hdr; /* structure header */ 281437Smws uint8_t smbbat_loc; /* location */ 282437Smws uint8_t smbbat_manufacturer; /* manufacturer */ 283437Smws uint8_t smbbat_date; /* manufacture date */ 284437Smws uint8_t smbbat_serial; /* serial number */ 285437Smws uint8_t smbbat_devname; /* device name */ 286437Smws uint8_t smbbat_chem; /* device chemistry */ 287437Smws uint16_t smbbat_cap; /* design capacity in mW hours */ 288437Smws uint16_t smbbat_volt; /* design voltage in mV */ 289437Smws uint8_t smbbat_version; /* SBDS version string */ 290437Smws uint8_t smbbat_err; /* error percentage */ 291437Smws uint16_t smbbat_ssn; /* SBDS serial number */ 292437Smws uint16_t smbbat_sdate; /* SBDS manufacture date */ 293437Smws uint8_t smbbat_schem; /* SBDS chemistry string */ 294437Smws uint8_t smbbat_mult; /* design capacity multiplier */ 295437Smws uint32_t smbbat_oemdata; /* OEM-specific data */ 296437Smws } smb_battery_t; 297437Smws 298437Smws typedef struct smb_hwsec { 299437Smws smb_header_t smbhs_hdr; /* structure header */ 300437Smws uint8_t smbhs_settings; /* settings byte */ 301437Smws } smb_hwsec_t; 302437Smws 303437Smws #define SMB_HWS_PWR_PS(x) (((x) & 0xC0) >> 6) 304437Smws #define SMB_HWS_KBD_PS(x) (((x) & 0x30) >> 4) 305437Smws #define SMB_HWS_ADM_PS(x) (((x) & 0x0C) >> 2) 306437Smws #define SMB_HWS_PAN_PS(x) (((x) & 0x03) >> 0) 307437Smws 308437Smws typedef struct smb_boot { 309437Smws smb_header_t smbbo_hdr; /* structure header */ 310437Smws uint8_t smbbo_pad[6]; /* reserved for future use */ 311437Smws uint8_t smbbo_status[1]; /* variable-length status buffer */ 312437Smws } smb_boot_t; 313437Smws 314437Smws typedef struct smb_ipmi { 315437Smws smb_header_t smbipm_hdr; /* structure header */ 316437Smws uint8_t smbipm_type; /* interface type */ 317437Smws uint8_t smbipm_spec; /* specification revision */ 318437Smws uint8_t smbipm_i2c; /* i2C slave address */ 319437Smws uint8_t smbipm_bus; /* NV storage device bus ID */ 320437Smws uint64_t smbipm_addr; /* base address */ 321437Smws uint8_t smbipm_info; /* base address modifier/intr info */ 322437Smws uint8_t smbipm_intr; /* interrupt number */ 323437Smws } smb_ipmi_t; 324437Smws 325437Smws #define SMB_IPM_SPEC_MAJOR(x) (((x) & 0xF0) >> 4) 326437Smws #define SMB_IPM_SPEC_MINOR(x) ((x) & 0x0F) 327437Smws 328437Smws #define SMB_IPM_ADDR_IO 1ULL 329437Smws 330437Smws #define SMB_IPM_INFO_REGS(x) (((x) & 0xC0) >> 6) 331437Smws #define SMB_IPM_INFO_LSB(x) (((x) & 0x10) >> 4) 332437Smws #define SMB_IPM_INFO_ISPEC(x) (((x) & 0x08) >> 3) 333437Smws #define SMB_IPM_INFO_IPOL(x) (((x) & 0x02) >> 1) 334437Smws #define SMB_IPM_INFO_IMODE(x) (((x) & 0x01) >> 0) 335437Smws 336437Smws #define SMB_IPM_REGS_1B 0 337437Smws #define SMB_IPM_REGS_4B 1 338437Smws #define SMB_IPM_REGS_16B 2 339437Smws 340437Smws #define SMB_IPM_IPOL_LO 0 341437Smws #define SMB_IPM_IPOL_HI 1 342437Smws 343437Smws #define SMB_IPM_IMODE_EDGE 0 344437Smws #define SMB_IPM_IMODE_LEVEL 1 345437Smws 346437Smws typedef struct smb_powersup { 347437Smws smb_header_t smbpsup_hdr; /* structure header */ 348437Smws uint8_t smbpsup_group; /* group id */ 349437Smws uint8_t smbpsup_loc; /* location tag */ 350437Smws uint8_t smbpsup_devname; /* device name */ 351437Smws uint8_t smbpsup_manufacturer; /* manufacturer */ 352437Smws uint8_t smbpsup_serial; /* serial number */ 353437Smws uint8_t smbpsup_asset; /* asset tag */ 354437Smws uint8_t smbpsup_part; /* part number */ 355437Smws uint8_t smbpsup_rev; /* revision string */ 356437Smws uint16_t smbpsup_max; /* max output in milliwatts */ 357437Smws uint16_t smbpsup_char; /* characteristics */ 358437Smws uint16_t smbpsup_vprobe; /* voltage probe handle */ 359437Smws uint16_t smbpsup_cooldev; /* cooling device handle */ 360437Smws uint16_t smbpsup_iprobe; /* current probe handle */ 361437Smws } smb_powersup_t; 362437Smws 363437Smws #pragma pack() 364437Smws 365437Smws typedef struct smb_struct { 366437Smws const smb_header_t *smbst_hdr; /* address of raw structure data */ 367437Smws const uchar_t *smbst_str; /* address of string data (if any) */ 368437Smws const uchar_t *smbst_end; /* address of 0x0000 ending tag */ 369437Smws struct smb_struct *smbst_next; /* next structure in hash chain */ 370437Smws uint16_t *smbst_strtab; /* string index -> offset table */ 371437Smws uint_t smbst_strtablen; /* length of smbst_strtab */ 372437Smws } smb_struct_t; 373437Smws 374437Smws struct smbios_hdl { 375437Smws smbios_entry_t sh_ent; /* structure table entry point */ 376437Smws const void *sh_buf; /* structure table buffer */ 377437Smws size_t sh_buflen; /* size of structure table buffer */ 378437Smws smb_struct_t *sh_structs; /* array of structure descriptors */ 379437Smws uint_t sh_nstructs; /* number of active structures */ 380437Smws smb_struct_t **sh_hash; /* hash bucket array for descriptors */ 381437Smws uint_t sh_hashlen; /* hash bucket array length */ 382437Smws int sh_err; /* error code for smbios_errno() */ 383437Smws int sh_libvers; /* library client abi version */ 384437Smws int sh_smbvers; /* derived underlying format version */ 385437Smws uint_t sh_flags; /* miscellaneous flags (see below) */ 386437Smws }; 387437Smws 388437Smws #define SMB_FL_DEBUG 0x1 /* print debug messages for this hdl */ 389437Smws #define SMB_FL_BUFALLOC 0x2 /* sh_buf was allocated by library */ 390437Smws 391437Smws #define SMB_BIOS_DEVICE "/dev/xsvc" /* device w/ BIOS physmem */ 392437Smws #define SMB_SMBIOS_DEVICE "/dev/smbios" /* device w/ SMBIOS image */ 393437Smws 394437Smws #define SMB_RANGE_START 0xF0000 /* start of physical address range */ 395437Smws #define SMB_RANGE_LIMIT 0xFFFFF /* limit of physical address range */ 396437Smws 397437Smws #define SMB_MAJMIN(M, m) ((((M) & 0xFF) << 16) | ((m) & 0xFF)) 398437Smws #define SMB_MAJOR(v) (((v) & 0xFF00) >> 8) 399437Smws #define SMB_MINOR(v) (((v) & 0x00FF)) 400437Smws 401437Smws #define ESMB_BASE 1000 /* base value for libsmbios errnos */ 402437Smws 403437Smws enum { 404437Smws ESMB_NOTFOUND = ESMB_BASE, /* SMBIOS table not found on system */ 405437Smws ESMB_MAPDEV, /* failed to map SMBIOS table */ 406437Smws ESMB_NOENT, /* failed to locate structure */ 407437Smws ESMB_NOMEM, /* failed to allocate memory */ 408437Smws ESMB_NOHDR, /* failed to read SMBIOS header */ 409437Smws ESMB_NOSTAB, /* failed to read SMBIOS struct table */ 410437Smws ESMB_NOINFO, /* no common info for structure */ 411437Smws ESMB_SHORT, /* buffer length doesn't match header */ 412437Smws ESMB_CORRUPT, /* buffer struct or len is corrupt */ 413437Smws ESMB_VERSION, /* version not supported by library */ 414437Smws ESMB_NOTSUP, /* feature not supported by provider */ 415437Smws ESMB_HEADER, /* SMBIOS header corrupt or invalid */ 416437Smws ESMB_OLD, /* SMBIOS version is too old for us */ 417437Smws ESMB_NEW, /* SMBIOS version is too new for us */ 418437Smws ESMB_CKSUM, /* SMBIOS header checksum mismatch */ 419437Smws ESMB_INVAL, /* invalid function call argument */ 420437Smws ESMB_TYPE, /* structure type mismatch */ 421437Smws ESMB_UNKNOWN /* unknown error (maximum value tag) */ 422437Smws }; 423437Smws 424437Smws extern const smb_struct_t *smb_lookup_type(smbios_hdl_t *, uint_t); 425437Smws extern const smb_struct_t *smb_lookup_id(smbios_hdl_t *, uint_t); 426437Smws extern const char *smb_strptr(const smb_struct_t *, uint_t); 427437Smws extern int smb_gteq(smbios_hdl_t *, int); 428437Smws 429437Smws extern int smb_set_errno(smbios_hdl_t *, int); 430437Smws extern smbios_hdl_t *smb_open_error(smbios_hdl_t *, int *, int); 431437Smws extern const char *smb_strerror(int); 432437Smws 433437Smws extern void *smb_alloc(size_t); 434437Smws extern void *smb_zalloc(size_t); 435437Smws extern void smb_free(void *, size_t); 436437Smws 437437Smws extern void smb_dprintf(smbios_hdl_t *, const char *, ...); 438437Smws 439437Smws extern int _smb_debug; 440437Smws 441437Smws #ifdef __cplusplus 442437Smws } 443437Smws #endif 444437Smws 445437Smws #endif /* _SYS_SMBIOS_IMPL_H */ 446