From a22ab1744c1a2accfa5d4155102413d1b8100b89 Mon Sep 17 00:00:00 2001 From: hsc Date: Mon, 27 Aug 2012 11:30:06 +0000 Subject: [PATCH] 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 --- src/core/sal/bochs/Reboot.ah | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/sal/bochs/Reboot.ah b/src/core/sal/bochs/Reboot.ah index a1705ad5..13236dc9 100644 --- a/src/core/sal/bochs/Reboot.ah +++ b/src/core/sal/bochs/Reboot.ah @@ -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;