Skip to contentSkip to conversation

multiple separate pci bridges ...

DISCUSSION Sven Luther 8 participants 50 messages Jan 1, 2004 – Jan 19, 2004

lore
Share & tools
lore
#0 lore raw

Hello,

I am currently trying to port linux to the Pegasos 2, which uses the Marvell Discovery 2 chip, and has two independent pci controllers, of which one is faked as an agp bus. This is with a modified 2.4.23 kernel from the linuxppc_2_4 branch.

Anyway, these two independent controllers both have one bus 0 on them :

PCI bus 0 controlled by pci at 80000000
PCI bus 0 controlled by pci at c0000000

(This coming from chrp_find_bridges).

For the pci bus, at 80000000, a simple indirect access can be used, and i setup a specialized io ops for the faked agp bus since it needs special care.

Later, in pcibios_init, there is a problem in the pci_scan_bus. The first bus has no problems :

Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00

But the second fails with :

PCI: Bus 00 already known

Which comes because in drivers/pci/pci.c:pci_bus_exists does handle only buses, and thus know nothing of separate pci bridges with the same bus number, and thus the kernel dies when accessing bus->xxx something in pcibios_init.

Now, i know that the powermacs in particular, and maybe others, also have this case of different same numbered pci buses with different base addresses, and that this kind of situation has already been solved.

So, what is the workaround here, and where does it get set.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 5 lines · Sven Luther

I am currently trying to port linux to the Pegasos 2, which uses the Marvell Discovery 2 chip, and has two independent pci controllers, of which one is faked as an agp bus. This is with a modified 2.4.23 kernel from the linuxppc_2_4 branch.

Why "faked" ? It's actually fairly sane to have the AGP bus be a separate PCI host controller... That's how it's done on pmacs.

Quoted 6 lines

Anyway, these two independent controllers both have one bus 0 on them :

PCI bus 0 controlled by pci at 80000000
PCI bus 0 controlled by pci at c0000000

(This coming from chrp_find_bridges).

Typical junk, Apple does the same. You want PCI domains or bus renumbering. No PCI domains in 2.4 though, so you want bus renumbering. Look at what pmac_pci.c does for uninorth which has 3 root busses whose firmware bus numbers all start at 0

Quoted 3 lines

For the pci bus, at 80000000, a simple indirect access can be used, and i setup a specialized io ops for the faked agp bus since it needs special care.

What do you mean ? config ops ? You can have different ops per host, again, look at what pmac_pci.c does

Quoted 18 lines

Later, in pcibios_init, there is a problem in the pci_scan_bus. The first bus has no problems :

Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00

Quoted 8 lines

But the second fails with :

PCI: Bus 00 already known

Which comes because in drivers/pci/pci.c:pci_bus_exists does handle only buses, and thus know nothing of separate pci bridges with the same bus number, and thus the kernel dies when accessing bus->xxx something in pcibios_init.

Yes, in 2.4, you need to do some renumbering.

Quoted 6 lines

Now, i know that the powermacs in particular, and maybe others, also have this case of different same numbered pci buses with different base addresses, and that this kind of situation has already been solved.

So, what is the workaround here, and where does it get set.

Basically, you do the bus numbering yourself. You never care about the number of the "root" bus since you basically just send type 0 config cycles to it, but you do care about bus numbers in PCI<->PCI bridges. You trigger the proper renumbering code by setting pci_assign_all_busses to 1.

So basically, what we do is, we keep a "next_busno" variable which is 0 at first. When probing a host, we assign it that bus number (0 for the first host typically). Then, we call pci_scan_bus(). This one will do the renumbering for P2P bridges when pci_assign_all_busses is true. It will also tell us what was the "last" bus number found on the host. We use that+1 to get the new next_busno and start again for the next host.

On your side, you don't have much else to do that set pci_assign_all_busses to 1, and create 2 pci_controller structures with different config cycle ops.

Note that in 2.4, there is a small risk when doing bus renumbering with PCI-PCI bridges that you can get temporarily overlapping bus numbers during the probe, thus screwing it up. this typically happens on Xserves. The problem is when scanning a given segment with P2P bridges, when old & new numbers overlap, a not-yet scanned bridge may be set to the same number as one we are currently scanning after having renumbered it, thus screwing things up. I think 2.6 is protected against this problem. For 2.4, what I do is hack to force a 0x10 bus number offset between hosts.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw

Happy new year to you.

Quoted 9 lines · Benjamin Herrenschmidt
Quoted 5 lines · Sven Luther

I am currently trying to port linux to the Pegasos 2, which uses the Marvell Discovery 2 chip, and has two independent pci controllers, of which one is faked as an agp bus. This is with a modified 2.4.23 kernel from the linuxppc_2_4 branch.

Why "faked" ? It's actually fairly sane to have the AGP bus be a separate PCI host controller... That's how it's done on pmacs.

There is some extra magic that needs to be done. In particular interrupts need to be disabled before being able to write to the config space of the agp bridge.

Quoted 11 lines
Quoted 7 lines

Anyway, these two independent controllers both have one bus 0 on them :

PCI bus 0 controlled by pci at 80000000
PCI bus 0 controlled by pci at c0000000

(This coming from chrp_find_bridges).

Typical junk, Apple does the same. You want PCI domains or bus renumbering. No PCI domains in 2.4 though, so you want bus renumbering.

Yeah.

Quoted 2 lines

Look at what pmac_pci.c does for uninorth which has 3 root busses whose firmware bus numbers all start at 0

Ok, thanks.

Quoted 6 lines
Quoted 3 lines

For the pci bus, at 80000000, a simple indirect access can be used, and i setup a specialized io ops for the faked agp bus since it needs special care.

What do you mean ? config ops ? You can have different ops per host, again, look at what pmac_pci.c does

Yep, that i did already. And that is what i did, i used the indirect pci ops for the first bus, but specialized stuff for the second bus, due to the above mentioned stuff.

Quoted 20 lines
Quoted 20 lines

Later, in pcibios_init, there is a problem in the pci_scan_bus. The first bus has no problems :

Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00

But the second fails with :

Quoted 8 lines
Quoted 6 lines

PCI: Bus 00 already known

Which comes because in drivers/pci/pci.c:pci_bus_exists does handle only buses, and thus know nothing of separate pci bridges with the same bus number, and thus the kernel dies when accessing bus->xxx something in pcibios_init.

Yes, in 2.4, you need to do some renumbering.

Ok.

Quoted 10 lines
Quoted 6 lines

Now, i know that the powermacs in particular, and maybe others, also have this case of different same numbered pci buses with different base addresses, and that this kind of situation has already been solved.

So, what is the workaround here, and where does it get set.

Basically, you do the bus numbering yourself. You never care about the number of the "root" bus since you basically just send type 0 config cycles to it, but you do care about bus numbers in PCI<->PCI bridges.

Mmm, since these are two CPU<->PCI bridges, i don't care about that, right. PCI<->PCI bridges are ones which stand behind a PCI<->PCI bridge, right ?

Quoted 2 lines

You trigger the proper renumbering code by setting pci_assign_all_busses to 1.

Ok. This must have been the magic bit i was searching for.

Quoted 7 lines

So basically, what we do is, we keep a "next_busno" variable which is 0 at first. When probing a host, we assign it that bus number (0 for the first host typically). Then, we call pci_scan_bus(). This one will do the renumbering for P2P bridges when pci_assign_all_busses is true. It will also tell us what was the "last" bus number found on the host. We use that+1 to get the new next_busno and start again for the next host.

Ok. Need to look again though to find the place where the arch specific place is to modify this. As i remember, pci_scan_bus is called from drivers/pci/pci.c, and i shouldn't need to modify this.

Quoted 3 lines

On your side, you don't have much else to do that set pci_assign_all_busses to 1, and create 2 pci_controller structures with different config cycle ops.

Yep. I guess the pci_assign_all_busses can be set in chrp_find_bridges, in the pegasos2 special case. The rest i have already handled.

Quoted 4 lines

Note that in 2.4, there is a small risk when doing bus renumbering with PCI-PCI bridges that you can get temporarily overlapping bus numbers during the probe, thus screwing it up. this typically happens on

Not a problem in this case though, right ? There is only one bus for each controller, and the controller are sitting directly after the CPU.

Quoted 4 lines

Xserves. The problem is when scanning a given segment with P2P bridges, when old & new numbers overlap, a not-yet scanned bridge may be set to the same number as one we are currently scanning after having renumbered

Ok, do we need to detect this, or will it just fail or something ?

Quoted 3 lines

it, thus screwing things up. I think 2.6 is protected against this problem. For 2.4, what I do is hack to force a 0x10 bus number offset between hosts.

Mmm. Will look into that.

Anyway, i will not be able to implement it until sunday at the earliest.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 4 lines

There is some extra magic that needs to be done. In particular interrupts need to be disabled before being able to write to the config space of the agp bridge.

That can be completely local to the config ops. of that pci_controller instance.

Quoted 6 lines
Quoted 2 lines

What do you mean ? config ops ? You can have different ops per host, again, look at what pmac_pci.c does

Yep, that i did already. And that is what i did, i used the indirect pci ops for the first bus, but specialized stuff for the second bus, due to the above mentioned stuff.

