---
.../Csm/LegacyBiosDxe/LegacyBiosInterface.h | 5 ++--
.../Csm/LegacyBiosDxe/LegacyBootSupport.c | 5 +++-
.../MemoryProfileInfo/MemoryProfileInfo.c | 3 +-
MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 12 ++++++--
MdeModulePkg/Core/Dxe/Mem/Page.c | 34 ++++++++++++++++++----
MdeModulePkg/Core/Dxe/Mem/Pool.c | 5 ++--
MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c | 3 +-
MdePkg/Include/Pi/PiDxeCis.h | 8 ++++-
MdePkg/Include/Pi/PiHob.h | 4 ++-
MdePkg/Include/Uefi/UefiMultiPhase.h | 8 ++++-
MdePkg/Include/Uefi/UefiSpec.h | 8 +++++
.../Library/UefiShellDebug1CommandsLib/MemMap.c | 8 ++++-
12 files changed, 85 insertions(+), 18 deletions(-)
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
index cc893a4..fcc0190 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -481,7 +481,8 @@ typedef enum {
EfiAcpiAddressRangeMemory = 1,
EfiAcpiAddressRangeReserved = 2,
EfiAcpiAddressRangeACPI = 3,
- EfiAcpiAddressRangeNVS = 4
+ EfiAcpiAddressRangeNVS = 4,
+ EfiAddressRangePersistentMemory = 7
} EFI_ACPI_MEMORY_TYPE;
typedef struct {
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
index 8120ef7..6ed0210 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -1597,6 +1597,9 @@ EfiMemoryTypeToE820Type (
case EfiRuntimeServicesData:
return EfiAcpiAddressRangeMemory;
+ case EfiPersistentMemory:
+ return EfiAddressRangePersistentMemory;
+
case EfiACPIReclaimMemory:
return EfiAcpiAddressRangeACPI;
diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
index 084b069..96bb9ad 100644
--- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
+++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -54,6 +54,7 @@ CHAR16 *mMemoryTypeString[] = {
L"EfiMemoryMappedIO",
L"EfiMemoryMappedIOPortSpace",
L"EfiPalCode",
+ L"EfiPersistentMemory",
L"EfiOSReserved",
};
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 6703c84..bce01a0 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -3,7 +3,7 @@
The GCD services are used to manage the memory and I/O regions that
are accessible to the CPU that is executing the DXE core.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -27,7 +27,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
EXPRESS OR IMPLIED.
EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_16_BIT_IO
| \
EFI_RESOURCE_ATTRIBUTE_32_BIT_IO
| \
- EFI_RESOURCE_ATTRIBUTE_64_BIT_IO
)
+ EFI_RESOURCE_ATTRIBUTE_64_BIT_IO
| \
+ EFI_RESOURCE_ATTRIBUTE_PERSISTENT
)
#define TESTED_MEMORY_ATTRIBUTES (EFI_RESOURCE_ATTRIBUTE_PRESENT | \
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
@@ -92,6 +93,7 @@ GCD_ATTRIBUTE_CONVERSION_ENTRY mAttributeConversionTable[] = {
{ EFI_RESOURCE_ATTRIBUTE_PRESENT, EFI_MEMORY_PRESENT,
FALSE },
{ EFI_RESOURCE_ATTRIBUTE_INITIALIZED, EFI_MEMORY_INITIALIZED,
FALSE },
{ EFI_RESOURCE_ATTRIBUTE_TESTED, EFI_MEMORY_TESTED,
FALSE },
+ { EFI_RESOURCE_ATTRIBUTE_PERSISTABLE, EFI_MEMORY_NV,
TRUE },
{ 0, 0,
FALSE }
};
@@ -103,6 +105,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8
*mGcdMemoryTypeNames[] = {
"Reserved ", // EfiGcdMemoryTypeReserved
"SystemMem", // EfiGcdMemoryTypeSystemMemory
"MMIO ", // EfiGcdMemoryTypeMemoryMappedIo
+ "PersistentMem",// EfiGcdMemoryTypePersistentMemory
"Unknown " // EfiGcdMemoryTypeMaximum
};
@@ -231,6 +234,8 @@ CoreValidateResourceDescriptorHobAttributes (
((Attributes & EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE) != 0));
ASSERT (((Attributes & EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED) == 0) ||
((Attributes & EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE) != 0));
+ ASSERT (((Attributes & EFI_RESOURCE_ATTRIBUTE_PERSISTENT) == 0) ||
+ ((Attributes & EFI_RESOURCE_ATTRIBUTE_PERSISTABLE) != 0));
}
/**
@@ -2357,6 +2362,9 @@ CoreInitializeGcdServices (
if ((ResourceHob->ResourceAttribute & MEMORY_ATTRIBUTE_MASK) ==
PRESENT_MEMORY_ATTRIBUTES) {
GcdMemoryType = EfiGcdMemoryTypeReserved;
}
+ if ((ResourceHob->ResourceAttribute &
EFI_RESOURCE_ATTRIBUTE_PERSISTENT) == EFI_RESOURCE_ATTRIBUTE_PERSISTENT) {
+ GcdMemoryType = EfiGcdMemoryTypePersistentMemory;
+ }
break;
case EFI_RESOURCE_MEMORY_MAPPED_IO:
case EFI_RESOURCE_FIRMWARE_DEVICE:
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index 84ebbca..830b197 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -67,6 +67,7 @@ EFI_MEMORY_TYPE_STATISTICS
mMemoryTypeStatistics[EfiMaxMemoryType + 1] = {
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, //
EfiMemoryMappedIO
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, //
EfiMemoryMappedIOPortSpace
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiPalCode
+ { 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, //
EfiPersistentMemory
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE } //
EfiMaxMemoryType
};
@@ -88,6 +89,7 @@ EFI_MEMORY_TYPE_INFORMATION
gMemoryTypeInformation[EfiMaxMemoryType + 1] = {
{ EfiMemoryMappedIO, 0 },
{ EfiMemoryMappedIOPortSpace, 0 },
{ EfiPalCode, 0 },
+ { EfiPersistentMemory, 0 },
{ EfiMaxMemoryType, 0 }
};
//
@@ -1198,7 +1200,7 @@ CoreInternalAllocatePages (
}
if ((MemoryType >= EfiMaxMemoryType && MemoryType <= 0x7fffffff) ||
- MemoryType == EfiConventionalMemory) {
+ (MemoryType == EfiConventionalMemory) || (MemoryType ==
EfiPersistentMemory)) {
return EFI_INVALID_PARAMETER;
}
@@ -1528,7 +1530,7 @@ CoreGetMemoryMap (
EFI_STATUS Status;
UINTN Size;
UINTN BufferSize;
- UINTN NumberOfRuntimeEntries;
+ UINTN NumberOfRuntimePersistentEntries;
LIST_ENTRY *Link;
MEMORY_MAP *Entry;
EFI_GCD_MAP_ENTRY *GcdMapEntry;
@@ -1546,16 +1548,21 @@ CoreGetMemoryMap (
//
// Count the number of Reserved and MMIO entries that are marked for runtime
use
+ // And, count the number of Persistent entries.
//
- NumberOfRuntimeEntries = 0;
+ NumberOfRuntimePersistentEntries = 0;
for (Link = mGcdMemorySpaceMap.ForwardLink; Link != &mGcdMemorySpaceMap;
Link = Link->ForwardLink) {
GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo)) {
if ((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) ==
EFI_MEMORY_RUNTIME) {
- NumberOfRuntimeEntries++;
+ NumberOfRuntimePersistentEntries ++;
}
}
+
+ if (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistentMemory) {
+ NumberOfRuntimePersistentEntries ++;
+ }
}
Size = sizeof (EFI_MEMORY_DESCRIPTOR);
@@ -1580,7 +1587,7 @@ CoreGetMemoryMap (
//
// Compute the buffer size needed to fit the entire map
//
- BufferSize = Size * NumberOfRuntimeEntries;
+ BufferSize = Size * NumberOfRuntimePersistentEntries;
for (Link = gMemoryMap.ForwardLink; Link != &gMemoryMap; Link =
Link->ForwardLink) {
BufferSize += Size;
}
@@ -1673,6 +1680,23 @@ CoreGetMemoryMap (
MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);
}
}
+
+ if (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistentMemory) {
+ //
+ // Create EFI_MEMORY_DESCRIPTOR for every Persistent GCD entries
+ //
+ MemoryMap->PhysicalStart = GcdMapEntry->BaseAddress;
+ MemoryMap->VirtualStart = 0;
+ MemoryMap->NumberOfPages = RShiftU64 ((GcdMapEntry->EndAddress -
GcdMapEntry->BaseAddress + 1), EFI_PAGE_SHIFT);
+ MemoryMap->Attribute = GcdMapEntry->Attributes | EFI_MEMORY_NV;
+ MemoryMap->Type = EfiPersistentMemory;
+
+ //
+ // Check to see if the new Memory Map Descriptor can be merged with an
+ // existing descriptor if they are adjacent and have the same attributes
+ //
+ MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);
+ }
}
//
diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c
index a40ddd5..1be177f 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Pool.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c
@@ -1,7 +1,7 @@
/** @file
UEFI Memory pool management functions.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -169,6 +169,7 @@ LookupPoolHead (
pool
@retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL.
+ PoolType was EfiPersistentMemory.
@retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation
failed.
@retval EFI_SUCCESS Pool successfully allocated.
@@ -187,7 +188,7 @@ CoreInternalAllocatePool (
// If it's not a valid type, fail it
//
if ((PoolType >= EfiMaxMemoryType && PoolType <= 0x7fffffff) ||
- PoolType == EfiConventionalMemory) {
+ (PoolType == EfiConventionalMemory) || (PoolType ==
EfiPersistentMemory)) {
return EFI_INVALID_PARAMETER;
}
diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
index e119fad..10aadff 100644
--- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
+++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
@@ -1,7 +1,7 @@
/** @file
Support routines for SMRAM profile.
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 -2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -1848,6 +1848,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 *mMemoryTypeString[]
= {
L"EfiMemoryMappedIO",
L"EfiMemoryMappedIOPortSpace",
L"EfiPalCode",
+ L"EfiPersistentMemory",
L"EfiOSReserved",
};
diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h
index a3d57b1..e39fe4e 100644
--- a/MdePkg/Include/Pi/PiDxeCis.h
+++ b/MdePkg/Include/Pi/PiDxeCis.h
@@ -1,7 +1,7 @@
/** @file
Include file matches things in PI.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under
the terms and conditions of the BSD License that accompanies this
distribution.
The full text of the license may be found at
@@ -48,6 +48,12 @@ typedef enum {
/// access I/O devices in the platform.
///
EfiGcdMemoryTypeMemoryMappedIo,
+ ///
+ /// A memory region that is visible to the boot processor.
+ /// This memory supports byte-addressable non-volatility.
+ /// It will be defined in the future PI specification.
+ ///
+ EfiGcdMemoryTypePersistentMemory,
EfiGcdMemoryTypeMaximum
} EFI_GCD_MEMORY_TYPE;
diff --git a/MdePkg/Include/Pi/PiHob.h b/MdePkg/Include/Pi/PiHob.h
index 9c65d5b..fc523e1 100644
--- a/MdePkg/Include/Pi/PiHob.h
+++ b/MdePkg/Include/Pi/PiHob.h
@@ -1,7 +1,7 @@
/** @file
HOB related definitions in PI.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -257,6 +257,7 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000
//
// The rest of the attributes are used to describe capabilities
//
@@ -275,6 +276,7 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE 0x00100000
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000
///
/// Describes the resource properties of all fixed,
diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h
b/MdePkg/Include/Uefi/UefiMultiPhase.h
index a7a7dcf..3201a4e 100644
--- a/MdePkg/Include/Uefi/UefiMultiPhase.h
+++ b/MdePkg/Include/Uefi/UefiMultiPhase.h
@@ -1,7 +1,7 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both
PEI and DXE phases.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -82,6 +82,12 @@ typedef enum {
/// Address space reserved by the firmware for code that is part of the
processor.
///
EfiPalCode,
+ ///
+ /// A memory region that operates as EfiConventionalMemory,
+ /// however it happens to also support byte-addressable non-volatility.
+ /// It will be defined in the future UEFI specification.
+ ///
+ EfiPersistentMemory,
EfiMaxMemoryType
} EFI_MEMORY_TYPE;
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index 64105c2..b3bc426 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -75,6 +75,12 @@ typedef enum {
#define EFI_MEMORY_RP 0x0000000000002000ULL
#define EFI_MEMORY_XP 0x0000000000004000ULL
//
+// Physical memory persistence attribute.
+// The memory region supports byte-addressable non-volatility.
+// It will be defined in the future UEFI specification.
+//
+#define EFI_MEMORY_NV 0x0000000000008000ULL
+//
// Runtime memory attribute
//
#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
@@ -128,6 +134,7 @@ typedef struct {
AllocateMaxAddress or AllocateAddress.
2) MemoryType is in the range
3) Memory is NULL.
+ 4) MemoryType was EfiPersistentMemory.
EfiMaxMemoryType..0x7FFFFFFF.
@retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
@retval EFI_NOT_FOUND The requested pages could not be found.
@@ -207,6 +214,7 @@ EFI_STATUS
@retval EFI_SUCCESS The requested number of bytes was allocated.
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
@retval EFI_INVALID_PARAMETER PoolType was invalid or Buffer is NULL.
+ PoolType was EfiPersistentMemory.
**/
typedef
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
index 6bc1a3e..8f9d161 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
@@ -1,7 +1,7 @@
/** @file
Main file for Mode shell Debug1 function.
- (C) Copyright 2013-2014, Hewlett-Packard Development Company, L.P.
+ (C) Copyright 2013-2015, Hewlett-Packard Development Company, L.P.
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
@@ -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;
--
1.9.0.msysgit.0
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel