From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web08.27749.1654484424914450989 for ; Sun, 05 Jun 2022 20:00:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=HORRAZA/; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654484434; x=1686020434; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ENFb+rfPI3CHasnPNsfKXKeq/t/JiNgaH/LP2re8MNQ=; b=HORRAZA/HJgfsMUp584g0srq0+ETAu1TzJBCfwNQwAjg3Q5FTAQBicoG kcjaOMzHC5ME3wpjDBuuIZsCRweXMhlKS7QWkLgIsG8sN8Y+60KFIyW/g GSaEIUKCAwl1oq+ODUfuGhH8d6iEp3Tct5zZY0mkhBy19pgo9ps0O/dmn /Bh2D08lPLV7211IuGOLCc10rcC7v7oSJxsODjBXlQzXs3tKx+mHnHuA4 wSIJR0QHbj2dHHcYsdkfw0GURmtJU4zxnENNTgMe4sQPMiPR50Dea62TR uG5s5eOg0TttRR8ASnMGdeg7qNVbOgn3ocgspRsurKHXLZHZuuG5JjAG7 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="276458108" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="276458108" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2022 20:00:34 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="647285786" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.66]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2022 20:00:32 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Ray Ni , Zhichao Gao , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH 06/14] ShellPkg: Update shell command memmap to show unaccepted memory Date: Mon, 6 Jun 2022 10:59:54 +0800 Message-Id: <45dd9950d91333c703d31f96a9058f7e968e5a93.1654420876.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937 ShellCommandRunMemMap() is updated to handle the case of unaccepted memory type. Cc: Ray Ni Cc: Zhichao Gao Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu --- ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c index 72f3c58b0970..41994ae709ce 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c @@ -26,6 +26,7 @@ STATIC CONST CHAR16 NameEfiACPIMemoryNVS[] = L"ACPIMemoryNVS"; STATIC CONST CHAR16 NameEfiMemoryMappedIO[] = L"MemoryMappedIO"; STATIC CONST CHAR16 NameEfiMemoryMappedIOPortSpace[] = L"MemoryMappedIOPortSpace"; STATIC CONST CHAR16 NameEfiPalCode[] = L"PalCode"; +STATIC CONST CHAR16 NameEfiUnacceptedMemory[] = L"Unaccepted"; // // Need short names for some memory types @@ -303,6 +304,11 @@ ShellCommandRunMemMap ( TotalPages += Walker->NumberOfPages; PalCodePages += Walker->NumberOfPages; break; + case EfiUnacceptedMemory: + ShellPrintHiiEx (-1, -1, NULL, (EFI_STRING_ID)(!Sfo ? STRING_TOKEN (STR_MEMMAP_LIST_ITEM) : STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiUnacceptedMemory, Walker->PhysicalStart, Walker->PhysicalStart+MultU64x64 (SIZE_4KB, Walker->NumberOfPages)-1, Walker->NumberOfPages, Walker->Attribute); + TotalPages += Walker->NumberOfPages; + PalCodePages += Walker->NumberOfPages; + break; default: // // Shell Spec defines the SFO format. -- 2.29.2.windows.2