Good.

Quoted 3 lines

Mmm, since these are two CPU<->PCI bridges, i don't care about that, right. PCI<->PCI bridges are ones which stand behind a PCI<->PCI bridge, right ?

No, no, ... PCI<->PCI bridges can happen still... some PCI cards can have one on-board for example.

Quoted 4 lines
Quoted 2 lines

You trigger the proper renumbering code by setting pci_assign_all_busses to 1.

Ok. This must have been the magic bit i was searching for.

Probably :)

Quoted 11 lines
Quoted 7 lines

So basically, what we do is, we keep a "next_busno" variable which is 0 at first. When probing a host, we assign it that bus number (0 for the first host typically). Then, we call pci_scan_bus(). This one will do the renumbering for P2P bridges when pci_assign_all_busses is true. It will also tell us what was the "last" bus number found on the host. We use that+1 to get the new next_busno and start again for the next host.

Ok. Need to look again though to find the place where the arch specific place is to modify this. As i remember, pci_scan_bus is called from drivers/pci/pci.c, and i shouldn't need to modify this.

No, look what I do when setting up uninorth in pmac_pci.c

Quoted 6 lines
Quoted 3 lines

On your side, you don't have much else to do that set pci_assign_all_busses to 1, and create 2 pci_controller structures with different config cycle ops.

Yep. I guess the pci_assign_all_busses can be set in chrp_find_bridges, in the pegasos2 special case. The rest i have already handled.

Yes.

Quoted 6 lines
Quoted 3 lines

Note that in 2.4, there is a small risk when doing bus renumbering with PCI-PCI bridges that you can get temporarily overlapping bus numbers during the probe, thus screwing it up. this typically happens on

Not a problem in this case though, right ? There is only one bus for each controller, and the controller are sitting directly after the CPU.

And ? You can still have P2P bridges sitting on one of your PCI busses.

Quoted 5 lines
Quoted 3 lines

Xserves. The problem is when scanning a given segment with P2P bridges, when old & new numbers overlap, a not-yet scanned bridge may be set to the same number as one we are currently scanning after having renumbered

Ok, do we need to detect this, or will it just fail or something ?

It will do random crap on PCI probe

Quoted 11 lines
Quoted 3 lines

it, thus screwing things up. I think 2.6 is protected against this problem. For 2.4, what I do is hack to force a 0x10 bus number offset between hosts.

Mmm. Will look into that.

Anyway, i will not be able to implement it until sunday at the earliest.

Friendly,

Sven Luther

--
Benjamin Herrenschmidt <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#44 lore raw
In reply to Sven Luther

Sven,

Synergy Microsystems has designs with the Discovery 2 as well. We worked around this by setting pci_assign_all_busses to true and with modifications to the platform specific config cycle routines (only included one as an example):

int
gemini_pcibios_bus_fixup(struct pci_dev *dev, struct pci_controller *hose)

{
        return ((dev->bus->number == hose->first_busno) ? 0 : dev->bus->number);
}

int
gemini_pcibios_read_config_byte(struct pci_dev *dev, int offset, u8 *val)

{
        unsigned long reg;
        unsigned int addr;
        int bus;
        struct pci_controller *hose;

        hose = dev->sysdata;
        bus = gemini_pcibios_bus_fixup(dev, hose);
        addr = pci_config_type1_addr(bus, dev->devfn, offset & ~(0x3));

        reg = config_read(addr, hose->cfg_addr, hose->cfg_data);
        *val = ((reg >> ((offset & 0x3) << 3)) & 0xff);
        return PCIBIOS_SUCCESSFUL;
}

It is also necessary to set the first and last bus number fields of the hose structure correctly in your platform specific code. These will get over written later by the PCI driver code, and in our case, to the same values. Our platform specific code does a preliminary scan of the PCI buses to find the first and last bus numbers.

This will also work when a PtP bridge is located on either of the primary PCI buses of the Discovery. We're using a derivative of a 2.4.19 kernel.

I'm open to a better approach...

Rob Baxter

Quoted 44 lines · Sven Luther

I am currently trying to port linux to the Pegasos 2, which uses the Marvell Discovery 2 chip, and has two independent pci controllers, of which one is faked as an agp bus. This is with a modified 2.4.23 kernel from the linuxppc_2_4 branch.

Anyway, these two independent controllers both have one bus 0 on them :

PCI bus 0 controlled by pci at 80000000
PCI bus 0 controlled by pci at c0000000

(This coming from chrp_find_bridges).

For the pci bus, at 80000000, a simple indirect access can be used, and i setup a specialized io ops for the faked agp bus since it needs special care.

Later, in pcibios_init, there is a problem in the pci_scan_bus. The first bus has no problems :

Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00

But the second fails with :

PCI: Bus 00 already known

Which comes because in drivers/pci/pci.c:pci_bus_exists does handle only buses, and thus know nothing of separate pci bridges with the same bus number, and thus the kernel dies when accessing bus->xxx something in pcibios_init.

Quoted 6 lines

Now, i know that the powermacs in particular, and maybe others, also have this case of different same numbered pci buses with different base addresses, and that this kind of situation has already been solved.

So, what is the workaround here, and where does it get set.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#43 lore raw
In reply to Sven Luther
Quoted 1 line · Sven Luther

Happy new year to you.

Happy New Year!

Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · Sven Luther
Quoted 4 lines

I am currently trying to port linux to the Pegasos 2, which uses the Marvell Discovery 2 chip, and has two independent pci controllers, of which one is faked as an agp bus. This is with a modified 2.4.23 kernel from the linuxppc_2_4 branch.

Quoted 6 lines
Quoted 2 lines

Why "faked" ? It's actually fairly sane to have the AGP bus be a separate PCI host controller... That's how it's done on pmacs.

There is some extra magic that needs to be done. In particular interrupts need to be disabled before being able to write to the config space of the agp bridge.

I seem to remember the upper layer already takes care of disabling interrupts? Or am I mistaken?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#45 lore raw
In reply to Rob Baxter
Quoted 15 lines · Rob Baxter

Sven,

Synergy Microsystems has designs with the Discovery 2 as well. We worked around this by setting pci_assign_all_busses to true and with modifications to the platform specific config cycle routines (only included one as an example):

int
gemini_pcibios_bus_fixup(struct pci_dev *dev, struct pci_controller *hose)

{
        return ((dev->bus->number == hose->first_busno) ? 0 : dev->bus->number);
}

int
gemini_pcibios_read_config_byte(struct pci_dev *dev, int offset, u8 *val)

Quoted 14 lines
{
        unsigned long reg;
        unsigned int addr;
        int bus;
        struct pci_controller *hose;

        hose = dev->sysdata;
        bus = gemini_pcibios_bus_fixup(dev, hose);
        addr = pci_config_type1_addr(bus, dev->devfn, offset & ~(0x3));

        reg = config_read(addr, hose->cfg_addr, hose->cfg_data);
        *val = ((reg >> ((offset & 0x3) << 3)) & 0xff);
        return PCIBIOS_SUCCESSFUL;
}

Hrm... Why this bus fixup thing ? Why not just clearly writing something like

if (dev->bus->number == hose->first_busno)

	discovery2_config_type0_addr(....);
else
	discovery2_config_type1_addr(....);

And those could be inline...

Also, the way you define functions with a name that "looks" like a generic function (pci_config_type1_addr) is rather ugly...

Quoted 5 lines

It is also necessary to set the first and last bus number fields of the hose structure correctly in your platform specific code. These will get over written later by the PCI driver code, and in our case, to the same values. Our platform specific code does a preliminary scan of the PCI buses to find the first and last bus numbers.

Why would you need to set them correctly ? The PCI code will set them to sensible values before doing the bus scan and will fixup the last busno afterward for each controller, you do not need any pre-scan or whatever and you can leave those values to 0 at init time.

Quoted 2 lines

This will also work when a PtP bridge is located on either of the primary PCI buses of the Discovery. We're using a derivative of a 2.4.19 kernel.

Yup, that should work fine.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#46 lore raw
Quoted 34 lines · Benjamin Herrenschmidt
Quoted 15 lines · Rob Baxter

Sven,

Synergy Microsystems has designs with the Discovery 2 as well. We worked around this by setting pci_assign_all_busses to true and with modifications to the platform specific config cycle routines (only included one as an example):

int
gemini_pcibios_bus_fixup(struct pci_dev *dev, struct pci_controller *hose)

{
        return ((dev->bus->number == hose->first_busno) ? 0 : dev->bus->number);
}

int
gemini_pcibios_read_config_byte(struct pci_dev *dev, int offset, u8 *val)

Quoted 14 lines
{
        unsigned long reg;
        unsigned int addr;
        int bus;
        struct pci_controller *hose;

        hose = dev->sysdata;
        bus = gemini_pcibios_bus_fixup(dev, hose);
        addr = pci_config_type1_addr(bus, dev->devfn, offset & ~(0x3));

        reg = config_read(addr, hose->cfg_addr, hose->cfg_data);
        *val = ((reg >> ((offset & 0x3) << 3)) & 0xff);
        return PCIBIOS_SUCCESSFUL;
}

