mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-11-04 11:29:11 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									6fa28b758b
								
							
						
					
					
						commit
						dc8d93ca0c
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
@ -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) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user