public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version
@ 2023-08-30  9:12 horacex.lien
  2023-08-31 15:56 ` Michael D Kinney
  0 siblings, 1 reply; 18+ messages in thread
From: horacex.lien @ 2023-08-30  9:12 UTC (permalink / raw)
  To: devel; +Cc: HoraceX Lien, Zhiguang Liu, Dandan Bi, Star Zeng, Zhichao Gao

From: HoraceX Lien <horacex.lien@intel.com>

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 PCD PcdSmbiosVersion from SMBIOS memory data,
to ensure that get consistent version value.

Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dandan Bi <dandan.bi@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>
---
 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
index 1a86e69d3c..e3f6215033 100644
--- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
+++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
@@ -1072,7 +1072,7 @@ 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);
+    EntryPointStructureData.SmbiosBcdRevision = (mPrivateData.Smbios.MajorVersion << 4) | mPrivateData.Smbios.MinorVersion;
     PhysicalAddress                           = 0xffffffff;
     Status                                    = gBS->AllocatePages (
                                                        AllocateMaxAddress,
-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108150): https://edk2.groups.io/g/devel/message/108150
Mute This Topic: https://groups.io/mt/101057293/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-09-25  2:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30  9:12 [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version horacex.lien
2023-08-31 15:56 ` Michael D Kinney
2023-09-01  7:06   ` Lien, HoraceX
     [not found]   ` <1780B48BF009A270.23790@groups.io>
2023-09-07  9:40     ` Lien, HoraceX
2023-09-07 22:05       ` Michael D Kinney
2023-09-08  9:35         ` Lien, HoraceX
2023-09-14  9:32           ` Lien, HoraceX
2023-09-14 17:48             ` Michael D Kinney
2023-09-15  7:35               ` Lien, HoraceX
2023-09-20  1:03               ` Guo, Gua
2023-09-20  1:35                 ` Michael D Kinney
2023-09-20  1:52                   ` Guo, Gua
     [not found]                   ` <17867875CCCD5E00.29111@groups.io>
2023-09-22  5:10                     ` Guo, Gua
2023-09-22 16:19                       ` Michael D Kinney
2023-09-23  0:21                         ` Guo, Gua
2023-09-23  3:06                           ` Michael D Kinney
2023-09-23  3:09                             ` Guo, Gua
2023-09-25  2:13                               ` Lien, HoraceX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox