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.

AM625: Protecting GPIO0/1 with firewall

Part Number: AM625

I want to protect GPIO0 & 1 from the R5 (runs unsafe code) using the firewall. But looking at table 3.8.3.1 in TRM (spruiv7c), it looks as if the relevant addresses are not protectable (e.g. GPIO0 @ 0x600000 or MAIN_PADCFG_CTRL_MMR_CFG0_* registers)? Is this correct?

 

  • Hi Endre,

    It looks like some FWL IDs were missed in the Table 8-3.

    I'm following up with internal TRM team on the Table 8.3.
    In parallel, please refer to the followings on your specific questions, where PADCFG_CTRL0_CFG0/GPIO0_MEM/GPIO1_MEM are all under FWL_ID (33).

    /* Properties of firewall at slave: PADCFG_CTRL0_CFG0 */
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_ID                                                            (33U)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_TYPE                                                          (CSL_FW_SECURITY)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_MMR_BASE                                                      (0x00000045008400U)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_NUM_REGIONS                                                   (16U)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_NUM_PRIV_IDS_PER_REGION                                       (3U)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_CFG0_START                                                    (0x000000000f0000U)
    #define CSL_STD_FW_PADCFG_CTRL0_CFG0_CFG0_END                                                      (0x000000000f7fffU)
    
    
    /* Properties of firewall at slave: GPIO0_MEM */
    #define CSL_STD_FW_GPIO0_MEM_ID                                                                    (33U)
    #define CSL_STD_FW_GPIO0_MEM_TYPE                                                                  (CSL_FW_SECURITY)
    #define CSL_STD_FW_GPIO0_MEM_MMR_BASE                                                              (0x00000045008400U)
    #define CSL_STD_FW_GPIO0_MEM_NUM_REGIONS                                                           (16U)
    #define CSL_STD_FW_GPIO0_MEM_NUM_PRIV_IDS_PER_REGION                                               (3U)
    #define CSL_STD_FW_GPIO0_MEM_START                                                                 (0x00000000600000U)
    #define CSL_STD_FW_GPIO0_MEM_END                                                                   (0x000000006000ffU)
    
    
    /* Properties of firewall at slave: GPIO1_MEM */
    #define CSL_STD_FW_GPIO1_MEM_ID                                                                    (33U)
    #define CSL_STD_FW_GPIO1_MEM_TYPE                                                                  (CSL_FW_SECURITY)
    #define CSL_STD_FW_GPIO1_MEM_MMR_BASE                                                              (0x00000045008400U)
    #define CSL_STD_FW_GPIO1_MEM_NUM_REGIONS                                                           (16U)
    #define CSL_STD_FW_GPIO1_MEM_NUM_PRIV_IDS_PER_REGION                                               (3U)
    #define CSL_STD_FW_GPIO1_MEM_START                                                                 (0x00000000601000U)
    #define CSL_STD_FW_GPIO1_MEM_END                                                                   (0x000000006010ffU)
    
    

    Best,
    -Hong

  • Thanks! I struggled a bit until I realized that region 0 was already set and owned by tifs, but by using the free regions (3 and up) it works.

    Endre