Hrm... Why this bus fixup thing ? Why not just clearly writing something like

Quoted 6 lines

if (dev->bus->number == hose->first_busno)

	discovery2_config_type0_addr(....);
else
	discovery2_config_type1_addr(....);

And those could be inline...

I like this, thank you, a much cleaner approach.

Quoted 3 lines

Also, the way you define functions with a name that "looks" like a generic function (pci_config_type1_addr) is rather ugly...

It's a local macro, I agree, it's ugly, it was there before my time:

#define pci_config_type1_addr(bus,dev,offset) \
        (0x80000000 | ((bus)<<16) | ((dev)<<8) | (offset))
#define pci_config_type0_addr(dev,offset) \
        ((1 << PCI_SLOT(dev)) | (PCI_FUNC(dev) << 8) | offset)
Quoted 8 lines
Quoted 7 lines

It is also necessary to set the first and last bus number fields of the hose structure correctly in your platform specific code. These will get over written later by the PCI driver code, and in our case, to the same values. Our platform specific code does a preliminary scan of the PCI buses to find the first and last bus numbers.

Quoted 4 lines

Why would you need to set them correctly ? The PCI code will set them to sensible values before doing the bus scan and will fixup the last busno afterward for each controller, you do not need any pre-scan or whatever and you can leave those values to 0 at init time.

This was necessary because the PCI driver (scan/enumeration code) was using these same config calls that was being fixed up. (A chicken and egg issue?)

Quoted 7 lines
Quoted 3 lines

This will also work when a PtP bridge is located on either of the primary PCI buses of the Discovery. We're using a derivative of a 2.4.19 kernel.

Yup, that should work fine.

Ben.

--
-Rob

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#47 lore raw
Quoted 3 lines

This was necessary because the PCI driver (scan/enumeration code) was using these same config calls that was being fixed up. (A chicken and egg issue?)

This should still not be necessary... Before scanning a bus, the PCI code will properly set first_busno, thus the config access methods will work.

The only problem I spotted in 2.4 (and afaik, that is fixed in 2.6) is that when P2P bridges are moved around, we could end up with a temporary wrong state where 2 of these on a given bus segment would try to decode the same bus numbers, thus screwing up probe. This is why I added a skew value of 0x10 between each host on some machines.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
In reply to Benjamin Herrenschmidt

Hello,

I managed to boot into linux, altough i didn't tried yet with a root filesystem, so i don't know if it will work.

Still, i get :

PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00
Scanning bus 10
Fixups for bus 10
Bus scan for 10 returning with max=10
PCI: Cannot allocate resource region 4 of device 00:00.0

So, the 0x10 incrementation is fine, but the agp bus is not working correctly, and thus the agp graphic card not recognized (and thus no radeonfb).

That said, i believe the 00:00.0 (should that not be 10:00.0 because of the renumbering) is the Marvell Discovery II pci controller, and the actual agp card should be found just behind.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
Quoted 21 lines

PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00
Scanning bus 10
Fixups for bus 10
Bus scan for 10 returning with max=10
PCI: Cannot allocate resource region 4 of device 00:00.0

Quoted 7 lines

So, the 0x10 incrementation is fine, but the agp bus is not working correctly, and thus the agp graphic card not recognized (and thus no radeonfb).

That said, i believe the 00:00.0 (should that not be 10:00.0 because of the renumbering) is the Marvell Discovery II pci controller, and the actual agp card should be found just behind.

What video card is this ?

It's possible that your config ops for the AGP don't work properly. Make sure you are really generating type 0 config cycles.

Also, this "cannot allocate resource region" smells bad. Can you check what the BARs of the host bridge are supposed to mean ?

I hope it's not yet another brain dead bridge that puts the system memory in a BAR... in which case we'll have to "hide" it from linux PCI subsystem.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#6 lore raw
Quoted 26 lines · Benjamin Herrenschmidt
Quoted 26 lines

PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00
Scanning bus 10
Fixups for bus 10
Bus scan for 10 returning with max=10
PCI: Cannot allocate resource region 4 of device 00:00.0

So, the 0x10 incrementation is fine, but the agp bus is not working correctly, and thus the agp graphic card not recognized (and thus no radeonfb).

Quoted 5 lines
Quoted 3 lines

That said, i believe the 00:00.0 (should that not be 10:00.0 because of the renumbering) is the Marvell Discovery II pci controller, and the actual agp card should be found just behind.

What video card is this ?

A Radeon 9200 SE 64M, from Xpert Vision. The kernel is patched for Radeon 9200 SE support. (Both i have are Yd models).

Quoted 2 lines

It's possible that your config ops for the AGP don't work properly. Make sure you are really generating type 0 config cycles.

Ok, i will check again, altough no more tonight.

Quoted 2 lines

Also, this "cannot allocate resource region" smells bad. Can you check what the BARs of the host bridge are supposed to mean ?

Ok, will do.

Quoted 2 lines

I hope it's not yet another brain dead bridge that puts the system memory in a BAR... in which case we'll have to "hide" it from linux PCI subsystem.

Mmm, seems Rob Baxter from Synergy Microsystems are already running linux on systems with the Discovery II north bridge, so i don't think this is it. I will check this tomorrow though.

Thanks again for your help,

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#48 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines

This was necessary because the PCI driver (scan/enumeration code) was using these same config calls that was being fixed up. (A chicken and egg issue?)

This should still not be necessary... Before scanning a bus, the PCI code will properly set first_busno, thus the config access methods will work.

Quoted 7 lines

The only problem I spotted in 2.4 (and afaik, that is fixed in 2.6) is that when P2P bridges are moved around, we could end up with a temporary wrong state where 2 of these on a given bus segment would try to decode the same bus numbers, thus screwing up probe. This is why I added a skew value of 0x10 between each host on some machines.

Ben.

The problem I saw with the dual PCI buses is that the second Discovery PCI bridge was assigned a bus number of 01 (i.e., first_busno), or 02 if a PtP bridge was located off of the first PCI bus of the Discovery, prior to the scan. The Discovery does not respond to PCI configuration cycles when the bus number is not zero--the reason for bus fixup routine.

--
-Rob

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#49 lore raw
Quoted 6 lines

The problem I saw with the dual PCI buses is that the second Discovery PCI bridge was assigned a bus number of 01 (i.e., first_busno), or 02 if a PtP bridge was located off of the first PCI bus of the Discovery, prior to the scan. The Discovery does not respond to PCI configuration cycles when the bus number is not zero--the reason for bus fixup routine.

Sure, you need to issue a type-0 config cycle on a host bridge for devices that are on the same segment... it's possible that in your case, a type 0 and and type 1 are the same format with bus 0 for the first, in which case, just do that (no need to "fixup" the bus number, it's really not related to bus numbers, but to the type of config cycles issued to the PCI bus)

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#7 lore raw
In reply to Sven Luther
Quoted 28 lines · Sven Luther
Quoted 26 lines · Benjamin Herrenschmidt
Quoted 26 lines

PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00
Scanning bus 10
Fixups for bus 10
Bus scan for 10 returning with max=10
PCI: Cannot allocate resource region 4 of device 00:00.0

So, the 0x10 incrementation is fine, but the agp bus is not working correctly, and thus the agp graphic card not recognized (and thus no radeonfb).

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

That said, i believe the 00:00.0 (should that not be 10:00.0 because of the renumbering) is the Marvell Discovery II pci controller, and the actual agp card should be found just behind.

What video card is this ?

A Radeon 9200 SE 64M, from Xpert Vision. The kernel is patched for Radeon 9200 SE support. (Both i have are Yd models).

Ok, i got it to work finally, at least upto asking me for a root filesystem, which i don't yet have on this harddisk.

Now, I have some technical questions about how to best do a few things.

I was recommended to set the ppc_md.pci_exclude_device so that the device 0 (the marvell bridge itself) is not seen by linux. I did this by following the 4xx example, which should be ok.

But, i have to do access some address which i need to ioremap. I created a hose->cfg_peg2_magic to to put this ioremapped address in. I guess this is not the most clean way of doing this or something, any hint on how to best do it ? I need to set this in chrp_find_bridges or something such, and use the address in the read/write_config functions.

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

And finally, about the stuff which blocked me most, i am somewhat bewildered. I use this :

        data = 0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
		| (dev->devfn << 8) | (offset & 0xff);

As the address to write to, but the indirect pci stuff uses offset & 0xfc, which blanks bits 0 & 1 for pci config type selection. What am i misunderstanding or doing wrong here ?

A, and a last question to Rob Baxter, did you manage to get the builtin gigabyte ethernet port to work, and if yes, with which code, an existing driver or some home built driver. Can you eventually share the code or something such ?

Anyway, thanks for your help.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#8 lore raw
Quoted 9 lines

Ok, i got it to work finally, at least upto asking me for a root filesystem, which i don't yet have on this harddisk.

Now, I have some technical questions about how to best do a few things.

I was recommended to set the ppc_md.pci_exclude_device so that the device 0 (the marvell bridge itself) is not seen by linux. I did this by following the 4xx example, which should be ok.

Actually, just hiding the BARs with a quirk should be enough (what I do for the CPC710)...

