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