我尝试运行对QEMU起作用的半主机退出指令:
mov r0, #0x18
ldr r1, =#0x20026
svc 0x00123456
但是gem5似乎无法正确处理它并崩溃了。
答案 0 :(得分:0)
截至fs.py
的7bfb7f3a43f382eb49853f47b140bfd6caad0fb8(2018年9月)开始,应用补丁:
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 3997ed76c..43bebcd66 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -376,5 +376,7 @@ if buildEnv['TARGET_ISA'] == "arm" and options.generate_dtb:
sys = getattr(root, sysname)
sys.dtb_filename = create_dtb_for_system(sys, '%s.dtb' % sysname)
+from m5.objects import ArmSemihosting
+test_sys.semihosting = ArmSemihosting()
Simulation.setWorkCountOptions(test_sys, options)
Simulation.run(options, root, test_sys, FutureClass)
应该与其他任何脚本类似,只需连接这个新的SimObject
。