On Fri, Jan 05, 2024 at 03:47:07PM +0000, Andrei Warkentin wrote: > Looks reasonable to me. > > Reviewed-by: Andrei Warkentin <andrei.warken...@intel.com> > > > -----Original Message----- > > From: Yang Wang <wangy...@bosc.ac.cn> > > Sent: Wednesday, December 27, 2023 8:57 PM > > To: Warkentin, Andrei <andrei.warken...@intel.com>; devel@edk2.groups.io > > Cc: Yang Wang <wangy...@bosc.ac.cn>; Ran Wang <wang...@bosc.ac.cn>; > > Bamvor Jian ZHANG <zhangj...@bosc.ac.cn>; Gao, Liming > > <gaolim...@byosoft.com.cn>; Kinney, Michael D > > <michael.d.kin...@intel.com>; Sunil V L <suni...@ventanamicro.com>; Liu, > > Zhiguang <zhiguang....@intel.com> > > Subject: [PATCH v2] 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 <wangy...@bosc.ac.cn> > > Reviewed-by: Ran Wang <wang...@bosc.ac.cn> > > Cc: Bamvor Jian ZHANG <zhangj...@bosc.ac.cn> > > Cc: Andrei Warkentin <andrei.warken...@intel.com> > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > > Cc: Michael D Kinney <michael.d.kin...@intel.com> > > Cc: Sunil V L <suni...@ventanamicro.com> > > Cc: Zhiguang Liu <zhiguang....@intel.com> > > --- Thanks for the patch!. Merged this as #5255 after fixing a minor formatting issue.
Thanks, Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113624): https://edk2.groups.io/g/devel/message/113624 Mute This Topic: https://groups.io/mt/103395756/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-