[PATCH] powerpc/fsl: add MSI support for the Freescale hypervisor

Scott Wood scottwood at freescale.com
Tue Dec 13 10:52:41 EST 2011


On 12/12/2011 05:37 PM, Timur Tabi wrote:
> @@ -205,6 +207,29 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
>  
>  	/* Setup inbound mem window */
>  	mem = memblock_end_of_DRAM();
> +
> +	/*
> +	 * The msi-address-64 property, if it exists, indicates the physical
> +	 * address of the MSIIR register.  Normally, this register is located
> +	 * inside CCSR, so the ATMU that covers all of CCSR is used for MSIs.
> +	 * But if this property exists, then we'll normally need to create a
> +	 * new ATMU for it.  For now, however, we cheat.  The only entity that
> +	 * creates this property is the Freescale hypervisor, and it
> +	 * always locates MSIIR in the page immediately after the end of DDR.
> +	 * So we can avoid allocating a new ATMU by just extending the DDR
> +	 * ATMU by one page.
> +	 */

Technically, it's up to the hv config file where MSIIR gets mapped.
After main memory is just a common way of configuring it, but won't work
if we're limiting the partition's memory to end at an unusual address.

Might also want to comment that the reason for this weird remapping is
hardware limitations in the IOMMU.

-Scott



More information about the Linuxppc-dev mailing list