mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 11:23:16 +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:
@@ -196,6 +196,20 @@ static inline int __sys_ipc(l4id_t to, l4id_t from, unsigned int ipc_type)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void printk_sysregs(struct syscall_args *regs)
|
||||
{
|
||||
printk("System call registers for tid: %d\n", current->tid);
|
||||
printk("R0: %x\n", regs->r0);
|
||||
printk("R1: %x\n", regs->r1);
|
||||
printk("R2: %x\n", regs->r2);
|
||||
printk("R3: %x\n", regs->r3);
|
||||
printk("R4: %x\n", regs->r4);
|
||||
printk("R5: %x\n", regs->r5);
|
||||
printk("R6: %x\n", regs->r6);
|
||||
printk("R7: %x\n", regs->r7);
|
||||
printk("R8: %x\n", regs->r8);
|
||||
}
|
||||
|
||||
/*
|
||||
* sys_ipc has multiple functions. In a nutshell:
|
||||
* - Copies message registers from one thread to another.
|
||||
|
||||
Reference in New Issue
Block a user