Quoted 5 lines

But, i have to do access some address which i need to ioremap. I created a hose->cfg_peg2_magic to to put this ioremapped address in. I guess this is not the most clean way of doing this or something, any hint on how to best do it ? I need to set this in chrp_find_bridges or something such, and use the address in the read/write_config functions.

What for ? you can eventually ioremap some lower address in host->cfg_addr or cfg_data and then use offsets from these addresses, though it's not recommended to ioremap too large spaces. You can also just ioremap that in a global once... I do that for a few things in pmac_feature.c, like the northbridge registers.

Quoted 2 lines

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

Why do you need hose->bus_offset ? For indirect_pci ? Well... that's a kludge, you should rather fix indirect_pci to use first_busno instead... I don't know where this bus_offset comes from in the first place, it's defined in pci_controller but not used at all in 2.6...

(BTW. You should really work on 2.6, not 2.4...)

Quoted 9 lines

And finally, about the stuff which blocked me most, i am somewhat bewildered. I use this :

        data = 0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
		| (dev->devfn << 8) | (offset & 0xff);

As the address to write to, but the indirect pci stuff uses offset & 0xfc, which blanks bits 0 & 1 for pci config type selection. What am i misunderstanding or doing wrong here ?

Normally, you write the offset 32 bits aligned, and then you add those 2 missing bits to the cycle used to actually read the config space (access to the data register).

But then... read your bridge spec.

Quoted 2 lines

A, and a last question to Rob Baxter, did you manage to get the builtin gigabyte ethernet port to work, and if yes, with which code, an

gigabit you mean ? :) gigabyte would be nice though...

Quoted 2 lines

existing driver or some home built driver. Can you eventually share the code or something such ?

What cell is it ?

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#39 lore raw
In reply to Sven Luther

Hi Sven:

I think there is some basic brokeness in the Discovery specific code. I've been meaning to go and look at some of the original code, to see if some stuff was left on the floor.

On our evalution boards the P2P registers are not set up. So you indeed have two PCI bus 0. The P2P register for PCI bus 1 should be initialized to identify it as bus 1, or whatever the right value is considering any more bridges found on bus 0.

If you insert pci cards which contain bridges on them, they only work on the bus 0 slots...

Do you have something like ppcboot or uboot starting your system or just a kernel? If you are using a real boot rom, you could try initializing the p2p registers by hand, then booting...

I'm hoping to work on this in the next few days.

Regards, Marcus Barrow

Quoted 72 lines · Sven Luther
Quoted 28 lines · Sven Luther
Quoted 26 lines · Benjamin Herrenschmidt
Quoted 26 lines

PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [11ab/6460] 000600 00
Found 00:08 [1106/3044] 000c00 00
Found 00:28 [1000/0001] 000100 00
Found 00:60 [1106/8231] 000601 00
Found 00:61 [1106/0571] 000101 00
Found 00:62 [1106/3038] 000c03 00
Found 00:63 [1106/3038] 000c03 00
Found 00:64 [1106/8235] 000000 00
Found 00:65 [1106/3058] 000401 00
Found 00:66 [1106/3068] 000780 00
Found 00:68 [1106/3065] 000200 00
Fixups for bus 00
Bus scan for 00 returning with max=00
Scanning bus 10
Fixups for bus 10
Bus scan for 10 returning with max=10
PCI: Cannot allocate resource region 4 of device 00:00.0

So, the 0x10 incrementation is fine, but the agp bus is not working correctly, and thus the agp graphic card not recognized (and thus no radeonfb).

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

That said, i believe the 00:00.0 (should that not be 10:00.0 because of the renumbering) is the Marvell Discovery II pci controller, and the actual agp card should be found just behind.

What video card is this ?

A Radeon 9200 SE 64M, from Xpert Vision. The kernel is patched for Radeon 9200 SE support. (Both i have are Yd models).

Ok, i got it to work finally, at least upto asking me for a root filesystem, which i don't yet have on this harddisk.

Now, I have some technical questions about how to best do a few things.

I was recommended to set the ppc_md.pci_exclude_device so that the device 0 (the marvell bridge itself) is not seen by linux. I did this by following the 4xx example, which should be ok.

But, i have to do access some address which i need to ioremap. I created a hose->cfg_peg2_magic to to put this ioremapped address in. I guess this is not the most clean way of doing this or something, any hint on how to best do it ? I need to set this in chrp_find_bridges or something such, and use the address in the read/write_config functions.

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

And finally, about the stuff which blocked me most, i am somewhat bewildered. I use this :

        data = 0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
		| (dev->devfn << 8) | (offset & 0xff);

As the address to write to, but the indirect pci stuff uses offset & 0xfc, which blanks bits 0 & 1 for pci config type selection. What am i misunderstanding or doing wrong here ?

A, and a last question to Rob Baxter, did you manage to get the builtin gigabyte ethernet port to work, and if yes, with which code, an existing driver or some home built driver. Can you eventually share the code or something such ?

Quoted 8 lines

Anyway, thanks for your help.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#9 lore raw
In reply to Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt
Quoted 4 lines

Ok, i got it to work finally, at least upto asking me for a root filesystem, which i don't yet have on this harddisk.

Quoted 8 lines
Quoted 5 lines

Now, I have some technical questions about how to best do a few things.

I was recommended to set the ppc_md.pci_exclude_device so that the device 0 (the marvell bridge itself) is not seen by linux. I did this by following the 4xx example, which should be ok.

Actually, just hiding the BARs with a quirk should be enough (what I do for the CPC710)...

Mmm, will look into this. Actually, linux should not write to those, but read access should be ok.

Quoted 7 lines
Quoted 5 lines

But, i have to do access some address which i need to ioremap. I created a hose->cfg_peg2_magic to to put this ioremapped address in. I guess this is not the most clean way of doing this or something, any hint on how to best do it ? I need to set this in chrp_find_bridges or something such, and use the address in the read/write_config functions.

What for ? you can eventually ioremap some lower address in

Well, these are the magic let's transform a standard pci bus into an agp one, i don't know exactly what they do, just that i have to do it.

Quoted 2 lines

host->cfg_addr or cfg_data and then use offsets from these addresses, though it's not recommended to ioremap too large spaces. You can also

Well, i tried ioremapping 0x10000, but without much success (cfg_addr/data is at cf8/cfc, and this magic stuff is at f118/f11c). I just got a sig 11 OOPS, so ...

Quoted 2 lines

just ioremap that in a global once... I do that for a few things in pmac_feature.c, like the northbridge registers.

Yeah, i have seen.

Quoted 4 lines
Quoted 2 lines

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

Why do you need hose->bus_offset ? For indirect_pci ? Well... that's

Nope, i checked, and it was trying to read the bus 0x10, while the bus is in reallity 0. That said, if i understood stuff correctly, it should be ok, since type 0 config ignores bus and device, right ?

Quoted 3 lines

a kludge, you should rather fix indirect_pci to use first_busno instead... I don't know where this bus_offset comes from in the first place, it's defined in pci_controller but not used at all in 2.6...

Yeah, nor in 2.4, if my grep is correct. I can't use indirect_pci for the second bus though.

Quoted 1 line

(BTW. You should really work on 2.6, not 2.4...)

Ah, yes, but 2.4 means suppoprt for debian-installer. Once that works, i will work on 2.6.x. Also, 2.4 provides me a known working base.

Quoted 10 lines
Quoted 9 lines

And finally, about the stuff which blocked me most, i am somewhat bewildered. I use this :

        data = 0x80000000 | ((dev->bus->number - hose->bus_offset) << 16)
		| (dev->devfn << 8) | (offset & 0xff);

As the address to write to, but the indirect pci stuff uses offset & 0xfc, which blanks bits 0 & 1 for pci config type selection. What am i misunderstanding or doing wrong here ?

Quoted 5 lines

Normally, you write the offset 32 bits aligned, and then you add those 2 missing bits to the cycle used to actually read the config space (access to the data register).

But then... read your bridge spec.

This is which bewilders me, the bridge spec speak about type 0 and type 1, and using the last 2 bits for this.

Quoted 4 lines
Quoted 2 lines

A, and a last question to Rob Baxter, did you manage to get the builtin gigabyte ethernet port to work, and if yes, with which code, an

gigabit you mean ? :) gigabyte would be nice though...

Yeah, whatever.

Quoted 4 lines
Quoted 2 lines

existing driver or some home built driver. Can you eventually share the code or something such ?

What cell is it ?

The Marvell Discovery II has (one, two or three) gigabit ethernets included, these do not appear on the pci bus, but need to be programmed directly with the NB registers. On the other hand, the sk98 driver provides driver for various Marvell gigabit ethernet.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#10 lore raw
Quoted 3 lines

Mmm, will look into this. Actually, linux should not write to those, but read access should be ok.

If the BARs contain address ranges that will confuse linux resource management (like RAM location), then you have to hide them completely.

Quoted 3 lines

Well, i tried ioremapping 0x10000, but without much success (cfg_addr/data is at cf8/cfc, and this magic stuff is at f118/f11c). I just got a sig 11 OOPS, so ...

