diff options
author | gonzo <gonzo@FreeBSD.org> | 2013-08-27 01:40:13 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2013-08-27 01:40:13 +0000 |
commit | 762d4fc307d076e9321cbb08a98305da44dbc545 (patch) | |
tree | e7e3e87d3e51102d0cdeb977beb1d4a5a0806854 | |
parent | 9426e190e7d41951c9bafa9b1c8e6756607e475c (diff) | |
download | FreeBSD-src-762d4fc307d076e9321cbb08a98305da44dbc545.zip FreeBSD-src-762d4fc307d076e9321cbb08a98305da44dbc545.tar.gz |
Fixes for compatibility with QEMU:
- Route PCI interrupt for NIC
- Make "no mapping" warning more user-friendly: add device name and mention
that it's IRQ mapping
- Do not overlap ICUs' IO window with PCI devices' IO windows by starting
IO rman at offset 0x100
-rw-r--r-- | sys/mips/malta/gt_pci.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/mips/malta/gt_pci.c b/sys/mips/malta/gt_pci.c index 0e2012e..37407b2 100644 --- a/sys/mips/malta/gt_pci.c +++ b/sys/mips/malta/gt_pci.c @@ -266,8 +266,12 @@ gt_pci_attach(device_t dev) sc->sc_io = MIPS_PHYS_TO_KSEG1(MALTA_PCI0_IO_BASE); sc->sc_io_rman.rm_type = RMAN_ARRAY; sc->sc_io_rman.rm_descr = "GT64120 PCI I/O Ports"; + /* + * First 256 bytes are ISA's registers: e.g. i8259's + * So do not use them for general purpose PCI I/O window + */ if (rman_init(&sc->sc_io_rman) != 0 || - rman_manage_region(&sc->sc_io_rman, 0, 0xffff) != 0) { + rman_manage_region(&sc->sc_io_rman, 0x100, 0xffff) != 0) { panic("gt_pci_attach: failed to set up I/O rman"); } @@ -568,8 +572,10 @@ gt_pci_route_interrupt(device_t pcib, device_t dev, int pin) * PIIX4 IDE adapter. HW IRQ0 */ return 0; + case 11: /* Ethernet */ + return 10; default: - printf("No mapping for %d/%d/%d/%d\n", bus, device, func, pin); + device_printf(pcib, "no IRQ mapping for %d/%d/%d/%d\n", bus, device, func, pin); } return (0); |