cat $PINTOSDIR/src/misc/bochs-2.2.6-ms-extensions.patch | patch -p1
cat $PINTOSDIR/src/misc/bochs-2.2.6-big-endian.patch | patch -p1
cat $PINTOSDIR/src/misc/bochs-2.2.6-jitter.patch | patch -p1
+cat $PINTOSDIR/src/misc/bochs-2.2.6-triple-fault.patch | patch -p1
if test "`uname -s`" = "SunOS"; then
cat $PINTOSDIR/src/misc/bochs-2.2.6-solaris.patch | patch -p1
fi
--- /dev/null
+--- bochs-2.2.6.orig/cpu/exception.cc 2006-01-25 14:20:00.000000000 -0800
++++ bochs-2.2.6/cpu/exception.cc 2006-04-08 13:01:18.000000000 -0700
+@@ -841,6 +841,12 @@ void BX_CPU_C::exception(unsigned vector
+
+ BX_CPU_THIS_PTR errorno++;
+ if (BX_CPU_THIS_PTR errorno >= 3) {
++#if BX_GDBSTUB
++ if (bx_dbg.gdbstub_enabled) {
++ fprintf(stderr, "Triple fault: stopping for gdb\n");
++ longjmp(BX_CPU_THIS_PTR jmp_buf_env, 1);
++ }
++#endif
+ #if BX_RESET_ON_TRIPLE_FAULT
+ BX_ERROR(("exception(): 3rd (%d) exception with no resolution, shutdown status is %02xh, resetting", vector, DEV_cmos_get_reg(0x0f)));
+ debug(BX_CPU_THIS_PTR prev_eip);
+@@ -860,6 +866,12 @@ void BX_CPU_C::exception(unsigned vector
+
+ /* if 1st was a double fault (software INT?), then shutdown */
+ if ( (BX_CPU_THIS_PTR errorno==2) && (BX_CPU_THIS_PTR curr_exception[0]==BX_ET_DOUBLE_FAULT) ) {
++#if BX_GDBSTUB
++ if (bx_dbg.gdbstub_enabled) {
++ fprintf(stderr, "Triple fault: stopping for gdb\n");
++ longjmp(BX_CPU_THIS_PTR jmp_buf_env, 1);
++ }
++#endif
+ #if BX_RESET_ON_TRIPLE_FAULT
+ BX_INFO(("exception(): triple fault encountered, shutdown status is %02xh, resetting", DEV_cmos_get_reg(0x0f)));
+ debug(BX_CPU_THIS_PTR prev_eip);
+
+Diff finished at Sat Apr 8 13:07:40
Adds the `jitter' feature described in the project documentation,
in which timer interrupts are delivered at random intervals.
+ bochs-2.2.6-triple-fault.patch
+
+ Causes Bochs to break to GDB when a triple fault occurs and
+ the GDB stub is active.
+
bochs-2.2.6-ms-extensions.patch
Needed for Bochs to compile with GCC on some hosts. Probably
To apply all the patches, cd into the Bochs directory, then type
patch -p1 < $PINTOSDIR/src/misc/bochs-2.2.6-big-endian.patch
patch -p1 < $PINTOSDIR/src/misc/bochs-2.2.6-jitter.patch
+ patch -p1 < $PINTOSDIR/src/misc/bochs-2.2.6-triple-fault.patch
patch -p1 < $PINTOSDIR/src/misc/bochs-2.2.6-ms-extensions.patch
patch -p1 < $PINTOSDIR/src/misc/bochs-2.2.6-solaris.patch
You will have to supply the proper $PINTOSDIR, of course. You can use