mirror of https://github.com/acidanthera/audk.git
Ring3: Fixed PAN page faults.
This commit is contained in:
parent
51e767463a
commit
32768e43f3
|
@ -273,6 +273,10 @@ CommonCExceptionHandler (
|
|||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
if (ArmHasPan ()) {
|
||||
ArmClearPan ();
|
||||
}
|
||||
|
||||
if (ExceptionType <= gMaxExceptionNumber) {
|
||||
if (gExceptionHandlers[ExceptionType]) {
|
||||
gExceptionHandlers[ExceptionType](ExceptionType, SystemContext);
|
||||
|
|
|
@ -256,8 +256,6 @@ DefaultExceptionHandler (
|
|||
DEBUG ((DEBUG_ERROR, "PC 0x%012lx\n", SystemContext.SystemContextAArch64->ELR));
|
||||
}
|
||||
|
||||
ArmClearPan ();
|
||||
|
||||
if ((UINT64 *)SystemContext.SystemContextAArch64->FP != 0) {
|
||||
Idx = 0;
|
||||
|
||||
|
|
|
@ -76,14 +76,14 @@ SysCallBootService (
|
|||
(RING3_STACK *)(UINTN)Physical
|
||||
);
|
||||
|
||||
CoreFreePages (Physical, EFI_SIZE_TO_PAGES (9 * sizeof (UINTN)));
|
||||
|
||||
SetUefiImageMemoryAttributes (
|
||||
gUartBaseAddress,
|
||||
EFI_PAGE_SIZE,
|
||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||
);
|
||||
|
||||
CoreFreePages (Physical, EFI_SIZE_TO_PAGES (9 * sizeof (UINTN)));
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,14 +79,14 @@ SysCallBootService (
|
|||
(RING3_STACK *)(UINTN)Physical
|
||||
);
|
||||
|
||||
CoreFreePages (Physical, EFI_SIZE_TO_PAGES (9 * sizeof (UINTN)));
|
||||
|
||||
SetUefiImageMemoryAttributes (
|
||||
gUartBaseAddress,
|
||||
EFI_PAGE_SIZE,
|
||||
EFI_MEMORY_XP | EFI_MEMORY_USER
|
||||
);
|
||||
|
||||
CoreFreePages (Physical, EFI_SIZE_TO_PAGES (9 * sizeof (UINTN)));
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,12 +94,7 @@ GoToRing3 (
|
|||
);
|
||||
}
|
||||
#elif defined (MDE_CPU_AARCH64) || defined (MDE_CPU_ARM)
|
||||
//
|
||||
// Problem 2: Uart memory maped page is not allocated at the very beginnig
|
||||
// and can be used for translation table later.
|
||||
//
|
||||
AllowSupervisorAccessToUserMemory ();
|
||||
|
||||
SetUefiImageMemoryAttributes (
|
||||
gUartBaseAddress,
|
||||
EFI_PAGE_SIZE,
|
||||
|
|
Loading…
Reference in New Issue