[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 19/26] ppc/xive: introduce a helper to map the X
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [RFC PATCH 19/26] ppc/xive: introduce a helper to map the XIVE memory regions |
Date: |
Wed, 5 Jul 2017 19:13:32 +0200 |
It will be used when the guest chooses the XIVE exploitation mode in
CAS.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/xive.c | 11 +++++++++++
include/hw/ppc/xive.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index cda1fa18e44d..895dd2b2f61b 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -915,3 +915,14 @@ bool xive_eq_for_target(XIVE *x, uint32_t target, uint8_t
priority,
return true;
}
+
+void xive_mmio_map(XIVE *x)
+{
+ /* ESBs */
+ sysbus_mmio_map(SYS_BUS_DEVICE(x), 0, x->vc_base);
+
+ /* Thread Management Interrupt Areas */
+ /* TODO: Only map the OS TIMA for the moment. Mapping the whole
+ * region needs some rework in the handlers */
+ sysbus_mmio_map(SYS_BUS_DEVICE(x), 1, x->tm_base + (1 << x->tm_shift));
+}
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
index 288116aeb8f4..560f6ab66f73 100644
--- a/include/hw/ppc/xive.h
+++ b/include/hw/ppc/xive.h
@@ -68,4 +68,6 @@ typedef struct sPAPRMachineState sPAPRMachineState;
void xive_spapr_init(sPAPRMachineState *spapr);
void xive_spapr_populate(XIVE *x, void *fdt);
+void xive_mmio_map(XIVE *x);
+
#endif /* PPC_XIVE_H */
--
2.7.5
- Re: [Qemu-devel] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model, (continued)
[Qemu-devel] [RFC PATCH 15/26] ppc/xive: push EQ data in OS event queues, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 16/26] ppc/xive: notify CPU when interrupt priority is more privileged, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 17/26] ppc/xive: add hcalls support, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 18/26] ppc/xive: add device tree support, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 19/26] ppc/xive: introduce a helper to map the XIVE memory regions,
Cédric Le Goater <=
[Qemu-devel] [RFC PATCH 20/26] ppc/xive: introduce a helper to create XIVE interrupt source objects, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 21/26] ppc/xive: introduce routines to allocate IRQ numbers, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 22/26] ppc/xive: create an XIVE interrupt source to handle IPIs, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 23/26] spapr: add a XIVE object to the sPAPR machine, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 24/26] spapr: include the XIVE interrupt source for IPIs, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 25/26] spapr: print the XIVE interrupt source for IPIs in the monitor, Cédric Le Goater, 2017/07/05
[Qemu-devel] [RFC PATCH 26/26] spapr: force XIVE exploitation mode for POWER9 (HACK), Cédric Le Goater, 2017/07/05