mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 05:34:31 +02:00
Ring3: Fixed several bugs for ARM.
This commit is contained in:
parent
3bddf9ac07
commit
fc08f7d273
@ -227,7 +227,7 @@ DefaultExceptionHandler (
|
|||||||
return mSysCallHandler (
|
return mSysCallHandler (
|
||||||
SystemContext.SystemContextArm->R0,
|
SystemContext.SystemContextArm->R0,
|
||||||
&(SystemContext.SystemContextArm->R1),
|
&(SystemContext.SystemContextArm->R1),
|
||||||
&(SystemContext.SystemContextArm->SP)
|
(VOID *)SystemContext.SystemContextArm->SP
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,11 +71,11 @@ SysCallBootService (
|
|||||||
//
|
//
|
||||||
// First 3 arguments are passed through R1-R3 and copied to SysCall Stack.
|
// First 3 arguments are passed through R1-R3 and copied to SysCall Stack.
|
||||||
//
|
//
|
||||||
CopyMem ((VOID *)((UINTN)Physical + sizeof (UINTN)), (VOID *)CoreRbp, 3 * sizeof (UINTN));
|
CopyMem ((VOID *)((UINTN)Physical + 2 * sizeof (UINTN)), (VOID *)CoreRbp, 3 * sizeof (UINTN));
|
||||||
//
|
//
|
||||||
// All remaining arguments are on User Stack.
|
// All remaining arguments are on User Stack.
|
||||||
//
|
//
|
||||||
CopyMem ((VOID *)((UINTN)Physical + 4 * sizeof (UINTN)), (VOID *)UserRsp, 5 * sizeof (UINTN));
|
CopyMem ((VOID *)((UINTN)Physical + 5 * sizeof (UINTN)), (VOID *)UserRsp, 4 * sizeof (UINTN));
|
||||||
EnableSMAP ();
|
EnableSMAP ();
|
||||||
|
|
||||||
Status = CallBootService (
|
Status = CallBootService (
|
||||||
|
@ -360,7 +360,7 @@ CoreFileSetPosition (
|
|||||||
File->Ring3File,
|
File->Ring3File,
|
||||||
Position
|
Position
|
||||||
);
|
);
|
||||||
#elif defined (MDE_CPU_IA32)
|
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM)
|
||||||
//
|
//
|
||||||
// UINT64 Position is passed as 2 double words on stack.
|
// UINT64 Position is passed as 2 double words on stack.
|
||||||
//
|
//
|
||||||
@ -370,13 +370,6 @@ CoreFileSetPosition (
|
|||||||
File->Ring3File,
|
File->Ring3File,
|
||||||
Position
|
Position
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
return GoToRing3 (
|
|
||||||
2,
|
|
||||||
(VOID *)mRing3FileProtocol.SetPosition,
|
|
||||||
File->Ring3File,
|
|
||||||
Position
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -643,7 +636,7 @@ CoreFileOpen (
|
|||||||
OpenMode,
|
OpenMode,
|
||||||
Attributes
|
Attributes
|
||||||
);
|
);
|
||||||
#elif defined (MDE_CPU_IA32)
|
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM)
|
||||||
//
|
//
|
||||||
// UINT64 OpenMode and Attributes are each passed as 2 double words on stack.
|
// UINT64 OpenMode and Attributes are each passed as 2 double words on stack.
|
||||||
//
|
//
|
||||||
@ -656,16 +649,6 @@ CoreFileOpen (
|
|||||||
OpenMode,
|
OpenMode,
|
||||||
Attributes
|
Attributes
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
Status = GoToRing3 (
|
|
||||||
5,
|
|
||||||
(VOID *)mRing3FileProtocol.Open,
|
|
||||||
File->Ring3File,
|
|
||||||
Ring3NewHandle,
|
|
||||||
Ring3FileName,
|
|
||||||
OpenMode,
|
|
||||||
Attributes
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
*NewHandle = NULL;
|
*NewHandle = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user