Trustzone. Boot in secure mode? non-secure mode? - Raspberry Pi Forums
hello. using pi2 , writing basic baremetal code prints out ns bit of scr register. used line read scr:
asm volatile("mrc p15, 0, %0, c1, c1, 0" : "=r" (val));
cpu seems hang. tried these 2 cases:
1) boot u-boot first, load baremetal @ somewhere , go address.
2) set kernel_old=1 in config.txt, kernel=baremetal_image, loaded @ 0x0.
thought might due secure/non-secure mode. so, searched if pi2 boots in secure mode or not, found that
- (viewtopic.php?p=697291#p697291) says boots in non-secure mode ,
- (http://infocenter.arm.com/help/index.js ... echfc.html) says boots in secure mode.
wondering 1 correct. mode change depending on booting method (using u-boot or not, loading @ 0x0 or not, ...)?
thank you.
asm volatile("mrc p15, 0, %0, c1, c1, 0" : "=r" (val));
cpu seems hang. tried these 2 cases:
1) boot u-boot first, load baremetal @ somewhere , go address.
2) set kernel_old=1 in config.txt, kernel=baremetal_image, loaded @ 0x0.
thought might due secure/non-secure mode. so, searched if pi2 boots in secure mode or not, found that
- (viewtopic.php?p=697291#p697291) says boots in non-secure mode ,
- (http://infocenter.arm.com/help/index.js ... echfc.html) says boots in secure mode.
wondering 1 correct. mode change depending on booting method (using u-boot or not, loading @ 0x0 or not, ...)?
thank you.
i found (viewtopic.php?p=874007#p874007) saying pi2 firmware switches non-secure hyp mode. used old firmware, kernel-old=1 , disable_commandline_tags=1 options in config.txt, , loaded baremetal prints out scr. works fine (i.e. did not switch non-secure mode).
raspberrypi
Comments
Post a Comment