plan9fox/sys/src/9/bcm64/io.h
cinap_lenrek efcfdd23d7 bcm64: get inbound and outbound pci window base address from device tree
On the pi400, the xhci reset firmware mailbox request
assumes that the pci windows match the ones specified
in the device tree. The inbound window (pcidmawin)
also varies now depending on the amount of memory
installed.

It is all pretty ridiculous, as the firmware could as
well just read the pci controllers hardware register
to determine the window configuration and the os could
keep a nice simple 1:1 mapping (with pci dma addresses
== physical addresses).
2021-02-06 13:47:45 +01:00

11 lines
175 B
C

#include "../bcm/io.h"
enum {
IRQgic = 160,
IRQpci = IRQgic + 20,
IRQether = IRQgic + 29,
};
#define PCIWINDOW soc.pcidmawin
#define PCIWADDR(va) (PADDR(va)+PCIWINDOW)