summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2015-08-06 10:13:42 +0000
committerlersek <lersek@Edk2>2015-08-06 10:13:42 +0000
commit98937dc2939b28139471474764fef11d3ee4fbd9 (patch)
tree850ca22d6d9538b5414cf9aa871c84473d40cbd2 /OvmfPkg/PlatformPei
parentb265ed9284ffbd83e38599a6168e57113fd85b98 (diff)
downloadedk2-98937dc2939b28139471474764fef11d3ee4fbd9.tar.gz
edk2-98937dc2939b28139471474764fef11d3ee4fbd9.tar.bz2
edk2-98937dc2939b28139471474764fef11d3ee4fbd9.zip
OvmfPkg: set SMBIOS version in DetectSmbiosVersionLib instead of PlatformPei
This patch de-duplicates the logic added in commit OvmfPkg: PlatformPei: set SMBIOS entry point version dynamically (git 37baf06b, SVN r17676) by hooking DetectSmbiosVersionLib into SmbiosDxe. Although said commit was supposed to work with SMBIOS 3.0 payloads from QEMU, in practice that never worked, because the size / signature checks in SmbiosVersionInitialization() would always fail, due to the SMBIOS 3.0 entry point being structurally different. Therefore this patch doesn't regress OvmfPkg. Cc: Wei Huang <wei@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gabriel L. Somlo <somlo@cmu.edu> Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18175 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c39
-rw-r--r--OvmfPkg/PlatformPei/PlatformPei.inf2
2 files changed, 0 insertions, 41 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 87c51d7a9c..9970d1479e 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -32,11 +32,9 @@
#include <Library/PeiServicesLib.h>
#include <Library/QemuFwCfgLib.h>
#include <Library/ResourcePublicationLib.h>
-#include <Library/BaseMemoryLib.h>
#include <Guid/MemoryTypeInformation.h>
#include <Ppi/MasterBootMode.h>
#include <IndustryStandard/Pci22.h>
-#include <IndustryStandard/SmBios.h>
#include <OvmfPlatforms.h>
#include "Platform.h"
@@ -382,41 +380,6 @@ DebugDumpCmos (
/**
- Set the SMBIOS entry point version for the generic SmbiosDxe driver.
-**/
-STATIC
-VOID
-SmbiosVersionInitialization (
- VOID
- )
-{
- FIRMWARE_CONFIG_ITEM Anchor;
- UINTN AnchorSize;
- SMBIOS_TABLE_ENTRY_POINT QemuAnchor;
- UINT16 SmbiosVersion;
-
- if (RETURN_ERROR (QemuFwCfgFindFile ("etc/smbios/smbios-anchor", &Anchor,
- &AnchorSize)) ||
- AnchorSize != sizeof QemuAnchor) {
- return;
- }
-
- QemuFwCfgSelectItem (Anchor);
- QemuFwCfgReadBytes (AnchorSize, &QemuAnchor);
- if (CompareMem (QemuAnchor.AnchorString, "_SM_", 4) != 0 ||
- CompareMem (QemuAnchor.IntermediateAnchorString, "_DMI_", 5) != 0) {
- return;
- }
-
- SmbiosVersion = (UINT16)(QemuAnchor.MajorVersion << 8 |
- QemuAnchor.MinorVersion);
- DEBUG ((EFI_D_INFO, "%a: SMBIOS version from QEMU: 0x%04x\n", __FUNCTION__,
- SmbiosVersion));
- PcdSet16 (PcdSmbiosVersion, SmbiosVersion);
-}
-
-
-/**
Perform Platform PEI initialization.
@param FileHandle Handle of the file being invoked.
@@ -466,8 +429,6 @@ InitializePlatform (
PeiFvInitialization ();
MemMapInitialization ();
-
- SmbiosVersionInitialization ();
}
MiscInitialization ();
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index cb7d7ddc46..81335a964f 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -58,7 +58,6 @@
QemuFwCfgLib
MtrrLib
PcdLib
- BaseMemoryLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
@@ -82,7 +81,6 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
- gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress