We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
asm("str lr,[sp, #-4]!"); asm("smc #0"); asm("mrc p15, 0, %0, c9, c1, 2" : "=r" (tcm_secure)); tcm_secure |= 1; asm("mcr p15, 0, %0, c9, c1, 2" /* set DTCM NS bit to 1 */ : : "r" (tcm_secure)); asm("movs pc, lr"); asm("ldr lr, [sp, #0]!");
It is also worth noting that the "typical" user model is that the bootstrap (running in secure) sets up the platform, assigning periphals, TCM, etc to the correct worlds, and the proceeds with the boot of the higher levels of the system.It is unusual to want to re-partition resources after this point, especially things like TCM, so can't your bootloader do this?