I don't fully understand... If you are doing IO cycles, there's no ioremapping needed at all at this point, just use the one that is done once for the bridge IO space. neither cf8/cfc not f118 look like addresses that can be ioremap'ed anyway...

Quoted 5 lines
Quoted 2 lines

just ioremap that in a global once... I do that for a few things in pmac_feature.c, like the northbridge registers.

Yeah, i have seen.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

Why do you need hose->bus_offset ? For indirect_pci ? Well... that's

Nope, i checked, and it was trying to read the bus 0x10, while the bus is in reallity 0. That said, if i understood stuff correctly, it should be ok, since type 0 config ignores bus and device, right ?

Yes. And for type 1, just issue a cycle to (bus - hose->first_busno)

Quoted 11 lines
Quoted 3 lines

a kludge, you should rather fix indirect_pci to use first_busno instead... I don't know where this bus_offset comes from in the first place, it's defined in pci_controller but not used at all in 2.6...

Yeah, nor in 2.4, if my grep is correct. I can't use indirect_pci for the second bus though.

Quoted 1 line

(BTW. You should really work on 2.6, not 2.4...)

Ah, yes, but 2.4 means suppoprt for debian-installer. Once that works, i will work on 2.6.x. Also, 2.4 provides me a known working base.

I still don't like the idea of new dev. beeing done on 2.4...

Quoted 2 lines

This is which bewilders me, the bridge spec speak about type 0 and type 1, and using the last 2 bits for this.

Yes. Usually, you don't put the last 2 bits of the offsets in cfg_addr, you crop that value to the closest 32 bits boundary (or 64 bits in some chips), and then you "offset" the cfg_data access.

For example, for a 8 bits access at an offset of 7, you would use 4 as the offset in cfg_addr, and then do a 8 bits access at cfg_data + 3

Quoted 4 lines

The Marvell Discovery II has (one, two or three) gigabit ethernets included, these do not appear on the pci bus, but need to be programmed directly with the NB registers. On the other hand, the sk98 driver provides driver for various Marvell gigabit ethernet.

Argh ????? They don't appear on PCI ? What piece of SHIT is this bridge ?

Really totally insane.

I strongly suggest you still match them as PCI devices, eventually using the bridge device itself as the match for the driver.... The DMA mapping ops are designed to work with PCI anyway.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#40 lore raw
In reply to Marcus Barrow
Quoted 7 lines · Marcus Barrow

Hi Sven:

I think there is some basic brokeness in the Discovery specific code. I've been meaning to go and look at some of the original code, to see if some stuff was left on the floor.

Mmm. What code are you speaking about here ?

Quoted 5 lines

On our evalution boards the P2P registers are not set up. So you indeed have two PCI bus 0. The P2P register for PCI bus 1 should be initialized to identify it as bus 1, or whatever the right value is considering any more bridges found on bus 0.

Mmm, i understand that the 2.6.x pci domain will make this not necessary. I might be wrong though.

Quoted 2 lines

If you insert pci cards which contain bridges on them, they only work on the bus 0 slots...

bus 1 is used as an agp bus anyway, and i doubt there are many agp graphic cards out there with pci bridges on them. When i inserted my Appian Jeronimo 2000 in that board, it refused to powerup at all, but then, maybe it is drawing too much power or something. After all, it has a 3dlabs gamma and two permedia3 on it.

Quoted 2 lines

Do you have something like ppcboot or uboot starting your system or just a kernel? If you are using a real

Well, there is a customized SmartFirmware OpenFirmware on the board. I even have (non-free though) access to the source of it. The board is mostly a CHRP design.

Quoted 2 lines

boot rom, you could try initializing the p2p registers by hand, then booting...

The Firmware guy told me don't touch it though.

Quoted 1 line

I'm hoping to work on this in the next few days.

Ok, great.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#11 lore raw
In reply to Benjamin Herrenschmidt
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 3 lines

Mmm, will look into this. Actually, linux should not write to those, but read access should be ok.

If the BARs contain address ranges that will confuse linux resource management (like RAM location), then you have to hide them completely.

Mmm, will check.

BTW, X has problems with pci config space access. It simply opens the /proc/bus/pci/<bus>/<dev>.<func> stuff, and is not happy with the result.

Is the above just a plain ioremap of config space or something such, or does the reads there use the pci access functions ?

Quoted 8 lines
Quoted 3 lines

Well, i tried ioremapping 0x10000, but without much success (cfg_addr/data is at cf8/cfc, and this magic stuff is at f118/f11c). I just got a sig 11 OOPS, so ...

I don't fully understand... If you are doing IO cycles, there's no ioremapping needed at all at this point, just use the one that is done once for the bridge IO space. neither cf8/cfc not f118 look like addresses that can be ioremap'ed anyway...

Well, it is f1000cf8/cfc and f100f118/f11c naturally, and the second is needed to enable a hardware kludge to make the second pci bus look like agp. I don't really have the details of such, but i need to write to the f118/f11c before/after each pci access to the second pci bus, as well as disable the CPU interrupts for doing the access.

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

just ioremap that in a global once... I do that for a few things in pmac_feature.c, like the northbridge registers.

Yeah, i have seen.

Quoted 3 lines
Quoted 2 lines

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Why do you need hose->bus_offset ? For indirect_pci ? Well... that's

Nope, i checked, and it was trying to read the bus 0x10, while the bus is in reallity 0. That said, if i understood stuff correctly, it should be ok, since type 0 config ignores bus and device, right ?

Yes. And for type 1, just issue a cycle to (bus - hose->first_busno)

How are the config access functions told that they shall do a type 0 or 1 access ? I have seen there is something in the pci_indirect functions that do this, but not sure i can do it here.

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

a kludge, you should rather fix indirect_pci to use first_busno instead... I don't know where this bus_offset comes from in the first place, it's defined in pci_controller but not used at all in 2.6...

Yeah, nor in 2.4, if my grep is correct. I can't use indirect_pci for the second bus though.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

(BTW. You should really work on 2.6, not 2.4...)

Ah, yes, but 2.4 means suppoprt for debian-installer. Once that works, i will work on 2.6.x. Also, 2.4 provides me a known working base.

I still don't like the idea of new dev. beeing done on 2.4...

Well, once i get it working, i will go on to 2.6, promised :))

That said, i was a bit disapointed by 2.6. If you remember, i had some problems with 2.4, since the second IDE bus uses a different interrupt than the first one, so i used a kludge in the via-ide driver to make it work. The 2.6 ide driver has per ide channel setup, but still does get the primary ide interrupt for the second channel too.

Quoted 9 lines
Quoted 2 lines

This is which bewilders me, the bridge spec speak about type 0 and type 1, and using the last 2 bits for this.

Yes. Usually, you don't put the last 2 bits of the offsets in cfg_addr, you crop that value to the closest 32 bits boundary (or 64 bits in some chips), and then you "offset" the cfg_data access.

For example, for a 8 bits access at an offset of 7, you would use 4 as the offset in cfg_addr, and then do a 8 bits access at cfg_data + 3

Ok, understand better now.

Quoted 6 lines
Quoted 4 lines

The Marvell Discovery II has (one, two or three) gigabit ethernets included, these do not appear on the pci bus, but need to be programmed directly with the NB registers. On the other hand, the sk98 driver provides driver for various Marvell gigabit ethernet.

Argh ????? They don't appear on PCI ? What piece of SHIT is this bridge ?

Well, the Discovery II use a internal crossbar switch, and the ethernet are on the same level as the pci buses. This makes for very efficient networking i guess, but has problems. In fact, each of these ones has the same priority as each pci bus.

I believe it should be possible to have each of these appear as an independent pci bus or something ?

Quoted 1 line

Really totally insane.

Well, i am no hardware guy, so i cannot make judgement on this, but i guess there are worse hardware out there.

Quoted 3 lines

I strongly suggest you still match them as PCI devices, eventually using the bridge device itself as the match for the driver.... The DMA mapping ops are designed to work with PCI anyway.

Mmm. Will have to look into that.

Again, thanks for your help,

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#41 lore raw
In reply to Sven Luther
Quoted 4 lines

Mmm, i understand that the 2.6.x pci domain will make this not necessary. I might be wrong though.

What do those register actually do ? Is there a spec of that host bridge I can download somewhere ?

Quoted 9 lines
Quoted 2 lines

If you insert pci cards which contain bridges on them, they only work on the bus 0 slots...

bus 1 is used as an agp bus anyway, and i doubt there are many agp graphic cards out there with pci bridges on them. When i inserted my Appian Jeronimo 2000 in that board, it refused to powerup at all, but then, maybe it is drawing too much power or something. After all, it has a 3dlabs gamma and two permedia3 on it.

Quoted 6 lines
Quoted 2 lines

Do you have something like ppcboot or uboot starting your system or just a kernel? If you are using a real

Well, there is a customized SmartFirmware OpenFirmware on the board. I even have (non-free though) access to the source of it. The board is mostly a CHRP design.

It has an x86 BIOS emulator for running the firmwares of the video cards ?

Quoted 5 lines

boot rom, you could try initializing the p2p registers

Quoted 1 line

by hand, then booting...

The Firmware guy told me don't touch it though.

