From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mx.groups.io with SMTP id smtpd.web10.11424.1678971608872022475 for ; Thu, 16 Mar 2023 06:00:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=ErpOgyh1; spf=pass (domain: bsdio.com, ip: 64.147.123.21, mailfrom: rebecca@bsdio.com) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 56AA4320092F; Thu, 16 Mar 2023 09:00:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 16 Mar 2023 09:00:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1678971606; x=1679058006; bh=TR/4y0oAFJuIYEnpT319sJZ/Q7bV1vpaEdq 0ibQTd08=; b=ErpOgyh1jrdQ0hov6K4fK8F1Y2ZGjy13b2AtTNx+ND5JeW0hjYC DAh9uAIRuIM0PCoTgwOqn7ul8K6a5W25UDJlWT312dV/JLNzao0KIlEZLDNjse62 CbgFfAHoEcP1k33kJWeMbIsOl2VHYl9wggzPXwwXqBGSaM1aeXj2U5XdDt0huoOp g0SJmz84jl9c3WORxX0KksC4vkVQi5T6IGcJkU5Asq71ffMxXtRYiGEiRRzzYk8/ HcWSI76CPmAj7d0vIBPiPFoIBBiz4RYePIww+kwzQArdN2guDb9567TOA5AiuFE4 /5g9lxV+tC54kh/qqbJqfdL2I+6rLqY4lsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678971606; x=1679058006; bh=TR/4y0oAFJuIYEnpT319sJZ/Q7bV1vpaEdq 0ibQTd08=; b=aIWRCmVDiSKLtl6tUxlPvV/T2Qhiwb7GsMCKaRa1HgPmd0quzuu o5WaTqS1wzXf15wx684ZREUFJaWJHEPXlDXViwbPjgPNqhupxAOmj/xjR2Dgxcjv rjBIxF5MOuswctj3Vw0OJbIqwVBIcfh8TFIQIN7RLcNGZsIFIEmfphPM0JRNhNff lOgdubKk60lI2JQ8X4xHlm0O8EcHNpHMQMPNaPkthfX/8i7Hx0ujPNWsZiLaJfkr KzpVN2M1nHMUyCz4B9mMEy2BfdYnu4m4qZLvtNt+GIpM4LlHjXdpxQS0+0hJPlxv ikFRkrRIVMNyumDeKWnZzFGMC8FGmVJRnPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeftddggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomheptfgvsggvtggtrgcuvehrrghnuceorhgvsggvtggtrges sghsughiohdrtghomheqnecuggftrfgrthhtvghrnhepteegjefgfeffleeftdelheefue fhuedtffeuudfhjeetuddvkeevkeetfedvleeknecuffhomhgrihhnpehgrhhouhhpshdr ihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Mar 2023 09:00:05 -0400 (EDT) Message-ID: <12217c3b-a8bc-afd2-de56-9407ff30e98e@bsdio.com> Date: Thu, 16 Mar 2023 07:00:04 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: Adjust the priority of getting firmware version To: devel@edk2.groups.io, tinhnguyen@os.amperecomputing.com Cc: patches@amperecomputing.com, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, Nhi Pham References: <20230313064321.170866-1-tinhnguyen@os.amperecomputing.com> From: "Rebecca Cran" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Given Leif's comments, I was expecting a new version with some changes. -- Rebecca Cran On 3/16/23 2:30 AM, Tinh Nguyen via groups.io wrote: > + Rebecca > > Could you kindly help me in reviewing this patch? > > Thanks, > > - Tinh > > On 13/03/2023 13:43, Tinh Nguyen wrote: >> The BIOS Firmware Version in the SMBIOS Type 0 can be fetched from >> the fixed PcdFirmwareVersionString or platform specific OemMiscLib. >> In fact, the support from OemMiscLib comes into play when the firmware >> version may be modified at boot time for extended information. >> >> Therefore, the priority of getting the version from OemMiscLib should >> be higher. In case there is no modification in the OemMiscLib, >> we have to keep HII string STR_MISC_BIOS_VERSION empty or 'Not >> Specified' >> to indicate that the firmware version should be fetched from >> the PcdFirmwareVersionString. >> >> Reviewed-by: Nhi Pham >> Signed-off-by: Tinh Nguyen >> --- >> ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c >> | 36 ++++++++++++++------ >>   1 file changed, 25 insertions(+), 11 deletions(-) >> >> diff --git >> a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c >> b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c >> index 66ead22a6e2c..31a3f6cde544 100644 >> --- >> a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c >> +++ >> b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c >> @@ -1,6 +1,6 @@ >>   /** @file >>   -  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
>> +  Copyright (c) 2022 - 2023, Ampere Computing LLC. All rights >> reserved.
>>     Copyright (c) 2021, NUVIA Inc. All rights reserved.
>>     Copyright (c) 2009, Intel Corporation. All rights reserved.
>>     Copyright (c) 2015, Hisilicon Limited. All rights reserved.
>> @@ -170,6 +170,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { >>     EFI_STRING_ID       TokenToGet; >>     SMBIOS_TABLE_TYPE0  *SmbiosRecord; >>     SMBIOS_TABLE_TYPE0  *InputData; >> +  CHAR16              *DefaultVersionString; >>       // >>     // First check for invalid parameters. >> @@ -187,17 +188,30 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { >>       HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Vendor, NULL); >>     } >>   -  Version = GetBiosVersion (); >> +  DefaultVersionString = HiiGetString ( >> +                           mSmbiosMiscHiiHandle, >> +                           STRING_TOKEN (STR_MISC_BIOS_VERSION), >> +                           NULL >> +                           ); >>   -  if (StrLen (Version) > 0) { >> -    TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION); >> -    HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL); >> -  } else { >> -    OemUpdateSmbiosInfo ( >> -      mSmbiosMiscHiiHandle, >> -      STRING_TOKEN (STR_MISC_BIOS_VERSION), >> -      BiosVersionType00 >> -      ); >> +  OemUpdateSmbiosInfo ( >> +    mSmbiosMiscHiiHandle, >> +    STRING_TOKEN (STR_MISC_BIOS_VERSION), >> +    BiosVersionType00 >> +    ); >> + >> +  Version = HiiGetString ( >> +              mSmbiosMiscHiiHandle, >> +              STRING_TOKEN (STR_MISC_BIOS_VERSION), >> +              NULL >> +              ); >> + >> +  if (((StrCmp (Version, DefaultVersionString) == 0) || (StrLen >> (Version) == 0))) { >> +    Version = GetBiosVersion (); >> +    if (StrLen (Version) > 0) { >> +      TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION); >> +      HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, >> NULL); >> +    } >>     } >>       Char16String = GetBiosReleaseDate (); > > > > >