Print this page
SKU fix for 5094
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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/smbios_impl.h
          +++ new/usr/src/uts/common/sys/smbios_impl.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
       23 + * Copyright 2015 OmniTI Computer Consulting, Inc.  All rights reserved.
  23   24   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  /*
  28   29   * This header file defines the implementation structures for the SMBIOS access
  29   30   * library, libsmbios, and an equivalent kernel module.  Clients should use
  30   31   * the <smbios.h> or <sys/smbios.h> header files to access DMTF SMBIOS
  31   32   * information, NOT these underlying implementation structures from the spec.
  32   33   * In short, do not user this header file or these routines for any purpose.
↓ open down ↓ 74 lines elided ↑ open up ↑
 107  108          uint8_t smbch_thstate;          /* thermal state */
 108  109          uint8_t smbch_security;         /* security state */
 109  110          uint32_t smbch_oemdata;         /* OEM-specific data */
 110  111          uint8_t smbch_uheight;          /* enclosure height */
 111  112          uint8_t smbch_cords;            /* number of power cords */
 112  113          uint8_t smbch_cn;               /* number of contained records */
 113  114          uint8_t smbch_cm;               /* size of contained records */
 114  115          uint8_t smbch_cv[1];            /* array of contained records */
 115  116  } smb_chassis_t;
 116  117  
      118 +/* WARNING: the argument is evaluated three times! */
      119 +#define SMB_CH_SKU(smbcp) ((char *) \
      120 +        (smbcp)->smbch_cv + ((smbcp)->smbch_cn * (smbcp)->smbch_cm))
 117  121  #define SMB_CHT_LOCK    0x80            /* lock bit within smbch_type */
 118  122  
 119  123  typedef struct smb_processor {
 120  124          smb_header_t smbpr_hdr;         /* structure header */
 121  125          uint8_t smbpr_socket;           /* socket designation */
 122  126          uint8_t smbpr_type;             /* processor type (see <smbios.h>) */
 123  127          uint8_t smbpr_family;           /* processor family (see <smbios.h>) */
 124  128          uint8_t smbpr_manufacturer;     /* manufacturer */
 125  129          uint64_t smbpr_cpuid;           /* processor cpuid information */
 126  130          uint8_t smbpr_version;          /* version */
↓ open down ↓ 2 lines elided ↑ open up ↑
 129  133          uint16_t smbpr_maxspeed;        /* maximum speed in MHz */
 130  134          uint16_t smbpr_curspeed;        /* current speed in MHz */
 131  135          uint8_t smbpr_status;           /* status (see <smbios.h>) */
 132  136          uint8_t smbpr_upgrade;          /* upgrade */
 133  137          uint16_t smbpr_l1cache;         /* L1 cache handle (if any) */
 134  138          uint16_t smbpr_l2cache;         /* L2 cache handle (if any) */
 135  139          uint16_t smbpr_l3cache;         /* L3 cache handle (if any) */
 136  140          uint8_t smbpr_serial;           /* serial number */
 137  141          uint8_t smbpr_asset;            /* asset tag */
 138  142          uint8_t smbpr_part;             /* part number */
      143 +        uint8_t smbpr_corecount;        /* number of cores per socket */
      144 +        uint8_t smbpr_coresenabled;     /* number of enabled cores per socket */
      145 +        uint8_t smbpr_threadcount;      /* number of threads per socket */
      146 +        uint16_t smbpr_cflags;  /* cpu characteristics (see <smbios.h>) */
      147 +        uint16_t smbpr_family2;         /* processor family2 (see <smbios.h>) */
 139  148  } smb_processor_t;
 140  149  
 141  150  typedef struct smb_cache {
 142  151          smb_header_t smbca_hdr;         /* structure header */
 143  152          uint8_t smbca_socket;           /* socket designation */
 144  153          uint16_t smbca_config;          /* cache configuration */
 145  154          uint16_t smbca_maxsize;         /* maximum installed size */
 146  155          uint16_t smbca_size;            /* installed size */
 147  156          uint16_t smbca_stype;           /* supported SRAM type */
 148  157          uint16_t smbca_ctype;           /* current SRAM type */
 149  158          uint8_t smbca_speed;            /* speed in nanoseconds */
 150  159          uint8_t smbca_etype;            /* error correction type */
 151  160          uint8_t smbca_ltype;            /* logical cache type */
 152  161          uint8_t smbca_assoc;            /* associativity */
 153  162  } smb_cache_t;
 154  163  
 155  164  /*
 156      - * Convert encoded cache size to bytes: DSP0134 Section 3.3.8 explains the
      165 + * Convert encoded cache size to bytes: DSP0134 Section 7.8 explains the
 157  166   * encoding.  The highest bit is 0 for 1k units, 1 for 64k units, and this
 158  167   * macro decodes the value into bytes for exporting to our clients.
 159  168   */
 160  169  #define SMB_CACHE_SIZE(s)       (((s) & 0x8000) ? \
 161  170          ((uint32_t)((s) & 0x7FFF) * 64 * 1024) : ((uint32_t)(s) * 1024))
 162  171  
 163  172  #define SMB_CACHE_CFG_MODE(c)           (((c) >> 8) & 3)
 164  173  #define SMB_CACHE_CFG_ENABLED(c)        (((c) >> 7) & 1)
 165  174  #define SMB_CACHE_CFG_LOCATION(c)       (((c) >> 5) & 3)
 166  175  #define SMB_CACHE_CFG_SOCKETED(c)       (((c) >> 3) & 1)
