rCore-Tutorial-v3 icon indicating copy to clipboard operation
rCore-Tutorial-v3 copied to clipboard

使用rustsbi-qemu教育版规避rustsbi某些版本与qemu不兼容导致卡死的问题

Open wyfcyx opened this issue 2 years ago • 2 comments
trafficstars

如题。@Ydrmaster在做一个rustsbi-tutorial,应该能够满足我们的tutorial项目的需求,我们正在跟进该项目的进展。

wyfcyx avatar Feb 26 '23 13:02 wyfcyx

ch7 sig_test不能运行,我本来在ch7测过,到ch8还是不能运行。我定位bug到时间中断没有触发。好像是rustsbi在时间中断没有委托到rCore中, 改为opensbi后正常运行。同时ch8中的一个forktest,改为opensbi也不会卡死可以正常运行。 上回我提交了一个pull request也是rustsbi的问题,rCore中不应该 if getchar() == 0 这样语句,sbi没读到字符串应该判断是否是-1,只是rustsbi读字符串是阻塞实现的,没读到字符不会返回,所以rCore中没出现问题。

PorterLu avatar Mar 18 '23 06:03 PorterLu

暂时的解决方案是:内核使用sbi-rt crate尽量避免使用legacy call从而能够跟上rustsbi,然后使用最新版rustsbi。目前各个分支应该能够支持qemu7.0-7.2了。

wyfcyx avatar Mar 30 '23 15:03 wyfcyx