Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Installing and booting and OF3 machine from a single empty internaldisk, not working



> > I'm not sure how OF spec defines such device node paths,
> > but I'll check how we should parse it.
> 
> When I get home I will type out the entire devalias list for you to be
> sure you have all the information.

Your ultra* and ide* aliases are enough to check the problem.

It turns out that OF machines (NetBSD/ofppc and NetBSD/macppc)
have their own OF bootpath implementation and device_register()
function in src/sys/arch/powerpc/oea/ofw_autoconf.c doesn't
handle quirks on those machines.

In ofw_autoconf.c rev 1.7, boot device dection code for PCI IDE
devices has been changed for pegasos (supported by NetBSD/ofppc):
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/arch/powerpc/oea/ofw_autoconf.c#rev1.7

Actually OF on pegasos has the following bootpath:
http://mail-index.NetBSD.org/port-ofppc/2008/01/11/msg000011.html
>> bootpath: /pci@80000000/ide@C,1/disk@1,0/netbsd.ofppc
 :
>> viaide0 at pci0 dev 12 function 1
>> atabus0 at viaide0 channel 0
>> atabus1 at viaide0 channel 1
>> wd0 at atabus1 drive 0: <ST340014A>
i.e. channel number is the first address of "disk" property
and driver number is the second one.

But according to  devalias you posted OF on macppc has a different format:
>> ultra1   /pci/@d/pci-ata@1/ata-4@0/disk@1
 :
>> ppb0 at pci0 dev 13 function 0
>> pci1 at ppb0 bus 1
>> cmdide0 at pci1 dev 1 function 0
>> cmdide0: secondary channel ignored (disabled)
>> atabus0 at cmdide0 channel 0
>> wd1 at atabus0 drive 1: <ST3200822A>
i.e. channel number is in parent's property.
(note the second channel is disabled by the firmware)

On the other hand, ACARD optional card gives the following bootpath:
http://mail-index.NetBSD.org/port-macppc/2008/09/02/msg000388.html
>> bootpath: /bandit@F2000000/ACARD,6260@D/disk@0/netbsd
 :
>> acardide0 at pci0 dev 13 function 0
>> atabus0 at acardide0 channel 0
>> atabus1 at acardide0 channel 1
>> wd0 at atabus0 drive 0: <ST3400633A>
i.e. no channel number in bootpath. Ugh.

Other variants found on ML:
>> bootpath: /bandit@F2000000/ohare@10/ATA@20000/ATA-Disk@0/netbsd
>> bandit0 at mainbus0
>> pci0 at bandit0 bus 0
>> obio0 at pci0 dev 16 function 0: addr 0xf3000000
>> wdc0 at obio0 offset 0x20000
>> atabus0 at wdc0 channel 0
>> wd0 at atabus0 drive 0: <Maxtor 33073U4>
This one has one on-board wdc at obio. (My Apus)

>> bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:10,/netbsd
>> pci1 at uninorth1 bus 0
>> obio0 at pci1 dev 23 function 0: addr 0x80000000
>> wdc0 at obio0 offset 0x1f000 irq 19
>> atabus0 at wdc0 channel 0
>> wdc1 at obio0 offset 0x20000 irq 20, level triggered: DMA transfer
>> atabus1 at wdc1 channel 0
>> wdc2 at obio0 offset 0x21000 irq 21, level triggered: DMA transfer
>> atabus2 at wdc2 channel 0
>> wd0 at atabus0 drive 0: <TOSHIBA MK6014MAP>
This one has three wdc at obio.

>> bootpath: /pci@f4000000/ata-6@d/disk@0:0/netbsd.current
>> pci1 at uninorth1 bus 0
>> obio0 at pci1 dev 23 function 0: addr 0x80000000
>> wdc0 at obio0 offset 0x20000 irq 24
>> atabus0 at wdc0 channel 0
>> pci2 at uninorth2 bus 0
>> wdc1 at pci2 dev 13 function 0: interrupting at irq 39
>> atabus1 at wdc1 channel 0
>> atapibus0 at atabus1: 2 targets
>> cd0 at atapibus0 drive 1: <MATSHITADVD-R   UJ-845, , D8PB> cdrom removable
>> wd0 at atabus1 drive 0: <ST9808211A>
This one has one wdc at obio and another wdc at pci. Wow.

>> bootpath: /pci@f2000000/@d/mac-io@7/ata-4@1f000/disk@1:0/netbsd
>> pci1 at uninorth1 bus 0
>> ppb0 at pci1 dev 13 function 0
>> pci2 at ppb0 bus 1
>> obio0 at pci2 dev 7 function 0: addr 0x80000000
>> wdc0 at obio0 offset 0x1f000 irq 19, level triggered: DMA transfer
>> atabus0 at wdc0 channel 0
>> wdc1 at obio0 offset 0x20000 irq 20, level triggered: DMA transfer
>> atabus1 at wdc1 channel 0
>> wdc2 at obio0 offset 0x21000 irq 21, level triggered: DMA transfer
>> atabus2 at wdc2 channel 0
>> wd0 at atabus0 drive 0: <IBM-DTLA-305020>
>> wd1: drive supports 16-sector PIO transfers, LBA addressing
This is my G4 posted before. Three wdc at obio.


Probably we have to add #ifdef ${MACHINE} or something similar
in the device_register() function to handle machine dependent quirks.
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index