05 January 2013, 19:21 | #21 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Could you also include debug mode A4000/Gayle IDE driver?
|
05 January 2013, 22:02 | #22 |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
I've built the HEAD branch kernel with DEBUG enabled for sbic:
netbsd-sbicdebug - kernel with DEBUG for sbic and ahsc netbsd-sbicdebug-serial - kernel with DEBUG for sbic and ahsc and console on serial port netbsd-sbicdebug-nodma - kernel with DEBUG for sbic and ahsc, disabled DMA for sbic netbsd-sbicdebug-nodma-serial - kernel with DEBUG for sbic and ahsc, also disabled DMA for sbic, console on serial port You can load the kernel directly from AmigaOS using the loadbsd utility. Kernels with IDE debug will follow later today . Unfortunately I don't have SCSI disk in my A3000 anymore. And all the disks I have left are not compatible with early revision 33C93 that I have. |
05 January 2013, 22:09 | #23 |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
IDE debug kernels:
netbsd-atadebug - kernel with ATADEBUG enabled netbsd-atadebug-serial - kernel with ATADEBUG enabled and console on serial port |
06 January 2013, 12:04 | #24 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
SCSI debug kernels don't appear to work correctly.
DMA serial: Prints "sd0 at scsibus0..." and drops to debugger. Non-debug would have started doing PIO while WD is in DMA mode after this. sbicwait TIMEO @1098 with asr=x20 csr=x8e Stopped in pid 0.16 (system) at 5df5a: unlk a6 .db> Non-DMA serial seems to work even worse, it crashes before "sd0 at scsibus0 target 0 lun 0: <UAE, NetBSD_4GB_HD.h, 0.3 disk fixed" is logged. (This is my netbsd5 test image, contents don't matter because it hasn't read any blocks yet anyway) MMU: page fault (logical addr=FF9B8005 SSW=0315 read=0 size=1 fc=5 pc=00254174) uvm_fault(0x42f470, 0xff9b8000, 0x2) -> 0xe . type 8, code [mmu,,ssw]: 4020315 .trap type 8, code = 4020315, v = ff9b8005 .pid = 0, lid = 16, pc = 00254174, ps = 2204, sfc = 1, dfc = 1 .. .panic: MMU fault .Stopped in pid 0.16 (system) at 5df6e: unlk a6 Does it have broken debugging or something else? IDE version worked fine and logged normal looking debug stuff without crashing. Tried with 68030 and 68060 MMU emulation modes, exact same happens with both. |
06 January 2013, 13:13 | #25 | ||
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Quote:
Quote:
|
||
06 January 2013, 13:32 | #26 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Screenshot attached (Easy to use serial logging is read-only, didn't bother with more complex options)
Interestingly disk information line appears when using non-serial version. |
06 January 2013, 13:35 | #27 | |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Quote:
Please use -S option to loadbsd, otherwise symbols are not loaded and I can't see the function names. Can you also do that on a kernel that drops into DDB on timeout? |
|
06 January 2013, 13:45 | #28 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Attached.
I meant WinUAE serial logging is "read-only", everything from serial ports gets logged but there is no support for writing to serial port (never really needed). |
06 January 2013, 13:57 | #29 | |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Quote:
|
|
06 January 2013, 16:29 | #30 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
sbicwait timeout is normal in DMA mode (It is now, I changed emulation to not accept PIO if DMA is active, it only caused useless errors that made no sense, that made debugging more difficult).
WD is programmed for DMA, Transfer Info command is executed, driver waits for data ready bit in status register, emulation waits for DMAC DMA to get enabled by driver: timeout. Transfer Info is single byte and comes just after Select-With-ATN has completed. I assume it is used to send message byte. Either there is some weird bug in emulation or there is some mysterious undocumented DMAC/WD feature that allows this kind of invalid state to work. |
06 January 2013, 22:55 | #31 |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Hi.
I've just tested on a real A3000 with CD-ROM and the ahsc/sbic driver works correctly. Even if it does some weird things, that in theory shouldn't work... it still works. So I guess that such mode of operation should also be implemented in emulation? See this log: http://pastebin.com/Nkd9rBKy The new kernels with debugging fixed: netbsd-sbicdebug-2 netbsd-sbicdebug-2-serial SCSIPI_DEBUG needed a number of target specified during compilation, I've used target number 4. |
07 January 2013, 13:47 | #32 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Unfortunately Inquiry and Check unit ready commands do work (Check unit does not return any data and inquiry is in separate init code path), only following ones do strange things. Could you try with CD in drive? Hopefully it does one or more read accesses..
|
07 January 2013, 21:04 | #33 | |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Quote:
http://pastebin.com/GJ3HkuM3 |
|
09 January 2013, 18:37 | #34 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Could you enable atzsc debugging (keep sbic debugging enabled) and create another CD in drive log?
|
10 January 2013, 17:50 | #35 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
SCSI emulation does work slightly better (two more SCSI commends execute fine) if PIO is allowed even if WD DMA mode bits are non-zero.
Technically a bug but looks like WD won't care. (Don't need atzsc debugging anymore) |
11 January 2013, 00:43 | #36 |
NetBSD developer
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
|
Ok, don't hesitate to ask if you need anything else. I don't have much free time these days but I'll help as much as I can.
|
11 January 2013, 21:48 | #37 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
NetBSD6 now seems to work with SCSI emulation.
Guru ROM now also works much better but it gets in some weird loop, does test unit ready, read capacity, inquiry etc.. commands, then reads first 16 blocks of drive, tries other IDs and then starts from the beginning, again and again. (More debugging to do..) Note that writing is not tested, it may not work yet. |
11 January 2013, 22:05 | #38 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,340
|
I tried running the NetBSD installer with my A3000 config and while it definitely gets further than before, it seems to hang after printing "Cool! Let's get to it..."
The last few lines of the log output were: Code:
MMU: page fault (logical addr=001DAD24 SSW=0341 read=1 size=4 fc=1 pc=00105ad0) MMU: page fault (logical addr=1DFFDFC8 SSW=0301 read=0 size=4 fc=1 pc=0011ced8) MMU: page fault (logical addr=08200000 SSW=0301 read=0 size=4 fc=1 pc=0010436c) MMU: page fault (logical addr=08202010 SSW=0301 read=0 size=4 fc=1 pc=001044cc) MMU: page fault (logical addr=08204010 SSW=0301 read=0 size=4 fc=1 pc=001044cc) MMU: page fault (logical addr=08206010 SSW=0301 read=0 size=4 fc=1 pc=001044cc) MMU: page fault (logical addr=000C60A6 SSW=5062 read=1 size=2 fc=2 pc=000c60a6) * WD33C93 select with atn, ID=6 WD33C93 STATUS=11 WD33C93 STATUS=8E * WD33C93 transfer info phase=10 len=1 dir=1 data=-1 wddma=4 dmac=0 WD33C93 SCSI O [10] 1/1 C0 WD33C93 SCSI got MESSAGE C0 WD33C93 STATUS=1A * WD33C93 transfer info phase=30 len=10 dir=2 data=-1 wddma=4 dmac=0 WD33C93 SCSI O [30] 10/10 28.00.00.40.2A.48.00.00.10.00 WD33C93 SCSI got COMMAND 28 WD33C93 STATUS=19 * WD33C93 transfer info phase=45 len=8192 dir=-1 data=-1 wddma=4 dmac=1 WD33C93 WRITE DMA 32 WD33C93 SCSI I [45] 32/8192 54.8B.76.01.60.02.42.83.48.78.00.3D.2F.0B.22.44.4E.91.50.8F.4A.88.67.02.42.18.22.42.60.20.2F.00 WD33C93 STATUS=1B WD33C93 PHASE=46 * WD33C93 select and transfer with atn, ID=6 PHASE=46 TC=0 WD33C93 STATUS=16 * WD33C93 select with atn, ID=6 WD33C93 STATUS=11 WD33C93 STATUS=8E * WD33C93 transfer info phase=10 len=1 dir=1 data=-1 wddma=4 dmac=0 WD33C93 SCSI O [10] 1/1 C0 WD33C93 SCSI got MESSAGE C0 WD33C93 STATUS=1A * WD33C93 transfer info phase=30 len=10 dir=2 data=-1 wddma=4 dmac=0 WD33C93 SCSI O [30] 10/10 2A.00.00.40.06.B0.00.00.03.00 WD33C93 SCSI got COMMAND 2A WD33C93 STATUS=18 * WD33C93 transfer info phase=45 len=1536 dir=1 data=-1 wddma=4 dmac=1 WD33C93 READ DMA 32 WD33C93 SCSI O [45] 32/1536 00.00.00.00.00.00.00.00.00.00.00.20.00.00.00.30.00.00.00.38.00.00.01.B8.00.00.00.00.FF.FF.FF.FF WD33C93 STATUS=18 * WD33C93 transfer info phase=45 len=1 dir=0 data=-1 wddma=4 dmac=1 WD33C93 DMA but no data!? |
11 January 2013, 22:07 | #39 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
0x2A = Write (10) so my guess about writing was correct
|
11 January 2013, 22:08 | #40 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,340
|
Aha, that explains it. I was hoping the writing not tested only applied to the Guru-ROM.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Debugging my dodgy asm! | hypnoshock | Coders. Asm / Hardware | 5 | 01 May 2012 01:55 |
Debugging and JIT issues | copse | support.WinUAE | 4 | 01 April 2012 05:50 |
Serial debugging while booting | jman | Coders. General | 1 | 25 March 2012 03:02 |
Help debugging a faulty CD32 | UberFreak | support.Hardware | 0 | 23 October 2009 03:29 |
Enforcer debugging tool | M&F | support.WinUAE | 0 | 21 May 2002 22:53 |
|
|