]> git.proxmox.com Git - mirror_edk2.git/commitdiff
add detail comments on the complicated code segment.
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Sep 2008 14:49:45 +0000 (14:49 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Sep 2008 14:49:45 +0000 (14:49 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5954 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Mem/Page.c
MdeModulePkg/Core/Dxe/Mem/Pool.c

index 5e3c81d78693dcd4b827fd20223c3682851421f9..c55bbe3b921e09a95c80f1ee38bacb1a57fb4b0c 100644 (file)
@@ -35,18 +35,20 @@ typedef struct {
 //\r
 UINTN     mMemoryMapKey = 0;\r
 \r
-//\r
-// mMapStack - space to use as temp storage to build new map descriptors\r
-// mMapDepth - depth of new descriptor stack\r
-//\r
-\r
 #define MAX_MAP_DEPTH 6\r
+\r
+///\r
+/// mMapDepth - depth of new descriptor stack\r
+///\r
 UINTN         mMapDepth = 0;\r
+///\r
+/// mMapStack - space to use as temp storage to build new map descriptors\r
+///\r
 MEMORY_MAP    mMapStack[MAX_MAP_DEPTH];\r
 UINTN         mFreeMapStack = 0;\r
-//\r
-// This list maintain the free memory map list\r
-//\r
+///\r
+/// This list maintain the free memory map list\r
+///\r
 LIST_ENTRY   mFreeMemoryMapEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mFreeMemoryMapEntryList);\r
 BOOLEAN      mMemoryTypeInformationInitialized = FALSE;\r
 \r
@@ -1287,7 +1289,10 @@ CoreGetMemoryMap (
     if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||\r
         (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo)) {\r
       if ((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME) {\r
-\r
+        // \r
+        // Create EFI_MEMORY_DESCRIPTOR for every Reserved and MMIO GCD entries\r
+        // that are marked for runtime use\r
+        //\r
         MemoryMap->PhysicalStart = GcdMapEntry->BaseAddress;\r
         MemoryMap->VirtualStart  = 0;\r
         MemoryMap->NumberOfPages = RShiftU64 ((GcdMapEntry->EndAddress - GcdMapEntry->BaseAddress + 1), EFI_PAGE_SHIFT);\r
index cea6fada4c367c95b4b53c4ffef1d1900e1eb85f..ce70cff51353efce46f5eae472e24d00d2a30197 100644 (file)
@@ -124,6 +124,10 @@ LookupPoolHead (
     return &mPoolHead[MemoryType];\r
   }\r
 \r
+  //\r
+  // MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI \r
+  // OS loaders that are provided by operating system vendors\r
+  //\r
   if (MemoryType < 0) {\r
 \r
     for (Link = mPoolHeadList.ForwardLink; Link != &mPoolHeadList; Link = Link->ForwardLink) {\r