From: "Nhi Pham" <nhi@os.amperecomputing.com>
To: Sami Mujawar <sami.mujawar@arm.com>,
Nhi Pham <nhi@os.amperecomputing.com>,
devel@edk2.groups.io, quic_llindhol@quicinc.com,
ardb+tianocore@kernel.org, quic_rcran@quicinc.com
Cc: patches@amperecomputing.com,
Minh Nguyen <minhn@amperecomputing.com>,
"nd@arm.com" <nd@arm.com>
Subject: Re: [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
Date: Wed, 24 Aug 2022 23:10:51 +0700 [thread overview]
Message-ID: <4f666bfb-f72f-9232-5b17-26ce3ebf7cd2@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <face2191-eb6c-3e01-fe22-c0bfbdc33b55@arm.com>
Hi Sami,
On 8/23/2022 11:21 PM, Sami Mujawar wrote:
> Hi Nhi,
>
> Thank you for this patch.
>
> Please find my response inline marked [SAMI].
>
> Regards,
>
> Sami Mujawar
>
> On 23/08/2022 11:59 am, Nhi Pham wrote:
>> From: Minh Nguyen <minhn@amperecomputing.com>
>>
>> In some scenarios, the processor version may be updated dynamically
>> from pre-UEFI firmware during booting. But the processor version is
>> fixed with PCD (PcdProcessorVersion), so it can not be updated it
>> dynamically. This patch will support setting that value both
>> statically and dynamically.
>>
>> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
>> ---
>> ArmPkg/Include/Library/OemMiscLib.h | 2 ++
>> ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 8
>> +++++++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/ArmPkg/Include/Library/OemMiscLib.h
>> b/ArmPkg/Include/Library/OemMiscLib.h
>> index 47cb30d84a62..330bb4b014de 100644
>> --- a/ArmPkg/Include/Library/OemMiscLib.h
>> +++ b/ArmPkg/Include/Library/OemMiscLib.h
>> @@ -1,5 +1,6 @@
>> /** @file
>>
>> *
>>
>> +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
>>
>> * Copyright (c) 2021, NUVIA Inc. All rights reserved.
>>
>> * Copyright (c) 2015, Hisilicon Limited. All rights reserved.
>>
>> * Copyright (c) 2015, Linaro Limited. All rights reserved.
>>
>> @@ -58,6 +59,7 @@ typedef enum {
>> SkuNumberType03,
>>
>> ProcessorPartNumType04,
>>
>> ProcessorSerialNumType04,
>>
>> + ProcessorVersionType04,
>>
>> SmbiosHiiStringFieldMax
>>
>> } OEM_MISC_SMBIOS_HII_STRING_FIELD;
>>
>>
>> diff --git
>> a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
>> b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
>> index 0b9af9bd7e1c..524b37b10479 100644
>> --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
>> +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
>> @@ -1,6 +1,7 @@
>> /** @file
>>
>> ProcessorSubClass.c
>>
>>
>> + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
>>
>> Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
>>
>> Copyright (c) 2015, Hisilicon Limited. All rights reserved.
>>
>> Copyright (c) 2015, Linaro Limited. All rights reserved.
>>
>> @@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings (
>> PartNumber = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);
>>
>>
>> SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer,
>> ProcessorManu);
>>
>> - SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion,
>> ProcessorVersion);
>>
>> SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag);
>>
>>
>> if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber))
>> > 0) {
>>
>> @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings (
>> OemUpdateSmbiosInfo (mHiiHandle, PartNumber,
>> ProcessorPartNumType04);
>>
>> }
>>
>>
>> + if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) {
>>
>> + HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr
>> (PcdProcessorVersion), NULL);
> [SAMI] Should the second parameter be ProcessorVersion?
Good catch. Will fix it.
Thanks,
Nhi
>>
>> + } else {
>>
>> + OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion,
>> ProcessorVersionType04);
>>
>> + }
>>
>> +
>>
>> // Processor Designation
>>
>> StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;
>>
>> ProcessorStr = AllocateZeroPool (StringBufferSize);
>>
next prev parent reply other threads:[~2022-08-24 16:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 10:59 [PATCH 0/6] ArmPkg/SMBIOS fixes and improvements Nhi Pham
2022-08-23 10:59 ` [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib Nhi Pham
2022-08-23 16:21 ` Sami Mujawar
2022-08-24 16:10 ` Nhi Pham [this message]
2022-08-23 10:59 ` [PATCH 2/6] ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call Nhi Pham
2022-08-23 16:28 ` Sami Mujawar
2022-08-23 10:59 ` [PATCH 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID Nhi Pham
2022-08-23 16:31 ` Sami Mujawar
2022-08-23 10:59 ` [PATCH 4/6] ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02" Nhi Pham
2022-08-23 16:34 ` Sami Mujawar
2022-08-23 10:59 ` [PATCH 5/6] ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2 Nhi Pham
2022-08-23 16:36 ` Sami Mujawar
2022-08-23 10:59 ` [PATCH 6/6] ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib Nhi Pham
2022-08-23 16:57 ` Sami Mujawar
2022-08-23 14:24 ` [edk2-devel] [PATCH 0/6] ArmPkg/SMBIOS fixes and improvements Rebecca Cran
2022-08-23 15:57 ` PierreGondois
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=4f666bfb-f72f-9232-5b17-26ce3ebf7cd2@amperemail.onmicrosoft.com \
--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