Android NDK and ARM Cortex-A8 embedded Linux expertise needed
$500-1000 USD
In Progress
Posted about 13 years ago
$500-1000 USD
Paid on delivery
My team has built an Android kernel module to implement a cache-lockdown feature available in the ARM Cortex-A8 processor cores. ARM has provided reference source-code here to implement this capability:
[login to view URL]
See the "[login to view URL]" down at the bottom of that page; it contains the necessary source code.
Despite using a kernel module (to achieve the necessary run-time permission), and despite using ARM's provided source code, I am unable to achieve the desired functionality. Specifically, while I can read the CP15's c9 register, and then write the data sync barrier, as soon as I try to write the c9 register (even if I try writing back the exact same value I just read), the phone freezes immediately. Since the crash is immediate, I can't even set hooks or use a debugger to see why it crashed.
Am working with two Android platforms: a Qualcomm Snapdragon phone (T-Mobile G2) and a TI OMAP phone (Motorola Droid2), and both fail in the exact same way.
For this project, I would like a working example of a kernel module written that correctly implements that sample assembly code for either of the above two platforms. Ideally, the kernel module would accept three input requests: "status", "lock", and "read #". They would work like this:
1. "Status" would return the number of cache ways, the size of each of them (in kB), and the lock status (0 or 1) of each of them.
2. "Lock" would pick one of the unlocked cache ways and lock it down. It would return an integer that indicated which way was just locked down. I understand that if I repeatedly use this function, I could render the hardware non-operational as all cache ways could end up being locked down.
3. "Read #" would return the contents of cache way #N. I understand that if the cache way #N is not locked down, the data would be different every time I read it.
We will write the application which uses the kernel module, that part is straightforward enough. We just can't get this part working.
I can of course provide a snapshot of the current source we have, so you need not start at absolute zero.
Please let me know if I left you with any questions.
-Scott