Parcourir la source

Add SMBIOS 3.0 table support

Also fix some small whitespace issues.
Pete Batard il y a 5 ans
Parent
commit
d857a968f4
3 fichiers modifiés avec 17 ajouts et 4 suppressions
  1. 1 0
      inc/efilib.h
  2. 15 4
      inc/libsmbios.h
  3. 1 0
      lib/data.c

+ 1 - 0
inc/efilib.h

@@ -137,6 +137,7 @@ extern EFI_GUID EfiPartTypeLegacyMbrGuid;
 extern EFI_GUID MpsTableGuid;
 extern EFI_GUID AcpiTableGuid;
 extern EFI_GUID SMBIOSTableGuid;
+extern EFI_GUID SMBIOS3TableGuid;
 extern EFI_GUID SalSystemTableGuid;
 
 extern EFI_GUID SimplePointerProtocol;

+ 15 - 4
inc/libsmbios.h

@@ -7,7 +7,7 @@ Copyright (c) 2000  Intel Corporation
 Module Name:
 
     LibSmbios.h
-    
+
 Abstract:
 
     Lib include  for SMBIOS services. Used to get system serial number and GUID
@@ -37,6 +37,19 @@ typedef struct {
     UINT8   SmbiosBcdRevision;
 } SMBIOS_STRUCTURE_TABLE;
 
+typedef struct {
+    UINT8   AnchorString[5];
+    UINT8   EntryPointStructureChecksum;
+    UINT8   EntryPointLength;
+    UINT8   MajorVersion;
+    UINT8   MinorVersion;
+    UINT8   DocRev;
+    UINT8   EntryPointRevision;
+    UINT8   Reserved;
+    UINT32  TableMaximumSize;
+    UINT64  TableAddress;
+} SMBIOS3_STRUCTURE_TABLE;
+
 //
 // Please note that SMBIOS structures can be odd byte aligned since the
 //  unformated section of each record is a set of arbitrary size strings.
@@ -71,7 +84,7 @@ typedef struct {
     // always byte copy this data to prevent alignment faults!
     //
     EFI_GUID        Uuid;
-    
+
     UINT8           WakeUpType;
 } SMBIOS_TYPE1;
 
@@ -127,6 +140,4 @@ typedef union {
 } SMBIOS_STRUCTURE_POINTER;
 #pragma pack()
 
-
 #endif
-

+ 1 - 0
lib/data.c

@@ -178,6 +178,7 @@ EFI_GUID UnknownDevice      = UNKNOWN_DEVICE_GUID;
 EFI_GUID MpsTableGuid             = MPS_TABLE_GUID;
 EFI_GUID AcpiTableGuid            = ACPI_TABLE_GUID;
 EFI_GUID SMBIOSTableGuid          = SMBIOS_TABLE_GUID;
+EFI_GUID SMBIOS3TableGuid         = SMBIOS3_TABLE_GUID;
 EFI_GUID SalSystemTableGuid       = SAL_SYSTEM_TABLE_GUID;
 
 //