TMF Hg

[musashi] fix stackframe type for bus errors

  • Thu, 08 Dec 2011 23:44:19 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 08 Dec 2011 23:44:19 +0000] rev 110
  • [musashi] fix stackframe type for bus errors

    Bus errors incorrectly pushed a Type 0000 stackframe, when they should have pushed a Type 1000 (Type $8) stackframe.
    Also, type 1000 frames were not handled for 68010 CPUs. They are now, but code must later be added to handle them for 68020s. FIXME!

    Reported-By: Armin Diehl <ad ardiehl.de>

[musashi] Fix handling of bus errors

  • Tue, 15 Nov 2011 10:12:37 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 15 Nov 2011 10:12:37 +0000] rev 109
  • [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).

Fix BSR0 UDS/LDS bit polarity

  • Tue, 15 Nov 2011 09:30:57 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 15 Nov 2011 09:30:57 +0000] rev 108
  • Fix BSR0 UDS/LDS bit polarity

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

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

only strobe BUSERR if dma access caused a pagefault, and don't send IRQ0s (musashi auto-clears IRQs)!

  • Fri, 04 Mar 2011 02:12:25 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 02:12:25 +0000] rev 107
  • only strobe BUSERR if dma access caused a pagefault, and don't send IRQ0s (musashi auto-clears IRQs)!

More verbose logging of page faults and bus errors

  • Fri, 04 Mar 2011 01:38:39 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:38:39 +0000] rev 106
  • More verbose logging of page faults and bus errors

fix small typos in WriteMem32

  • Fri, 04 Mar 2011 01:37:42 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:37:42 +0000] rev 105
  • fix small typos in WriteMem32

    WriteMem32 warnings for writes to MapRAM and VRAM mirrors were incorrectly declaring themselves as read operations.

fix issue with WE+ bit becoming unset, fix pagefault:not-mapped-in logic

  • Fri, 04 Mar 2011 01:36:30 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:36:30 +0000] rev 104
  • fix issue with WE+ bit becoming unset, fix pagefault:not-mapped-in logic

    - The WE+ (page write enable) bit was becoming unset when the Page Status bits were being set.
    A stupid mistake in an AND expression was unsetting the write-enable, thus making S4TEST 12,2 and 12,3 fail spectacularly.

    - Pagefaults were not being generated correctly for pages which were not mapped in. Even Supervisor code accessing unmapped pages should get a PF.

more verbose bus error logging

  • Fri, 04 Mar 2011 00:44:36 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:44:36 +0000] rev 103
  • more verbose bus error logging

add Error Enable bit to gcr write handler

  • Fri, 04 Mar 2011 00:44:06 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:44:06 +0000] rev 102
  • add Error Enable bit to gcr write handler

add Error Enable bit to system state

  • Fri, 04 Mar 2011 00:41:52 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:41:52 +0000] rev 101
  • add Error Enable bit to system state