Hi,
I'm running an OMAP-L138 and I'm trying to access SYSCFG-registers from the ARM.
I run a Linux on that ARM and after booting I call my program. As I understand this program runs in 'user mode' (protected mode) by default. Looking at the memory map of these SYSCFG-registers (http://www.ti.com/lit/ds/symlink/omap-l138.pdf p.74) I can see most of them only being accessable in a 'privileged mode' (unprotected mode) but some seem to be accessable from user mode, such as REVID.
From my program though I get a 'Segmentation fault' when I try to access that register:
CSL_SyscfgRegsOvly sysRegs0 = (CSL_SyscfgRegsOvly) CSL_SYSCFG_0_REGS;
printf("sysRegs0->REVID: %x\n", (sysRegs0->REVID));
Running the very same code from the DSP works. I assume the ARM needs to be in a privileged mode to access any of the SYSCFG-registers?
Anyway, how do I conviently switch to a privileged mode from user mode?
I read that this is usually done by software interrupts (SWI / SVC). I don't really know how I would implement something like this is done in assembly. Is there an example around for this?
The other option would be to run the whole application in privileged mode. In the TI-wiki I found this acticle: http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L138
There a file boot.asm is used to do this. How do I link this file?
Regards,
Mathias