From 73768087c464615d95ea95fb4a281cbfb17147a3 Mon Sep 17 00:00:00 2001 From: Chris Phillips Date: Thu, 21 Aug 2014 20:26:32 +0000 Subject: [PATCH] ShellPkg: Fixes and updates for the 'memmap' command - Update 'memmap -sfo' format to match UEFI Shell 2.1 spec - Update help output for easier viewing - Update 'memmap' output format for better alignment Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Phillips Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15872 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UefiShellDebug1CommandsLib/MemMap.c | 101 +++++++++++------- .../UefiShellDebug1CommandsLib.uni | Bin 171322 -> 169906 bytes 2 files changed, 61 insertions(+), 40 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c index 7f2faa4273..6bc1a3ed72 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c @@ -1,6 +1,7 @@ /** @file Main file for Mode shell Debug1 function. + (C) Copyright 2013-2014, Hewlett-Packard Development Company, L.P. Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -12,21 +13,37 @@ **/ +// +// Need full names for Standard-Format Output +// STATIC CONST CHAR16 NameEfiReservedMemoryType[] = L"Reserved"; STATIC CONST CHAR16 NameEfiLoaderCode[] = L"LoaderCode"; STATIC CONST CHAR16 NameEfiLoaderData[] = L"LoaderData"; -STATIC CONST CHAR16 NameEfiBootServicesCode[] = L"BS_Code"; -STATIC CONST CHAR16 NameEfiBootServicesData[] = L"BS_Data"; -STATIC CONST CHAR16 NameEfiRuntimeServicesCode[] = L"RT_Code"; -STATIC CONST CHAR16 NameEfiRuntimeServicesData[] = L"RT_Data"; +STATIC CONST CHAR16 NameEfiBootServicesCode[] = L"BootServiceCode"; +STATIC CONST CHAR16 NameEfiBootServicesData[] = L"BootServiceData"; +STATIC CONST CHAR16 NameEfiRuntimeServicesCode[] = L"RuntimeCode"; +STATIC CONST CHAR16 NameEfiRuntimeServicesData[] = L"RuntimeData"; STATIC CONST CHAR16 NameEfiConventionalMemory[] = L"Available"; -STATIC CONST CHAR16 NameEfiUnusableMemory[] = L"Unusable"; -STATIC CONST CHAR16 NameEfiACPIReclaimMemory[] = L"ACPIRec"; -STATIC CONST CHAR16 NameEfiACPIMemoryNVS[] = L"ACPI_NVS"; -STATIC CONST CHAR16 NameEfiMemoryMappedIO[] = L"MMIO"; -STATIC CONST CHAR16 NameEfiMemoryMappedIOPortSpace[] = L"MMIOPort"; +STATIC CONST CHAR16 NameEfiUnusableMemory[] = L"UnusableMemory"; +STATIC CONST CHAR16 NameEfiACPIReclaimMemory[] = L"ACPIReclaimMemory"; +STATIC CONST CHAR16 NameEfiACPIMemoryNVS[] = L"ACPIMemoryNVS"; +STATIC CONST CHAR16 NameEfiMemoryMappedIO[] = L"MemoryMappedIO"; +STATIC CONST CHAR16 NameEfiMemoryMappedIOPortSpace[] = L"MemoryMappedIOPortSpace"; STATIC CONST CHAR16 NameEfiPalCode[] = L"PalCode"; +// +// Need short names for some memory types +// +STATIC CONST CHAR16 NameEfiBootServicesCodeShort[] = L"BS_Code"; +STATIC CONST CHAR16 NameEfiBootServicesDataShort[] = L"BS_Data"; +STATIC CONST CHAR16 NameEfiRuntimeServicesCodeShort[] = L"RT_Code"; +STATIC CONST CHAR16 NameEfiRuntimeServicesDataShort[] = L"RT_Data"; +STATIC CONST CHAR16 NameEfiUnusableMemoryShort[] = L"Unusable"; +STATIC CONST CHAR16 NameEfiACPIReclaimMemoryShort[] = L"ACPI_Recl"; +STATIC CONST CHAR16 NameEfiACPIMemoryNVSShort[] = L"ACPI_NVS"; +STATIC CONST CHAR16 NameEfiMemoryMappedIOShort[] = L"MMIO"; +STATIC CONST CHAR16 NameEfiMemoryMappedIOPortSpaceShort[] = L"MMIO_Port"; + #include "UefiShellDebug1CommandsLib.h" /** @@ -141,8 +158,14 @@ ShellCommandRunMemMap ( ShellStatus = SHELL_ACCESS_DENIED; } else { ASSERT(Version == EFI_MEMORY_DESCRIPTOR_VERSION); + Sfo = ShellCommandLineGetFlag(Package, L"-sfo"); - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_LIST_HEAD), gShellDebug1HiiHandle); + if (!Sfo) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_LIST_HEAD), gShellDebug1HiiHandle); + } else { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_SFO_HEADER), gShellDebug1HiiHandle, L"memmap"); + } + for (Walker = (UINT8*)Buffer; Walker < (((UINT8*)Buffer)+Size) && Walker != NULL; Walker += ItemSize){ switch (((EFI_MEMORY_DESCRIPTOR*)Walker)->Type) { case EfiReservedMemoryType: @@ -160,22 +183,22 @@ ShellCommandRunMemMap ( TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiBootServicesCode: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiBootServicesCode, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiBootServicesCodeShort:NameEfiBootServicesCode, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); BSCodePages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiBootServicesData: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiBootServicesData, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiBootServicesDataShort:NameEfiBootServicesData, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); BSDataPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiRuntimeServicesCode: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiRuntimeServicesCode, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiRuntimeServicesCodeShort:NameEfiRuntimeServicesCode, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); RTCodePages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiRuntimeServicesData: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiRuntimeServicesData, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiRuntimeServicesDataShort:NameEfiRuntimeServicesData, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); RTDataPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; @@ -185,25 +208,25 @@ ShellCommandRunMemMap ( TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiUnusableMemory: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiUnusableMemory, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiUnusableMemoryShort:NameEfiUnusableMemory, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); UnusableMemoryPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiACPIReclaimMemory: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiACPIReclaimMemory, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiACPIReclaimMemoryShort:NameEfiACPIReclaimMemory, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; AcpiReclaimPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiACPIMemoryNVS: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiACPIMemoryNVS, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiACPIMemoryNVSShort:NameEfiACPIMemoryNVS, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; AcpiNvsPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiMemoryMappedIO: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiMemoryMappedIO, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiMemoryMappedIOShort:NameEfiMemoryMappedIO, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); MmioSpacePages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiMemoryMappedIOPortSpace: - ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiMemoryMappedIOPortSpace, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, !Sfo?NameEfiMemoryMappedIOPortSpaceShort:NameEfiMemoryMappedIOPortSpace, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart, ((EFI_MEMORY_DESCRIPTOR*)Walker)->PhysicalStart+MultU64x64(SIZE_4KB,((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages)-1, ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages, ((EFI_MEMORY_DESCRIPTOR*)Walker)->Attribute); MmioPortPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; case EfiPalCode: @@ -218,18 +241,21 @@ ShellCommandRunMemMap ( // // print the summary // - ReservedPagesSize = MultU64x64(SIZE_4KB,ReservedPages); - LoadCodePagesSize = MultU64x64(SIZE_4KB,LoadCodePages); - LoadDataPagesSize = MultU64x64(SIZE_4KB,LoadDataPages); - BSCodePagesSize = MultU64x64(SIZE_4KB,BSCodePages); - BSDataPagesSize = MultU64x64(SIZE_4KB,BSDataPages); - RTDataPagesSize = MultU64x64(SIZE_4KB,RTDataPages); - RTCodePagesSize = MultU64x64(SIZE_4KB,RTCodePages); - AvailPagesSize = MultU64x64(SIZE_4KB,AvailPages); - TotalPagesSize = MultU64x64(SIZE_4KB,TotalPages); - AcpiReclaimPagesSize = MultU64x64(SIZE_4KB,AcpiReclaimPages); - AcpiNvsPagesSize = MultU64x64(SIZE_4KB,AcpiNvsPages); - MmioSpacePagesSize = MultU64x64(SIZE_4KB,MmioSpacePages); + ReservedPagesSize = MultU64x64(SIZE_4KB,ReservedPages); + LoadCodePagesSize = MultU64x64(SIZE_4KB,LoadCodePages); + LoadDataPagesSize = MultU64x64(SIZE_4KB,LoadDataPages); + BSCodePagesSize = MultU64x64(SIZE_4KB,BSCodePages); + BSDataPagesSize = MultU64x64(SIZE_4KB,BSDataPages); + RTDataPagesSize = MultU64x64(SIZE_4KB,RTDataPages); + RTCodePagesSize = MultU64x64(SIZE_4KB,RTCodePages); + AvailPagesSize = MultU64x64(SIZE_4KB,AvailPages); + TotalPagesSize = MultU64x64(SIZE_4KB,TotalPages); + AcpiReclaimPagesSize = MultU64x64(SIZE_4KB,AcpiReclaimPages); + AcpiNvsPagesSize = MultU64x64(SIZE_4KB,AcpiNvsPages); + MmioSpacePagesSize = MultU64x64(SIZE_4KB,MmioSpacePages); + MmioPortPagesSize = MultU64x64(SIZE_4KB,MmioPortPages); + PalCodePagesSize = MultU64x64(SIZE_4KB,PalCodePages); + UnusableMemoryPagesSize = MultU64x64(SIZE_4KB,UnusableMemoryPages); if (!Sfo) { ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_LIST_SUMM), gShellDebug1HiiHandle, ReservedPages, ReservedPagesSize, @@ -242,20 +268,15 @@ ShellCommandRunMemMap ( AcpiReclaimPages, AcpiReclaimPagesSize, AcpiNvsPages, AcpiNvsPagesSize, MmioSpacePages, MmioSpacePagesSize, + MmioPortPages, MmioPortPagesSize, + PalCodePages, PalCodePagesSize, AvailPages, AvailPagesSize, DivU64x32(MultU64x64(SIZE_4KB,TotalPages), SIZE_1MB), TotalPagesSize ); } else { - // - // Compute sizes only used for SFO mode - // - MmioPortPagesSize = MultU64x64(SIZE_4KB, MmioPortPages); - UnusableMemoryPagesSize = MultU64x64(SIZE_4KB, UnusableMemoryPages); - PalCodePagesSize = MultU64x64(SIZE_4KB, PalCodePages); - - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_MEMMAP_LIST_SUMM_SFO), gShellDebug1HiiHandle, + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_LIST_SUMM_SFO), gShellDebug1HiiHandle, TotalPagesSize, - MultU64x64(SIZE_4KB,ReservedPages), + ReservedPagesSize, BSCodePagesSize, BSDataPagesSize, RTCodePagesSize, diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni index 5561e6ff070e937c1fc5f2063c0f19daa977fc6f..79a72ec6e93d660d2685df0e0824144ff2be8c61 100644 GIT binary patch delta 1398 zcmcgsO-vI}5T3U{Ar%!UEop&vMMwboY1i^sLQ5?WjX)cV#u%b4lu8YhrQ0fkXo3eX z8cW_`^klsne?Si;91JJp$;6WhCk}cs#H$(Z@!tgxv78s zN}m>s8o>umt52%RC9s17PC_f>Ea$qf*u-~qVo?x=z|VWFHlBW1Z<~fGn4!l9b1+L! z7~&9t7N~;;P@oRi9|-L{ZqdI9WQi3 zoZf%6xkGBoN`ASMB=-dFsQV04t?YUKS6ljbV*b>A;%=sYBh$~MR=gxJJ#NpkK&=Sl zq|G>0ejOYJJ-tU@kj4mjA%Gom=4T?#_c7z4R+z{u(~9LL!GM`T){U}5&{ZoCC5c69 zI1vUQM$IFWoME^L3VMBl`K(Ak3N5PYDpYX^0!@$|p}81wi&S07eE)@MH9}hrWvfQ* zO0{zQkfN^)DfAv^MwCOWt$Kg#ql6oy_=6aBv8tmEXd~A#P#ax@^XQdXPr)2S@rKMs zaLg!J@SV(t@P~($VcO3MizL;9FS*V9rLF{5WY*|YD8j|;22-$*?Uoe9r$&91HdQ-F zp^<>=^j2>VBBHev&4%fWGc?&VtTRm?|)L;fUPfF_`yOcH1RL#|^_I zniH%RKM$}9OsAR7pdLwOjnYVvorF2`OROC~%#*0r1Tz_PiH>H2j1eG4sf^?5H0wLI tKWBr~1zyrSKoz~4Ih3C<3yKOGK>IIt1QQCg@HKnQz0fk-2rUcSw% delta 2347 zcmcgt&2Jl35T8lhrg1)sFplHUCfigIL^Q$ckF_^crLo=6R-`p`K{*svCUI$`eAuy@ zl&Vsr0zz$2RrC(;Mk$m_RVfOU8p)SBEnf$Y9JnCz7oZ@OE8+LnPRM$V#0jnTy?yg$ ze)F4oGyA?-c9%--+uCOjdO5T*+SDOZy6fTZ9iMlLTal5b9A)Tz$_o7ppC}*PEuKYg zu_-<_R>Xtoz9x+hkxl{embqVCKYT^xVqJA)t>TE;?vOt-ow|>PoU+TWIb}nKYh~B{ z8l9mmjnfoqG=#Sg?@o3~;}pF^X~^qqToH>$YH_cMACGp{aGw{!cz5#@O#o+<;v!@A zi}hfa2pHX>9FO<(Q30O&=uH}{H;a{&r>fr}{xbH6#YF0w(w?Yl|9|s2nxk_xL%km^ zC0Cb{oF0(tc^+$-Mkc56WGE-!p5xPUBi-PZzkI|e(*?Rfvj{v*MQqQ2bOs<3G+@c+ zETba!XXz3&a@II#>1P3|QLlAOQ?M#xtx}kj%k%7Q>c!_I&B)9qd*qiUACn_9P&v>ik3!! zRJbYBVHQXVr-G(tMP1F?6p-J7!9MxvJi9p~*ZTQD&qcs2KuMX8!$9Ryk*F9Kq<(`v z{$iDb;)^t3ykz;Bkef>l-^tYL+#yp7oRonQKPT@kaHkA>&n}U?^8)%hDa!j?;^#szBf^df3Q?%vXG<#*>F}vEL6rn)%8IT7av$rKiVf6fndMb*GPkB!h{sNE$ z<=Rc09whB-%3ptCzqlN0l}~Q+^K!ieJY^iL#T%wj4PI-bQG>N|pFQ?G}L4p(ru%538Y6qTLu+8~&!p3Nfn z^B5=O%02e))xpV8w@DO;MRW@gRqEbl6{9T+`f2v^oLG+fUR4)`dLk&KAm$X(fy>Zp zx0fL~1i~goG3(F?O8rmv;STJ4Wy?^*cFbX@3RQ=Znqw8Cpt;j1RL7f+CQ(KK_^Wt& z!&YGy(aOEHVRno z#dLs0tyIRqENpQ)k-?$b{!B1YSG#(`Rv1Pd7`+N(B6yYLDx63C6kWoIcOF!SZe86N k)j0;Br_NEO2Iq)%zuf$qUzFvm9R6fufmb&c8lLq04Sk&YrT_o{