From 08ec3548af64930748137d1b4d6dcbb0ac5885ea Mon Sep 17 00:00:00 2001 From: hsc Date: Wed, 6 Jun 2012 14:27:20 +0000 Subject: [PATCH] Bochs CPU fix: don't crash on weird memory accesses Raising a GP exception may not be what a real x86 does, but it allows us to catch this case in our experiments. TODO: figure out correct reaction; backport to upstream git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1311 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- bochs/cpu/cpu.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bochs/cpu/cpu.cc b/bochs/cpu/cpu.cc index c0b9079c..810d0ca7 100644 --- a/bochs/cpu/cpu.cc +++ b/bochs/cpu/cpu.cc @@ -795,6 +795,9 @@ void BX_CPU_C::prefetch(void) else { BX_PANIC(("prefetch: getHostMemAddr vetoed direct read, pAddr=0x" FMT_PHY_ADDRX, pAddr)); } + // DanceOS + // XXX how would this be handled on a real machine? + exception(BX_GP_EXCEPTION, 0); } } }