Update for printing BIOS extension size information. Signed-off-by: Roger Hsu <roger....@hpe.com> Cc: Ray Ni <ray...@intel.com> Cc: Zhichao Gao <zhichao....@intel.com> Cc: Abner Chang <abner.ch...@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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#89232): https://edk2.groups.io/g/devel/message/89232 Mute This Topic: https://groups.io/mt/90628978/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-