Skip to content

Commit

Permalink
Ring3: Fixed line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Jan 20, 2025
1 parent 1f8f6dd commit aeacf20
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
16 changes: 8 additions & 8 deletions ArmPkg/Library/ArmExceptionLib/Arm/ExceptionSupport.S
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ASM_PFX(Fiq):
ASM_PFX(ResetEntry):
srsdb #0x13! @ Store return state on SVC stack
@ We are already in SVC mode
sub SP, SP, #0x8 @ Save space for TTBR0
sub SP, SP, #0x8 @ Save space for TTBR0
stmfd SP!,{LR} @ Store the link register for the current mode
sub SP,SP,#0x20 @ Save space for SP, LR, PC, IFAR - CPSR
stmfd SP!,{R0-R12} @ Store the register state
Expand All @@ -128,7 +128,7 @@ ASM_PFX(SoftwareInterruptEntry):
isb
srsdb #0x13! @ Store return state on SVC stack
@ We are already in SVC mode
sub SP, SP, #0x8 @ Save space for TTBR0
sub SP, SP, #0x8 @ Save space for TTBR0
stmfd SP!,{LR} @ Store the link register for the current mode
sub SP,SP,#0x20 @ Save space for SP, LR, PC, IFAR - CPSR
stmfd SP!,{R0-R12} @ Store the register state
Expand Down Expand Up @@ -278,9 +278,9 @@ NoAdjustNeeded:

NoTTBR0Switch:

#if (FixedPcdGet32(PcdVFPEnabled))
vpush {d0-d15} @ save vstm registers in case they are used in optimizations
#endif
#if (FixedPcdGet32(PcdVFPEnabled))
vpush {d0-d15} @ save vstm registers in case they are used in optimizations
#endif

mov R4, SP @ Save current SP
tst R4, #4
Expand All @@ -301,9 +301,9 @@ CommonCExceptionHandler (

mov SP, R4 @ Restore SP

#if (FixedPcdGet32(PcdVFPEnabled))
vpop {d0-d15}
#endif
#if (FixedPcdGet32(PcdVFPEnabled))
vpop {d0-d15}
#endif

ldr R4, [SP, #0x40] @ Saved Processor Status Register
and R4, R4, #0xF
Expand Down
6 changes: 3 additions & 3 deletions MdeModulePkg/Core/Dxe/SysCall/ARM/CoreBootServices.S
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ ASM_FUNC(ReturnToCore)
#endif

// Restore old SP_usr and LR_usr.
ldmia SP, {SP, LR}^
add SP, SP, #0x8

ldmia SP, {SP, LR}^
add SP, SP, #0x8

pop {R4-R12, LR}

// Enable interrupts.
Expand Down
6 changes: 3 additions & 3 deletions MdeModulePkg/Core/Dxe/SysCall/SupportedProtocols.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ CoreDriverBindingStart (
RemainingDevicePath
);

gUserPageTable = OldPageTable;
gUserPageTable = OldPageTable;

return Status;
}
Expand Down Expand Up @@ -207,7 +207,7 @@ CoreDriverBindingStop (
ChildHandleBuffer
);

gUserPageTable = OldPageTable;
gUserPageTable = OldPageTable;

return Status;
}
Expand Down Expand Up @@ -243,7 +243,7 @@ CoreFileClose (
FreePool (UserDriver->CoreWrapper);
RemoveEntryList (&UserDriver->Link);

gUserPageTable = OldPageTable;
gUserPageTable = OldPageTable;

return Status;
}
Expand Down
30 changes: 15 additions & 15 deletions UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@ GetExceptionAddresses (
return &mAddresses;
}

VOID
EFIAPI
SetExceptionAddresses (
IN VOID *Buffer,
IN UINTN BufferSize
)
{
mAddresses.ExceptionStackBase = (UINTN)Buffer;
mAddresses.ExceptionStackSize = BufferSize;
mAddresses.ExceptionHandlerBase = (UINTN)&ExceptionHandlerBase;
mAddresses.ExceptionHandlerSize = (UINTN)&ExceptionHandlerEnd - mAddresses.ExceptionHandlerBase;
mAddresses.ExceptionDataBase = (UINTN)&CorePageTable;

CorePageTable = AsmReadCr3 ();
}
VOID
EFIAPI
SetExceptionAddresses (
IN VOID *Buffer,
IN UINTN BufferSize
)
{
mAddresses.ExceptionStackBase = (UINTN)Buffer;
mAddresses.ExceptionStackSize = BufferSize;
mAddresses.ExceptionHandlerBase = (UINTN)&ExceptionHandlerBase;
mAddresses.ExceptionHandlerSize = (UINTN)&ExceptionHandlerEnd - mAddresses.ExceptionHandlerBase;
mAddresses.ExceptionDataBase = (UINTN)&CorePageTable;

CorePageTable = AsmReadCr3 ();
}

0 comments on commit aeacf20

Please sign in to comment.