add detail comments on the complicated code segment.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5954 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2008-09-23 14:49:45 +00:00
parent 6fa28b758b
commit dc8d93ca0c
2 changed files with 18 additions and 9 deletions

View File

@ -35,18 +35,20 @@ typedef struct {
//
UINTN mMemoryMapKey = 0;
//
// mMapStack - space to use as temp storage to build new map descriptors
// mMapDepth - depth of new descriptor stack
//
#define MAX_MAP_DEPTH 6
///
/// mMapDepth - depth of new descriptor stack
///
UINTN mMapDepth = 0;
///
/// mMapStack - space to use as temp storage to build new map descriptors
///
MEMORY_MAP mMapStack[MAX_MAP_DEPTH];
UINTN mFreeMapStack = 0;
//
// This list maintain the free memory map list
//
///
/// This list maintain the free memory map list
///
LIST_ENTRY mFreeMemoryMapEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mFreeMemoryMapEntryList);
BOOLEAN mMemoryTypeInformationInitialized = FALSE;
@ -1287,7 +1289,10 @@ CoreGetMemoryMap (
if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo)) {
if ((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME) {
//
// Create EFI_MEMORY_DESCRIPTOR for every Reserved and MMIO GCD entries
// that are marked for runtime use
//
MemoryMap->PhysicalStart = GcdMapEntry->BaseAddress;
MemoryMap->VirtualStart = 0;
MemoryMap->NumberOfPages = RShiftU64 ((GcdMapEntry->EndAddress - GcdMapEntry->BaseAddress + 1), EFI_PAGE_SHIFT);

View File

@ -124,6 +124,10 @@ LookupPoolHead (
return &mPoolHead[MemoryType];
}
//
// MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI
// OS loaders that are provided by operating system vendors
//
if (MemoryType < 0) {
for (Link = mPoolHeadList.ForwardLink; Link != &mPoolHeadList; Link = Link->ForwardLink) {