AURIX™ TC3xx 调试口保护 secure debug

目录

Introduction

UCB_DBG_ORIG and UCB_DBG_COPY Content

使用Debug Password 保护调试接口设置

项目硬件接口保护方案

hexview

Lock using UDE

Unlock using UDE

Lock using Lauterbach

 Unlock using Lauterbach


Introduction

TC3xx中,Debug interface的配置在UCB_DBG_ORIG (UCB18) 中,Debug的使能与否主要由PROCONDBG寄存器决定。此UCB为调试接口配置密码保护。

 

• Gate 1

− 通过OCDS模块控制对TriCore™调试的访问。

• Gate 2

− 通过DMU模块控制对TriCore™调试的访问。

• Gates 3 and 4

− 直接由HSM控制。

− 通过这两个门,HSM可以锁定对Host CPU的调试访问权限,也可以关闭HSM自身的调试支持。

− 锁定机制由 UCB_HSM_ORIG 和 UCB_HSM_COPY控制。

UCB_DBG_ORIG and UCB_DBG_COPY Content

The UCB_DBG (ORIG and COPY) contain the user defined debug protection. It is protected with the password PW0 to PW7. The protection configuration is transferred into the register DMU_HF_PROCONDBG.

 

使用Debug Password 保护调试接口设置

 通过UCB_DBG (PROCONDBG)寄存器锁定调试接口

 设置 Bit 0 (OCDSDIS)

  1. 0 = OCDS not locked
  2. 1 = OCDS locked → Needs to be set to disable debug facilities

 设置 Bit 1 (DBGIFLCK)

  1. 0 = Debug interface not locked → In case OCDSDIS == 1: SSW* does not automatically unlock debug interface even if correct password was supplied → User has to perform “disable protection” command sequence in Host application code
  2. 1 = Debug interface locked → In case OCDSDIS == 1: SSW automatically unlocks debug interface if correct password was supplied

 设置 debug password保护

通过正确的debug password来解锁

项目硬件接口保护方案

hexview

如下图所示为位置0xAF402400的ucb_dbg_origin的hex内容。

  

Lock using UDE

UCB_DBG configuration for lock debug access with password through Memtool

 UCB_PFLASH configuration for flash read protection through Memtool

Unlock using UDE

UCB_DBG configuration for unlock debug access with password through Memtool

Lock using Lauterbach

An alternative way to set the UCB_DBG_ORIG password using the Lauterbach debugger is using a script.
The following extracted code sets the:
DMU_HF_PROCONDBG.OCDSDIS bit to 1.
DMU_HF_PROCONDBG.DBGIFLCK bit to 1 .
User defined password in the ORIG UCB.

 

The following extracted code:
Sets the DMU_HF_PROCONPF.RPRO bit to 1.
Sets the user defined password in the UCB_PFLASH_ORIG.
 

 Unlock using Lauterbach

In order to provide the debug password to unlock the debug interface, Lauterbach provides the following command:

 

  • 5
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱思考的发菜_汽车网络信息安全

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值