mirror of https://github.com/acidanthera/audk.git
ShellPkg: Update Shell MemMap command to show PersistentMemory range
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17243 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a671a0120a
commit
6c4542eda2
|
@ -24,6 +24,7 @@ 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";
|
||||
|
@ -207,6 +208,11 @@ ShellCommandRunMemMap (
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue