SPRACX6 June 2021 DRA821U , DRA821U , DRA821U-Q1 , DRA821U-Q1 , DRA829J , DRA829J , DRA829J-Q1 , DRA829J-Q1 , DRA829V , DRA829V , DRA829V-Q1 , DRA829V-Q1 , TDA4VM , TDA4VM , TDA4VM-Q1 , TDA4VM-Q1
New code is not always successful on the first try. Below utility functions can dump out the requests being sent via SCI, allowing for some readable output on the console port.
void J721E_dump_owner_req(struct tisci_msg_fwl_change_owner_info_req *req)
{
uint32_t i = 0;
SBL_log(SBL_LOG_ERR,"\n");
SBL_log(SBL_LOG_ERR,"Ownership Request:\n");
SBL_log(SBL_LOG_ERR,"req.fwl_id = 0x%x\n",req->fwl_id);
SBL_log(SBL_LOG_ERR,"req.owner_index = 0x%x\n",req->owner_index);
SBL_log(SBL_LOG_ERR,"req.region = 0x%x\n",req->region);
uint8_t *bPtr = (uint8_t *) req;
for (i = 0; (i < sizeof(struct tisci_msg_fwl_change_owner_info_req)); i++)
{
SBL_log(SBL_LOG_ERR,"%02x ", bPtr[i]);
}
SBL_log(SBL_LOG_ERR,"\n");
return;
}
void J721E_dump_region_req(struct tisci_msg_fwl_set_firewall_region_req *req)
{
uint32_t i = 0;
uint32_t *startAddr;
uint32_t *endAddr;
startAddr = (uint32_t *) &req->start_address;
endAddr = (uint32_t *) &req->end_address;
SBL_log(SBL_LOG_ERR,"\n");
SBL_log(SBL_LOG_ERR,"Region Set Request:\n");
SBL_log(SBL_LOG_ERR,"req.fwl_id = %d\n", req->fwl_id);
SBL_log(SBL_LOG_ERR,"req.region = %d\n", req->region);
SBL_log(SBL_LOG_ERR,"req.control = 0x%x\n", req->control);
SBL_log(SBL_LOG_ERR,"req.start_address = 0x%x%x\n", startAddr[1], startAddr[0]);
SBL_log(SBL_LOG_ERR,"req.end_address = 0x%x%x\n", endAddr[1], endAddr[0]);
SBL_log(SBL_LOG_ERR,"req.n_permission_regs = 0x%x\n", req->n_permission_regs);
for(i = 0; i < req->n_permission_regs; i++)
{
SBL_log(SBL_LOG_ERR, "req.permissions[%d] = 0x%x\n", i, req->permissions[0]);
}
SBL_log(SBL_LOG_ERR, "\n");
return;
}