TrustZone in Hikey board


I bought a Hikey board recently(CPU-Hi6220V;SoC-Kirin 620) and was ready to test its TrustZone feature. I find one doc in this official repo.

Unfortunately, there is no detailed description on how to use TrustZone feature in the doc <i>Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf</i>. For example, in chapter 1.3.2, it says “Each interrupt source can be set to secure interrupt source or non-secure interrupt source.” But it doesn’t tell me how to do it, e.g. which bit in what register should be set. This seems to be the only documentation available so far.

Does anyone know some other docs about how to use TrustZone in Hikey? Any help would be appreciated.
Thanks in advance.


It’s not as easy as writing a bit to a register. You’ve to understand the architecture and know how you want to design your system. E.g. for interrupts the recommended routing model is IRQ as a Normal world interrupt source, and FIQ as the Secure world source (ref

There doesn’t seem to be a list for all Trustzone related registers as they seem to be ‘spreaded’ out all over different places. There’s sample code here ( > for how to develop a TEE and monitor code. You can see the different kinds of registers written to. and also talk about how ARM-TF is designed and related register settings.

Some other useful reference might be:
ARMv8-A Reference Manual

Cortex-A Series Programmer’s Guide for ARMv8-A