mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4544 These value of Major/Minor version are updated from SMBIOS memory data, but BCD Revision is updated from PCD PcdSmbiosVersion. We should also update BCD Revision from SMBIOS memory data, to ensure that get consistent version value. Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: HoraceX Lien <horacex.lien@intel.com>
This commit is contained in:
parent
bf0bdacdd6
commit
be971fc302
|
@ -1072,14 +1072,18 @@ SmbiosCreateTable (
|
|||
DEBUG ((DEBUG_INFO, "SmbiosCreateTable: Initialize 32-bit entry point structure\n"));
|
||||
EntryPointStructureData.MajorVersion = mPrivateData.Smbios.MajorVersion;
|
||||
EntryPointStructureData.MinorVersion = mPrivateData.Smbios.MinorVersion;
|
||||
EntryPointStructureData.SmbiosBcdRevision = (UINT8)((PcdGet16 (PcdSmbiosVersion) >> 4) & 0xf0) | (UINT8)(PcdGet16 (PcdSmbiosVersion) & 0x0f);
|
||||
PhysicalAddress = 0xffffffff;
|
||||
Status = gBS->AllocatePages (
|
||||
AllocateMaxAddress,
|
||||
EfiRuntimeServicesData,
|
||||
EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
|
||||
&PhysicalAddress
|
||||
);
|
||||
EntryPointStructureData.SmbiosBcdRevision = 0;
|
||||
if ((mPrivateData.Smbios.MajorVersion <= 9) && (mPrivateData.Smbios.MinorVersion <= 9)) {
|
||||
EntryPointStructureData.SmbiosBcdRevision = ((mPrivateData.Smbios.MajorVersion & 0x0f) << 4) | (mPrivateData.Smbios.MinorVersion & 0x0f);
|
||||
}
|
||||
|
||||
PhysicalAddress = 0xffffffff;
|
||||
Status = gBS->AllocatePages (
|
||||
AllocateMaxAddress,
|
||||
EfiRuntimeServicesData,
|
||||
EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
|
||||
&PhysicalAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "SmbiosCreateTable () could not allocate EntryPointStructure < 4GB\n"));
|
||||
Status = gBS->AllocatePages (
|
||||
|
|
Loading…
Reference in New Issue