↓ open down ↓ 18 lines elided ↑ open up ↑
 185  194          uint16_t smbsl_id;              /* slot ID */
 186  195          uint8_t smbsl_ch1;              /* slot characteristics 1 */
 187  196          uint8_t smbsl_ch2;              /* slot characteristics 2 */
 188  197          uint16_t smbsl_sg;              /* segment group number */
 189  198          uint8_t smbsl_bus;              /* bus number */
 190  199          uint8_t smbsl_df;               /* device/function number */
 191  200  } smb_slot_t;
 192  201  
 193  202  typedef struct smb_obdev {
 194  203          uint8_t smbob_type;             /* encoded type and enable bit */
 195      -        uint8_t smbob_name;             /* descriptiong string */
      204 +        uint8_t smbob_name;             /* description string */
 196  205  } smb_obdev_t;
 197  206  
 198  207  #define SMB_OBT_ENABLED         0x80    /* enable bit within smbob_type */
 199  208  
 200  209  typedef struct smb_strtab {
 201  210          smb_header_t smbtb_hdr;         /* structure header */
 202  211          uint8_t smbtb_count;            /* number of strings */
 203  212  } smb_strtab_t;
 204  213  
 205  214  typedef struct smb_lang {
↓ open down ↓ 20 lines elided ↑ open up ↑
 226  235  } smb_sel_t;
 227  236  
 228  237  typedef struct smb_memarray {
 229  238          smb_header_t smbmarr_hdr;       /* structure header */
 230  239          uint8_t smbmarr_loc;            /* location */
 231  240          uint8_t smbmarr_use;            /* use */
 232  241          uint8_t smbmarr_ecc;            /* error detect/correct mechanism */
 233  242          uint32_t smbmarr_cap;           /* maximum capacity */
 234  243          uint16_t smbmarr_err;           /* error handle */
 235  244          uint16_t smbmarr_ndevs;         /* number of slots or sockets */
      245 +        uint64_t smbmarr_extcap;        /* extended maximum capacity */
 236  246  } smb_memarray_t;
 237  247  
 238  248  typedef struct smb_memarrmap {
 239  249          smb_header_t smbamap_hdr;       /* structure header */
 240  250          uint32_t smbamap_start;         /* starting address in kilobytes */
 241  251          uint32_t smbamap_end;           /* ending address in kilobytes */
 242  252          uint16_t smbamap_array;         /* physical memory array handle */
 243  253          uint8_t smbamap_width;          /* partition width */
      254 +        uint64_t smbamap_extstart;      /* extended starting address in bytes */
      255 +        uint64_t smbamap_extend;        /* extended ending address in bytes */
 244  256  } smb_memarrmap_t;
 245  257  
 246  258  typedef struct smb_memdevice {
 247  259          smb_header_t smbmdev_hdr;       /* structure header */
 248  260          uint16_t smbmdev_array;         /* array handle */
 249  261          uint16_t smbmdev_error;         /* error handle */
 250  262          uint16_t smbmdev_twidth;        /* total width */
 251  263          uint16_t smbmdev_dwidth;        /* data width */
 252  264          uint16_t smbmdev_size;          /* size in either K or MB */
 253  265          uint8_t smbmdev_form;           /* form factor */
 254  266          uint8_t smbmdev_set;            /* device set */
 255  267          uint8_t smbmdev_dloc;           /* device locator */
 256  268          uint8_t smbmdev_bloc;           /* bank locator */
 257  269          uint8_t smbmdev_type;           /* memory type */
 258  270          uint16_t smbmdev_flags;         /* detail flags */
 259  271          uint16_t smbmdev_speed;         /* speed in MHz */
 260  272          uint8_t smbmdev_manufacturer;   /* manufacturer */
 261  273          uint8_t smbmdev_serial;         /* serial number */
 262  274          uint8_t smbmdev_asset;          /* asset tag */
 263  275          uint8_t smbmdev_part;           /* part number */
      276 +        uint8_t smbmdev_attrs;          /* attributes */
      277 +        uint32_t smbmdev_extsize;       /* extended size */
      278 +        uint16_t smbmdev_clkspeed;      /* configured clock speed */
      279 +        uint16_t smbmdev_minvolt;       /* minimum voltage */
      280 +        uint16_t smbmdev_maxvolt;       /* maximum voltage */
      281 +        uint16_t smbmdev_confvolt;      /* configured voltage */
 264  282  } smb_memdevice_t;
 265  283  
 266  284  #define SMB_MDS_KBYTES          0x8000  /* size in specified in kilobytes */
 267  285  
 268  286  typedef struct smb_memdevmap {
 269  287          smb_header_t smbdmap_hdr;       /* structure header */
 270  288          uint32_t smbdmap_start;         /* starting address in kilobytes */
 271  289          uint32_t smbdmap_end;           /* ending address in kilobytes */
 272  290          uint16_t smbdmap_device;        /* memory device handle */
 273  291          uint16_t smbdmap_array;         /* memory array mapped address handle */
 274  292          uint8_t smbdmap_rpos;           /* row position */
 275  293          uint8_t smbdmap_ipos;           /* interleave position */
 276  294          uint8_t smbdmap_idepth;         /* interleave depth */
      295 +        uint64_t smbdmap_extstart;      /* extended starting address */
      296 +        uint64_t smbdmap_extend;        /* extended ending address */
 277  297  } smb_memdevmap_t;
 278  298  
 279  299  typedef struct smb_battery {
 280  300          smb_header_t smbbat_hdr;        /* structure header */
 281  301          uint8_t smbbat_loc;             /* location */
 282  302          uint8_t smbbat_manufacturer;    /* manufacturer */
 283  303          uint8_t smbbat_date;            /* manufacture date */
 284  304          uint8_t smbbat_serial;          /* serial number */
 285  305          uint8_t smbbat_devname;         /* device name */
 286  306          uint8_t smbbat_chem;            /* device chemistry */
↓ open down ↓ 207 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX