assembly - Trust Zone on Raspberry Pi unexpected behaviour? -
i working on trust zone extension on raspberry pi b+ has arm1176jzf-s processor. according given documentation on arm11, there 3 exception vector tables each secure world, non-secure(ns) world , monitor mode resp. , c12 register hold base of operations address of both secure , ns world exception vector table base of operations addresses.
i added both these addresses c12 register in corresponding worlds(secure / ns). tried swi (svc) in both worlds. found working fine in secure world in ns world command goes ns reset handler swi instead of swi handler. used next commands :
for secure world : ldr r0, =_start //_start - base of operations address of secure vector table mcr p15, 0, r0, c12, c0, 0 non-secure world : ldr r0, =_ns_start //ns_start - base of operations address of non-secure vector table mcr p15, 0, r0, c12, c0, 0
here code : https://github.com/avk7vk/arm_bare_metal/tree/master/trustzone-smc
please allow me know issue here .
the vector base of operations address register (vbar) has bottom 5 bits defined "res0", meaning ignored , treated zero. result, vector table must 32-byte aligned. achieved with:
.align 5 _ns_start: ldr pc, ns_reset ...
assembly arm raspberry-pi trust-zone
No comments:
Post a Comment