Print this page
5094 Update libsmbios with recent items
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Robert Mustacchi <rm@joyent.com>
*** 18,27 ****
--- 18,28 ----
*
* CDDL HEADER END
*/
/*
+ * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*** 112,121 ****
--- 113,125 ----
uint8_t smbch_cn; /* number of contained records */
uint8_t smbch_cm; /* size of contained records */
uint8_t smbch_cv[1]; /* array of contained records */
} smb_chassis_t;
+ /* WARNING: the argument is evaluated three times! */
+ #define SMB_CH_SKU(smbcp) ((char *) \
+ (smbcp)->smbch_cv + ((smbcp)->smbch_cn * (smbcp)->smbch_cm))
#define SMB_CHT_LOCK 0x80 /* lock bit within smbch_type */
typedef struct smb_processor {
smb_header_t smbpr_hdr; /* structure header */
uint8_t smbpr_socket; /* socket designation */
*** 134,143 ****
--- 138,152 ----
uint16_t smbpr_l2cache; /* L2 cache handle (if any) */
uint16_t smbpr_l3cache; /* L3 cache handle (if any) */
uint8_t smbpr_serial; /* serial number */
uint8_t smbpr_asset; /* asset tag */
uint8_t smbpr_part; /* part number */
+ uint8_t smbpr_corecount; /* number of cores per socket */
+ uint8_t smbpr_coresenabled; /* number of enabled cores per socket */
+ uint8_t smbpr_threadcount; /* number of threads per socket */
+ uint16_t smbpr_cflags; /* cpu characteristics (see <smbios.h>) */
+ uint16_t smbpr_family2; /* processor family2 (see <smbios.h>) */
} smb_processor_t;
typedef struct smb_cache {
smb_header_t smbca_hdr; /* structure header */
uint8_t smbca_socket; /* socket designation */
*** 151,161 ****
uint8_t smbca_ltype; /* logical cache type */
uint8_t smbca_assoc; /* associativity */
} smb_cache_t;
/*
! * Convert encoded cache size to bytes: DSP0134 Section 3.3.8 explains the
* encoding. The highest bit is 0 for 1k units, 1 for 64k units, and this
* macro decodes the value into bytes for exporting to our clients.
*/
#define SMB_CACHE_SIZE(s) (((s) & 0x8000) ? \
((uint32_t)((s) & 0x7FFF) * 64 * 1024) : ((uint32_t)(s) * 1024))
--- 160,170 ----
uint8_t smbca_ltype; /* logical cache type */
uint8_t smbca_assoc; /* associativity */
} smb_cache_t;
/*
! * Convert encoded cache size to bytes: DSP0134 Section 7.8 explains the
* encoding. The highest bit is 0 for 1k units, 1 for 64k units, and this
* macro decodes the value into bytes for exporting to our clients.
*/
#define SMB_CACHE_SIZE(s) (((s) & 0x8000) ? \
((uint32_t)((s) & 0x7FFF) * 64 * 1024) : ((uint32_t)(s) * 1024))
*** 190,200 ****
uint8_t smbsl_df; /* device/function number */
} smb_slot_t;
typedef struct smb_obdev {
uint8_t smbob_type; /* encoded type and enable bit */
! uint8_t smbob_name; /* descriptiong string */
} smb_obdev_t;
#define SMB_OBT_ENABLED 0x80 /* enable bit within smbob_type */
typedef struct smb_strtab {
--- 199,209 ----
uint8_t smbsl_df; /* device/function number */
} smb_slot_t;
typedef struct smb_obdev {
uint8_t smbob_type; /* encoded type and enable bit */
! uint8_t smbob_name; /* description string */
} smb_obdev_t;
#define SMB_OBT_ENABLED 0x80 /* enable bit within smbob_type */
typedef struct smb_strtab {
*** 231,248 ****
--- 240,260 ----
uint8_t smbmarr_use; /* use */
uint8_t smbmarr_ecc; /* error detect/correct mechanism */
uint32_t smbmarr_cap; /* maximum capacity */
uint16_t smbmarr_err; /* error handle */
uint16_t smbmarr_ndevs; /* number of slots or sockets */
+ uint64_t smbmarr_extcap; /* extended maximum capacity */
} smb_memarray_t;
typedef struct smb_memarrmap {
smb_header_t smbamap_hdr; /* structure header */
uint32_t smbamap_start; /* starting address in kilobytes */
uint32_t smbamap_end; /* ending address in kilobytes */
uint16_t smbamap_array; /* physical memory array handle */
uint8_t smbamap_width; /* partition width */
+ uint64_t smbamap_extstart; /* extended starting address in bytes */
+ uint64_t smbamap_extend; /* extended ending address in bytes */
} smb_memarrmap_t;
typedef struct smb_memdevice {
smb_header_t smbmdev_hdr; /* structure header */
uint16_t smbmdev_array; /* array handle */
*** 259,268 ****
--- 271,286 ----
uint16_t smbmdev_speed; /* speed in MHz */
uint8_t smbmdev_manufacturer; /* manufacturer */
uint8_t smbmdev_serial; /* serial number */
uint8_t smbmdev_asset; /* asset tag */
uint8_t smbmdev_part; /* part number */
+ uint8_t smbmdev_attrs; /* attributes */
+ uint32_t smbmdev_extsize; /* extended size */
+ uint16_t smbmdev_clkspeed; /* configured clock speed */
+ uint16_t smbmdev_minvolt; /* minimum voltage */
+ uint16_t smbmdev_maxvolt; /* maximum voltage */
+ uint16_t smbmdev_confvolt; /* configured voltage */
} smb_memdevice_t;
#define SMB_MDS_KBYTES 0x8000 /* size in specified in kilobytes */
typedef struct smb_memdevmap {
*** 272,281 ****
--- 290,301 ----
uint16_t smbdmap_device; /* memory device handle */
uint16_t smbdmap_array; /* memory array mapped address handle */
uint8_t smbdmap_rpos; /* row position */
uint8_t smbdmap_ipos; /* interleave position */
uint8_t smbdmap_idepth; /* interleave depth */
+ uint64_t smbdmap_extstart; /* extended starting address */
+ uint64_t smbdmap_extend; /* extended ending address */
} smb_memdevmap_t;
typedef struct smb_battery {
smb_header_t smbbat_hdr; /* structure header */
uint8_t smbbat_loc; /* location */