Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 0765ee6cd36aef02236ae431a7097624d17762d9
https://github.com/tianocore/edk2/commit/0765ee6cd36aef02236ae431a7097624d17762d9
Author: 王洋 <[email protected]>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
M MdePkg/Library/BaseLib/BaseLib.inf
M MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
A MdePkg/Library/BaseLib/RiscV64/SwitchStack.S
Log Message:
-----------
MdePkg/BaseLib: Fix boot DxeCore hang on riscv platform
For scene of
HandOffToDxeCore()->SwitchStack(DxeCoreEntryPoint)->
InternalSwitchStack()->LongJump(),Variable HobList.Raw
will be passed (from *Context1 to register a0) to
DxeMain() in parameter *HobStart.
However, meanwhile the function LongJump() overrides
register a0 with a1 (-1) due to commit (ea628f28e5 "RISCV: Fix
InternalLongJump to return correct value"), then cause hang.
Replacing calling LongJump() with new InternalSwitchStackAsm() to pass
addres data in register s0 to register a0 could fix this issue (just
like the solution in MdePkg/Library/BaseLib/AArch64/SwitchStack.S)
Signed-off-by: Yang Wang <[email protected]>
Cc: Bamvor Jian ZHANG <[email protected]>
Cc: Andrei Warkentin <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Sunil V L <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Reviewed-by: Ran Wang <[email protected]>
Reviewed-by: Andrei Warkentin <[email protected]>
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits