From: Philippe Mathieu-Daudé <f4...@amsat.org> The BCM2711 has a BCM54213 Gigabit Ethernet block mapped in the PCIe range.
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> --- FIXME: create the bcm54213-geth in raspi.c? vAJB: - fix for move of gic_base to bc --- hw/arm/bcm2836.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 99dc15e6e4..ff62e741ce 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -15,6 +15,7 @@ #include "hw/arm/bcm2836.h" #include "hw/arm/raspi_platform.h" #include "hw/sysbus.h" +#include "hw/misc/unimp.h" typedef struct BCM283XClass { /*< private >*/ @@ -46,6 +47,8 @@ static Property bcm2836_enabled_cores_property = #define GIC_VIFACE_OTHER_OFS(cpu) (0x5000 + (cpu) * 0x200) #define GIC_VCPU_OFS 0x6000 +#define PCIE_BASE 0x7d500000 + static void bcm2836_init(Object *obj) { BCM283XState *s = BCM283X(obj); @@ -227,6 +230,13 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) qdev_connect_gpio_out(DEVICE(&s->cpu[n].core), GTIMER_SEC, qdev_get_gpio_in_named(DEVICE(&s->control), "cntpsirq", n)); } + + /* bcm2838 kludge to easily create PCIe */ + if (bc->gic_base) { + create_unimplemented_device("bcm2838-pcie", PCIE_BASE, 0x100000); + create_unimplemented_device("bcm54213-geth", + PCIE_BASE + 0x80000, 0x10000); + } } static void bcm283x_class_init(ObjectClass *oc, void *data) -- 2.30.2