src/version.h.in

Tue, 15 Nov 2011 10:12:37 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Tue, 15 Nov 2011 10:12:37 +0000
changeset 109
2f8afb9e5baa
parent 14
7a98c853715e
permissions
-rw-r--r--

[musashi] Fix handling of bus errors

Patch-Author: Andrew Warkentin <andreww591!gmail>
Patch-MessageID: <4EC200CE.2020304@gmail.com>

I have fixed the first page fault test failure in FreeBee (the page fault test now hangs rather than errors out, because it is trying to read from the hard drive to test DMA page faults).

There were actually two bugs (the first bug was masking the second one).

First, the ancient version of Musashi that you used is unable to properly resume from bus errors that happen in the middle of certain instructions (some instructions are fetched in stages, with the PC being advanced to each part of the instruction, so basically what happens is the CPU core attempts to read the memory location referenced by the first operand, the bus error occurs, causing the PC to jump to the exception vector, but the faulting instruction is still in the middle of being fetched, so the PC is then advanced past the beginning of the exception handler). I fixed this by delaying the jump to the bus error vector until after the faulting instruction finishes.

The second bug is simpler - you had the UDS and LDS bits in BSR0 inverted (they are supposed to be active low).

     1 #define VER_COMPILE_DATETIME	"@@datetime@@"
     2 #define VER_COMPILE_DATE		"@@date@@"
     3 #define VER_COMPILE_TIME		"@@time@@"
     4 #define VER_COMPILE_BY			"@@whoami@@"
     5 #define VER_COMPILE_HOST		"@@hostname@@"
     6 #define VER_COMPILER			"@@compiler@@"
     7 #define VER_BUILD_TYPE			"@@buildtype@@"
     8 #define VER_CFLAGS				"@@cflags@@"
    10 #define VER_MAJOR				@@majorver@@
    11 #define VER_MINOR				@@minorver@@
    12 #define VER_BUILDNUM			@@buildnum@@
    13 #define VER_EXTRA				"@@extraver@@"
    14 #define VER_VCSREV				"@@vcsstr@@"
    16 #define VER_FULLSTR				"@@fullverstr@@"