Current-Users archive

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

Re: pchb@acpi again

On Mon, Apr 15, 2013 at 09:31:37PM +0900, KIYOHARA Takashi wrote:
> > ah, yes, removing it from that list lets it be found.  and initializing
> > the new aa_dmat and aa_dmat64 fields lets pchb_acpi attach successfully.
> > all the PCI devices work fine, it turns out that we already have logic
> > to prevent a PCI bus from being attached twice.  but the ISA devices are
> > are found twice:
> hmm...  I disabled that isa devices in my config-file at 3 years old.

for a GENERIC kernel on x86 we need to have them both present.

> And pchb found twice in my memory.  (pchb@acpi, pchb@pci)
> Don`t you find these?

on one of my test boxes, we find it twice but we don't attach it the second 

mainbus0 (root)
ACPI Warning: FADT (revision 3) is longer than ACPI 2.0 version, truncating 
length 268 to 244 (20110623/tbfadt-320)
cpu0 at mainbus0 apid 0: Dual Core AMD Opteron(tm) Processor 285, id 0x20f12
cpu1 at mainbus0 apid 1: Dual Core AMD Opteron(tm) Processor 285, id 0x20f12
cpu2 at mainbus0 apid 2: Dual Core AMD Opteron(tm) Processor 285, id 0x20f12
cpu3 at mainbus0 apid 3: Dual Core AMD Opteron(tm) Processor 285, id 0x20f12
ioapic0 at mainbus0 apid 8
ioapic1 at mainbus0 apid 9
ioapic2 at mainbus0 apid 10
ioapic3 at mainbus0 apid 11
acpi0 at mainbus0: Intel ACPICA 20110623
pchb0 at acpi0 (PCI0, PNP0A03-7): ACPI Host-PCI Bridge
pci0 at pchb0 bus 0: configuration mode 1
NVIDIA nForce4 Memory Controller (miscellaneous memory, revision 0xa3) at pci0 
dev 0 function 0 not configured

    Class Name: memory (0x05)
    Subclass Name: miscellaneous (0x80)

static int
pchbmatch(device_t parent, cfdata_t match, void *aux)
        struct pci_attach_args *pa = aux;

        if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE &&
            PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_HOST)
                return 1;

        return 0;

on other tests systems, we do attach pchb0 when we find its reference
to itself, but there's other logic in pchbattach() to decide whether or not
to attach the pci bus through that reference.  by default we don't attach
the pci bus behind a pchb, only when we can tell that it's not the

on other platforms we have similar things to avoid recursively attaching.

> This problem can avoid implement to pci_tag_equal().
> Skip to call pci_probe_device(), if equal bridgetag and device's tag
> in pci_enumlate_bus().

on ia64, all host bridges should be found via ACPI, so I would think that
ia64 wouldn't need a pchb@pci driver at all.  or if it has such a driver,
that driver would never need to attach the pci bus behind the pchb.


Home | Main Index | Thread Index | Old Index