mirror of https://github.com/acidanthera/audk.git
OvmfPkg: SmbiosVersionLib: recognize SMBIOS 3.x entry point
Also set the DocRev field the way QEMU exposes it, because MdeModulePkg/Universal/SmbiosDxe lets us control that field too. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Wei Huang <wei@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gabriel L. Somlo <somlo@cmu.edu> 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@18182 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
9b1c5be026
commit
c3db5a8c3d
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
SMBIOS_TABLE_ENTRY_POINT V2;
|
SMBIOS_TABLE_ENTRY_POINT V2;
|
||||||
|
SMBIOS_TABLE_3_0_ENTRY_POINT V3;
|
||||||
} QEMU_SMBIOS_ANCHOR;
|
} QEMU_SMBIOS_ANCHOR;
|
||||||
|
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
@ -73,6 +74,22 @@ DetectSmbiosVersion (
|
||||||
QemuAnchor.V2.MinorVersion);
|
QemuAnchor.V2.MinorVersion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case sizeof QemuAnchor.V3:
|
||||||
|
QemuFwCfgReadBytes (AnchorSize, &QemuAnchor);
|
||||||
|
|
||||||
|
if (QemuAnchor.V3.MajorVersion != 3 ||
|
||||||
|
QemuAnchor.V3.TableMaximumSize != TablesSize ||
|
||||||
|
CompareMem (QemuAnchor.V3.AnchorString, "_SM3_", 5) != 0) {
|
||||||
|
return RETURN_SUCCESS;
|
||||||
|
}
|
||||||
|
SmbiosVersion = (UINT16)(QemuAnchor.V3.MajorVersion << 8 |
|
||||||
|
QemuAnchor.V3.MinorVersion);
|
||||||
|
|
||||||
|
DEBUG ((EFI_D_INFO, "%a: SMBIOS 3.x DocRev from QEMU: 0x%02x\n",
|
||||||
|
__FUNCTION__, QemuAnchor.V3.DocRev));
|
||||||
|
PcdSet8 (PcdSmbiosDocRev, QemuAnchor.V3.DocRev);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,4 +49,5 @@
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
|
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
|
||||||
|
|
|
@ -362,6 +362,7 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
||||||
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -368,6 +368,7 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
||||||
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -367,6 +367,7 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
|
||||||
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in New Issue