TMF Hg
changelog
- 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).
- 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)."
- 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)!
- 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
- 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.
- 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.
- 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
- 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
- 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
- Thu, 03 Mar 2011 13:05:21 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 13:05:21 +0000] rev 100
- Fix broken pagebit update code (was failing S4TEST 19 Map Translation test)
- Thu, 03 Mar 2011 08:18:57 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 08:18:57 +0000] rev 99
- use LOG functions for kbc debugging, make KBC debugging optional
- Thu, 03 Mar 2011 08:15:09 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 08:15:09 +0000] rev 98
- add single-string logging functions to work around gcc warning
- Wed, 02 Mar 2011 07:16:32 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 02 Mar 2011 07:16:32 +0000] rev 97
- Add 60Hz timer tick patch from Andrew Warkentin <andreww591 gmail com>
... I have also attached a patch that adds the 60Hz timer interrupt (I'm not sure if it's totally correct, though, since the cursor blinks rather slowly).
Received-From: Andrew Warkentin <andreww591 gmail com>
Signed-Off-By: Philip Pemberton <philpem@philpem.me.uk>
- Tue, 01 Mar 2011 21:33:32 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 01 Mar 2011 21:33:32 +0000] rev 96
- Add keyboard patch from Andrew Warkentin <andreww591 gmail com>
I fixed the keyboard in FreeBee. I looked at the keyboard driver source available on a few sites, and it appears that BEGKBD/KEY_BEGIN_KEYBOARD is only supposed to be sent after the end of mouse data, and that KLAST/KEY_LIST_END is not a separate code, but a flag that is set on the last non-KALLUP/KEY_ALL_UP code in a list. I have attached a patch that implements these changes. I have also attached a patch that adds the 60Hz timer interrupt (I'm not sure if it's totally correct, though, since the cursor blinks rather slowly).
Received-From: Andrew Warkentin <andreww591 gmail com>
Signed-Off-By: Philip Pemberton <philpem@philpem.me.uk>
- Thu, 10 Feb 2011 01:09:42 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:09:42 +0000] rev 95
- make it possible to eject the floppy disc (use F11!)
- Thu, 10 Feb 2011 01:09:04 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:09:04 +0000] rev 94
- fix keyboard update-flag handler to only set flag when a mapped key has been pressed
- Thu, 10 Feb 2011 01:08:32 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:08:32 +0000] rev 93
- properly handle 8 and 16 bit KBC writes
- Thu, 10 Feb 2011 00:07:59 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 00:07:59 +0000] rev 92
- remove edge-sensive kbc intr handler, was breaking the keyboard stuff. also made kbd refresh at same rate as 60Hz tick.
- Wed, 09 Feb 2011 23:45:55 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 23:45:55 +0000] rev 91
- only send kb state when the state changes, use kb command constants
- Wed, 09 Feb 2011 22:05:42 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 22:05:42 +0000] rev 90
- merge heads
- Thu, 30 Dec 2010 00:45:13 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:45:13 +0000] rev 89
- make utils.h include stdio (for LOG functions)
- Thu, 30 Dec 2010 00:44:25 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:44:25 +0000] rev 88
- add NELEMS macro to utils.h
- Thu, 30 Dec 2010 00:41:48 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:41:48 +0000] rev 87
- fix fdc irq handling (but irqs still disabled for now until the arbiter is sorted out)
- Thu, 30 Dec 2010 00:37:03 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:37:03 +0000] rev 86
- add keyboard event handler; need to do register r/w next.
- Wed, 09 Feb 2011 17:11:48 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 17:11:48 +0000] rev 85
- more keyboard fixes... interrupt logic needs fixing... grrrrr...
- Wed, 09 Feb 2011 16:35:49 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 16:35:49 +0000] rev 84
- major work on keyboard driver
- Wed, 09 Feb 2011 15:43:48 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:43:48 +0000] rev 83
- fix stupid mistakes in keyboard code (i broke the build, w00t...)
- Wed, 09 Feb 2011 15:40:05 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:40:05 +0000] rev 82
- fix DELETE mapping and add keyboard evt handler
- Wed, 09 Feb 2011 15:39:16 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:39:16 +0000] rev 81
- ignore discs dir
- Wed, 09 Feb 2011 15:03:31 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:03:31 +0000] rev 80
- implement some more of the keyboard controller
- Wed, 29 Dec 2010 09:06:17 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 09:06:17 +0000] rev 79
- eliminate redundant head
- Wed, 29 Dec 2010 09:04:43 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 09:04:43 +0000] rev 78
- merge heads (properly this time)
- Wed, 29 Dec 2010 03:27:35 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 03:27:35 +0000] rev 77
- discard head, need to merge some stuff back in later
- Mon, 06 Dec 2010 08:27:21 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Mon, 06 Dec 2010 08:27:21 +0000] rev 76
- move edge-sensitive FDC IRQ to main()
- Mon, 06 Dec 2010 08:27:05 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Mon, 06 Dec 2010 08:27:05 +0000] rev 75
- init state variables properly
- Wed, 29 Dec 2010 01:38:54 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 01:38:54 +0000] rev 74
- add first cut keyboard driver
- Tue, 28 Dec 2010 22:37:21 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 22:37:21 +0000] rev 73
- small amt of wd279x tidying
- Tue, 28 Dec 2010 21:47:43 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 21:47:43 +0000] rev 72
- Only print LED state if it has changed
- Tue, 28 Dec 2010 19:55:13 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 19:55:13 +0000] rev 71
- add LOG macro and convert WD279x printfs to LOG() calls
- Tue, 28 Dec 2010 19:23:57 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 19:23:57 +0000] rev 70
- tidy up WR_nn macros
- Tue, 28 Dec 2010 19:11:46 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 19:11:46 +0000] rev 69
- add page fault handling for DMA controller
- Tue, 28 Dec 2010 19:10:36 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 19:10:36 +0000] rev 68
- fix UDS/LDS in bus error handling for 16/32-bit accesses
- Tue, 28 Dec 2010 18:59:15 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 18:59:15 +0000] rev 67
- DMA: remove a few debug messages and rewrite memory error handling
- Tue, 28 Dec 2010 18:58:51 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 18:58:51 +0000] rev 66
- fix ENFORCE_SIZE to print "read from" / "write to"
- Tue, 28 Dec 2010 18:36:39 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 18:36:39 +0000] rev 65
- fix expansion RAM handling and Unhandled Read From Expansion Space alerts
- Tue, 28 Dec 2010 18:19:48 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 18:19:48 +0000] rev 64
- turn logging of unhandled I/O R/W ops back on
- Tue, 28 Dec 2010 17:47:01 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 17:47:01 +0000] rev 63
- finish expansion memory emulation
- Tue, 28 Dec 2010 17:31:28 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 17:31:28 +0000] rev 62
- add state initialisation for expansion RAM
- Tue, 28 Dec 2010 17:25:46 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 17:25:46 +0000] rev 61
- fixed expansion ram addressing, now detects base/expansion RAM counts correctly
- Tue, 28 Dec 2010 17:23:04 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 17:23:04 +0000] rev 60
- fixes to Base RAM addressing -- 512K detected OK now, still need to deal with Expansion RAM detect issues
- Tue, 28 Dec 2010 16:59:40 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 16:59:40 +0000] rev 59
- partial rewrite of memory / I/O handling code to reduce repetition
- Wed, 15 Dec 2010 01:20:57 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Wed, 15 Dec 2010 01:20:57 +0000] rev 58
- update hgignore
- Tue, 14 Dec 2010 02:41:40 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Tue, 14 Dec 2010 02:41:40 +0000] rev 57
- add CHS param checking (FDC), fix DMA address setting (DMA_XFER)
* Floppy controller wasn't checking CHS values. Fixed.
* DMA ADDRESS COUNT register was implemented completely wrong -- shifts and ANDmasks were wrong. Fixed.
Boot PROM and Loader now run to the point of booting the kernel!
- Mon, 13 Dec 2010 03:00:43 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Mon, 13 Dec 2010 03:00:43 +0000] rev 56
- disable floppy interrupts (to CPU), force HDD int flag on (i.e. command always complete)
- Sun, 12 Dec 2010 23:47:35 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Sun, 12 Dec 2010 23:47:35 +0000] rev 55
- improve error and DMA handling
- Mon, 06 Dec 2010 01:43:04 +0000
- by Philip Pemberton <philpem@philpem.me.uk> [Mon, 06 Dec 2010 01:43:04 +0000] rev 54
- fix side-select bug in WDC FDC driver, was causing all reads to occur on side0... now the Loader boots!
Loader will boot, but immediately gives up on the floppy drive... Not sure why.