This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Executing C code in HYP mode

Hello everyone.

I'mcurrently  working with CCSv6.1 and the OMAP_5432_UEVM

I'm trying to execute the following C code :

void init_distr(){

	uint32 i = 0;
	uint32 addr = 0x0;

	// get max number of interrupt
	addr = GICD + GICD_TYPER; //0x48211004
	uint32 max_interrupt = *((uint32*)addr);

The idea is very simple: I want to read the value at 0x48211004 in order to initialize the GIC & the VGIC according to the hypervisor XEN configuration.

When the code is executing in HYP mode, the application returns a Prefetch Abort, while in SPV mode it works just fine.
I investigated a little and found that in HYP mode, the variable addr was allocated in 0x3Exxxxxx which according to the documentation of the OMAP, is reserved.

I'm using GNU compiler (Linaro 4.8.4) and cannot really switch to TI for porting purposes.

I am available for any questions, informations.

Best regards,