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.

TDA4VM: Inconsistency with ti_sci firewall configuration

Part Number: TDA4VM


Tool/software:

Hi TI-Team,

I try to understand how the firewalls on TDA4 are working and try to configure PCIE2_HP slave module firewall according to the TISCI documentation.

However, during my experiments, some inconsistency happened after writing a configuration and reading it again:

This is my test code:

    uint16_t fwID = 2532;
    uint16_t fwRegion = 0;
    uint32_t fwDisableAll = 0xFFFF;

    // Enable firewall for PCIE2_DAT0
    {
        tisci_msg_fwl_set_firewall_region_req reqSetFwlCtrl;
        memset(&reqSetFwlCtrl, 0, sizeof(tisci_msg_fwl_set_firewall_region_req));
        reqSetFwlCtrl.fwl_id = fwID;
        reqSetFwlCtrl.region = fwRegion;
        reqSetFwlCtrl.start_address = 0x4400000000;
        reqSetFwlCtrl.end_address = 0x4407ffffff;
        reqSetFwlCtrl.control = 0xA;
        reqSetFwlCtrl.n_permission_regs = 3;
        reqSetFwlCtrl.permissions[0] = fwDisableAll;
        reqSetFwlCtrl.permissions[1] = fwDisableAll;
        reqSetFwlCtrl.permissions[2] = fwDisableAll;

        tisci_msg_fwl_set_firewall_region_resp respSetFwlCtrl;
        memset(&respSetFwlCtrl, 0, sizeof(respSetFwlCtrl));

        int32_t retVal = CSL_PASS;
        retVal = Sciclient_firewallSetRegion(&reqSetFwlCtrl, &respSetFwlCtrl, SCICLIENT_SERVICE_WAIT_FOREVER);
        if (retVal != CSL_PASS)
        {
            logger.Log("Firewall region # %d of region ID %d getInfo...FAILED \n", reqSetFwlCtrl.fwl_id, reqSetFwlCtrl.region);
        }
        else
        {
            logger.Log("Firewall # %d reg idx %d has been configured\n",
                       reqSetFwlCtrl.fwl_id,
                       reqSetFwlCtrl.region);
        }

    }

    for (int i = 0; i < 24; i++)
    {
        tisci_msg_fwl_get_firewall_region_req reqGetFwlCtrl;
        memset(&reqGetFwlCtrl, 0, sizeof(tisci_msg_fwl_get_firewall_region_req));
        reqGetFwlCtrl.fwl_id = fwID;
        reqGetFwlCtrl.region = fwRegion + i;

        tisci_msg_fwl_get_firewall_region_resp respGetFwlCtrl;
        memset(&respGetFwlCtrl, 0, sizeof(respGetFwlCtrl));

        int32_t retVal = CSL_PASS;
        retVal = Sciclient_firewallGetRegion(&reqGetFwlCtrl, &respGetFwlCtrl, SCICLIENT_SERVICE_WAIT_FOREVER);
        if (retVal != CSL_PASS)
        {
            logger.Log("Firewall region # %d of region ID %d getInfo...FAILED \n", reqGetFwlCtrl.fwl_id, reqGetFwlCtrl.region);
        }
        else
        {
            logger.Log("Firewall # %d reg idx %d control 0x%lx start 0x%llx end 0x%llx\n",
                       reqGetFwlCtrl.fwl_id,
                       reqGetFwlCtrl.region,
                       respGetFwlCtrl.control,
                       respGetFwlCtrl.start_address,
                       respGetFwlCtrl.end_address);

        }
    }

This the output:

][MCU2_0][DEBUG][Firewall # 2532 reg idx 0 has been configured
][MCU2_0][DEBUG][Firewall # 2532 reg idx 0 control 0xa start 0x4404400000000 end 0x4404407ffffff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 1 control 0x0 start 0x4404200000000 end 0x44042ffffffff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 2 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 3 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 4 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 5 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 6 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 7 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 8 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 9 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 10 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 11 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 12 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 13 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 14 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 15 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 16 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 17 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 18 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 19 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 20 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 21 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 22 control 0x0 start 0x4400000000000 end 0x4400000000fff
][MCU2_0][DEBUG][Firewall # 2532 reg idx 23 control 0x0 start 0x4400000000000 end 0x4400000000fff

I'm wondering, why Sciclient_firewallGetRegion reads start address "0x4404400000000", after I set the start address via Sciclient_firewallSetRegion to "0x4400000000".


I checked with CCS Memory Browser the actual values after SciClient_firewallSetRegion. The content looks according to my configuration which I gave firewallSetRegion function.

Am I doing something wrong here? Is there a bug in Sciclient software?

We are using RTOS PSDK_v09_01_00_06

Best Regards,
Thomas