From: "Abner Chang" <abner.chang@hpe.com>
To: "Hsu, Roger (HPE ISS SW)" <roger.hsu@hpe.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Ray Ni <ray.ni@intel.com>, Zhichao Gao <zhichao.gao@intel.com>
Subject: Re: [PATCH 2/2] ShellPkg/SmbiosView: Print BIOS extension size
Date: Tue, 26 Apr 2022 00:37:23 +0000 [thread overview]
Message-ID: <PH0PR84MB16479E998D5D8E8DE89B7598FFFB9@PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220422065553.73-1-roger.hsu@hpe.com>
[-- Attachment #1: Type: text/plain, Size: 2995 bytes --]
Hi Roger,
There is an update for SMBIOS type 0 at commit ID fdfbf1fd-a85ae8d9. Please rebase the changes to edk2 master branch and send out the patch V2.
Thanks
Abner
________________________________
From: Hsu, Roger (HPE ISS SW) <roger.hsu@hpe.com>
Sent: Friday, April 22, 2022 2:55 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ray Ni <ray.ni@intel.com>; Zhichao Gao <zhichao.gao@intel.com>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Subject: [PATCH 2/2] ShellPkg/SmbiosView: Print BIOS extension size
Update for printing BIOS extension size information.
Signed-off-by: Roger Hsu <roger.hsu@hpe.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Abner Chang <abner.chang@hpe.com>
---
.../SmbiosView/PrintInfo.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..ee0dbc19be 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -3,7 +3,7 @@
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP<BR>
+ (C) Copyright 2015-2022 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -338,7 +338,15 @@ SmbiosPrintStructure (
PRINT_PENDING_STRING (Struct, Type0, BiosVersion);
PRINT_STRUCT_VALUE_H (Struct, Type0, BiosSegment);
PRINT_PENDING_STRING (Struct, Type0, BiosReleaseDate);
- ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));
+ if (Struct->Type0->BiosSize == EXCEED_BIOS_ROM_SIZE) {
+ if (Struct->Type0->ExtendedBiosSize.Unit == BIOS_ROM_SIZE_IN_MEGABYTES) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, (BYTES_IN_MEGABYTES * (Struct->Type0->ExtendedBiosSize.Size)) / BYTES_IN_KILOBYTES);
+ } else if (Struct->Type0->ExtendedBiosSize.Unit == BIOS_ROM_SIZE_IN_GIGABYTES) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, (BYTES_IN_GIGABYTES *(Struct->Type0->ExtendedBiosSize.Size)) / BYTES_IN_KILOBYTES);
+ }
+ } else {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));
+ }
DisplayBiosCharacteristics (ReadUnaligned64 ((UINT64 *)(UINTN)&(Struct->Type0->BiosCharacteristics)), Option);
--
2.28.0.windows.1
[-- Attachment #2: Type: text/html, Size: 5456 bytes --]
prev parent reply other threads:[~2022-04-26 0:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 6:55 [PATCH 2/2] ShellPkg/SmbiosView: Print BIOS extension size Hsu, Roger
2022-04-26 0:37 ` Abner Chang [this message]
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=PH0PR84MB16479E998D5D8E8DE89B7598FFFB9@PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.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