Quoted 8 lines
Quoted 1 line

I'm hoping to work on this in the next few days.

Ok, great.

Friendly,

Sven Luther

--
Benjamin Herrenschmidt <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#12 lore raw
In reply to Sven Luther
Quoted 8 lines · Sven Luther
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 3 lines

Mmm, will look into this. Actually, linux should not write to those, but read access should be ok.

If the BARs contain address ranges that will confuse linux resource management (like RAM location), then you have to hide them completely.

Quoted 8 lines

Mmm, will check.

BTW, X has problems with pci config space access. It simply opens the /proc/bus/pci/<bus>/<dev>.<func> stuff, and is not happy with the result.

Is the above just a plain ioremap of config space or something such, or does the reads there use the pci access functions ?

They should use the PCI access function, could be your access size handling that is wrong (the offset masking stuff), or maybe XFree shokes on the host bridge

Quoted 29 lines
Quoted 8 lines
Quoted 3 lines

Well, i tried ioremapping 0x10000, but without much success (cfg_addr/data is at cf8/cfc, and this magic stuff is at f118/f11c). I just got a sig 11 OOPS, so ...

I don't fully understand... If you are doing IO cycles, there's no ioremapping needed at all at this point, just use the one that is done once for the bridge IO space. neither cf8/cfc not f118 look like addresses that can be ioremap'ed anyway...

Well, it is f1000cf8/cfc and f100f118/f11c naturally, and the second is needed to enable a hardware kludge to make the second pci bus look like agp. I don't really have the details of such, but i need to write to the f118/f11c before/after each pci access to the second pci bus, as well as disable the CPU interrupts for doing the access.

Quoted 14 lines
Quoted 13 lines
Quoted 2 lines

just ioremap that in a global once... I do that for a few things in pmac_feature.c, like the northbridge registers.

Yeah, i have seen.

Quoted 4 lines
Quoted 2 lines

Also, i had to manually set hose->bus_offset = 0x10, since that didn't seem to be set automatically. I don't know why though.

Why do you need hose->bus_offset ? For indirect_pci ? Well... that's

Nope, i checked, and it was trying to read the bus 0x10, while the bus is in reallity 0. That said, if i understood stuff correctly, it should be ok, since type 0 config ignores bus and device, right ?

Quoted 5 lines
Quoted 1 line

Yes. And for type 1, just issue a cycle to (bus - hose->first_busno)

How are the config access functions told that they shall do a type 0 or 1 access ? I have seen there is something in the pci_indirect functions that do this, but not sure i can do it here.

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Quoted 14 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

a kludge, you should rather fix indirect_pci to use first_busno instead... I don't know where this bus_offset comes from in the first place, it's defined in pci_controller but not used at all in 2.6...

Yeah, nor in 2.4, if my grep is correct. I can't use indirect_pci for the second bus though.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

(BTW. You should really work on 2.6, not 2.4...)

Ah, yes, but 2.4 means suppoprt for debian-installer. Once that works, i will work on 2.6.x. Also, 2.4 provides me a known working base.

I still don't like the idea of new dev. beeing done on 2.4...

Quoted 7 lines

Well, once i get it working, i will go on to 2.6, promised :))

That said, i was a bit disapointed by 2.6. If you remember, i had some problems with 2.4, since the second IDE bus uses a different interrupt than the first one, so i used a kludge in the via-ide driver to make it work. The 2.6 ide driver has per ide channel setup, but still does get the primary ide interrupt for the second channel too.

Well, there is no clean way currently to deal with that issue. If I get a board, I can try to hack something better :)

Quoted 19 lines
Quoted 9 lines
Quoted 2 lines

This is which bewilders me, the bridge spec speak about type 0 and type 1, and using the last 2 bits for this.

Yes. Usually, you don't put the last 2 bits of the offsets in cfg_addr, you crop that value to the closest 32 bits boundary (or 64 bits in some chips), and then you "offset" the cfg_data access.

For example, for a 8 bits access at an offset of 7, you would use 4 as the offset in cfg_addr, and then do a 8 bits access at cfg_data + 3

Ok, understand better now.

Quoted 6 lines
Quoted 4 lines

The Marvell Discovery II has (one, two or three) gigabit ethernets included, these do not appear on the pci bus, but need to be programmed directly with the NB registers. On the other hand, the sk98 driver provides driver for various Marvell gigabit ethernet.

Argh ????? They don't appear on PCI ? What piece of SHIT is this bridge ?

Quoted 7 lines

Well, the Discovery II use a internal crossbar switch, and the ethernet are on the same level as the pci buses. This makes for very efficient networking i guess, but has problems. In fact, each of these ones has the same priority as each pci bus.

I believe it should be possible to have each of these appear as an independent pci bus or something ?

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Quoted 4 lines
Quoted 1 line

Really totally insane.

Well, i am no hardware guy, so i cannot make judgement on this, but i guess there are worse hardware out there.

Yah, sure, all hardware is broken some way :)

Quoted 11 lines
Quoted 3 lines

I strongly suggest you still match them as PCI devices, eventually using the bridge device itself as the match for the driver.... The DMA mapping ops are designed to work with PCI anyway.

Mmm. Will have to look into that.

Again, thanks for your help,

Friendly,

Sven Luther

--
Benjamin Herrenschmidt <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#13 lore raw
Quoted 15 lines · Benjamin Herrenschmidt
Quoted 14 lines · Sven Luther
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 3 lines

Mmm, will look into this. Actually, linux should not write to those, but read access should be ok.

If the BARs contain address ranges that will confuse linux resource management (like RAM location), then you have to hide them completely.

Mmm, will check.

BTW, X has problems with pci config space access. It simply opens the /proc/bus/pci/<bus>/<dev>.<func> stuff, and is not happy with the result.

Quoted 6 lines
Quoted 2 lines

Is the above just a plain ioremap of config space or something such, or does the reads there use the pci access functions ?

They should use the PCI access function, could be your access size handling that is wrong (the offset masking stuff), or maybe XFree shokes on the host bridge

Don't exactly know what happens, it dies with :

(II) Host-to-PCI bridge:
(II) Bus 16: bridge is at (0:0:0), (-1,16,0), BCTRL: 0x0008 (VGA_EN is set) (II) Bus 16 I/O range:

	[0] -1	0	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 16 non-prefetchable memory range:
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 16 prefetchable memory range:
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]

(full log on : http://zapek.com/misc/XFree86.0.log)

Need to install my box, and do some testing myself. X doesn't kill the box though, which is rather nice.

Quoted 5 lines

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Quoted 8 lines
Quoted 5 lines

That said, i was a bit disapointed by 2.6. If you remember, i had some problems with 2.4, since the second IDE bus uses a different interrupt than the first one, so i used a kludge in the via-ide driver to make it work. The 2.6 ide driver has per ide channel setup, but still does get the primary ide interrupt for the second channel too.

Well, there is no clean way currently to deal with that issue. If I get a board, I can try to hack something better :)

Will see. How long would you need the board, and you are in Australia still, right ?

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

Argh ????? They don't appear on PCI ? What piece of SHIT is this bridge ?

Well, the Discovery II use a internal crossbar switch, and the ethernet are on the same level as the pci buses. This makes for very efficient networking i guess, but has problems. In fact, each of these ones has the same priority as each pci bus.

Quoted 5 lines
Quoted 2 lines

I believe it should be possible to have each of these appear as an independent pci bus or something ?

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#42 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines

Mmm, i understand that the 2.6.x pci domain will make this not necessary. I might be wrong though.

What do those register actually do ? Is there a spec of that host bridge I can download somewhere ?

There is a spec, but under NDA, i don't know if you can freely get a hand on it.

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

If you insert pci cards which contain bridges on them, they only work on the bus 0 slots...

bus 1 is used as an agp bus anyway, and i doubt there are many agp graphic cards out there with pci bridges on them. When i inserted my Appian Jeronimo 2000 in that board, it refused to powerup at all, but then, maybe it is drawing too much power or something. After all, it has a 3dlabs gamma and two permedia3 on it.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Do you have something like ppcboot or uboot starting your system or just a kernel? If you are using a real

Well, there is a customized SmartFirmware OpenFirmware on the board. I even have (non-free though) access to the source of it. The board is mostly a CHRP design.

It has an x86 BIOS emulator for running the firmwares of the video cards ?

Yep, that too. Not sure if the standard OF graphic cards would work too, i have none of such to test though. tdfx fbdev seems broken with a G4, since it uses the old access macros, and doesn't do eieios or something such. Didn't look at recent code though, and don't have voodoo cards handy anyway.

That said, the OF only uses textmode, since fb8 support would mean vesa 3.0 compliant card limit.

There are some embedded drivers too, but they are not activated i think.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#14 lore raw
In reply to Sven Luther
Quoted 9 lines · Sven Luther
Quoted 5 lines · Benjamin Herrenschmidt

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Yep, two hoses, with different hose->first_busno.

Quoted 5 lines
Quoted 2 lines

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Hide the memory BAR only, not the full PCI device.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#15 lore raw
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Sven Luther
Quoted 5 lines · Benjamin Herrenschmidt

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Quoted 4 lines
Quoted 2 lines

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Yep, two hoses, with different hose->first_busno.

