mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
SysCall: Replaced AllocatePool() with CoreAllocatePages().
This commit is contained in:
parent
ede5387afd
commit
99d5d6b5a9
@ -30,19 +30,24 @@ GoToRing3 (
|
|||||||
RING3_CALL_DATA *Input;
|
RING3_CALL_DATA *Input;
|
||||||
VA_LIST Marker;
|
VA_LIST Marker;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
EFI_PHYSICAL_ADDRESS Ring3Pages;
|
||||||
|
UINT32 PagesNumber;
|
||||||
|
|
||||||
DisableSMAP ();
|
PagesNumber = (UINT32)EFI_SIZE_TO_PAGES (sizeof (RING3_CALL_DATA) + Number * sizeof (UINTN));
|
||||||
Status = gBS->AllocatePool (
|
|
||||||
|
Status = CoreAllocatePages (
|
||||||
|
AllocateAnyPages,
|
||||||
EfiRing3MemoryType,
|
EfiRing3MemoryType,
|
||||||
sizeof (RING3_CALL_DATA) + Number * sizeof (UINTN),
|
PagesNumber,
|
||||||
(VOID **)&Input
|
&Ring3Pages
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((DEBUG_ERROR, "Ring0: Failed to allocate memory for Input data.\n"));
|
|
||||||
EnableSMAP ();
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Input = (RING3_CALL_DATA *)(UINTN)Ring3Pages;
|
||||||
|
|
||||||
|
DisableSMAP ();
|
||||||
Input->NumberOfArguments = Number;
|
Input->NumberOfArguments = Number;
|
||||||
Input->EntryPoint = EntryPoint;
|
Input->EntryPoint = EntryPoint;
|
||||||
|
|
||||||
@ -74,6 +79,8 @@ GoToRing3 (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreFreePages (Ring3Pages, PagesNumber);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user