asm(" MCR p15, 0, r0, c7, c5, 0");
I am able to compile successfully. However, when I try to execute the code, I get an "Illegal Instruction" output.
Does this mean that the kernel I am using is not supporting the MCR instruction? If yes, what should be the selection in menuconfig?
Thanks in advance,
Krishna
This means this instruction is privileged and can only be run by the kernel.
This behaviour is documented here:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344b/Babhejba.html
ARM Linux kernel has a syscall to flush caches. I don't know how to
invoke it, but google should be your friend :-) Look for arm and
cacheflush.
Laurent
You can use the DIE_ID-register which will be unique for each OMAP-chip:
CONTROL.CONTROL_DIE_ID[127:0] 0x4830A218
The register is build internally at TI during production, and contains
unique info for each device... Unfortunately I haven't found the format
officially available to TI externals, which is the reason I don't disclose
more information here - But trust me it's unique... :-)
The officially released info can be found at page 195 in the TRM :-)
Best regards - Good luck
Søren
PS: What do you mean with "secure" on a GP device?
The DIE_IUD is fused into the chip, and can't be changed - Is this what you
meant?
Have you been successful in reading this register?
My experience is that this register cannot be accessed unless you are
running in secure mode.
If you have found a way, please share!
Steve
This register as well? In given case, I find it strange - Normally the
DIE_ID is fine accessible in a GP-device, but to be honest I haven't checked
it on the OMAP3530 - At least not for a while - I can't remember if ever? I
however checked it on an OMAPv1035 GP-device not that long ago - Here it's
working. :-)
I will give it at try ASAP - Probably sometime tonight EU time?
Søren
I just gave it a quick try in u-boot with the md (memory display) command,
which worked fine...
- At least the board didn't crash and AFAIR the value looks OK as well.
OMAP3 beagleboard.org # md 0x4830a218 1
4830a218: 0a018019 ....
OMAP3 beagleboard.org #
Best regards
Søren
Grégoire