[edk2-devel] [edk2-platforms][PATCH 1/4] JadePkg: Correct PCD names for SMBIOS Type 0

Minh Nguyen via groups.io posted 4 patches 1 year, 1 month ago
[edk2-devel] [edk2-platforms][PATCH 1/4] JadePkg: Correct PCD names for SMBIOS Type 0
Posted by Minh Nguyen via groups.io 1 year, 1 month ago
This corrects "PcdSmbiosTables1MajorVersion" and
"PcdSmbiosTables1MinorVersion" of SMBIOS Type 1,
these PCDs should be for Type 0.

Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com>
---
 Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec                    | 14 ++++----------
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf |  6 +++---
 Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c   |  6 +++---
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec b/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec
index 625a9b2b1e89..eeaf8cf87435 100644
--- a/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec
+++ b/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec
@@ -1,6 +1,6 @@
 ## @file
 #
-# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+# Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -64,19 +64,13 @@ [PcdsFixedAtBuild]
   gAmpereTokenSpaceGuid.PcdPmproDbBaseReg|0x100001540000|UINT64|0x00000004
 
   #
-  # SMBIOS Type 1 Pcd
+  # SMBIOS Type 0 Pcd
   #
-  gAmpereTokenSpaceGuid.PcdSmbiosTables1MajorVersion|0|UINT8|0x00000005
-  gAmpereTokenSpaceGuid.PcdSmbiosTables1MinorVersion|0|UINT8|0x00000006
+  gAmpereTokenSpaceGuid.PcdSmbiosTables0MajorVersion|0|UINT8|0x00000005
+  gAmpereTokenSpaceGuid.PcdSmbiosTables0MinorVersion|0|UINT8|0x00000006
 
 [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx]
   #
   # Firmware Volume Pcds
   #
   gAmpereTokenSpaceGuid.PcdFvBlockSize|0|UINT32|0xB0000001
-
-  #
-  # SMBIOS, default or template values
-  #
-  # SMBIOS Type 0 - BIOS Information
-  gAmpereTokenSpaceGuid.PcdSmbiosTables0BiosReleaseDate|"MM/DD/YYYY"|VOID*|0xB0000002 # Must follow this MM/DD/YYYY SMBIOS date format
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
index a70af6faa212..77148b417b0f 100644
--- a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -1,6 +1,6 @@
 ## @file
 #
-# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+# Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -40,8 +40,8 @@ [Protocols]
 [Pcd]
   # Type 0
   gAmpereTokenSpaceGuid.PcdSmbiosTables0BiosReleaseDate
-  gAmpereTokenSpaceGuid.PcdSmbiosTables1MajorVersion
-  gAmpereTokenSpaceGuid.PcdSmbiosTables1MinorVersion
+  gAmpereTokenSpaceGuid.PcdSmbiosTables0MajorVersion
+  gAmpereTokenSpaceGuid.PcdSmbiosTables0MinorVersion
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
 
   gArmTokenSpaceGuid.PcdFdSize
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index add89f5978d6..32735496ecdc 100644
--- a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+  Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -790,7 +790,7 @@ GetBiosVerMajor (
   VOID
   )
 {
-  return (PcdGet8 (PcdSmbiosTables1MajorVersion));
+  return (PcdGet8 (PcdSmbiosTables0MajorVersion));
 }
 
 STATIC
@@ -799,7 +799,7 @@ GetBiosVerMinor (
   VOID
   )
 {
-  return (PcdGet8 (PcdSmbiosTables1MinorVersion));
+  return (PcdGet8 (PcdSmbiosTables0MinorVersion));
 }
 
 STATIC
-- 
2.39.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105266): https://edk2.groups.io/g/devel/message/105266
Mute This Topic: https://groups.io/mt/99111897/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-