pci: add host memory base to pci_arch_t

- sparc64 has PCI memory space at offset, therefore "ranges" property
  of host bridge must have different PCI and host memory addresses

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@788 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Igor V. Kovalenko
2010-05-27 20:12:19 +00:00
committed by Blue Swirl
parent ba0a4c1373
commit 75d49e26b4
4 changed files with 16 additions and 10 deletions

View File

@@ -455,10 +455,10 @@ static void pci_host_set_ranges(const pci_config_t *config)
ncells += host_encode_phys_addr(props + ncells, arch->rbase);
ncells += pci_encode_size(props + ncells, arch->rlen);
}
if (arch->mem_base) {
if (arch->host_mem_base) {
ncells += pci_encode_phys_addr(props + ncells, 0, MEMORY_SPACE_32,
config->dev, 0, arch->mem_base);
ncells += host_encode_phys_addr(props + ncells, arch->mem_base);
config->dev, 0, arch->pci_mem_base);
ncells += host_encode_phys_addr(props + ncells, arch->host_mem_base);
ncells += pci_encode_size(props + ncells, arch->mem_len);
}
set_property(dev, "ranges", (char *)props, ncells * sizeof(props[0]));
@@ -1255,7 +1255,7 @@ int ob_pci_init(void)
/* Find all PCI bridges */
mem_base = arch->mem_base;
mem_base = arch->pci_mem_base;
/* I/O ports under 0x400 are used by devices mapped at fixed
location. */
io_base = arch->io_base + 0x400;