This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2674R10:CCFG TrustZone 边界配置

Guru**** 2386620 points
Other Parts Discussed in Thread: SYSCONFIG
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1270563/cc2674r10-ccfg-trustzone-boundary-configuration

器件型号:CC2674R10
主题中讨论的其他器件:SysConfig

您好!

有人能帮助我更好地了解如何 SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY为不使用 TrustZone 的项目配置 CCFG 中的参数吗?

 source/ti/devices/cc13x4_cc26x4/startup_files/ccfg.c 中的默认值 为 0x0 和评论似乎表明 仅保护前8KB 闪存

#ifndef SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x0        // Min value; set all except the lowest 8KB of flash as nonsecure
//#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY  0x3FF      // Max value; all flash is secure-only
#endif

因此、我很惊讶地看到 SysConfig 的默认值  0x1 。 CC26XX 的 SysConfig 模板(source/ti/devices/.meta/templates/ti_devices_CC26XX_config.c.xdt) 指出0x0是一个"特殊"值、 使得整个闪存仅受安全保护、

% if(!(system.modules["/ti/utils/TrustZone"])) {
// Set all of flash to non-secure, except the lowest 8 KB
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x1
% } else if(inst.markAllFlashSecure) {
// Set all of flash to secure-only access, using the special value of 0
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x0
% }

鉴于这种困惑、我的问题是:

  • 设置 SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY为0是否会保护整个闪存、还是仅保护前8KB?
  • 是否可以将整个闪存设置为不安全?  如果是,如何? 如果没有、为什么?
  • 我应该使用什么值来保护前16KB 闪存? (0x2?)

谢谢!
彼得