mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 09:43:14 +01:00
Modifications towards full ipc
- Added a full ipc send/recv test - Removed non-zero value checking in r2 for ipc that was there to catch inadvertent full ipc calls. - Added correct hanlding for read/write mrs for current status of utcb. TODO: - Add mapping of every utcb to every task for privileged access so that the kernel can access every utcb without switching spaces. - Removal of same mappings - Upon thread creation need to copy page tables accordingly i.e. each task will have its own utcb mapped with USER access, but every other utcb as kernel access only. Need to handle this case upon page table copying.
This commit is contained in:
@@ -24,6 +24,19 @@
|
||||
#include <test.h>
|
||||
#include <boot.h>
|
||||
|
||||
|
||||
|
||||
int ipc_test_full_sync(void)
|
||||
{
|
||||
for (int i = 0; i < MR_TOTAL + MR_REST; i++) {
|
||||
printf("%s/%s: MR%d: %d\n", __TASKNAME__, __FUNCTION__,
|
||||
i, read_mr(i));
|
||||
/* Reset it to 0 */
|
||||
write_mr(i, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void handle_requests(void)
|
||||
{
|
||||
/* Generic ipc data */
|
||||
@@ -54,6 +67,9 @@ void handle_requests(void)
|
||||
mr[i] = read_mr(MR_UNUSED_START + i);
|
||||
|
||||
switch(tag) {
|
||||
case L4_IPC_TAG_SYNC_FULL:
|
||||
ret = ipc_test_full_sync();
|
||||
break;
|
||||
case L4_IPC_TAG_SYNC:
|
||||
mm0_test_global_vm_integrity();
|
||||
// printf("%s: Synced with waiting thread.\n", __TASKNAME__);
|
||||
|
||||
Reference in New Issue
Block a user