Re: Access to PCI Expansion ROMs on PPC

2007-11-26 Thread Robin H. Johnson
On Mon, Nov 26, 2007 at 11:33:00AM -0500, Jon Smirl wrote: > Did you check out the cards on x86 and ascertain that they have the > standard PCI header in them? 55 AA All PCI ROMs are supposed to > have that. If they are missing that the size code in the rom.c isn't > going to work right. See m

Re: Access to PCI Expansion ROMs on PPC

2007-11-26 Thread Jon Smirl
On 11/26/07, Robin H. Johnson <[EMAIL PROTECTED]> wrote: > On Mon, Nov 26, 2007 at 10:20:14AM +0100, Michel D?nzer wrote: > > > Regarding the sub-thread on x86 emulation, that is totally out of scope > > > for this. The 'AtomBIOS' of the ATI cards, consists of multiple parts (I > > > may have minor

Re: Access to PCI Expansion ROMs on PPC

2007-11-26 Thread Robin H. Johnson
On Mon, Nov 26, 2007 at 10:20:14AM +0100, Michel D?nzer wrote: > > Regarding the sub-thread on x86 emulation, that is totally out of scope > > for this. The 'AtomBIOS' of the ATI cards, consists of multiple parts (I > > may have minor errors here, ask airlied if you need more > > clarification): >

Re: Access to PCI Expansion ROMs on PPC

2007-11-26 Thread Michel Dänzer
On Mon, 2007-11-26 at 00:59 -0800, Robin H. Johnson wrote: > > Regarding the sub-thread on x86 emulation, that is totally out of scope > for this. The 'AtomBIOS' of the ATI cards, consists of multiple parts (I > may have minor errors here, ask airlied if you need more > clarification): > a) Initi

Re: Access to PCI Expansion ROMs on PPC

2007-11-26 Thread Robin H. Johnson
On Sun, Nov 25, 2007 at 11:41:01AM -0800, Robin H. Johnson wrote: > I was looking around for a description of the ROM layout, and instead I > found this: http://developer.apple.com/technotes/tn/tn2000.html > It was relevant because it explicitly mentioned enabling the > PCI_COMMAND_MEMORY bit in th

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Benjamin Herrenschmidt
> You can dump the PCI config block in /sys with hexdump and see if the > PCI_COMMAND_MEMORY bit is set. I was also unable to locate where in > the kernel PCI_COMMAND_MEMORY is being set. It could be that it is set > by the BIOS at boot on the x86 and not on the ppc. The kernel doesn't until some

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Jon Smirl
On 11/25/07, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > Now, regarding that user problem, this it totally unrelated as it's a > "mac" card. > > It's possible that it's one of these radeons that disable ROM access via > a register in which case a quirk is needed to re-enable it. He says in

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Benjamin Herrenschmidt
On Sun, 2007-11-25 at 15:51 -0500, Jon Smirl wrote: > > They blocked the X server changes, which rendered the kernel support > pointless. But that's all old news. No, you are wrong, nothing was ever "blocked". Ben. ___ Linuxppc-dev mailing list Linu

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Jon Smirl
On 11/25/07, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > On Sun, 2007-11-25 at 08:30 -0500, Jon Smirl wrote: > > > > > The two cards with x86 firmware return 0xFF for those two readb() > > > instructions, while the X1900 with OF returns 0x00 for the readb(). > > > > > > Could one of the m

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Benjamin Herrenschmidt
On Sun, 2007-11-25 at 08:30 -0500, Jon Smirl wrote: > > > The two cards with x86 firmware return 0xFF for those two readb() > > instructions, while the X1900 with OF returns 0x00 for the readb(). > > > > Could one of the more knowledgeable folk for PPC intricacies suggest > why > > those readb ca

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Robin H. Johnson
On Sun, Nov 25, 2007 at 08:30:58AM -0500, Jon Smirl wrote: > I don't know PPC at this low of level but it may be a problem with non > word-aligned access to memory. I thought readb() was supposed to work > on all archs and alignment issues are handled inside readb(). Also, > the readw() may have an

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Jon Smirl
On 11/25/07, Robin H. Johnson <[EMAIL PROTECTED]> wrote: > On Sun, Nov 25, 2007 at 03:15:35AM -0800, Robin H. Johnson wrote: > > I started in there from that, and ended up in pci-sysfs.c... > > The ROM memcpy in drivers/pci/pci-sysfs.c:pci_read_rom() is never running. > ... > > [ 306.396743] drive

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Robin H. Johnson
On Sun, Nov 25, 2007 at 03:15:35AM -0800, Robin H. Johnson wrote: > I started in there from that, and ended up in pci-sysfs.c... > The ROM memcpy in drivers/pci/pci-sysfs.c:pci_read_rom() is never running. ... > [ 306.396743] drivers/pci/pci-sysfs.c:577:pci_read_rom: size=0x0 > rom=0xd8008258

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Robin H. Johnson
On Sat, Nov 24, 2007 at 09:13:40PM -0500, Jon Smirl wrote: > The ROM is mapped in drivers/pci/rom.c > > You could add some printks and see if there is an error and if the ROM > is accessible > > rom = ioremap(start, *size); > if (!rom) { > /* restore enable if iore

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Robin H. Johnson
On Sun, Nov 25, 2007 at 10:42:42AM +0100, Andreas Schwab wrote: > "Robin H. Johnson" <[EMAIL PROTECTED]> writes: > > > I put the card into an amd64 box, found the relevant 'rom' node ($ROM) under > > /sys/device/pci*, and dumped it as follows: > > # echo 1>$ROM > Did you run it exactly like this?

Re: Access to PCI Expansion ROMs on PPC

2007-11-25 Thread Andreas Schwab
"Robin H. Johnson" <[EMAIL PROTECTED]> writes: > I put the card into an amd64 box, found the relevant 'rom' node ($ROM) under > /sys/device/pci*, and dumped it as follows: > # echo 1>$ROM Did you run it exactly like this? Because this will echo exactly one newline to $ROM. If you want to echo "

Re: Access to PCI Expansion ROMs on PPC

2007-11-24 Thread Jon Smirl
On 11/24/07, Robin H. Johnson <[EMAIL PROTECTED]> wrote: > Following up from initial conversation with benh in #ppc64, I did a bit > of testing (and then a bit more). > > Two PCIe cards for my testing: > a) sata_sil24 eSATA (x86 BIOS) > b) ATI X700 graphics (x86 BIOS) > > I put the card into an amd