A, yes, right.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Hide the memory BAR only, not the full PCI device.

Ok, will try that.

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#16 lore raw
Quoted 20 lines · Sven Luther
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Sven Luther
Quoted 5 lines · Benjamin Herrenschmidt

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Quoted 4 lines
Quoted 2 lines

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Yep, two hoses, with different hose->first_busno.

A, yes, right.

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Hide the memory BAR only, not the full PCI device.

Ok, will try that.

We hide all of the PCI resources (i.e., PCI BARs) by initializing all of resources to zero. This allows us to load drivers (e.g., ethernet) specific to the Discovery. Registers internal to the Discovery (via the PowerPC bus) need to be initialized and queried for memory, PCI I/O, PCI memory, and PCI prefecthable memory mappings (hopefully your firmware does this).

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}
Quoted 3 lines

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

We have it initialized and enabled.

Quoted 5 lines

Friendly,

Sven Luther

--
-Rob Baxter

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#17 lore raw
Quoted 40 lines · Rob Baxter
Quoted 22 lines · Sven Luther
Quoted 9 lines · Geert Uytterhoeven
Quoted 8 lines · Sven Luther
Quoted 6 lines · Benjamin Herrenschmidt

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Quoted 4 lines
Quoted 2 lines

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Yep, two hoses, with different hose->first_busno.

A, yes, right.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Hide the memory BAR only, not the full PCI device.

Ok, will try that.

We hide all of the PCI resources (i.e., PCI BARs) by initializing all of resources to zero. This allows us to load drivers (e.g., ethernet) specific to the Discovery. Registers internal to the Discovery (via the PowerPC bus) need to be initialized and queried for memory, PCI I/O, PCI memory, and PCI prefecthable memory mappings (hopefully your firmware does this).

Here's the code from our pcibios_fixup:

Quoted 9 lines
	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}

Ok, thanks, will try it out.

BTW, could you please do something to not reject my incoming email ? Black listing frances biggest ISP is somewhat silly, and my last experience with such black lister was not conclusive. They blacklisted it on the basis of 50 or so spams received over one year period, most of them not even comming from wanadoo but from other ISPs.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#18 lore raw
In reply to Rob Baxter
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Quoted 4 lines
Quoted 2 lines

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

We have it initialized and enabled.

The kernel doesn't do anything to the L2 cache, it all depends what you firmware does to it.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#19 lore raw

The L2 (and L3 if you have one) is enabled some twenty lines into "ev64260_setup_arch()". Now it only sets the the enable bit, perhaps you also need to set bits for size and clock?

Or possibly, i'm using some defunct tree...

Marcus

Quoted 26 lines · Benjamin Herrenschmidt
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Quoted 3 lines
Quoted 2 lines

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

Quoted 9 lines
Quoted 1 line

We have it initialized and enabled.

The kernel doesn't do anything to the L2 cache, it all depends what you firmware does to it.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#20 lore raw
In reply to Benjamin Herrenschmidt
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}
Quoted 2 lines

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

agreed

Quoted 7 lines

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

I have no problem with XFree working with a CT69030 (chips_drv.o) PMC graphics card and an USB keyboard and mouse setup.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

We have it initialized and enabled.

The kernel doesn't do anything to the L2 cache, it all depends what you firmware does to it.

That's true, but for the ppc stuff, there is initialization routines within the kernel source.

Quoted 4 lines

Ben.

--
-Rob

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#21 lore raw

-

Quoted 5 lines
Quoted 2 lines

The kernel doesn't do anything to the L2 cache, it all depends what you firmware does to it.

That's true, but for the ppc stuff, there is initialization routines within the kernel source.

Yes, those are initially here to allow change of the setting via /proc/sys/kernel/l2cr. I also used them to force passing a different l2cr values via BootX and for setting up the L2 on the second CPU of SMP machines and to restore it on wakeup from sleep on laptops

Nothing prevents you, of course, from setting L2 in your arch code as well using those functions, but it's preferred to have the firmware set it up properly in the first place.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#22 lore raw
In reply to Benjamin Herrenschmidt
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}
Quoted 5 lines

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you

Not exactly, but i have yet to investigate this issue.

Quoted 4 lines

try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Well, XFree86 doesn't seem to see the device 0, since i hide it from the config ops. Here is a lspci output :

00:01.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
00:05.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:0c.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] (rev 10)
00:0c.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06) 00:0c.2 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.3 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.4 Non-VGA unclassified device: VIA Technologies, Inc. VT8235 ACPI (rev 10)
00:0c.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 40) 00:0c.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 20)
00:0d.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)
10:08.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5964 (rev 01)

I am now building X 4.4.0 yesterdays CVS checkout, and will investigate what exactly goes wrong.

Also, i retire what i said about voodoo support, it works fine with tdfxfb.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

BTW, is there any reason the L2 cache is disabled by default in the 2.4.x kernels ?

We have it initialized and enabled.

The kernel doesn't do anything to the L2 cache, it all depends what you firmware does to it.

Mmm, ok. I still have to pass it the l2cr=0x80000000 boot arg, but maybe it would be easier to add it to the default boot args or something.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#23 lore raw
Quoted 3 lines

Mmm, ok. I still have to pass it the l2cr=0x80000000 boot arg, but maybe it would be easier to add it to the default boot args or something.

No, your platform code can initialize it directly, but CC a flame to the firmware folks for not doing it right in the first place

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#24 lore raw
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 3 lines

Mmm, ok. I still have to pass it the l2cr=0x80000000 boot arg, but maybe it would be easier to add it to the default boot args or something.

No, your platform code can initialize it directly, but CC a flame to the firmware folks for not doing it right in the first place

Ok, i will, thanks again for your help.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#25 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Is this a problem with overlapping PCI resources again (thought that was fixed in 2.4 anyway)? Resolving the overlap helped there. What does XFree do, simply disable resources?

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#26 lore raw
Quoted 10 lines · Michael Schmitz
Quoted 6 lines

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Is this a problem with overlapping PCI resources again (thought that was fixed in 2.4 anyway)? Resolving the overlap helped there. What does XFree do, simply disable resources?

There should be no overlap.... Let me check the log ...

(II) Host-to-PCI bridge:
(II) Bus 16: bridge is at (0:0:0), (-1,16,0), BCTRL: 0x0008 (VGA_EN is set)
(II) Bus 16 I/O range:

        [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 16 non-prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 16 prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]

The problem is on the host bridge BARs again. I don't know what they are supposed to do, you need to look at the bridge spec, but you definitely need to hide them some way...

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#27 lore raw
Quoted 24 lines · Benjamin Herrenschmidt
Quoted 10 lines · Michael Schmitz
Quoted 6 lines

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

Is this a problem with overlapping PCI resources again (thought that was fixed in 2.4 anyway)? Resolving the overlap helped there. What does XFree do, simply disable resources?

There should be no overlap.... Let me check the log ...

(II) Host-to-PCI bridge:
(II) Bus 16: bridge is at (0:0:0), (-1,16,0), BCTRL: 0x0008 (VGA_EN is set)
(II) Bus 16 I/O range:

        [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 16 non-prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 16 prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]
Quoted 3 lines

The problem is on the host bridge BARs again. I don't know what they are supposed to do, you need to look at the bridge spec, but you definitely need to hide them some way...

What i don't know is why X looks at them, even if it didn't appear on the pci devices list. i am currently building X 4.4 out of CVS to follow up on where exactly the problem is.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#28 lore raw
In reply to Benjamin Herrenschmidt
Quoted 11 lines
Quoted 4 lines

Is this a problem with overlapping PCI resources again (thought that was fixed in 2.4 anyway)? Resolving the overlap helped there. What does XFree do, simply disable resources?

There should be no overlap.... Let me check the log ...

(II) Host-to-PCI bridge:
(II) Bus 16: bridge is at (0:0:0), (-1,16,0), BCTRL: 0x0008 (VGA_EN is set)
(II) Bus 16 I/O range:

Quoted 7 lines
        [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 16 non-prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 16 prefetchable memory range:
        [0] -1  0       0x00000000 - 0xffffffff (0x0) MX[B]

The problem is on the host bridge BARs again. I don't know what they

That's the weird (-1,busno,0)? My values are 0,busno,1 (plain old gracke). The rest looks perfectly OK...

Quoted 2 lines

are supposed to do, you need to look at the bridge spec, but you definitely need to hide them some way...

Thought I spotted something familiar, but this looks new.

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#29 lore raw
In reply to Benjamin Herrenschmidt
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}
Quoted 2 lines

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

Mmm, what do you mean by a pci quirk ?

Anyway, i did that from pcibios_fixup, as well as blocking all pci writes to device 0 on both buses and reads to all functions of device 0 on both bus, except function 0, for which i allow reads of the first 15 bytes, and return 0 for the others, as i am told i should do by the hardware guys.

