Subject: Re: PATA disk drive not being configured in 2.0.2
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Dieter <netbsd@sopwith.solgatos.com>
List: port-alpha
Date: 06/15/2005 08:09:08
> No it's not. But the SRM maps it DMA registers to the wrong address.
> I suspect that SRM don't use DMA to boot from CD.

Bingo!

I turned off dma in the config file and it now boots.

cmdide* at pci? dev ? function ? flags 0x0002
cd*     at atapibus? drive ? flags 0x0ff0


cmdide0 at pci0 dev 11 function 0
cmdide0: CMD Technology PCI0646 (rev. 0x01)
cmdide0: bus-master DMA support present, but unused (forced off by config file)
cmdide0: primary channel wired to compatibility mode
cmdide0: primary channel interrupting at isa irq 14
atabus2 at cmdide0 channel 0
cmdide0: secondary channel wired to compatibility mode
cmdide0: secondary channel interrupting at isa irq 15
atabus3 at cmdide0 channel 1

[ ... ]

atapibus0 at atabus2: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST DVDRAM GSA-4160B, K7J49GI5609, A301> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
cd0(cmdide0:0:0): using PIO mode 4

I can mount a CD.

So the controller seems to be working okay in PIO mode, in both
SRM and NetBSD.

I poked around in SRM and couldn't find any sort of reset-to-factory-defaults
command.  Of course SRM has a bunch of features that I haven't found documentation
for, so maybe there is one?  Anyone know of one?

I did find a table of PTEs:

>>>show map | more
pte 0000000003156048 000018A900063301  va 0000000120012000  pa 0000000003152000
pte 0000000003156050 000018C400023309  va 0000000120014000  pa 0000000003188000
pte 0000000003156058 000018C600023309  va 0000000120016000  pa 000000000318C000
===
pte 0000000002F5A050 000017B100023309  va 0000000160014000  pa 0000000002F62000
pte 0000000002F5A058 000018B200023309  va 0000000160016000  pa 0000000003164000
pte 0000000002F5A060 000018B300023309  va 0000000160018000  pa 0000000003166000
pte 0000000002F5A068 000017B400023309  va 000000016001A000  pa 0000000002F68000
pte 0000000002F5A070 000018C300023309  va 000000016001C000  pa 0000000003186000
===
[ ... ]

I can try and capture the entire set if they would be useful.