The child address of the PCI-EBus bridge "ranges" property should be offset from the BAR address and not the beginning of the address space (similar as to how the "assigned-addresses" property is generated). This fixes EBus enumeration under FreeBSD SPARC64.
Reported-by: Marius Strobl marius@alchemy.franken.de Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/drivers/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openbios-devel/drivers/pci.c b/openbios-devel/drivers/pci.c index 366f4a1..b76c43e 100644 --- a/openbios-devel/drivers/pci.c +++ b/openbios-devel/drivers/pci.c @@ -824,7 +824,7 @@ int ebus_config_cb(const pci_config_t *config) ncells += pci_encode_phys_addr(props + ncells, flags, space_code, config->dev, PCI_BASE_ADDR_0 + (i * sizeof(uint32_t)), - 0); + config->assigned[i] & ~mask);
props[ncells++] = config->sizes[i]; }