Hi Akshay,
Just to be sure: does CFG_TEE_LOAD_ADDR corresponds to the real address where u-boot loads optee image?
CFG_TEE_LOAD_ADDR corresponds to the relocated address (real entry point) of optee.
//Build details:
Hm, looks fine.
Also, I'm bothered by thread id (0x5f5ed35e in your case). It should be 0x0.
The weird thing is looking back at the console logs and looks like I have been getting different thread ids between reboots/builds!
Ah, I'm sorry. Thread local storage is being initialized later, so it is okay to see strange thread id's on early stages of boot.
Okay, so looks like there are some problem with MMU or MMU tables. You can define define DEBUG_XLAT_TABLE 1 on core_mmu_v7.c to take a look at the tables. They should be OK. But just to be sure... And one more question: are you sure that u-boot boots in Secure PL1 mode? Can you dump contents of SCR just to be sure?