]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove micro definition for smbios version, instead we use a PCD value to let user...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Feb 2010 02:54:22 +0000 (02:54 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Feb 2010 02:54:22 +0000 (02:54 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9893 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf

index 4a1f8a59ca8be75ab4c43d313a9ce7e1e43dcb19..68805d2f9536c7c58d384d894b55e19bf03a617c 100644 (file)
   #  BIT0 set indicates 4KB alignment\r
   #  BIT1 set indicates 8KB alignment\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1|UINT32|0x10000047\r
+  \r
+  ## Smbios version\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0206|UINT16|0x00010055\r
 \r
 [PcdsFixedAtBuild,PcdsPatchableInModule]\r
   ## Maximun number of performance log entries during PEI phase.\r
index a3a85d59db4cc2ec6187b19afc2e9f7b32d96f57..9e80c3b1d37cf07f6b1dc84bb48dd8ea1eec3696 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, Intel Corporation                                                         \r
+Copyright (c) 2009 - 2010, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -45,13 +45,13 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
   //\r
   0x1f,\r
   //\r
-  // MajorVersion: 2 (Version 2.4)\r
+  // MajorVersion\r
   //\r
-  0x02,\r
+  (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) >> 8),\r
   //\r
-  // MinorVersion: 4 (Version 2.4)\r
+  // MinorVersion\r
   //\r
-  0x04,\r
+  (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) & 0x00ff),\r
   //\r
   // MaxStructureSize, TO BE FILLED\r
   //\r
@@ -997,8 +997,8 @@ SmbiosDriverEntryPoint (
   mPrivateData.Smbios.UpdateString      = SmbiosUpdateString;\r
   mPrivateData.Smbios.Remove            = SmbiosRemove;\r
   mPrivateData.Smbios.GetNext           = SmbiosGetNext;\r
-  mPrivateData.Smbios.MajorVersion      = SMBIOS_MAJOR_VERSION;\r
-  mPrivateData.Smbios.MinorVersion      = SMBIOS_MINOR_VERSION;\r
+  mPrivateData.Smbios.MajorVersion      = (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) >> 8);\r
+  mPrivateData.Smbios.MinorVersion      = (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) & 0x00ff);\r
 \r
   InitializeListHead (&mPrivateData.DataListHead);\r
   InitializeListHead (&mPrivateData.AllocatedHandleListHead);\r
index f75429cbad933a413413d42e8abb20b0bbf8f645..30092f57972c0ba22031e26a6a5a615827f146ed 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This code supports the implementation of the Smbios protocol\r
   \r
-Copyright (c) 2009, Intel Corporation                                                         \r
+Copyright (c) 2009 - 2010, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -29,10 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
-\r
-#define SMBIOS_MAJOR_VERSION 2\r
-#define SMBIOS_MINOR_VERSION 4\r
-\r
+#include <Library/PcdLib.h>\r
 \r
 #define SMBIOS_INSTANCE_SIGNATURE SIGNATURE_32 ('S', 'B', 'i', 's')\r
 typedef struct {\r
index 17d9d83d28afeda3cd6ebabe9f8d8a782e130305..9c16b831649e94741b437b2a2ff2c87adaf439d9 100644 (file)
@@ -2,7 +2,7 @@
 # Component description file for Smbios module.\r
 #\r
 # This driver initializes and installs the SMBIOS protocol.\r
-# Copyright (c) 2009, Intel Corporation\r
+# Copyright (c) 2009 - 2010, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -37,6 +37,7 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
 \r
 [LibraryClasses]\r
   UefiBootServicesTableLib\r
@@ -46,6 +47,7 @@
   UefiLib\r
   UefiDriverEntryPoint\r
   DebugLib\r
+  PcdLib\r
 \r
 [Protocols]\r
   gEfiSmbiosProtocolGuid                       # PROTOCOL ALWAYS_PRODUCED\r
@@ -54,5 +56,8 @@
   gEfiEventReadyToBootGuid                    # PROTOCOL ALWAYS_CONSUMED\r
   gEfiSmbiosTableGuid                         # PROTOCOL ALWAYS_CONSUMED\r
 \r
+[FixedPcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion\r
+\r
 [Depex]\r
   TRUE\r