SPRACX6 June   2021 DRA821U , DRA821U , DRA829J , DRA829J , DRA829V , DRA829V , TDA4VM , TDA4VM , TDA4VM-Q1 , TDA4VM-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2Firewall Documentation
    1. 2.1 Technical Reference Manual (TRM)
    2. 2.2 SDK TISCI Documentation
    3. 2.3 SDK Firewall Documentation
    4. 2.4 TI NDA Firewall Slide Sets
  4. 3Firewall Definitions and Terms
  5. 4SysConfig Tool
  6. 5Master Firewall versus Slave Firewall
    1. 5.1 Slave Firewalls
    2. 5.2 Master Firewalls
    3. 5.3 A72 Master Firewall
  7. 6Where to Firewall
    1. 6.1 Example
  8. 7Programming Firewalls
    1. 7.1 Sample SBL Code
      1. 7.1.1 Create a Table
      2. 7.1.2 Parse the Table of Firewall Regions
      3. 7.1.3 Utility Functions
      4. 7.1.4 Processor SDK 7.1 SBL Example

Utility Functions

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;
}