Hi all,
I'm working on ioapic_irq support on M2V-MX SE. While at it, I wanted to factor out SB and NB ioapic initialization and use the generic ioapic driver. However I never see that code from drivers/generic/ioapic.c is called.
I tried various devicetree combinations, but nothing works. I'm out of ideas, possibly this has to do something that I do this on AMD system.
My first question is what is the difference between .enable and .enable_dev anyway?
I'm pasting here my "simple" devicetree.cb, the commented version does not work either and I get complains that it is left over static device and no PCI device.
I think in both cases I got IOAPIC: 09 missing read_resources And enable_dev is never called. I put there a printk.
Please can someone sched some light?
Thanks Rudolf
chip northbridge/amd/amdk8/root_complex # Root complex device lapic_cluster 0 on # APIC cluster chip cpu/amd/socket_AM2 # CPU device lapic 0 on end # APIC end end device pci_domain 0 on # PCI domain subsystemid 0x1043 0 inherit chip northbridge/amd/amdk8 # mc0 device pci 18.0 on # Northbridge # Devices on link 0, link 0 == LDT 0
chip southbridge/via/k8t890 # "Southbridge" K8M890
device pci 0.0 on end # HT device pci 0.5 on chip drivers/generic/ioapic register "irq_on_fsb" = "1" register "base" = "0xfecc0000" device ioapic 9 on end end end
end #end NB chip end #end LDT0
device pci 18.0 on end #LDT1 device pci 18.0 on end #LDT2
device pci 18.1 on end device pci 18.2 on end device pci 18.3 on end end #mc0
# chip drivers/generic/ioapic # register "irq_on_fsb" = "1" # register "base" = "0xfecc0000" # device ioapic 9 on end # end
end #pci_domain end #root complex
Hi Rudolf,
You need to have the ioapic driver compiled in.
select DRIVERS_GENERIC_IOAPI
In your mainboard's Kconfig should do the trick.
Alex
On 08/17/2012 09:30 AM, Rudolf Marek wrote:
Hi all,
I'm working on ioapic_irq support on M2V-MX SE. While at it, I wanted to factor out SB and NB ioapic initialization and use the generic ioapic driver. However I never see that code from drivers/generic/ioapic.c is called.
I tried various devicetree combinations, but nothing works. I'm out of ideas, possibly this has to do something that I do this on AMD system.
My first question is what is the difference between .enable and .enable_dev anyway?
I'm pasting here my "simple" devicetree.cb, the commented version does not work either and I get complains that it is left over static device and no PCI device.
I think in both cases I got IOAPIC: 09 missing read_resources And enable_dev is never called. I put there a printk.
Please can someone sched some light?
Thanks Rudolf
chip northbridge/amd/amdk8/root_complex # Root complex device lapic_cluster 0 on # APIC cluster chip cpu/amd/socket_AM2 # CPU device lapic 0 on end # APIC end end device pci_domain 0 on # PCI domain subsystemid 0x1043 0 inherit chip northbridge/amd/amdk8 # mc0 device pci 18.0 on # Northbridge # Devices on link 0, link 0 == LDT 0
chip southbridge/via/k8t890 # "Southbridge" K8M890 device pci 0.0 on end # HT device pci 0.5 on chip drivers/generic/ioapic register "irq_on_fsb" = "1" register "base" = "0xfecc0000" device ioapic 9 on end end end end #end NB chip end #end LDT0 device pci 18.0 on end #LDT1 device pci 18.0 on end #LDT2 device pci 18.1 on end device pci 18.2 on end device pci 18.3 on end end #mc0
# chip drivers/generic/ioapic # register "irq_on_fsb" = "1" # register "base" = "0xfecc0000" # device ioapic 9 on end # end
end #pci_domain end #root complex
Hi all,
Just an update to this problem. It was missing scan_static_bus in parent device. Thanks goes to MrNuke ;)
I have now another problem related to that work. For some reason HT bus thinks there are some left over devices:
Capability: type 0x08 @ 0x60 flags: 0x0060 PCI: 00:00.0 count: 0003 static_count: 0010 PCI: 00:00.0 [1106/0336] enabled next_unitid: 0010 PCI: 00:0f.0 PCI: 00:10.0 PCI: 00:10.1 PCI: 00:10.2 PCI: 00:10.3 PCI: 00:10.4 PCI: 00:11.0 PCI: 00:12.0 PCI: 00:13.0 PCI: 00:13.1 HT: Leftover static devices. Check your devicetree.cb
For this reason second SB IOAPIC is not used too. I dont know what could be possibly wrong with my devicetree. Im attaching bootlogs and devicetree to this mail. If someone knows plz help.
Thanks Rudolf
On 08/28/2012 05:18 PM, Rudolf Marek wrote:
Hi all,
Just an update to this problem. It was missing scan_static_bus in parent device. Thanks goes to MrNuke ;)
I have now another problem related to that work. For some reason HT bus thinks there are some left over devices:
Capability: type 0x08 @ 0x60 flags: 0x0060 PCI: 00:00.0 count: 0003 static_count: 0010 PCI: 00:00.0 [1106/0336] enabled next_unitid: 0010 PCI: 00:0f.0 PCI: 00:10.0 PCI: 00:10.1 PCI: 00:10.2 PCI: 00:10.3 PCI: 00:10.4 PCI: 00:11.0 PCI: 00:12.0 PCI: 00:13.0 PCI: 00:13.1 HT: Leftover static devices. Check your devicetree.cb
For this reason second SB IOAPIC is not used too. I dont know what could be possibly wrong with my devicetree. Im attaching bootlogs and devicetree to this mail. If someone knows plz help.
Thanks Rudolf
Hi,
Thanks for the hint, but please note there is the "HT:" it means that hypertransport.c is relevant here and not the pci_device.c.
Thanks Rudolf
IIRC: CPU <-> K8M890 == HT bus K8M890 <-> VT8237x == VIA V4 bus
Since your problems come from the devices in VT8237x, I doubt HT is the offender. HT and PCI code uses very similar algorithms to locate and sort devices. Don't convince yourself that HT is the issue, or that _this_ code is the issue until you find it :)
I think it's most likely a misplaced "end" in devicetree.cb, but I didn't find any myself. Best to push your changes to gerrit, and use the nice and shiny pretty print that the forefathers implemented for devicetree files. ;)
Alex
On 08/29/2012 01:22 AM, Rudolf Marek wrote:
Hi,
Thanks for the hint, but please note there is the "HT:" it means that hypertransport.c is relevant here and not the pci_device.c.
Thanks Rudolf
For some reason, it seems that coreboot cannot find devices at those devfn. Normally, I'd say "are you sure you aren't setting/unsetting a bit that disables those devices" but there are just too many leftover devices.
As a first step, pci_scan_get_dev() seems to be the offender. I would put a printk to get both the argument devfn, and (*list)->path.pci.devfn, and try to figure out why the "offending" devices are not located. This should at least shed some light on where to look next.
Alex
On 08/28/2012 05:18 PM, Rudolf Marek wrote:
Hi all,
Just an update to this problem. It was missing scan_static_bus in parent device. Thanks goes to MrNuke ;)
I have now another problem related to that work. For some reason HT bus thinks there are some left over devices:
Capability: type 0x08 @ 0x60 flags: 0x0060 PCI: 00:00.0 count: 0003 static_count: 0010 PCI: 00:00.0 [1106/0336] enabled next_unitid: 0010 PCI: 00:0f.0 PCI: 00:10.0 PCI: 00:10.1 PCI: 00:10.2 PCI: 00:10.3 PCI: 00:10.4 PCI: 00:11.0 PCI: 00:12.0 PCI: 00:13.0 PCI: 00:13.1 HT: Leftover static devices. Check your devicetree.cb
For this reason second SB IOAPIC is not used too. I dont know what could be possibly wrong with my devicetree. Im attaching bootlogs and devicetree to this mail. If someone knows plz help.
Thanks Rudolf