29 VOID *TranslationTableBase;
30 UINTN TranslationTableSize;
35 Status = ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);
36 if (EFI_ERROR (Status)) {
37 DEBUG ((DEBUG_ERROR,
"Error: Failed to enable MMU\n"));
61 IN UINT64 UefiMemorySize
66 UINT64 ResourceLength;
77 ASSERT (
PcdGet64 (PcdSystemMemorySize) != 0);
82 ResourceAttributes = (
83 EFI_RESOURCE_ATTRIBUTE_PRESENT |
84 EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
85 EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
86 EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
87 EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
88 EFI_RESOURCE_ATTRIBUTE_TESTED
96 while ((NextHob.Raw =
GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) !=
NULL) {
97 if ((NextHob.ResourceDescriptor->
ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) &&
105 NextHob.Raw = GET_NEXT_HOB (NextHob);
111 EFI_RESOURCE_SYSTEM_MEMORY,
128 if ((
PcdGet64 (PcdFdBaseAddress) >=
PcdGet64 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) {
133 while ((NextHob.Raw =
GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) !=
NULL) {
134 if ((NextHob.ResourceDescriptor->
ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) &&
136 (FdTop <= NextHob.ResourceDescriptor->PhysicalStart + NextHob.ResourceDescriptor->
ResourceLength))
140 ResourceTop = NextHob.ResourceDescriptor->
PhysicalStart + ResourceLength;
143 if (SystemMemoryTop != FdTop) {
146 EFI_RESOURCE_SYSTEM_MEMORY,
159 EFI_RESOURCE_SYSTEM_MEMORY,
169 if (FdTop < NextHob.ResourceDescriptor->PhysicalStart + ResourceLength) {
172 EFI_RESOURCE_SYSTEM_MEMORY,
191 NextHob.Raw = GET_NEXT_HOB (NextHob);
198 InitMmu (MemoryTable);
200 if (
FeaturePcdGet (PcdPrePiProduceMemoryTypeInformationHob)) {
VOID EFIAPI BuildResourceDescriptorHob(IN EFI_RESOURCE_TYPE ResourceType, IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute, IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes)
VOID EFIAPI BuildMemoryAllocationHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
VOID *EFIAPI GetNextHob(IN UINT16 Type, IN CONST VOID *HobStart)
VOID *EFIAPI GetHobList(VOID)
#define DEBUG(Expression)
VOID BuildMemoryTypeInformationHob(VOID)
EFI_STATUS EFIAPI MemoryPeim(IN EFI_PHYSICAL_ADDRESS UefiMemoryBase, IN UINT64 UefiMemorySize)
#define PcdGet64(TokenName)
#define PcdGet32(TokenName)
#define FeaturePcdGet(TokenName)
UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PHYSICAL_ADDRESS PhysicalStart
EFI_RESOURCE_TYPE ResourceType
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute