summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
67b8f80)
Update the GCD memory map initialization code so it disregards
memory that is not addressable by the CPU at boot time. This
only affects the first memory descriptor that is added, other
memory descriptors are permitted that describe memory ranges
that may be accessible to the CPU itself only when executing
under the OS.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
// region that is big enough to initialize the DXE core. Always skip the PHIT Resource HOB.\r
// The max address must be within the physically addressible range for the processor.\r
//\r
// region that is big enough to initialize the DXE core. Always skip the PHIT Resource HOB.\r
// The max address must be within the physically addressible range for the processor.\r
//\r
- HighAddress = MAX_ADDRESS;\r
+ HighAddress = MAX_ALLOC_ADDRESS;\r
for (Hob.Raw = *HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
//\r
// Skip the Resource Descriptor HOB that contains the PHIT\r
for (Hob.Raw = *HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
//\r
// Skip the Resource Descriptor HOB that contains the PHIT\r
- // Skip Resource Descriptor HOBs that do not describe tested system memory below MAX_ADDRESS\r
+ // Skip Resource Descriptor HOBs that do not describe tested system memory below MAX_ALLOC_ADDRESS\r
//\r
ResourceHob = Hob.ResourceDescriptor;\r
if (ResourceHob->ResourceType != EFI_RESOURCE_SYSTEM_MEMORY) {\r
//\r
ResourceHob = Hob.ResourceDescriptor;\r
if (ResourceHob->ResourceType != EFI_RESOURCE_SYSTEM_MEMORY) {\r
if ((ResourceHob->ResourceAttribute & MEMORY_ATTRIBUTE_MASK) != TESTED_MEMORY_ATTRIBUTES) {\r
continue;\r
}\r
if ((ResourceHob->ResourceAttribute & MEMORY_ATTRIBUTE_MASK) != TESTED_MEMORY_ATTRIBUTES) {\r
continue;\r
}\r
- if ((ResourceHob->PhysicalStart + ResourceHob->ResourceLength) > (EFI_PHYSICAL_ADDRESS)MAX_ADDRESS) {\r
+ if ((ResourceHob->PhysicalStart + ResourceHob->ResourceLength) > (EFI_PHYSICAL_ADDRESS)MAX_ALLOC_ADDRESS) {\r
continue;\r
}\r
\r
//\r
// Skip Resource Descriptor HOBs that are below a previously found Resource Descriptor HOB\r
//\r
continue;\r
}\r
\r
//\r
// Skip Resource Descriptor HOBs that are below a previously found Resource Descriptor HOB\r
//\r
- if (HighAddress != (EFI_PHYSICAL_ADDRESS)MAX_ADDRESS && ResourceHob->PhysicalStart <= HighAddress) {\r
+ if (HighAddress != (EFI_PHYSICAL_ADDRESS)MAX_ALLOC_ADDRESS && ResourceHob->PhysicalStart <= HighAddress) {\r