47 while ((MemoryAllocationHob =
GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, HobStart)) !=
NULL) {
51 if ((UnblockBase < HobEnd) && (UnblockEnd > HobBase)) {
59 DEBUG ((DEBUG_ERROR,
"Error: range [0x%lx, 0x%lx] to unblock contains invalid type memory\n", UnblockBase, UnblockEnd));
63 if (UnblockBase < HobBase) {
68 GET_NEXT_HOB (MemoryAllocationHob),
72 if (EFI_ERROR (Status)) {
77 if (UnblockEnd > HobEnd) {
82 GET_NEXT_HOB (MemoryAllocationHob),
86 if (EFI_ERROR (Status)) {
94 HobStart = GET_NEXT_HOB (MemoryAllocationHob);
97 DEBUG ((DEBUG_ERROR,
"Error: range [0x%lx, 0x%lx] to unblock doesn't belong to any memory allocation HOB\n", UnblockBase, UnblockEnd));
125 IN UINT64 NumberOfPages
134 DEBUG ((DEBUG_ERROR,
"Error: UnblockAddress is not 4KB aligned: %p\n", UnblockAddress));
135 return EFI_INVALID_PARAMETER;
140 if (EFI_ERROR (Status)) {
148 if (!EFI_ERROR (Status)) {
149 DEBUG ((DEBUG_ERROR,
"Unblock requests are rejected since the MmIpl finishes execution\n"));
157 if (MmUnblockMemoryHob ==
NULL) {
158 DEBUG ((DEBUG_ERROR,
"MmUnblockMemoryRequest: Failed to allocate hob for unblocked data parameter!!\n"));
VOID *EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
VOID *EFIAPI GetNextHob(IN UINT16 Type, IN CONST VOID *HobStart)
VOID *EFIAPI GetHobList(VOID)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
#define RETURN_ACCESS_DENIED
#define IS_ALIGNED(Value, Alignment)
#define RETURN_INVALID_PARAMETER
#define DEBUG(Expression)
EFI_STATUS EFIAPI MmUnblockMemoryRequest(IN EFI_PHYSICAL_ADDRESS UnblockAddress, IN UINT64 NumberOfPages)
EFI_STATUS MmUnblockMemoryLibIsUnblockableRegion(IN VOID *HobStart, IN EFI_PHYSICAL_ADDRESS UnblockBase, IN EFI_PHYSICAL_ADDRESS UnblockEnd)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_PAGES_TO_SIZE(Pages)
EFI_PHYSICAL_ADDRESS MemoryBaseAddress
EFI_MEMORY_TYPE MemoryType
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
EFI_PHYSICAL_ADDRESS PhysicalStart