From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.5454.1650610879771864014 for ; Fri, 22 Apr 2022 00:01:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=AK0FPkBZ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0111295386=roger.hsu@hpe.com) Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23M6IIKJ018948; Fri, 22 Apr 2022 07:01:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pps0720; bh=S6Zcpylg455+fuDyB7O1f6vp/ch8AsmoNco/j0CRUlg=; b=AK0FPkBZgiR1xEW5idrWDn4ZdCjZxrY80kBpv4/AolVEICuX8oQu3uuFEKLQNno+EyA4 zR7d/wmBKs5KGasUlYveqSwlE8/i6093qW0P6uRbkpv/fU2QmnpXuIzHn+8w7H0CJyvF +Map/esBsPLeMyYeSHhBc4SzB8sK2l7Cn2/Kf1AGtwCRql2gisqKWTNV65+o0sDWECsr rYmwoA30HTevfLOSs/Xdmt0S0Qu5ce3SSwVEGAnOqfC/Rit5iQWmL4ts0s7Yj5dizMh3 s1j8eh5pQALLGdFzWRsuNshVfYG9Hr4r8BAO8eoeXuHYS6rVVOHDA5gGGIK2zKYzFv10 NQ== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3fkpyp8a8y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 07:01:18 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 45F0D51; Fri, 22 Apr 2022 07:01:18 +0000 (UTC) Received: from localhost.localdomain (unknown [15.119.210.230]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 237064B; Fri, 22 Apr 2022 07:01:16 +0000 (UTC) From: "Hsu, Roger" To: devel@edk2.groups.io Cc: Ray Ni , Zhichao Gao , Abner Chang Subject: [PATCH 2/2] ShellPkg/SmbiosView: Print BIOS extension size Date: Fri, 22 Apr 2022 14:55:53 +0800 Message-Id: <20220422065553.73-1-roger.hsu@hpe.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 X-Proofpoint-GUID: REyYwed0zO44nF3lG31qbMCp3GvVnKQQ X-Proofpoint-ORIG-GUID: REyYwed0zO44nF3lG31qbMCp3GvVnKQQ X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-22_02,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 suspectscore=0 impostorscore=0 mlxlogscore=677 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204220030 Content-Transfer-Encoding: quoted-printable Update for printing BIOS extension size information. Signed-off-by: Roger Hsu Cc: Ray Ni Cc: Zhichao Gao Cc: Abner Chang --- .../SmbiosView/PrintInfo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.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 @@ =0D Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
=0D (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
=0D - (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP
=0D + (C) Copyright 2015-2022 Hewlett Packard Enterprise Development LP
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -338,7 +338,15 @@ SmbiosPrintStructure ( PRINT_PENDING_STRING (Struct, Type0, BiosVersion);=0D PRINT_STRUCT_VALUE_H (Struct, Type0, BiosSegment);=0D PRINT_PENDING_STRING (Struct, Type0, BiosReleaseDate);=0D - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));=0D + if (Struct->Type0->BiosSize =3D=3D EXCEED_BIOS_ROM_SIZE) {=0D + if (Struct->Type0->ExtendedBiosSize.Unit =3D=3D BIOS_ROM_SIZE_IN_M= EGABYTES) {=0D + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRIN= TINFO_BIOS_SIZE), gShellDebug1HiiHandle, (BYTES_IN_MEGABYTES * (Struct->Typ= e0->ExtendedBiosSize.Size)) / BYTES_IN_KILOBYTES);=0D + } else if (Struct->Type0->ExtendedBiosSize.Unit =3D=3D BIOS_ROM_SI= ZE_IN_GIGABYTES) {=0D + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRIN= TINFO_BIOS_SIZE), gShellDebug1HiiHandle, (BYTES_IN_GIGABYTES *(Struct->Type= 0->ExtendedBiosSize.Size)) / BYTES_IN_KILOBYTES);=0D + }=0D + } else {=0D + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));= =0D + }=0D =0D DisplayBiosCharacteristics (ReadUnaligned64 ((UINT64 *)(UINTN)&(Stru= ct->Type0->BiosCharacteristics)), Option);=0D =0D --=20 2.28.0.windows.1