From 5c4cbcf26ca9465a36fc0661b4103d55897e1a19 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Tue, 7 Aug 2012 16:10:38 +0000 Subject: pseries dma: DMA window params added to PHB and DT population changed Previously the only PCI bus supported was the emulated PCI bus with fixed DMA window with start at 0 and size 1GB. As we are going to support PCI pass through which DMA window properties are set by the host kernel, we have to support DMA windows with parameters other than default. This patch adds: 1. DMA window properties to sPAPRPHBState: LIOBN (bus id), start, size of the window. 2. An additional function spapr_dma_dt() to populate DMA window properties in the device tree which simply accepts all the parameters and does not try to guess what kind of IOMMU is given to it. The original spapr_dma_dt() is renamed to spapr_tcet_dma_dt(). Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/spapr_pci.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/spapr_pci.h') diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h index 6892e4fae5..7518899b85 100644 --- a/hw/spapr_pci.h +++ b/hw/spapr_pci.h @@ -41,7 +41,9 @@ typedef struct sPAPRPHBState { target_phys_addr_t msi_win_addr; MemoryRegion memwindow, iowindow, msiwindow; - + uint32_t dma_liobn; + uint64_t dma_window_start; + uint64_t dma_window_size; DMAContext *dma; struct { -- cgit v1.2.3