ZHCABB2 June 2021 DRA821U , DRA829J , DRA829V , TDA4VM , TDA4VM-Q1
新代码并不总是在第一次尝试时就能成功。下面的实用程序函数可以转储通过 SCI 发送的请求,从而在控制台端口上提供一些可读的输出。
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;
}