Hi,
My customer is evaluating 66AK2H06 on their board.
When using CCS, the most of initialization is done by GEL files.
The gel file is attached.xtcievmk2x_arm.txt
Customer is now trying to test without CCS and put most of initialization sequences done by GEL to their code.
There is one function enterNonSecureMode() in GEL file. It works fine when CCS is connected.
When they put the similar sequence below in their code, the program run away somewhere.
CSL_a15DisableMmu(); CSL_a15DisableInstrCache(); CSL_a15DisableDataCache(); /* Set bit 10 and 11 in NSACR to allow NS access to cp10 and cp11 */ asm("MRC p15, 0, r0, c1, c1, 2\n"); asm("ORR r0, r0, #0x00000C00\n"); asm("MCR p15, 0, r0, c1, c1, 2\n"); /* Set bit 0 in SCR for NS mode */ asm("MRC p15, 0, r0, c1, c1, 0\n"); asm("ORR r0, r0, #0x1\n"); asm("MCR p15, 0, r0, c1, c1, 0\n"); // "Enabling EnableNeon" asm("MRC p15, #0, r1, c1, c0, #2\n"); asm("ORR r1, r1, #(0xf << 20)\n"); asm("MCR p15, #0, r1, c1, c0, #2\n"); asm("MOV r1, #0\n"); // "Enabling SMP bit in ACTLR" asm("MRC p15, #0, r1, c1, c0, #1\n"); asm("ORR r1, r1, #(0x1 << 6)\n"); asm("MCR p15, #0, r1, c1, c0, #1\n"); // Ensure MMU and Caches are disabled after changing security mode CSL_a15DisableMmu(); CSL_a15DisableInstrCache(); CSL_a15DisableDataCache();
Q1) What is the purpose of the enterNonSecureMode() ?
Q2) Is the same sequence needed in customer code?
Q3) What wrong with the customer code sequence?
Thanks and regards,
Koichiro Tashiro