mirror of
https://github.com/drasko/codezero.git
synced 2026-01-27 02:03:14 +01:00
Fixed various errors with ipc message passing.
Previously we had changed the method of setting the ipc tag from l4_ipc() call argument to being passed as a message register. - This change was not reflected in l4_ipc() signature as it still had a 3rd argument, even though ignored. - l4_set_sender and _set_tag had their arguments wrong way around. - Previously 5 mrs were passed onto utcb instead of 6, relying on the fact that l4_ipc tag argument was being passed in r3 directly, this wasnt true anymore with new convention, but wasn't catered for. TODO: - MM0 shouldn't really allocate tids itself, but use ones supplied by C0. - Sender tid shouldn't really passed by the sender task, but rather by C0. Otherwise security can be easily breached by user tasks pretending to be other tasks. This would also save us a message register.
This commit is contained in:
@@ -43,12 +43,12 @@ END_PROC(l4_kread)
|
||||
|
||||
/*
|
||||
* Inter-process communication. Loads message registers as arguments before the call,
|
||||
* and stores them as results after the call. @r0 = to, @r1 = from, @r2 = tag.
|
||||
* and stores them as results after the call. @r0 = to, @r1 = from.
|
||||
*/
|
||||
BEGIN_PROC(l4_ipc)
|
||||
stmfd sp!, {r4-r8,lr} @ Save context.
|
||||
utcb_address r12 @ Get utcb address.
|
||||
ldmib r12!, {r3-r8} @ Load 5 Message registers from utcb. MR1-MR5
|
||||
ldmia r12!, {r3-r8} @ Load 6 Message registers from utcb. MR1-MR5
|
||||
ldr r12, =__l4_ipc
|
||||
mov lr, pc
|
||||
ldr pc, [r12]
|
||||
|
||||
Reference in New Issue
Block a user