Page MenuHomeFreeBSD

Handle interrupt-maps with a parent unit address
ClosedPublic

Authored by andrew on Dec 11 2015, 4:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 3:14 PM
Unknown Object (File)
Tue, Dec 10, 6:12 PM
Unknown Object (File)
Mon, Dec 9, 5:51 PM
Unknown Object (File)
Nov 14 2024, 4:36 PM
Unknown Object (File)
Nov 6 2024, 2:14 PM
Unknown Object (File)
Oct 26 2024, 7:02 AM
Unknown Object (File)
Oct 6 2024, 3:25 AM
Unknown Object (File)
Oct 5 2024, 7:36 PM
Subscribers

Details

Summary

When parsing the interrupt-map we need to take the parent unit address
into account. I have found a device tree that uses it, and without this
legacy interrupts fail.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Handle interrupt-maps with a parent unit address.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added a reviewer: nwhitehorn.

This definitely fixes a bug (though see comment about OF_searchencprop() above). Could you make a call for testing on the powerpc and sparc64 lists before committing? I worry this might break those systems if code there is relying on the bug. It at least will work on one Apple PowerPC system, so that's promising.

sys/dev/ofw/ofw_bus_subr.c
364 ↗(On Diff #11134)

This needs to be OF_getencprop(), not OF_searchencprop().

andrew edited edge metadata.

Use OF_getencprop

Does not work on my two sparc64 boxes. Here the output on a Sun Fire V210:

[...]
nexus0: <memory-controller> mem 0x40000000000-0x40000000007 type memory-controller (no driver attached)
nexus0: <memory-controller> mem 0x40000800000-0x40000800007 type memory-controller (no driver attached)
bge0: <Broadcom BCM5704 A3, ASIC rev. 0x002003> mem 0x200000-0x20ffff,0x110000-0x11ffff at device 2.0 on pci0
bge0: CHIP ID 0x00002003; ASIC REV 0x02; CHIP REV 0x20; PCI on PCI-X 66 MHz; 64bit
miibus0: <MII bus> on bge0
brgphy0: <BCM5704 1000BASE-T media interface> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge0: Ethernet address: 00:14:4f:53:1f:55
bge1: <Broadcom BCM5704 A3, ASIC rev. 0x002003> mem 0x400000-0x40ffff,0x120000-0x12ffff at device 2.1 on pci0
panic: trap: fast instruction access mmu miss (kernel)
cpuid = 0
KDB: stack backtrace:
vpanic() at vpanic+0x1b4
panic() at panic+0x20
trap() at trap+0x554
-- fast instruction access mmu miss tar=0xef80000 %o7=0xf000a498 --
userland() at 0xef80000
user trace: trap %o7=0xf000a498
pc 0xef80000, sp 0xc1015b51
done
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x80: ta              %xcc, 1
db>
In D4518#96060, @mmoll wrote:

Does not work on my two sparc64 boxes. Here the output on a Sun Fire V210:

It seems sparc64 doesn't use the parent #address-cells property. Based on my reading of the Linux source it seems the only PowerPC board that follows sparc64 is the cell. With this in mind I can disable it for sparc64 & leave it enabled on other architectures.

Don't use the parent address on sparc64, it uses a different encoding

This revision was automatically updated to reflect the committed changes.