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

 

  1.   摘要
  2.   商标
  3. 1引言
  4. 2防火墙文档
    1. 2.1 技术参考手册 (TRM)
    2. 2.2 SDK TISCI 文档
    3. 2.3 SDK 防火墙文档
    4. 2.4 TI NDA 防火墙幻灯片组
  5. 3防火墙定义和术语
  6. 4SysConfig 工具
  7. 5主防火墙与从防火墙
    1. 5.1 从防火墙
    2. 5.2 主防火墙
    3. 5.3 A72 主防火墙
  8. 6防火墙的位置
    1. 6.1 示例
  9. 7防火墙编程
    1. 7.1 示例 SBL 代码
      1. 7.1.1 创建表
      2. 7.1.2 解析防火墙区域表
      3. 7.1.3 实用功能
      4. 7.1.4 Processor SDK 7.1 SBL 示例

实用功能

新代码并不总是在第一次尝试时就能成功。下面的实用程序函数可以转储通过 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;
}