This works fine for the fbdev, but X is not at all happy with it, well, it seems to work, but there is nothing outputed on the screen :(, but that is something i probably have to solve with XFree86.

Quoted 6 lines

note that there's still a problem with XFree which will "see" those BARs and, according to the log posted by Sven, shoke. Sven, can you try "hiding" the host bridge completely from the config ops and see if that helps with XFree ? That's not a very good solution though, we'll have to do something different about it. Now if only XFree stopped mucking with the PCI bus...

So, yes, that does help with XFree86, altough i get a strange message i have to search the origin for :

(WW) ****INVALID IO ALLOCATION**** b: 0x1000 e:0x10ff correcting

Also, with voodoo 3 cards, the tdfx driver dies with :

(EE) TDFX(0): No valid PIO address in PCI config space

But Radeon works.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#30 lore raw
Quoted 15 lines · Sven Luther
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 12 lines

Here's the code from our pcibios_fixup:

	dev = NULL;
	while ((dev = pci_find_device(PCI_VENDOR_ID_GALILEO,
				PCI_DEVICE_ID_GALILEO_GT64260, dev))) {
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			dev->resource[i].flags = 0;
			dev->resource[i].start = 0;
			dev->resource[i].end = 0;
		}
	}
Quoted 2 lines
Quoted 2 lines

pcibios_fixup isn't the right place to do that ;) You should do this from a pci quirk imho.

Damn, i specifically return 0 when reading bytes >15 on the device 0, func 0, but hexdump /proc/bus/pci/10/00.0 still gives me :

0000000 ab11 6064 0700 b022 0300 0006 2000 0000
0000010 20df 65c3 20df 65c3 20df 65c3 20df 65c3
*
0000040

Should the second line not show only 0s ?

Also, GALILEO is now known as MARVELL, is it ok to add the additional PCI_VENDOR_ID_MARVELL as the same value as the PCI_VENDOR_ID_GALILEO above, and also use PCI_DEVICE_ID_MAVELL_... ?

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#31 lore raw
In reply to Geert Uytterhoeven
Quoted 14 lines · Geert Uytterhoeven
Quoted 9 lines · Sven Luther
Quoted 5 lines · Benjamin Herrenschmidt

Type 0 is an access to the primary segment (doesn't contain a bus number), type 1 is to be forwarded to another bus segment by a P2P bridge. So for anything directly attached to the host bridge, it's a type 0 access. Anything else is type 1. Typically, if the bus number of your "target" == hose->first_busno, it's type 0, else type 1

Yep, except we have two pci controllers, and it should be type 0 for both of them.

Yep, two hoses, with different hose->first_busno.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

They could have appeared as on-chip PCI devices on a "pseudo-bus", but we can eventually just match with the host's PCI device.

Ok. but this can also be faked or something ? But, how can we match with the host PCI device, if we are going to hide it ?

Hide the memory BAR only, not the full PCI device.

Ok, i have done this. I have followed the recomendations of the hardware guy, and did the following :

device 0, function 0 : read access to bytes 0-15, read returns 0 on regs > 15. Write access fails silently.

device 0, function 1-7 : both read and writes fail with PCIBIOS_DEVICE_NOT_FOUND.

Additionnally, i have nullified the ressources with :

	dev->resource[i].flags = 0;
	dev->resource[i].start = 0;
	dev->resource[i].end = 0;

from the pcibios_fixup (not the right place, but i don't know where it should be done instead).

This allows me to see the host bridge on both buses, and radeonfb works fine :

$ lspci
00:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
00:01.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
00:05.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:0c.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] (rev 10)
00:0c.1 IDE interface: VIA Technologies, Inc.  VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:0c.2 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.3 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.4 Non-VGA unclassified device: VIA Technologies, Inc. VT8235 ACPI (rev 10)
00:0c.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 40)
00:0c.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 20)
00:0d.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)
10:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
10:08.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5964 (rev 01)

But :

$ hexdump /proc/bus/pci/10/00.0
0000000 ab11 6064 0700 b022 0300 0006 2000 0000
0000010 20df 85cf 20df 85cf 20df 85cf 20df 85cf
*
0000040

Why in hell do i have 0x20df85cf on all four bars of the config space addresses 0x10 to 0x1f ?

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only. Something strange is going on.

Thanks for your help.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#32 lore raw
Quoted 4 lines · Sven Luther

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Could also be AGP related.

Quoted 2 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only.

DDC timeouts? As Ben pointed out, one can only speculate without seeing the server log.

--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#33 lore raw
Quoted 7 lines · Michel Dänzer
Quoted 4 lines · Sven Luther

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Could also be AGP related.

Using PCI gart only. (No real AGP on this box, only a pci bus faked as AGP one.

Quoted 5 lines
Quoted 2 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only.

DDC timeouts? As Ben pointed out, one can only speculate without seeing the server log.

Maybe, but it worked well with my previous board. See the log in my response to Ben.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#35 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 2 lines · Sven Luther

Using PCI gart only. (No real AGP on this box, only a pci bus faked as AGP one.

Makes no sense. It's either an AGP bus or not an AGP bus. AGP is just a superset of PCI so there is no such thing as "PCI bus faked as AGP one".

It is a PCI bus (well actually, PCI-X could be supported), but it is not. The connector is an AGP one, and there is some magic chip or something which you need to access to do AGP-like config accessing. I have no idea of the details of it though, only that you need to write the f118/f11c address before/after each agp config space address.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#36 lore raw
Quoted 6 lines

It is a PCI bus (well actually, PCI-X could be supported), but it is not. The connector is an AGP one, and there is some magic chip or something which you need to access to do AGP-like config accessing. I have no idea of the details of it though, only that you need to write the f118/f11c address before/after each agp config space address.

WTF ? There is no such thing like AGP-like config access... there is real AGP cycles but from what you say, it doesn't seem to work.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#38 lore raw
In reply to Sven Luther
Quoted 6 lines

Ok, i have done this. I have followed the recomendations of the hardware guy, and did the following :

device 0, function 0 : read access to bytes 0-15, read returns 0 on regs > 15. Write access fails silently.

Show the code (just in case...)

Quoted 9 lines

device 0, function 1-7 : both read and writes fail with PCIBIOS_DEVICE_NOT_FOUND.

Additionnally, i have nullified the ressources with :

	dev->resource[i].flags = 0;
	dev->resource[i].start = 0;
	dev->resource[i].end = 0;

from the pcibios_fixup (not the right place, but i don't know where it should be done instead).

A quirk is one of the functions in the table in pci.c but you can use the fixup too at this point...

Quoted 20 lines

This allows me to see the host bridge on both buses, and radeonfb works fine :

$ lspci
00:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
00:01.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
00:05.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:0c.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] (rev 10)
00:0c.1 IDE interface: VIA Technologies, Inc.  VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:0c.2 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.3 USB Controller: VIA Technologies, Inc. USB (rev 1e)
00:0c.4 Non-VGA unclassified device: VIA Technologies, Inc. VT8235 ACPI (rev 10)
00:0c.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 40)
00:0c.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 20)
00:0d.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)
10:00.0 Host bridge: Galileo Technology Ltd.: Unknown device 6460 (rev 03)
10:08.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5964 (rev 01)

But :

Quoted 8 lines
$ hexdump /proc/bus/pci/10/00.0
0000000 ab11 6064 0700 b022 0300 0006 2000 0000
0000010 20df 85cf 20df 85cf 20df 85cf 20df 85cf
*
0000040

Why in hell do i have 0x20df85cf on all four bars of the config space addresses 0x10 to 0x1f ?

I don't know, make sure you are "filtering" things properly... You should return 0xff on anything after 0x10 I suppose (though you may want to return 0 for the BARs, I have to dbl check).

Quoted 3 lines

Finally, X works, altough DRI freezes after a second or two with my radeon 9200SE, while it works for a Radeon 7500, but this is probably a DRI issue.

Which version of DRI ? Do you have the interrupt routing working properly ?

Quoted 3 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only. Something strange is going on.

Yah, XFree log could be useful.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#34 lore raw
In reply to Sven Luther
Quoted 2 lines · Sven Luther

Using PCI gart only. (No real AGP on this box, only a pci bus faked as AGP one.

Makes no sense. It's either an AGP bus or not an AGP bus. AGP is just a superset of PCI so there is no such thing as "PCI bus faked as AGP one".

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

What makes me wonder, is that X needs around 20 seconds to launch, which could not be something normal. It usually takes 5-8 seconds only.

DDC timeouts? As Ben pointed out, one can only speculate without seeing the server log.

Quoted 6 lines

Maybe, but it worked well with my previous board. See the log in my response to Ben.

Friendly,

Sven Luther

--
Benjamin Herrenschmidt <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#37 lore raw
In reply to Benjamin Herrenschmidt
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 6 lines

It is a PCI bus (well actually, PCI-X could be supported), but it is not. The connector is an AGP one, and there is some magic chip or something which you need to access to do AGP-like config accessing. I have no idea of the details of it though, only that you need to write the f118/f11c address before/after each agp config space address.

WTF ? There is no such thing like AGP-like config access... there is real AGP cycles but from what you say, it doesn't seem to work.

Yeah, exactly my impression on this. The only thing i was told about this, is that you have to do this black magic (disable interrupts, write to f118, do the access, write to f11c, enable interrupts) for each access to the secondary bus config space.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/