audk/MdePkg/Library/BaseLib/RiscV64
王洋 0765ee6cd3 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 <wangyang@bosc.ac.cn>
Cc: Bamvor Jian ZHANG <zhangjian@bosc.ac.cn>
Cc: Andrei Warkentin <andrei.warkentin@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Ran Wang <wangran@bosc.ac.cn>
Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com>
2024-01-11 15:19:26 +00:00
..
CpuBreakpoint.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuPause.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuScratch.S MdePkg/BaseLib: RISC-V: Add few more helper functions 2023-02-16 05:53:28 +00:00
DisableInterrupts.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EnableInterrupts.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GetInterruptState.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
InternalSwitchStack.c MdePkg/BaseLib: Fix boot DxeCore hang on riscv platform 2024-01-11 15:19:26 +00:00
MemoryFence.S MdePkg/BaseLib: Add MemoryFence implementation for RiscV64 2021-07-21 12:34:13 +00:00
ReadTimer.S MdePkg/BaseLib: RISC-V: Add function to update stimecmp register 2024-01-11 12:07:42 +00:00
RiscVCacheMgmt.S MdePkg: Implement RISC-V Cache Management Operations 2023-12-19 12:48:14 +00:00
RiscVCpuBreakpoint.S MdePkg/BaseLib: BaseLib for RISCV64 architecture 2020-05-07 03:17:15 +00:00
RiscVCpuPause.S MdePkg/BaseLib: BaseLib for RISCV64 architecture 2020-05-07 03:17:15 +00:00
RiscVInterrupt.S MdePkg/BaseLib: RISC-V: Add few more helper functions 2023-02-16 05:53:28 +00:00
RiscVMmu.S MdePkg/BaseLib: RISC-V: Support getting satp register value 2023-07-15 14:10:18 +00:00
RiscVSetJumpLongJump.S RISCV: Fix InternalLongJump to return correct value 2023-09-21 04:57:57 +00:00
SpeculationBarrier.S MdePkg/BaseLib: Add SpeculationBarrier implementation for RiscV64 2023-06-06 20:37:18 +00:00
SwitchStack.S MdePkg/BaseLib: Fix boot DxeCore hang on riscv platform 2024-01-11 15:19:26 +00:00