mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/ExceptionHandler: Fix a context error in LoongArch64
On the LoongArch platform: the a0 register can be used as both a function parameter and a return value. Due to parameter EFI_SYSTEM_CONTEXT being overwritten by an invalid context address, when calling GetExceptionType, incorrect parameter address causes memory access exception. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4796 Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
This commit is contained in:
parent
dc93ff8a55
commit
5db0091418
|
@ -34,6 +34,7 @@ PopContext:
|
|||
//
|
||||
bl DisableInterrupts
|
||||
|
||||
move $a0, $s0 // Restore a0 parameter through s0(EFI_SYSTEM_CONTEXT)
|
||||
bl GetExceptionType // Get current exception type, and stored in register a0
|
||||
|
||||
// Check whether the FPE is changed during interrupt handler, if ture restore it.
|
||||
|
|
Loading…
Reference in New Issue