English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 January 2013, 20:21   #21
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
Could you also include debug mode A4000/Gayle IDE driver?
Toni Wilen is online now  
AdSense AdSense  
Old 05 January 2013, 23:02   #22
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
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.
strim is offline  
Old 05 January 2013, 23:09   #23
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
IDE debug kernels:

netbsd-atadebug - kernel with ATADEBUG enabled
netbsd-atadebug-serial - kernel with ATADEBUG enabled and console on serial port
strim is offline  
Old 06 January 2013, 13:04   #24
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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.
Toni Wilen is online now  
Old 06 January 2013, 14:13   #25
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
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>
It drops into debugger by design in case of timeout on sbicwait if DEBUG is enabled. Please use "bt" command to obtain back trace. This way we'll exactly know where in the driver's code sbicwait was called (and what it is waiting for). You can type "continue" to let it run further. Or you might be interested in other possible debugger commands.

Quote:
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.
This shouldn't happen. I'll try to find a SCSI CD-ROM and test it on a real hardware. It's possible that non-DMA mode is broken, this probably wasn't tested is some last 10 years . Almost all 33C93 drivers use DMA by default. Nevertheless, can you use "bt" to obtain back trace?
strim is offline  
Old 06 January 2013, 14:32   #26
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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.
Attached Thumbnails
Click image for larger version

Name:	netbsd_debug1.png
Views:	131
Size:	20.8 KB
ID:	33769  
Toni Wilen is online now  
Old 06 January 2013, 14:35   #27
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
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.
Serial shouldn't be read-only. Something is probably broken if it is.

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?
strim is offline  
Old 06 January 2013, 14:45   #28
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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).
Attached Thumbnails
Click image for larger version

Name:	netbsd_debug2_nodma.png
Views:	112
Size:	21.1 KB
ID:	33770   Click image for larger version

Name:	netbsd_debug2_dma.png
Views:	112
Size:	20.3 KB
ID:	33771  
Toni Wilen is online now  
Old 06 January 2013, 14:57   #29
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
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).
The DMA kernel is failing within sbicselectbus() function, which well... selects the bus. But it should have printed a ton of debugging info so far. For some reason it didn't, I need to investigate that and prepare new kernels...
strim is offline  
Old 06 January 2013, 17:29   #30
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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.
Toni Wilen is online now  
Old 06 January 2013, 23:55   #31
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
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.
strim is offline  
Old 07 January 2013, 14:47   #32
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
Quote:
Originally Posted by strim View Post
I've just tested on a real A3000 with CD-ROM and the ahsc/sbic driver works correctly.
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..
Toni Wilen is online now  
Old 07 January 2013, 22:04   #33
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
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..
Here it is! It works, at least to the extent of mounting ISO filesystem. It bails out because it can't find /sbin/init on the CD, but otherwise seems good.

http://pastebin.com/GJ3HkuM3
strim is offline  
Old 09 January 2013, 19:37   #34
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
Could you enable atzsc debugging (keep sbic debugging enabled) and create another CD in drive log?
Toni Wilen is online now  
Old 10 January 2013, 18:50   #35
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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)
Toni Wilen is online now  
Old 11 January 2013, 01:43   #36
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
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)
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.
strim is offline  
Old 11 January 2013, 22:48   #37
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
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.
Toni Wilen is online now  
Old 11 January 2013, 23:05   #38
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,625
Quote:
Originally Posted by Toni Wilen View Post
NetBSD6 now seems to work with SCSI emulation.
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!?
Attached Thumbnails
Click image for larger version

Name:	NetBSD_install_A3000_2013-01-11.png
Views:	97
Size:	16.0 KB
ID:	33835  
mark_k is online now  
Old 11 January 2013, 23:07   #39
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,793
0x2A = Write (10) so my guess about writing was correct
Toni Wilen is online now  
Old 11 January 2013, 23:08   #40
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,625
Aha, that explains it. I was hoping the writing not tested only applied to the Guru-ROM.
mark_k is online now  
AdSense AdSense  
 


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 02:55
Debugging and JIT issues copse support.WinUAE 4 01 April 2012 06:50
Serial debugging while booting jman Coders. General 1 25 March 2012 04:02
Help debugging a faulty CD32 UberFreak support.Hardware 0 23 October 2009 04:29
Enforcer debugging tool M&F support.WinUAE 0 21 May 2002 23:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:34.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.26392 seconds with 14 queries