[coreboot] [commit] r5319 - trunk/src/arch/i386/include/arch

Stefan Reinauer stepan at coresystems.de
Tue Mar 30 01:05:38 CEST 2010

On 3/30/10 12:44 AM, ron minnich wrote:
> The IRQ_SLOTS_COUNT was ONLY needed because of very early bug in gcc 3.
> The bug was with things like this:
> struct blah {
>    int x;
> };
> struct bee {
>    struct blah[0];
> };
> The idea here is you can initialize the bee struct and the number of
> blah structs depends on the initializer, not the declaration.
> In the early days of v3 gcc would not handle the initialization
> correctly at all. Really, IRQ_SLOTS_COUNT should be something we can
> get along without. (at least that's what memory tells me).

It became a bit harder when we started to be smart and did this:

        32+16*CONFIG_IRQ_SLOT_COUNT,     /* There can be total
CONFIG_IRQ_SLOT_COUNT devices on the bus */

in the struct. So without CONFIG_IRQ_SLOT_COUNT, the struct is invalid,
at least on those boards I checked.

> Note that on gcc2 it had to be 1, that was the convention; then it
> became 0 later.
I wonder, how can we completely create pirq_tables dynamically... Is it
that hard?

*                {0x00,(0x01<<3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8},
{0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x0, 0x0}, // PCIe?
                {0x00,(0x02<<3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000},
{0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // VGA
                {0x00,(0x1e<<3)|0x0, {{0x61, 0xdcf8}, {0x68, 0xdcf8},
{0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // PCI bridge
                {0x00,(0x1f<<3)|0x0, {{0x62, 0xdcf8}, {0x63, 0xdcd8},
{0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // LPC
                {0x00,(0x1d<<3)|0x0, {{0x6b, 0xdcf8}, {0x63, 0xdcd8},
{0x62, 0xdcf8}, {0x60, 0x0dcf8}}, 0x0, 0x0}, // USB#1
How can we decide which interrupts to allow, i.e dcf8, dcd8, ...

I saw some clean bios implementations that just created one PIRQ entry
for every PCI device in the system... I think that should work for us, too.
But how can we find out the mapping...
If we could do this on ACPI boards only, that would be fine, ... ACPI
knows the information, too, but in another format..

coresystems GmbH . Brahmsstr. 16 . D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 . Fax: +49 761 7664613
Email: info at coresystems.de  . http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg . HRB 7656
Geschäftsführer: Stefan Reinauer . Ust-IdNr.: DE245674866

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100330/e1c9447a/attachment.html>

More information about the coreboot mailing list