Reviewed-by: Jaben Carsey <[email protected]> -----Original Message----- From: Liming Gao [mailto:[email protected]] Sent: Monday, April 27, 2015 3:58 AM To: [email protected] Cc: [email protected] Subject: [edk2] [Patch 3/4] ShellPkg: Update Shell MemMap command to show PersistentMemory range Importance: High
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao [email protected] Reviewed-by: Star Zeng <[email protected]> Signed-off-by: Liming Gao <[email protected]> --- 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 598c04a..4e35760 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c @@ -22,10 +22,11 @@ STATIC CONST CHAR16 NameEfiLoaderData[] = L"LoaderData"; 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 NameEfiPersistentMemory[] = L"Persistent"; 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"; @@ -205,10 +206,15 @@ ShellCommandRunMemMap ( case EfiConventionalMemory: ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiConventionalMemory, ((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); AvailPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; TotalPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; break; + case EfiPersistentMemory: + ShellPrintHiiEx(-1, -1, NULL, (EFI_STRING_ID)(!Sfo?STRING_TOKEN (STR_MEMMAP_LIST_ITEM):STRING_TOKEN (STR_MEMMAP_LIST_ITEM_SFO)), gShellDebug1HiiHandle, NameEfiPersistentMemory, ((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); + AvailPages += ((EFI_MEMORY_DESCRIPTOR*)Walker)->NumberOfPages; + 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, !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: -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
