aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-08-20 11:24:33 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-08-20 11:24:33 +0100
commit112a829f8f0add64f73bfea66c153355ea596da9 (patch)
treeedbb66a6e9d77c4ca037166506b782a48c72a066 /include
parent6d0ed6ba6c1aa0201326d4f0072e91983495bb52 (diff)
downloadqemu-112a829f8f0add64f73bfea66c153355ea596da9.zip
qemu-112a829f8f0add64f73bfea66c153355ea596da9.tar.gz
qemu-112a829f8f0add64f73bfea66c153355ea596da9.tar.bz2
hw/dma/pl080: Don't use CPU address space for DMA accesses
Currently our PL080/PL081 model uses a combination of the CPU's address space (via cpu_physical_memory_{read,write}()) and the system address space for performing DMA accesses. For the PL081s in the MPS FPGA images, their DMA accesses must go via Master Security Controllers. Switch the PL080/PL081 model to take a MemoryRegion property which defines its downstream for making DMA accesses. Since the PL08x are only used in two board models, we make provision of the 'downstream' link mandatory and convert both users at once, rather than having it be optional with a default to the system address space. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/dma/pl080.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/dma/pl080.h b/include/hw/dma/pl080.h
index 7c6a418..9d4b3df 100644
--- a/include/hw/dma/pl080.h
+++ b/include/hw/dma/pl080.h
@@ -21,6 +21,8 @@
* + sysbus IRQ 1: DMACINTERR error interrupt request
* + sysbus IRQ 2: DMACINTTC count interrupt request
* + sysbus MMIO region 0: MemoryRegion for the device's registers
+ * + QOM property "downstream": MemoryRegion defining where DMA
+ * bus master transactions are made
*/
#ifndef HW_DMA_PL080_H
@@ -61,6 +63,9 @@ typedef struct PL080State {
qemu_irq irq;
qemu_irq interr;
qemu_irq inttc;
+
+ MemoryRegion *downstream;
+ AddressSpace downstream_as;
} PL080State;
#endif