diff options
author | Timur Tabi <timur@freescale.com> | 2011-09-23 13:41:35 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-10-14 03:54:29 -0400 |
commit | 2bcd1c0cfcf53a384159c272c972645e7e822140 (patch) | |
tree | 221e336531b92f2eef53cd48a1c1ad217ccf894b /Documentation/devicetree | |
parent | 45116806139743cf35baa01a584e5972e5d833f6 (diff) |
powerpc/fsl_msi: add support for "msi-address-64" property
Add support for the msi-address-64 property of a PCI node. This property
specifies the PCI address of MSIIR (message signaled interrupt index
register).
In commit 3da34aae ("powerpc/fsl: Support unique MSI addresses per PCIe Root
Complex"), the msi_addr_hi/msi_addr_lo fields of struct fsl_msi were redefined
from an actual address to just an offset, but the fields were not renamed
accordingly. These fields are replace with a single field, msiir_offset,
to reflect the new meaning.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt index 70558c3f3682..5d586e1ccaf5 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt | |||
@@ -25,6 +25,16 @@ Required properties: | |||
25 | are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed | 25 | are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed |
26 | to MPIC. | 26 | to MPIC. |
27 | 27 | ||
28 | Optional properties: | ||
29 | - msi-address-64: 64-bit PCI address of the MSIIR register. The MSIIR register | ||
30 | is used for MSI messaging. The address of MSIIR in PCI address space is | ||
31 | the MSI message address. | ||
32 | |||
33 | This property may be used in virtualized environments where the hypervisor | ||
34 | has created an alternate mapping for the MSIR block. See below for an | ||
35 | explanation. | ||
36 | |||
37 | |||
28 | Example: | 38 | Example: |
29 | msi@41600 { | 39 | msi@41600 { |
30 | compatible = "fsl,mpc8610-msi", "fsl,mpic-msi"; | 40 | compatible = "fsl,mpc8610-msi", "fsl,mpic-msi"; |
@@ -41,3 +51,35 @@ Example: | |||
41 | 0xe7 0>; | 51 | 0xe7 0>; |
42 | interrupt-parent = <&mpic>; | 52 | interrupt-parent = <&mpic>; |
43 | }; | 53 | }; |
54 | |||
55 | The Freescale hypervisor and msi-address-64 | ||
56 | ------------------------------------------- | ||
57 | Normally, PCI devices have access to all of CCSR via an ATMU mapping. The | ||
58 | Freescale MSI driver calculates the address of MSIIR (in the MSI register | ||
59 | block) and sets that address as the MSI message address. | ||
60 | |||
61 | In a virtualized environment, the hypervisor may need to create an IOMMU | ||
62 | mapping for MSIIR. The Freescale ePAPR hypervisor has this requirement | ||
63 | because of hardware limitations of the Peripheral Access Management Unit | ||
64 | (PAMU), which is currently the only IOMMU that the hypervisor supports. | ||
65 | The ATMU is programmed with the guest physical address, and the PAMU | ||
66 | intercepts transactions and reroutes them to the true physical address. | ||
67 | |||
68 | In the PAMU, each PCI controller is given only one primary window. The | ||
69 | PAMU restricts DMA operations so that they can only occur within a window. | ||
70 | Because PCI devices must be able to DMA to memory, the primary window must | ||
71 | be used to cover all of the guest's memory space. | ||
72 | |||
73 | PAMU primary windows can be divided into 256 subwindows, and each | ||
74 | subwindow can have its own address mapping ("guest physical" to "true | ||
75 | physical"). However, each subwindow has to have the same alignment, which | ||
76 | means they cannot be located at just any address. Because of these | ||
77 | restrictions, it is usually impossible to create a 4KB subwindow that | ||
78 | covers MSIIR where it's normally located. | ||
79 | |||
80 | Therefore, the hypervisor has to create a subwindow inside the same | ||
81 | primary window used for memory, but mapped to the MSIR block (where MSIIR | ||
82 | lives). The first subwindow after the end of guest memory is used for | ||
83 | this. The address specified in the msi-address-64 property is the PCI | ||
84 | address of MSIIR. The hypervisor configures the PAMU to map that address to | ||
85 | the true physical address of MSIIR. | ||