- if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&\r
- (ResourceHob->ResourceAttribute & MEMORY_ATTRIBUTE_MASK) == TESTED_MEMORY_ATTRIBUTES ) {\r
-\r
- if (PhitHob->EfiFreeMemoryBottom >= ResourceHob->PhysicalStart &&\r
- PhitHob->EfiFreeMemoryTop <= (ResourceHob->PhysicalStart + ResourceHob->ResourceLength) ) {\r
-\r
- //\r
- // Cache the resource descriptor HOB for the memory region described by the PHIT HOB\r
- //\r
- PhitResourceHob = ResourceHob;\r
- Found = TRUE;\r
-\r
- Attributes = PhitResourceHob->ResourceAttribute;\r
- BaseAddress = PageAlignAddress (PhitHob->EfiMemoryTop);\r
- Length = PageAlignLength (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - BaseAddress);\r
- if (Length < MINIMUM_INITIAL_MEMORY_SIZE) {\r
- BaseAddress = PageAlignAddress (PhitHob->EfiFreeMemoryBottom);\r
- Length = PageAlignLength (PhitHob->EfiFreeMemoryTop - BaseAddress);\r
- if (Length < MINIMUM_INITIAL_MEMORY_SIZE) {\r
- BaseAddress = PageAlignAddress (ResourceHob->PhysicalStart);\r
- Length = PageAlignLength ((UINT64)((UINTN)*HobStart - BaseAddress));\r
- }\r
- }\r
- break;\r
- }\r
+ //\r
+ // Cache the resource descriptor HOB for the memory region described by the PHIT HOB\r
+ //\r
+ PhitResourceHob = ResourceHob;\r
+ Found = TRUE;\r
+\r
+ //\r
+ // Compute range between PHIT EfiFreeMemoryTop and the end of the Resource Descriptor HOB\r
+ //\r
+ Attributes = PhitResourceHob->ResourceAttribute;\r
+ BaseAddress = PageAlignAddress (PhitHob->EfiMemoryTop);\r
+ Length = PageAlignLength (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - BaseAddress);\r
+ if (Length < MINIMUM_INITIAL_MEMORY_SIZE) {\r
+ //\r
+ // If that range is not large enough to intialize the DXE Core, then \r
+ // Compute range between PHIT EfiFreeMemoryBottom and PHIT EfiFreeMemoryTop\r
+ //\r
+ BaseAddress = PageAlignAddress (PhitHob->EfiFreeMemoryBottom);\r
+ Length = PageAlignLength (PhitHob->EfiFreeMemoryTop - BaseAddress);\r
+ if (Length < MINIMUM_INITIAL_MEMORY_SIZE) {\r
+ //\r
+ // If that range is not large enough to intialize the DXE Core, then \r
+ // Compute range between the start of the Resource Descriptor HOB and the start of the HOB List\r
+ //\r
+ BaseAddress = PageAlignAddress (ResourceHob->PhysicalStart);\r
+ Length = PageAlignLength ((UINT64)((UINTN)*HobStart - BaseAddress));\r