]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
MdeModulePkg/IntelFrameworkModulePkg: Update PeiCore, SmbiosDxe and IsaSerialDxe...
[mirror_edk2.git] / MdeModulePkg / Universal / SmbiosDxe / SmbiosDxe.c
index 861e35eb9986c96b6ee9d1f770bfb154b06e66f3..c0128f088f9e12a5fd69e86f35f7a857248a81f6 100644 (file)
@@ -2,7 +2,7 @@
   This code produces the Smbios protocol. It also responsible for constructing \r
   SMBIOS table into system table.\r
   \r
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -49,11 +49,11 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
   //\r
   // MajorVersion\r
   //\r
-  (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) >> 8),\r
+  0,\r
   //\r
   // MinorVersion\r
   //\r
-  (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) & 0x00ff),\r
+  0,\r
   //\r
   // MaxStructureSize, TO BE FILLED\r
   //\r
@@ -87,11 +87,11 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
   //\r
   0,\r
   //\r
-  // StructureTableLength, TO BE FILLED\r
+  // TableLength, TO BE FILLED\r
   //\r
   0,\r
   //\r
-  // StructureTableAddress, TO BE FILLED\r
+  // TableAddress, TO BE FILLED\r
   //\r
   0,\r
   //\r
@@ -101,7 +101,7 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
   //\r
   // SmbiosBcdRevision\r
   //\r
-  0  \r
+  0\r
 };\r
 \r
 \r
@@ -980,7 +980,7 @@ SmbiosCreateTable (
     PhysicalAddress = 0xffffffff;\r
     Status = gBS->AllocatePages (\r
                     AllocateMaxAddress,\r
-                    EfiReservedMemoryType,\r
+                    EfiRuntimeServicesData,\r
                     EFI_SIZE_TO_PAGES (EntryPointStructure->TableLength),\r
                     &PhysicalAddress\r
                     );\r
@@ -1078,8 +1078,11 @@ SmbiosDriverEntryPoint (
   mPrivateData.Smbios.UpdateString      = SmbiosUpdateString;\r
   mPrivateData.Smbios.Remove            = SmbiosRemove;\r
   mPrivateData.Smbios.GetNext           = SmbiosGetNext;\r
-  mPrivateData.Smbios.MajorVersion      = (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) >> 8);\r
-  mPrivateData.Smbios.MinorVersion      = (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) & 0x00ff);\r
+  mPrivateData.Smbios.MajorVersion      = (UINT8) (PcdGet16 (PcdSmbiosVersion) >> 8);\r
+  mPrivateData.Smbios.MinorVersion      = (UINT8) (PcdGet16 (PcdSmbiosVersion) & 0x00ff);\r
+  EntryPointStructureData.MajorVersion  = mPrivateData.Smbios.MajorVersion;\r
+  EntryPointStructureData.MinorVersion  = mPrivateData.Smbios.MinorVersion;\r
+  EntryPointStructureData.SmbiosBcdRevision = (UINT8) ((PcdGet16 (PcdSmbiosVersion) >> 4) & 0xf0) | (UINT8) (PcdGet16 (PcdSmbiosVersion) & 0x0f);\r
 \r
   InitializeListHead (&mPrivateData.DataListHead);\r
   InitializeListHead (&mPrivateData.AllocatedHandleListHead);\r
@@ -1092,7 +1095,7 @@ SmbiosDriverEntryPoint (
   PhysicalAddress = 0xffffffff;\r
   Status = gBS->AllocatePages (\r
                   AllocateMaxAddress,\r
-                  EfiReservedMemoryType,\r
+                  EfiRuntimeServicesData,\r
                   EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),\r
                   &PhysicalAddress\r
                   );\r
@@ -1100,7 +1103,7 @@ SmbiosDriverEntryPoint (
     DEBUG ((EFI_D_ERROR, "SmbiosDriverEntryPoint() could not allocate EntryPointStructure < 4GB\n"));\r
     Status = gBS->AllocatePages (\r
                     AllocateAnyPages,\r
-                    EfiReservedMemoryType,\r
+                    EfiRuntimeServicesData,\r
                     EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),\r
                     &PhysicalAddress\r
                     );\r
@@ -1126,7 +1129,7 @@ SmbiosDriverEntryPoint (
   PhysicalAddress = 0xffffffff;\r
   Status = gBS->AllocatePages (\r
                   AllocateMaxAddress,\r
-                  EfiReservedMemoryType,\r
+                  EfiRuntimeServicesData,\r
                   1,\r
                   &PhysicalAddress\r
                   );\r