Home | History | Annotate | Line # | Download | only in inc
libsmbios.h revision 1.1.1.1.4.2
      1  1.1.1.1.4.2  rmind /*	$NetBSD: libsmbios.h,v 1.1.1.1.4.2 2014/05/18 17:46:02 rmind Exp $	*/
      2  1.1.1.1.4.2  rmind 
      3  1.1.1.1.4.2  rmind #ifndef _LIB_SMBIOS_H
      4  1.1.1.1.4.2  rmind #define _LIB_SMBIOS_H
      5  1.1.1.1.4.2  rmind /*++
      6  1.1.1.1.4.2  rmind 
      7  1.1.1.1.4.2  rmind Copyright (c) 2000  Intel Corporation
      8  1.1.1.1.4.2  rmind 
      9  1.1.1.1.4.2  rmind Module Name:
     10  1.1.1.1.4.2  rmind 
     11  1.1.1.1.4.2  rmind     LibSmbios.h
     12  1.1.1.1.4.2  rmind 
     13  1.1.1.1.4.2  rmind Abstract:
     14  1.1.1.1.4.2  rmind 
     15  1.1.1.1.4.2  rmind     Lib include  for SMBIOS services. Used to get system serial number and GUID
     16  1.1.1.1.4.2  rmind 
     17  1.1.1.1.4.2  rmind Revision History
     18  1.1.1.1.4.2  rmind 
     19  1.1.1.1.4.2  rmind --*/
     20  1.1.1.1.4.2  rmind 
     21  1.1.1.1.4.2  rmind //
     22  1.1.1.1.4.2  rmind // Define SMBIOS tables.
     23  1.1.1.1.4.2  rmind //
     24  1.1.1.1.4.2  rmind #pragma pack(1)
     25  1.1.1.1.4.2  rmind typedef struct {
     26  1.1.1.1.4.2  rmind     UINT8   AnchorString[4];
     27  1.1.1.1.4.2  rmind     UINT8   EntryPointStructureChecksum;
     28  1.1.1.1.4.2  rmind     UINT8   EntryPointLength;
     29  1.1.1.1.4.2  rmind     UINT8   MajorVersion;
     30  1.1.1.1.4.2  rmind     UINT8   MinorVersion;
     31  1.1.1.1.4.2  rmind     UINT16  MaxStructureSize;
     32  1.1.1.1.4.2  rmind     UINT8   EntryPointRevision;
     33  1.1.1.1.4.2  rmind     UINT8   FormattedArea[5];
     34  1.1.1.1.4.2  rmind     UINT8   IntermediateAnchorString[5];
     35  1.1.1.1.4.2  rmind     UINT8   IntermediateChecksum;
     36  1.1.1.1.4.2  rmind     UINT16  TableLength;
     37  1.1.1.1.4.2  rmind     UINT32  TableAddress;
     38  1.1.1.1.4.2  rmind     UINT16  NumberOfSmbiosStructures;
     39  1.1.1.1.4.2  rmind     UINT8   SmbiosBcdRevision;
     40  1.1.1.1.4.2  rmind } SMBIOS_STRUCTURE_TABLE;
     41  1.1.1.1.4.2  rmind 
     42  1.1.1.1.4.2  rmind //
     43  1.1.1.1.4.2  rmind // Please note that SMBIOS structures can be odd byte aligned since the
     44  1.1.1.1.4.2  rmind //  unformated section of each record is a set of arbitrary size strings.
     45  1.1.1.1.4.2  rmind //
     46  1.1.1.1.4.2  rmind 
     47  1.1.1.1.4.2  rmind typedef struct {
     48  1.1.1.1.4.2  rmind     UINT8   Type;
     49  1.1.1.1.4.2  rmind     UINT8   Length;
     50  1.1.1.1.4.2  rmind     UINT8   Handle[2];
     51  1.1.1.1.4.2  rmind } SMBIOS_HEADER;
     52  1.1.1.1.4.2  rmind 
     53  1.1.1.1.4.2  rmind typedef UINT8   SMBIOS_STRING;
     54  1.1.1.1.4.2  rmind 
     55  1.1.1.1.4.2  rmind typedef struct {
     56  1.1.1.1.4.2  rmind     SMBIOS_HEADER   Hdr;
     57  1.1.1.1.4.2  rmind     SMBIOS_STRING   Vendor;
     58  1.1.1.1.4.2  rmind     SMBIOS_STRING   BiosVersion;
     59  1.1.1.1.4.2  rmind     UINT8           BiosSegment[2];
     60  1.1.1.1.4.2  rmind     SMBIOS_STRING   BiosReleaseDate;
     61  1.1.1.1.4.2  rmind     UINT8           BiosSize;
     62  1.1.1.1.4.2  rmind     UINT8           BiosCharacteristics[8];
     63  1.1.1.1.4.2  rmind } SMBIOS_TYPE0;
     64  1.1.1.1.4.2  rmind 
     65  1.1.1.1.4.2  rmind typedef struct {
     66  1.1.1.1.4.2  rmind     SMBIOS_HEADER   Hdr;
     67  1.1.1.1.4.2  rmind     SMBIOS_STRING   Manufacturer;
     68  1.1.1.1.4.2  rmind     SMBIOS_STRING   ProductName;
     69  1.1.1.1.4.2  rmind     SMBIOS_STRING   Version;
     70  1.1.1.1.4.2  rmind     SMBIOS_STRING   SerialNumber;
     71  1.1.1.1.4.2  rmind 
     72  1.1.1.1.4.2  rmind     //
     73  1.1.1.1.4.2  rmind     // always byte copy this data to prevent alignment faults!
     74  1.1.1.1.4.2  rmind     //
     75  1.1.1.1.4.2  rmind     EFI_GUID        Uuid;
     76  1.1.1.1.4.2  rmind 
     77  1.1.1.1.4.2  rmind     UINT8           WakeUpType;
     78  1.1.1.1.4.2  rmind } SMBIOS_TYPE1;
     79  1.1.1.1.4.2  rmind 
     80  1.1.1.1.4.2  rmind typedef struct {
     81  1.1.1.1.4.2  rmind     SMBIOS_HEADER   Hdr;
     82  1.1.1.1.4.2  rmind     SMBIOS_STRING   Manufacturer;
     83  1.1.1.1.4.2  rmind     SMBIOS_STRING   ProductName;
     84  1.1.1.1.4.2  rmind     SMBIOS_STRING   Version;
     85  1.1.1.1.4.2  rmind     SMBIOS_STRING   SerialNumber;
     86  1.1.1.1.4.2  rmind } SMBIOS_TYPE2;
     87  1.1.1.1.4.2  rmind 
     88  1.1.1.1.4.2  rmind typedef struct {
     89  1.1.1.1.4.2  rmind     SMBIOS_HEADER   Hdr;
     90  1.1.1.1.4.2  rmind     SMBIOS_STRING   Manufacturer;
     91  1.1.1.1.4.2  rmind     UINT8           Type;
     92  1.1.1.1.4.2  rmind     SMBIOS_STRING   Version;
     93  1.1.1.1.4.2  rmind     SMBIOS_STRING   SerialNumber;
     94  1.1.1.1.4.2  rmind     SMBIOS_STRING   AssetTag;
     95  1.1.1.1.4.2  rmind     UINT8           BootupState;
     96  1.1.1.1.4.2  rmind     UINT8           PowerSupplyState;
     97  1.1.1.1.4.2  rmind     UINT8           ThermalState;
     98  1.1.1.1.4.2  rmind     UINT8           SecurityStatus;
     99  1.1.1.1.4.2  rmind     UINT8           OemDefined[4];
    100  1.1.1.1.4.2  rmind } SMBIOS_TYPE3;
    101  1.1.1.1.4.2  rmind 
    102  1.1.1.1.4.2  rmind typedef struct {
    103  1.1.1.1.4.2  rmind     SMBIOS_HEADER   Hdr;
    104  1.1.1.1.4.2  rmind     UINT8           Socket;
    105  1.1.1.1.4.2  rmind     UINT8           ProcessorType;
    106  1.1.1.1.4.2  rmind     UINT8           ProcessorFamily;
    107  1.1.1.1.4.2  rmind     SMBIOS_STRING   ProcessorManufacture;
    108  1.1.1.1.4.2  rmind     UINT8           ProcessorId[8];
    109  1.1.1.1.4.2  rmind     SMBIOS_STRING   ProcessorVersion;
    110  1.1.1.1.4.2  rmind     UINT8           Voltage;
    111  1.1.1.1.4.2  rmind     UINT8           ExternalClock[2];
    112  1.1.1.1.4.2  rmind     UINT8           MaxSpeed[2];
    113  1.1.1.1.4.2  rmind     UINT8           CurrentSpeed[2];
    114  1.1.1.1.4.2  rmind     UINT8           Status;
    115  1.1.1.1.4.2  rmind     UINT8           ProcessorUpgrade;
    116  1.1.1.1.4.2  rmind     UINT8           L1CacheHandle[2];
    117  1.1.1.1.4.2  rmind     UINT8           L2CacheHandle[2];
    118  1.1.1.1.4.2  rmind     UINT8           L3CacheHandle[2];
    119  1.1.1.1.4.2  rmind } SMBIOS_TYPE4;
    120  1.1.1.1.4.2  rmind 
    121  1.1.1.1.4.2  rmind typedef union {
    122  1.1.1.1.4.2  rmind     SMBIOS_HEADER   *Hdr;
    123  1.1.1.1.4.2  rmind     SMBIOS_TYPE0    *Type0;
    124  1.1.1.1.4.2  rmind     SMBIOS_TYPE1    *Type1;
    125  1.1.1.1.4.2  rmind     SMBIOS_TYPE2    *Type2;
    126  1.1.1.1.4.2  rmind     SMBIOS_TYPE3    *Type3;
    127  1.1.1.1.4.2  rmind     SMBIOS_TYPE4    *Type4;
    128  1.1.1.1.4.2  rmind     UINT8           *Raw;
    129  1.1.1.1.4.2  rmind } SMBIOS_STRUCTURE_POINTER;
    130  1.1.1.1.4.2  rmind #pragma pack()
    131  1.1.1.1.4.2  rmind 
    132  1.1.1.1.4.2  rmind 
    133  1.1.1.1.4.2  rmind #endif
    134  1.1.1.1.4.2  rmind 
    135