Orbstheorem
Member
- Joined
- May 24, 2016
- Messages
- 47
This is a sumary of the research I've been doing on this subject. This reflects to my best will what I think can be done according to the documentation I've found.
First at all, the Cortex M4 cores might be clocked around
Second, I found the OMAP543x Technical Reference Manual
This document explains the internal architecture of the OMAP5.
The bad news is that starting up a coprocessor seems way more complicated that I though. (Check the linked document to see a little bit about it).
The good news is that I might have some clues though, so basically the plan boils down to this:
1) Proof of Concept of M4s booting and running: Dummy blinky led, using (internal) timer interrupt.
2) Try something based on this to load the kernel.
3) Getting an embedded cortex m4 linux image stable (at least not to panic).
4) Get a remote shell (like having uart on a devel board) to the linux system running on the M4s...
5) Setup some sort of tmpfs so we can "share" files with the other system
6) Buy some pizza to celebrate userland on Cortex M4
What to do next?
According to the Technical Reference Manual (p1418), the cortex M4's MMU can be configured from the A15s and can be allowed access to system memories and peripherals.
The main ideas:
- Assign the USB Port of the modem to the M4's address space so it can use the device.
- Basically use the M4s as a baseband processor:
- - Control the state of the modem
- - Wake up the main system (via an interrupt) in case of a network event (ie. a call or an SMS).
- - Export the internet connection via networking (? ideas here please)
Personally my main target would be being able to shutdown (ie. suspend to ram) the A15s and keep myself connected to the network so I can receive network events.
Challenges:
Stage I: Booting the M4s:
This is (by far) most tricky part.
Hints:
- Locate the ram segments assigned to the boot of these cores.
- Write and Compile a simple test program that pokes the interrupts of the system to have some feedback from the M4 cores. (Basic embedded programming...).
- Lock these segments from kernel space (so they can't be swapped off. This shouldn't be that hard). Flash an executable into this space (trivial aswell...).
- Find all the reset signals to be tweaked so the M4s will exit from reset state.
- Setup some sort of "fake" uart to communicate with the M4 cores.
Stage II: Running Linux on the M4s:
- Cross Compiling a Cortex M4 version of the Linux Kernel. (Not necessarly the one I linked abode).
- Enable the MMU as soon as possible.
- Setup some sort of "fake" uart to communicate with the M4 cores.
- Setup some tmpfs for making a rootfs for init (/sbin/init) and busybox.
Stage III: Connecting both kernels:
- Setup some sort of "shared" tmpfs so we can easily upload binaries and files into the M4 system.
- Setup interrupts so the M4s can wake up the A15s.
Stage IV: Setup USB (MMAP?) on the M4 kernel:
- Take the USB Peripheral from usb_core subsystem and reset it.
- (MMAP?) link the USB Port to the M4 kernel.
Stage V: Setup networking:
- Setup some sort of TAP interface on both sides.
- Setup the modem software (the driver should be included on the linux kernel...).
Let me know what you think about this project. All opinions welcome.
Personally I've done some kernel driver development and Embedded (both linux and RTOS) Systems development. But I'm still somewhat concerned about all this, I'd rather discuss this with you so we can maybe figure a better plan.
Thanks for reading
Best Regards
@EvilDragon can you please show this to Nikolaus and tell us what he thinks?
--- Update 29.05.16 ---
I won't be working anymore on this project until I get my pyra for two reasons:
- I found enough information to say this is feasible an requires mostly experimentation, I'll leave bellow the clues I've found so me or anyone interested can retake this later.
- The following weeks I'll be on exams and I should focus (I'm a student, sorry ).
Related:
http://processors.wiki.ti.com/index.php/Early_Boot_and_Late_Attach
https://git.ti.com/ipc
https://github.com/goldelico/gta04-kernel/tree/work/hns/pyrav5/drivers/remoteproc
Last edited: