As derived from the current logic in pci_host_set_ranges().
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/ppc/qemu/init.c | 21 +++++++++++++++++++++ arch/sparc64/openbios.c | 6 ++++++ arch/x86/openbios.c | 4 ++++ 3 files changed, 31 insertions(+)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index ffbf08d..6984e91 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -108,6 +108,11 @@ static const pci_arch_t known_arch[] = { .io_len = 0x00010000, .rbase = 0x00000000, .rlen = 0x00400000, + .host_ranges = { + { .type = IO_SPACE, .parentaddr = 0, .childaddr = 0x80000000, .len = 0x00010000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0, .childaddr = 0xc0100000, .len = 0x10000000 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + }, .irqs = { 9, 11, 9, 11 } }, [ARCH_MAC99] = { @@ -125,6 +130,11 @@ static const pci_arch_t known_arch[] = { .io_len = 0x00800000, .rbase = 0x00000000, .rlen = 0x01000000, + .host_ranges = { + { .type = IO_SPACE, .parentaddr = 0, .childaddr = 0xf2000000, .len = 0x00800000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0x80000000, .childaddr = 0x80000000, .len = 0x10000000 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + }, .irqs = { 0x1b, 0x1c, 0x1d, 0x1e } }, [ARCH_MAC99_U3] = { @@ -142,6 +152,11 @@ static const pci_arch_t known_arch[] = { .io_len = 0x00800000, .rbase = 0x00000000, .rlen = 0x01000000, + .host_ranges = { + { .type = IO_SPACE, .parentaddr = 0, .childaddr = 0xf2000000, .len = 0x00800000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0x80000000, .childaddr = 0x80000000, .len = 0x10000000 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + }, .irqs = { 0x1b, 0x1c, 0x1d, 0x1e } }, [ARCH_HEATHROW] = { @@ -159,6 +174,12 @@ static const pci_arch_t known_arch[] = { .io_len = 0x00800000, .rbase = 0xfd000000, .rlen = 0x01000000, + .host_ranges = { + { .type = IO_SPACE, .parentaddr = 0, .childaddr = 0xfe000000, .len = 0x00800000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0, .childaddr = 0xfd000000, .len = 0x01000000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0x80000000, .childaddr = 0x80000000, .len = 0x10000000 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + }, .irqs = { 21, 22, 23, 24 } }, }; diff --git a/arch/sparc64/openbios.c b/arch/sparc64/openbios.c index d624eb2..20673bc 100644 --- a/arch/sparc64/openbios.c +++ b/arch/sparc64/openbios.c @@ -64,6 +64,12 @@ static const struct hwdef hwdefs[] = { .mem_len = 0x10000000, .io_base = APB_SPECIAL_BASE + 0x2000000ULL, // PCI Bus I/O space .io_len = 0x10000, + .host_ranges = { + { .type = CONFIGURATION_SPACE, .parentaddr = 0, .childaddr = APB_SPECIAL_BASE + 0x1000000ULL, .len = 0x2000000 }, + { .type = IO_SPACE, .parentaddr = 0, .childaddr = APB_SPECIAL_BASE + 0x2000000ULL, .len = 0x10000 }, + { .type = MEMORY_SPACE_32, .parentaddr = 0, .childaddr = APB_MEM_BASE + 0x100000ULL, .len = 0x10000000 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + }, .irqs = { 0, 1, 2, 3 }, }, .machine_id_low = 0, diff --git a/arch/x86/openbios.c b/arch/x86/openbios.c index d8a0f9e..8a48a95 100644 --- a/arch/x86/openbios.c +++ b/arch/x86/openbios.c @@ -30,6 +30,10 @@ static const pci_arch_t default_pci_host = { .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82441, .io_base = 0x1000, + .host_ranges = { + { .type = IO_SPACE, .parentaddr = 0, .childaddr = 0x1000, .len = 0 }, + { .type = 0, .parentaddr = 0, .childaddr = 0, .len = 0 } + } }; #endif