bugfix: Bochs reboot results in invalid CPU state

Bochs' CPU loop hook is not the right place to trigger a reboot; the EIP
increment soon thereafter leaves the CPU in an invalid state:
00194392696e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00194392698e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00194392700e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
...

Instead, do it where the "reboot" button also does it -- synchronously in a
timer handler.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1507 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-08-27 11:30:06 +00:00
parent ca17c793e7
commit a22ab1744c

View File

@ -9,9 +9,9 @@
#include "../SALInst.hpp"
aspect Reboot {
pointcut cpuLoop() = "void defineCPULoopJoinPoint(...)";
pointcut reboot_trigger() = "void bx_pc_system_c::tick%(...)";
advice execution (cpuLoop()) : after ()
advice execution (reboot_trigger()) : before ()
{
if (!fail::reboot_bochs_request) {
return;