public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: [edk2-devel] [PATCH 1/2] ArmPkg: make PcdProcessorVersion dynamic
Date: Fri, 12 Jul 2024 11:23:55 +0200	[thread overview]
Message-ID: <20240712092356.517074-2-marcin.juszkiewicz@linaro.org> (raw)
In-Reply-To: <20240712092356.517074-1-marcin.juszkiewicz@linaro.org>

On SbsaQemu platform we would like to be able to set this variable
during bootup as cpu model can be different on each system run.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 ArmPkg/ArmPkg.dec                                             | 2 +-
 .../Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index c0861140e858..cd922a04ddfa 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -198,7 +198,6 @@ [PcdsFixedAtBuild.common]
   gArmTokenSpaceGuid.PcdBaseBoardProductName|L""|VOID*|0x30000056
   gArmTokenSpaceGuid.PcdBaseBoardVersion|L""|VOID*|0x30000057
   gArmTokenSpaceGuid.PcdProcessorManufacturer|L""|VOID*|0x30000071
-  gArmTokenSpaceGuid.PcdProcessorVersion|L""|VOID*|0x30000072
   gArmTokenSpaceGuid.PcdProcessorSerialNumber|L""|VOID*|0x30000073
   gArmTokenSpaceGuid.PcdProcessorAssetTag|L""|VOID*|0x30000074
   gArmTokenSpaceGuid.PcdProcessorPartNumber|L""|VOID*|0x30000075
@@ -301,6 +300,7 @@ [PcdsFixedAtBuild.AARCH64]
 #
 [PcdsFixedAtBuild.common, PcdsDynamic.common, PcdsPatchableInModule.common]
 
+  gArmTokenSpaceGuid.PcdProcessorVersion|L""|VOID*|0x30000072
   # System Memory (DRAM): These PCDs define the region of in-built system memory
   # Some platforms can get DRAM extensions, these additional regions may be
   # declared to UEFI using separate resource descriptor HOBs
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index 4f2d42133756..4a787b603698 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -527,8 +527,8 @@ AllocateType4AndSetProcessorInformationStrings (
     OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04);
   }
 
-  if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) {
-    HiiSetString (mHiiHandle, ProcessorVersion, (CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion), NULL);
+  if (StrLen ((CHAR16 *)PcdGetPtr (PcdProcessorVersion)) > 0) {
+    HiiSetString (mHiiHandle, ProcessorVersion, (CHAR16 *)PcdGetPtr (PcdProcessorVersion), NULL);
   } else {
     OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionType04);
   }
--
2.45.2



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



  reply	other threads:[~2024-07-12  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  9:23 [edk2-devel] [PATCH 0/2] Set CPU model in SMBIOS Marcin Juszkiewicz
2024-07-12  9:23 ` Marcin Juszkiewicz [this message]
2024-07-12  9:23 ` [edk2-devel] [PATCH edk2-platforms 2/2] SbsaQemu: set " Marcin Juszkiewicz
2024-07-12 10:01   ` Ard Biesheuvel
2024-07-12 10:58     ` Marcin Juszkiewicz
2024-07-15  3:24     ` Nhi Pham via groups.io
2024-07-15  8:24       ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240712092356.517074-2-marcin.juszkiewicz@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox