Revision: 18723
          http://sourceforge.net/p/edk2/code/18723
Author:   leiflindholm
Date:     2015-11-03 11:11:22 +0000 (Tue, 03 Nov 2015)
Log Message:
-----------
ArmPlatformPkg: Juno - add correct SPI interrupt numbers for MSI

The JunoR1 has a GICv2m which is a GICv2 with a little piece of hardware
that has some memory mapped locations that can trigger traditional SPI
interrupts. This allows some basic PCIe MSI capabilities.

Setup the SPI range that is mapped by the MSI window. This range is
described in the JunoR1 SoC TRM, table 3-3. Under Interrupt ID 244-351 is
described as "GICv2m PCI Express MSI". In the future when these tables
are generated programmatically the information may be found in the
MSI_TYPER register as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.lin...@arm.com>
Reviewed-by: Ryan Harkin <ryan.har...@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>

Modified Paths:
--------------
    trunk/edk2/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Madt.aslc
    trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h

Modified: trunk/edk2/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Madt.aslc
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Madt.aslc   2015-11-03 
02:58:30 UTC (rev 18722)
+++ trunk/edk2/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Madt.aslc   2015-11-03 
11:11:22 UTC (rev 18723)
@@ -119,7 +119,8 @@
           0x2C06F000, 0x2C04F000, 25, 0 /* GicRBase */),
     },
     EFI_ACPI_5_0_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 
(PcdGicDistributorBase), 0),
-    EFI_ACPI_6_0_GIC_MSI_FRAME_INIT(0, ARM_JUNO_GIV2M_MSI_BASE, 0, 0, 0)
+    // Format: EFI_ACPI_6_0_GIC_MSI_FRAME_INIT(GicMsiFrameId, 
PhysicalBaseAddress, Flags, SPICount, SPIBase)
+    EFI_ACPI_6_0_GIC_MSI_FRAME_INIT(0, ARM_JUNO_GIV2M_MSI_BASE, 0, 
ARM_JUNO_GIV2M_MSI_SPI_COUNT, ARM_JUNO_GIV2M_MSI_SPI_BASE)
   };
 #endif
 

Modified: trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h  2015-11-03 
02:58:30 UTC (rev 18722)
+++ trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h  2015-11-03 
11:11:22 UTC (rev 18723)
@@ -40,9 +40,14 @@
 #define ARM_JUNO_PERIPHERALS_BASE             0x20000000
 #define ARM_JUNO_PERIPHERALS_SZ               0x0E000000
 
+// PCIe MSI address window
 #define ARM_JUNO_GIV2M_MSI_BASE               0x2c1c0000
 #define ARM_JUNO_GIV2M_MSI_SZ                 SIZE_256KB
 
+// PCIe MSI to SPI mapping range
+#define ARM_JUNO_GIV2M_MSI_SPI_BASE           224
+#define ARM_JUNO_GIV2M_MSI_SPI_COUNT          127 //TRM says last SPI is 351, 
351-224=127
+
 // On-Chip non-secure SRAM
 #define ARM_JUNO_NON_SECURE_SRAM_BASE         0x2E000000
 #define ARM_JUNO_NON_SECURE_SRAM_SZ           SIZE_16MB


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to