mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
Merge 533417cee9 into fb2ac429de
This commit is contained in:
commit
7a57edba68
1 changed files with 0 additions and 56 deletions
|
|
@ -687,60 +687,6 @@ MmConfigurationMmNotify (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Migrate MemoryBaseAddress in memory allocation HOBs with BootServiceData
|
|
||||||
type and non-zero GUID name from Boot Service memory to MMRAM.
|
|
||||||
|
|
||||||
@param[in] HobStart Pointer to the start of the HOB list.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
MigrateMemoryAllocationHobs (
|
|
||||||
IN VOID *HobStart
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_PEI_HOB_POINTERS Hob;
|
|
||||||
EFI_HOB_MEMORY_ALLOCATION *MemoryAllocationHob;
|
|
||||||
VOID *MemoryInMmram;
|
|
||||||
|
|
||||||
MemoryAllocationHob = NULL;
|
|
||||||
Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, HobStart);
|
|
||||||
while (Hob.Raw != NULL) {
|
|
||||||
MemoryAllocationHob = (EFI_HOB_MEMORY_ALLOCATION *)Hob.Raw;
|
|
||||||
if (MemoryAllocationHob->AllocDescriptor.MemoryType == EfiBootServicesData) {
|
|
||||||
if (!IsZeroGuid (&MemoryAllocationHob->AllocDescriptor.Name)) {
|
|
||||||
MemoryInMmram = AllocatePages (EFI_SIZE_TO_PAGES (MemoryAllocationHob->AllocDescriptor.MemoryLength));
|
|
||||||
if (MemoryInMmram != NULL) {
|
|
||||||
DEBUG ((
|
|
||||||
DEBUG_INFO,
|
|
||||||
"Migrate Memory Allocation Hob (%g) from %08x to %08p\n",
|
|
||||||
&MemoryAllocationHob->AllocDescriptor.Name,
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryBaseAddress,
|
|
||||||
MemoryInMmram
|
|
||||||
));
|
|
||||||
CopyMem (
|
|
||||||
MemoryInMmram,
|
|
||||||
(VOID *)(UINTN)MemoryAllocationHob->AllocDescriptor.MemoryBaseAddress,
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryLength
|
|
||||||
);
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)MemoryInMmram;
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryType = EfiRuntimeServicesData;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DEBUG ((
|
|
||||||
DEBUG_ERROR,
|
|
||||||
"Error - Memory Allocation Hob [%08x, %08x] doesn't have a GUID name specified\n",
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryBaseAddress,
|
|
||||||
MemoryAllocationHob->AllocDescriptor.MemoryLength
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Hob.Raw = GET_NEXT_HOB (Hob);
|
|
||||||
Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is responsible for validating the input HOB list and
|
This function is responsible for validating the input HOB list and
|
||||||
initializing a new HOB list in MMRAM based on the input HOB list.
|
initializing a new HOB list in MMRAM based on the input HOB list.
|
||||||
|
|
@ -813,8 +759,6 @@ InitializeMmHobList (
|
||||||
Status = MmInstallConfigurationTable (&gMmCoreMmst, &gEfiHobListGuid, MmHobStart, HobSize);
|
Status = MmInstallConfigurationTable (&gMmCoreMmst, &gEfiHobListGuid, MmHobStart, HobSize);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
MigrateMemoryAllocationHobs (MmHobStart);
|
|
||||||
|
|
||||||
return MmHobStart;
|
return MmHobStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue