This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Reserving interrupt lines for RTOS jailhouse inmate

Part Number: AM5728

Hi there,

I'm working with Linux processor-sdk 05.02.00.10 and RTOS processor-sdk 4.03.00.05.
I successfully worked with jailhouse hypervisor on the AM5728 evaluation board.

Now I'm setting up a RTOS jailhouse inmate on a AM5728 based custom board and I'm trying to figure out which irq lines I need to reserve in the Linux kernel dts.

Going through

http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Virtualization.html

and analyzing ICSS_EMAC example, I see that additional irq's 44 127 129 136 137 are reserved in am572x-idk-jailhouse.dtsi.

I see the interruptNum arguments that are used when the  ICSS_EMAC RTOS inmate invokes HwiP_create() is invoked, but there's no connection between them and the numbers skipped in the dts.

Also, nodes in the dts that hold lines like

interrupts = <GIC_SPI xx IRQ_TYPE_LEVEL_HIGH>;

with matching numbers (44 127 129...) are not related to the ICSS_EMAC example.

How can I figure the irq numbers I need to skip for my RTOS app?

Thanks a lot,

Nir.

  • Does

    omapconf dump crossbar irq mpu

    help me in any way?

  • Hi Nir,

    In RTOS SDK v5.0.0.15, the interrupts used in the ICSS_EMAC example are defined in <RTOS-SDK>/pdk_am57xx_1_0_11/packages/ti/drv/icss_emac/test/src/main.c:

    513 int32_t ICSS_EMAC_testPruIcssInstance2Setup(void)
    514 {
    ...
    552 #ifndef __LINUX_USER_SPACE
     553     /* For PRU2 Eth0 */
     554     CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_127, CSL_XBAR_PRUSS2_IRQ_HOST8);  /* link ISR */
     555     CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_137, CSL_XBAR_PRUSS2_IRQ_HOST2);  /* RX PKT ISR */
     556     CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_129, CSL_XBAR_PRUSS2_IRQ_HOST4);  /* TX PKT ISR */
     557 #ifndef SWITCH_EMAC
     558     if ((ICSS_EMAC_testEvmType  == ICSS_EMAC_TEST_BOARD_IDKAM572x) || (ICSS_EMAC_testEvmType  == ICSS_EMAC_TEST_BOARD_IDKAM574x))
     559     {
     560     /* For PRU2 Eth1 */
     561         CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_134, CSL_XBAR_PRUSS2_IRQ_HOST9);  /* link ISR */
     562         CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_135, CSL_XBAR_PRUSS2_IRQ_HOST3);  /* RX PKT ISR */
     563         CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_136, CSL_XBAR_PRUSS2_IRQ_HOST5);  /* TX PKT ISR */
     564     }

  • Hi,

    Thanks for your reply.

    In my system gpio1_3 is used as an interrupt.

    GPIO_setConfig_v1() registers the interrupt of gpio1_3 with 

    interruptRegParam.corepacConfig.intVecNum = hwAttrs->lin1IntNum;    ==    61

    Where is the number 61 coming from?

    When GPIO_enableInt() is invoked to enable the interrupt of gpio1_3 I get a nasty error message on the Linux side:

    [ 111.304105] irq 0, desc: d4803700, depth: 1, count: 0, unhandled: 0
    [ 111.304107] ->handle_irq(): c01807f8,
    [ 111.304118] handle_bad_irq+0x0/0x2a4
    [ 111.304120] ->irq_data.chip(): c0d1aae4,
    [ 111.304127] no_irq_chip+0x0/0x88
    [ 111.304130] ->action(): (null)
    [ 111.304133] IRQ_NOPROBE set
    [ 111.304135] IRQ_NOREQUEST set
    [ 111.304138] unexpected IRQ trap at vector 00

    This message appears only once.

    A new line is added to /proc/interrupts

    0:           1           none        Edge

    The callback function of gpio1_3 is not invoked.

    Dumping the crossbar yields this:

    OMAPCONF (rev v1.73 built Sun Mar 10 11:16:57 UTC 2019)
    
    HW Platform:
      Generic DRA74X (Flattened Device Tree)
      DRA75X ES2.0 GP Device (STANDARD performance (1.0GHz))
      TPS659038  ES2.2 
    
    SW Build Details:
      Build:
        Version:  _____                    _____           _         _   
      Kernel:
        Version: 4.14.79-rt47-gd9200ca684
        Author: oe-user@oe-host
        Toolchain: gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11
        Type: #19 SMP PREEMPT RT
        Date: Thu Aug 1 08:19:37 UTC 2019
    
    |----------------------------------------------------------------------------------------------------------------------------------------------|
    | mpu IRQ Crossbar Dump                                                                                                                        |
    |----------------------------------------------------------------------------------------------------------------------------------------------|
    | Index | Addr       | Val | Name                               | Source        | Description                                                  |
    |----------------------------------------------------------------------------------------------------------------------------------------------|
    | 0     |        N/A | N/A | MPU_CLUSTER_IRQ_INTERR             | MPU_CLUSTER   | Illegal writes to interrupt controller memory map region     |
    | 1     |        N/A | N/A | CS_CTI_MPU_C0_IRQ                  | MPU_C0_CS_CTI | TRIGOUT[6] of Cross Trigger Interface 0 (CTI0)               |
    | 2     |        N/A | N/A | CS_CTI_MPU_C1_IRQ                  | MPU_C1_CS_CTI | TRIGOUT[6] of Cross Trigger Interface 1 (CTI1)               |
    | 3     |        N/A | N/A | MPU_CLUSTER_IRQ_AXIERR             | MPU_CLUSTER   | Error indication for AXI write transactions with a BRESP err |
    | 4     | 0x4A002A48 |   0 | reserved                           | reserved      | N/A                                                          |
    | 5     |        N/A | N/A | WD_TIMER_MPU_C0_IRQ_WARN           | MPU_WD_TIMER  | MPU_WD_TIMER channel 0 warning interrupt                     |
    | 6     |        N/A | N/A | WD_TIMER_MPU_C1_IRQ_WARN           | MPU_WD_TIMER  | MPU_WD_TIMER channel 1 warning interrupt                     |
    | 7     | 0x4A002A4A |   0 | reserved                           | reserved      | N/A                                                          |
    | 8     | 0x4A002A4C |   0 | reserved                           | reserved      | N/A                                                          |
    | 9     | 0x4A002A4E |   0 | reserved                           | reserved      | N/A                                                          |
    | 10    | 0x4A002A50 |   5 | L3_MAIN_IRQ_APP_ERR                | L3_MAIN       | L3_MAIN application or non-attributable error                |
    | 11    | 0x4A002A52 |   0 | reserved                           | reserved      | N/A                                                          |
    | 12    | 0x4A002A54 |   0 | reserved                           | reserved      | N/A                                                          |
    | 13    | 0x4A002A56 |   0 | reserved                           | reserved      | N/A                                                          |
    | 14    | 0x4A002A58 |   0 | reserved                           | reserved      | N/A                                                          |
    | 15    | 0x4A002A5A |   0 | reserved                           | reserved      | N/A                                                          |
    | 16    | 0x4A002A5C |   0 | reserved                           | reserved      | N/A                                                          |
    | 17    | 0x4A002A5E |   0 | reserved                           | reserved      | N/A                                                          |
    | 18    | 0x4A002A60 |   0 | reserved                           | reserved      | N/A                                                          |
    | 19    | 0x4A002A62 |   0 | reserved                           | reserved      | N/A                                                          |
    | 20    | 0x4A002A64 |   0 | reserved                           | reserved      | N/A                                                          |
    | 21    | 0x4A002A66 |   0 | reserved                           | reserved      | N/A                                                          |
    | 22    | 0x4A002A68 |   0 | reserved                           | reserved      | N/A                                                          |
    | 23    | 0x4A002A6A |   0 | reserved                           | reserved      | N/A                                                          |
    | 24    | 0x4A002A6C |   0 | reserved                           | reserved      | N/A                                                          |
    | 25    | 0x4A002A6E |   0 | reserved                           | reserved      | N/A                                                          |
    | 26    | 0x4A002A70 |   0 | reserved                           | reserved      | N/A                                                          |
    | 27    | 0x4A002A72 |  22 | reserved                           | reserved      | N/A                                                          |
    | 28    | 0x4A002A74 |   0 | reserved                           | reserved      | N/A                                                          |
    | 29    | 0x4A002A76 |   0 | reserved                           | reserved      | N/A                                                          |
    | 30    | 0x4A002A78 |  25 | GPIO2_IRQ_1                        | GPIO2         | GPIO2 interrupt 1                                            |
    | 31    | 0x4A002A7A |   0 | reserved                           | reserved      | N/A                                                          |
    | 32    | 0x4A002A7C |   0 | reserved                           | reserved      | N/A                                                          |
    | 33    | 0x4A002A7E |   0 | reserved                           | reserved      | N/A                                                          |
    | 34    | 0x4A002A80 |   0 | reserved                           | reserved      | N/A                                                          |
    | 35    | 0x4A002A82 |   0 | reserved                           | reserved      | N/A                                                          |
    | 36    | 0x4A002A84 |   0 | reserved                           | reserved      | N/A                                                          |
    | 37    | 0x4A002A86 |   0 | reserved                           | reserved      | N/A                                                          |
    | 38    | 0x4A002A88 |   0 | reserved                           | reserved      | N/A                                                          |
    | 39    | 0x4A002A8A |   0 | reserved                           | reserved      | N/A                                                          |
    | 40    | 0x4A002A8C |   0 | reserved                           | reserved      | N/A                                                          |
    | 41    | 0x4A002A8E |   0 | reserved                           | reserved      | N/A                                                          |
    | 42    | 0x4A002A90 |   0 | reserved                           | reserved      | N/A                                                          |
    | 43    | 0x4A002A92 |   0 | reserved                           | reserved      | N/A                                                          |
    | 44    | 0x4A002A94 |  39 | TIMER8_IRQ                         | TIMER8        | TIMER8 interrupt                                             |
    | 45    | 0x4A002A96 |   0 | reserved                           | reserved      | N/A                                                          |
    | 46    | 0x4A002A98 |   0 | reserved                           | reserved      | N/A                                                          |
    | 47    | 0x4A002A9A |   0 | reserved                           | reserved      | N/A                                                          |
    | 48    | 0x4A002A9C |   0 | reserved                           | reserved      | N/A                                                          |
    | 49    | 0x4A002A9E |   0 | reserved                           | reserved      | N/A                                                          |
    | 50    | 0x4A002AA0 |   0 | reserved                           | reserved      | N/A                                                          |
    | 51    | 0x4A002AA2 |   0 | reserved                           | reserved      | N/A                                                          |
    | 52    | 0x4A002AA4 |   0 | reserved                           | reserved      | N/A                                                          |
    | 53    | 0x4A002AA6 |   0 | reserved                           | reserved      | N/A                                                          |
    | 54    | 0x4A002AA8 |   0 | reserved                           | reserved      | N/A                                                          |
    | 55    | 0x4A002AAA |   0 | reserved                           | reserved      | N/A                                                          |
    | 56    | 0x4A002AAC |   0 | reserved                           | reserved      | N/A                                                          |
    | 57    | 0x4A002AAE |   0 | reserved                           | reserved      | N/A                                                          |
    | 58    | 0x4A002AB0 |   0 | reserved                           | reserved      | N/A                                                          |
    | 59    | 0x4A002AB2 |  54 | reserved                           | reserved      | N/A                                                          |
    | 60    | 0x4A002AB4 |  55 | I2C5_IRQ                           | I2C5          | I2C5 interrupt                                               |
    | 61    | 0x4A002AB6 |  56 | I2C3_IRQ                           | I2C3          | I2C3 interrupt                                               |
    | 62    | 0x4A002AB8 |   0 | reserved                           | reserved      | N/A                                                          |
    | 63    | 0x4A002ABA |  73 | USB2_IRQ_INTR0                     | USB2          | USB2 interrupt 0                                             |
    | 64    | 0x4A002ABC |  71 | USB1_IRQ_INTR0                     | USB1          | USB1 interrupt 0                                             |
    | 65    | 0x4A002ABE |  96 | HDMI_IRQ                           | HDMI          | HDMI interrupt                                               |
    | 66    | 0x4A002AC0 |  61 | MCSPI2_IRQ                         | MCSPI2        | McSPI2 interrupt                                             |
    | 67    | 0x4A002AC2 |  62 | reserved                           | reserved      | N/A                                                          |
    | 68    | 0x4A002AC4 |  63 | reserved                           | reserved      | N/A                                                          |
    | 69    | 0x4A002AC6 |  64 | reserved                           | reserved      | N/A                                                          |
    | 70    | 0x4A002AC8 |  20 | DISPC_IRQ                          | DISPC         | Display controller interrupt                                 |
    | 71    | 0x4A002ACA | 393 | VIP2_IRQ_2                         | VIP2          | VIP2 interrupt 2                                             |
    | 72    | 0x4A002ACC | 352 | VIP2_IRQ_1                         | VIP2          | VIP2 interrupt 1                                             |
    | 73    | 0x4A002ACE | 147 | DSP2_IRQ_MMU1                      | DSP2          | DSP2 MMU1 interrupt                                          |
    | 74    | 0x4A002AD0 | 146 | DSP2_IRQ_MMU0                      | DSP2          | DSP2 MMU0 interrupt                                          |
    | 75    | 0x4A002AD2 | 354 | VPE_IRQ                            | VPE           | VPE interrupt                                                |
    | 76    | 0x4A002AD4 |  47 | RNG_IRQ                            | RNG           | RNG interrupt                                                |
    | 77    | 0x4A002AD6 |  46 | SHA2MD5_1_IRQ_P                    | SHA2MD5_1     | SHA2MD5_1 interrupt on HIB2                                  |
    | 78    | 0x4A002AD8 |  77 | DES3DES_IRQ_P                      | DES3DES       | DES3DES public interrupt                                     |
    | 79    | 0x4A002ADA |  59 | reserved                           | reserved      | N/A                                                          |
    | 80    | 0x4A002ADC |  80 | AES1_IRQ_P                         | AES1          | AES1 public interrupt                                        |
    | 81    | 0x4A002ADE | 120 | BB2D_IRQ                           | BB2D          | BB2D interrupt                                               |
    | 82    | 0x4A002AE0 |  16 | GPU_IRQ                            | GPU           | GPU interrupt                                                |
    | 83    | 0x4A002AE2 | 222 | DCAN1_IRQ_INT0                     | DCAN1         | DCAN1 interrupt 0                                            |
    | 84    | 0x4A002AE4 | 337 | GMAC_SW_IRQ_MISC_PULSE             | GMAC_SW       | GMAC_SW miscellaneous interrupt                              |
    | 85    | 0x4A002AE6 | 336 | GMAC_SW_IRQ_TX_PULSE               | GMAC_SW       | GMAC_SW transmit interrupt                                   |
    | 86    | 0x4A002AE8 | 335 | GMAC_SW_IRQ_RX_PULSE               | GMAC_SW       | GMAC_SW receive interrupt                                    |
    | 87    | 0x4A002AEA | 334 | GMAC_SW_IRQ_RX_THRESH_PULSE        | GMAC_SW       | GMAC_SW receive threshold interrupt                          |
    | 88    | 0x4A002AEC |  87 | USB2_IRQ_INTR1                     | USB2          | USB2 interrupt 1                                             |
    | 89    | 0x4A002AEE |  72 | USB1_IRQ_INTR1                     | USB1          | USB1 interrupt 1                                             |
    | 90    | 0x4A002AF0 | 217 | RTC_SS_IRQ_ALARM                   | RTC_SS        | RTC_SS alarm interrupt                                       |
    | 91    | 0x4A002AF2 |  49 | SATA_IRQ                           | SATA          | SATA interrupt                                               |
    | 92    | 0x4A002AF4 | 343 | QSPI_IRQ                           | QSPI          | QSPI interrupt                                               |
    | 93    | 0x4A002AF6 | 396 | IPU2_IRQ_MMU                       | IPU2          | IPU2 MMU interrupt                                           |
    | 94    | 0x4A002AF8 | 395 | IPU1_IRQ_MMU                       | IPU1          | IPU1 MMU interrupt                                           |
    | 95    | 0x4A002AFA | 145 | DSP1_IRQ_MMU1                      | DSP1          | DSP1 MMU1 interrupt                                          |
    | 96    | 0x4A002AFC |  23 | DSP1_IRQ_MMU0                      | DSP1          | DSP1 MMU0 interrupt                                          |
    | 97    | 0x4A002AFE |  81 | MMC2_IRQ                           | MMC2          | MMC2 interrupt                                               |
    | 98    | 0x4A002B00 |  93 | reserved                           | reserved      | N/A                                                          |
    | 99    | 0x4A002B02 |  51 | I2C1_IRQ                           | I2C1          | I2C1 interrupt                                               |
    | 100   | 0x4A002B04 | 108 | DMM_IRQ                            | DMM           | DMM interrupt                                                |
    | 101   | 0x4A002B06 |  75 | WD_TIMER2_IRQ                      | WD_TIMER2     | WD_TIMER2 interrupt                                          |
    | 102   | 0x4A002B08 | 342 | TIMER16_IRQ                        | TIMER16       | TIMER16 interrupt                                            |
    | 103   | 0x4A002B0A | 341 | TIMER15_IRQ                        | TIMER15       | TIMER15 interrupt                                            |
    | 104   | 0x4A002B0C | 340 | TIMER14_IRQ                        | TIMER14       | TIMER14 interrupt                                            |
    | 105   | 0x4A002B0E | 339 | TIMER13_IRQ                        | TIMER13       | TIMER13 interrupt                                            |
    | 106   | 0x4A002B10 |  90 | TIMER12_IRQ                        | TIMER12       | TIMER12 interrupt                                            |
    | 107   | 0x4A002B12 |  42 | TIMER11_IRQ                        | TIMER11       | TIMER11 interrupt                                            |
    | 108   | 0x4A002B14 |  41 | TIMER10_IRQ                        | TIMER10       | TIMER10 interrupt                                            |
    | 109   | 0x4A002B16 |  40 | TIMER9_IRQ                         | TIMER9        | TIMER9 interrupt                                             |
    | 110   | 0x4A002B18 |  38 | TIMER7_IRQ                         | TIMER7        | TIMER7 interrupt                                             |
    | 111   | 0x4A002B1A |  37 | TIMER6_IRQ                         | TIMER6        | TIMER6 interrupt                                             |
    | 112   | 0x4A002B1C |  36 | TIMER5_IRQ                         | TIMER5        | TIMER5 interrupt                                             |
    | 113   | 0x4A002B1E |  35 | TIMER4_IRQ                         | TIMER4        | TIMER4 interrupt                                             |
    | 114   | 0x4A002B20 |  34 | TIMER3_IRQ                         | TIMER3        | TIMER3 interrupt                                             |
    | 115   | 0x4A002B22 | 256 | MAILBOX6_IRQ_USER3                 | MAILBOX6      | Mailbox 6 user 3 interrupt                                   |
    | 116   | 0x4A002B24 | 255 | MAILBOX6_IRQ_USER2                 | MAILBOX6      | Mailbox 6 user 2 interrupt                                   |
    | 117   | 0x4A002B26 | 254 | MAILBOX6_IRQ_USER1                 | MAILBOX6      | Mailbox 6 user 1 interrupt                                   |
    | 118   | 0x4A002B28 | 253 | MAILBOX6_IRQ_USER0                 | MAILBOX6      | Mailbox 6 user 0 interrupt                                   |
    | 119   | 0x4A002B2A | 252 | MAILBOX5_IRQ_USER3                 | MAILBOX5      | Mailbox 5 user 3 interrupt                                   |
    | 120   | 0x4A002B2C | 251 | MAILBOX5_IRQ_USER2                 | MAILBOX5      | Mailbox 5 user 2 interrupt                                   |
    | 121   | 0x4A002B2E | 250 | MAILBOX5_IRQ_USER1                 | MAILBOX5      | Mailbox 5 user 1 interrupt                                   |
    | 122   | 0x4A002B30 | 249 | MAILBOX5_IRQ_USER0                 | MAILBOX5      | Mailbox 5 user 0 interrupt                                   |
    | 123   | 0x4A002B32 | 221 | UART10_IRQ                         | UART10        | UART10 interrupt                                             |
    | 124   | 0x4A002B34 | 116 | GPIO8_IRQ_1                        | GPIO8         | GPIO8 interrupt 1                                            |
    | 125   | 0x4A002B36 |  30 | GPIO7_IRQ_1                        | GPIO7         | GPIO7 interrupt 1                                            |
    | 126   | 0x4A002B38 |  29 | GPIO6_IRQ_1                        | GPIO6         | GPIO6 interrupt 1                                            |
    | 127   | 0x4A002B3A | 122 | reserved                           | reserved      | N/A                                                          |
    | 128   | 0x4A002B3C |  27 | GPIO4_IRQ_1                        | GPIO4         | GPIO4 interrupt 1                                            |
    | 129   | 0x4A002B3E | 124 | reserved                           | reserved      | N/A                                                          |
    | 130   | 0x4A002B40 |  26 | GPIO3_IRQ_1                        | GPIO3         | GPIO3 interrupt 1                                            |
    | 131   |        N/A | N/A | MPU_CLUSTER_IRQ_PMU_C0             | MPU_CLUSTER   | MPU core 0 PMU interrupt                                     |
    | 132   |        N/A | N/A | MPU_CLUSTER_IRQ_PMU_C1             | MPU_CLUSTER   | MPU core 1 PMU interrupt                                     |
    | 133   | 0x4A002B42 |   0 | reserved                           | reserved      | N/A                                                          |
    | 134   | 0x4A002B44 | 197 | PRUSS2_IRQ_HOST3                   | PRU_ICSS2     | PRU-ICSS2 host interrupt 3 (AM57xx only)                     |
    | 135   | 0x4A002B46 | 198 | PRUSS2_IRQ_HOST4                   | PRU_ICSS2     | PRU-ICSS2 host interrupt 4 (AM57xx only)                     |
    | 136   | 0x4A002B48 | 199 | PRUSS2_IRQ_HOST5                   | PRU_ICSS2     | PRU-ICSS2 host interrupt 5 (AM57xx only)                     |
    | 137   | 0x4A002B4A | 200 | PRUSS2_IRQ_HOST6                   | PRU_ICSS2     | PRU-ICSS2 host interrupt 6 (AM57xx only)                     |
    | 138   | 0x4A002B4C |  25 | GPIO2_IRQ_1                        | GPIO2         | GPIO2 interrupt 1                                            |
    | 139   | 0x4A002B4E |   0 | reserved                           | reserved      | N/A                                                          |
    | 140   | 0x4A002B50 |   0 | reserved                           | reserved      | N/A                                                          |
    | 141   | 0x4A002B52 |  24 | GPIO1_IRQ_1                        | GPIO1         | GPIO1 interrupt 1                                            |
    | 142   | 0x4A002B54 | 371 | EDMA_TC1_IRQ_ERR                   | EDMA          | TC1 EDMA TPTC1 error interrupt                               |
    | 143   | 0x4A002B56 | 370 | EDMA_TC0_IRQ_ERR                   | EDMA          | TC0 EDMA TPTC0 error interrupt                               |
    | 144   | 0x4A002B58 | 359 | EDMA_TPCC_IRQ_ERR                  | EDMA          | TPCC EDMA TPCC error interrupt                               |
    | 145   | 0x4A002B5A | 360 | EDMA_TPCC_IRQ_MP                   | EDMA          | TPCC EDMA TPCC memory protection interrupt                   |
    | 146   | 0x4A002B5C | 361 | EDMA_TPCC_IRQ_REGION0              | EDMA          | TPCC EDMA TPCC region 0 interrupt                            |
    | 147   | 0x4A002B5E |  10 | DMA_SYSTEM_IRQ_3                   | DMA_SYSTEM    | System DMA interrupt 3                                       |
    | 148   | 0x4A002B60 |   9 | DMA_SYSTEM_IRQ_2                   | DMA_SYSTEM    | System DMA interrupt 2                                       |
    | 149   | 0x4A002B62 |   8 | DMA_SYSTEM_IRQ_1                   | DMA_SYSTEM    | System DMA interrupt 1                                       |
    | 150   | 0x4A002B64 |   7 | DMA_SYSTEM_IRQ_0                   | DMA_SYSTEM    | System DMA interrupt 0                                       |
    | 151   | 0x4A002B66 | 121 | CTRL_MODULE_CORE_IRQ_THERMAL_ALERT | CTRL_MODULE   | CTRL_MODULE thermal alert interrupt                          |
    | 152   | 0x4A002B68 | 233 | PCIe_SS1_IRQ_INT1                  | PCIe_SS1      | PCIe_SS1 interrupt 1                                         |
    | 153   | 0x4A002B6A |   0 | reserved                           | reserved      | N/A                                                          |
    | 154   | 0x4A002B6C |   0 | reserved                           | reserved      | N/A                                                          |
    | 155   | 0x4A002B6E | 232 | PCIe_SS1_IRQ_INT0                  | PCIe_SS1      | PCIe_SS1 interrupt 0                                         |
    | 156   | 0x4A002B70 |   0 | reserved                           | reserved      | N/A                                                          |
    | 157   | 0x4A002B72 |   6 | PRM_IRQ_MPU                        | PRM           | PRCM interrupt to MPU                                        |
    | 158   | 0x4A002B74 |   4 | L3_MAIN_IRQ_DBG_ERR                | L3_MAIN       | L3_MAIN debug error                                          |
    | 159   | 0x4A002B76 |  32 | TIMER1_IRQ                         | TIMER1        | TIMER1 interrupt                                             |
    |----------------------------------------------------------------------------------------------------------------------------------------------|
    
    

    If I understand correctly, GPIO1_IRQ_1 is directed by crossbar 24 to MPU_IRQ 141. Is this correct?

    I tried setting interruptRegParam.corepacConfig.intVecNum to 141 but got the same result.

    If I skip 141 in the kernel dts am572x-idk-jailhouse.dtsi, GPIO1_IRQ_1 is set to MPU_IRQ 144 instead.

    Should I skip any specific irq number in the dts?

    With regard to inmate cell configuration, what irq number in irqchips needs to be passed to the inamte to make gpio1_3 interrupt trigger the RTOS inmate instead of the Linux?

    Thanks a lot,

    Nir.

  • Nir,

    Nir Geller said:

    When GPIO_enableInt() is invoked to enable the interrupt of gpio1_3 I get a nasty error message on the Linux side:

    [ 111.304105] irq 0, desc: d4803700, depth: 1, count: 0, unhandled: 0
    [ 111.304107] ->handle_irq(): c01807f8,
    [ 111.304118] handle_bad_irq+0x0/0x2a4
    [ 111.304120] ->irq_data.chip(): c0d1aae4,
    [ 111.304127] no_irq_chip+0x0/0x88
    [ 111.304130] ->action(): (null)
    [ 111.304133] IRQ_NOPROBE set
    [ 111.304135] IRQ_NOREQUEST set
    [ 111.304138] unexpected IRQ trap at vector 00

    First of all, please ensure you have disabled gpio1 in your Linux device tree, similar to gpio2, gpio3, or gpio5 am572x-idk-jailhouse.dtsi.

  • After disabling gpio1 in the dts the kernel doesn't dump the error message.

    But the ISR is still not invoked and I didn't get answers to any of my questions.

    Where is the number 61 coming from?

    What is the meaning of intVecNum? is it the MPU_IRQ index?

    Should I skip any specific irq number in the dts?

    With regard to inmate cell configuration, what irq number in irqchips needs to be passed to the inamte to make gpio1_3 interrupt trigger the RTOS inmate instead of the Linux?

    Thanks a lot,

    Nir.

  • Nir,

    Nir Geller said:

    After disabling gpio1 in the dts the kernel doesn't dump the error message.

    But the ISR is still not invoked and I didn't get answers to any of my questions.

    Please let's solve problems one by one. If a forum post has too much information, it either leads to the wrong direction of the debug, or readers got confused.

    For your rest of RTOS related questions, I will direct them to other software expert to help.

  • Nir,

    The number 61 is the GIC ID Number, see TRM Table 17-2. MPU_INTC Default Interrupt Mapping, MPU_IRQ_29 (ID61), and the footprint - This column shows the association between the Shared Peripheral Interrupts (MPU_IRQ_0 – MPU_IRQ_159) and the GIC inputs (ID32 – ID191).

    There is an offset 32 between MPU_IRQ and GIC input. 

    The below line in the dump_mpu_crossbar.txt indicates the GPIO1 interrupt (input number 24) is routed by cross bar configuration register at 0x4A002B52, i.e. CTRL_CORE_MPU_IRQ_140_141[24:16], to MPU_IRQ_141 (ID173).

    >> 141   | 0x4A002B52 |  24 | GPIO1_IRQ_1                        | GPIO1         | GPIO1 interrupt 1   

    then intVecNum should be set to 173.

    Regards,

    Garrett

  • Hi Garrett,

    After disabling GPIO1 and skipping irq 29 in am572x-idk-jailhouse.dtsi the crossbar is configured as follows

    29   | 0x4A002A76 |  24 | GPIO1_IRQ_1                        | GPIO1         | GPIO1 interrupt 1   

    I added irq 29 to the inmate cell configuration and now I'm getting GPIO1 interrupt in the RTOS side.

    Thanks for your help,

    Nir.