Skip to content

Commit

Permalink
ppc/pegasos2: Fix reg property of 64 bit BARs in device tree
Browse files Browse the repository at this point in the history
The board firmware handles this correctly following the Open Firmware
standard which we missed. This fixes 64 bit BARs when using VOF.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-ID: <20230721221320.1311E7456AB@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
zbalaton authored and danielhb committed Aug 4, 2023
1 parent 889dd6c commit 6b6d4c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/ppc/pegasos2.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,11 @@ static void add_pci_device(PCIBus *bus, PCIDevice *d, void *opaque)
if (d->io_regions[i].type & PCI_BASE_ADDRESS_SPACE_IO) {
cells[j] |= cpu_to_be32(1 << 24);
} else {
cells[j] |= cpu_to_be32(2 << 24);
if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_TYPE_64) {
cells[j] |= cpu_to_be32(3 << 24);
} else {
cells[j] |= cpu_to_be32(2 << 24);
}
if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_PREFETCH) {
cells[j] |= cpu_to_be32(4 << 28);
}
Expand Down

0 comments on commit 6b6d4c1

Please sign in to comment.