valid flag is added
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include <aal/cpu.h>
|
||||
#include <aal/mm.h>
|
||||
#include <aal/debug.h>
|
||||
#include <process.h>
|
||||
|
||||
int num_processors = 1;
|
||||
static volatile int ap_stop = 1;
|
||||
@ -20,8 +21,12 @@ static void ap_wait(void)
|
||||
barrier();
|
||||
cpu_pause();
|
||||
}
|
||||
kprintf("ap started.\n");
|
||||
kmalloc_init();
|
||||
sched_init();
|
||||
init_host_syscall_channel();
|
||||
|
||||
ap_idle();
|
||||
schedule();
|
||||
}
|
||||
|
||||
void ap_start(void)
|
||||
|
||||
@ -142,7 +142,7 @@ static void process_msg_init_acked(unsigned long pphys)
|
||||
|
||||
lparam->post_fin = 1;
|
||||
|
||||
kprintf("Syscall parameters:\n");
|
||||
kprintf("Syscall parameters: (%d)\n", aal_mc_get_processor_id());
|
||||
kprintf(" Response: %lx, %p\n",
|
||||
lparam->response_pa, lparam->response_va);
|
||||
kprintf(" Request : %lx, %lx, %p\n",
|
||||
|
||||
@ -114,7 +114,6 @@ static void rest_init(void)
|
||||
mc_ikc_init();
|
||||
|
||||
sched_init();
|
||||
ap_start();
|
||||
}
|
||||
|
||||
int host_ikc_inited = 0;
|
||||
@ -129,6 +128,7 @@ static void post_init(void)
|
||||
}
|
||||
|
||||
init_host_syscall_channel();
|
||||
ap_start();
|
||||
}
|
||||
|
||||
int main(void)
|
||||
|
||||
@ -221,7 +221,7 @@ void schedule(void)
|
||||
|
||||
if (switch_ctx) {
|
||||
kprintf("schedule: %p (%p) => %p (%p) \n", prev,
|
||||
prev->page_table, next, next->page_table);
|
||||
prev ? prev->page_table : NULL, next, next->page_table);
|
||||
aal_mc_load_page_table(next->page_table);
|
||||
|
||||
if (prev) {
|
||||
|
||||
@ -21,6 +21,10 @@ static void send_syscall(struct syscall_request *req)
|
||||
|
||||
res->status = 0;
|
||||
|
||||
kprintf("CPU : %lx\n", aal_mc_get_processor_id());
|
||||
kprintf("Target is %lx\n", cpu_local_var(scp).request_pa);
|
||||
kprintf("SC req: %ld %ld %ld\n", req->valid, req->number, req->args[0]);
|
||||
|
||||
memcpy_async(cpu_local_var(scp).request_pa,
|
||||
virt_to_phys(req), sizeof(*req), 0, &fin);
|
||||
|
||||
@ -249,7 +253,7 @@ long sys_uname(int n, aal_mc_user_context_t *ctx)
|
||||
request.number = n;
|
||||
request.args[0] = phys;
|
||||
|
||||
return do_syscall(&request);
|
||||
return do_syscall(&request), stop();
|
||||
}
|
||||
|
||||
long sys_getxid(int n, aal_mc_user_context_t *ctx)
|
||||
@ -311,6 +315,14 @@ long syscall(int num, aal_mc_user_context_t *ctx)
|
||||
|
||||
cpu_enable_interrupt();
|
||||
|
||||
kprintf("SC(%d)[%3d](%lx, %lx, %lx, %lx, %lx) @ %lx | %lx\n",
|
||||
aal_mc_get_processor_id(),
|
||||
num,
|
||||
aal_mc_syscall_arg0(ctx), aal_mc_syscall_arg1(ctx),
|
||||
aal_mc_syscall_arg2(ctx), aal_mc_syscall_arg3(ctx),
|
||||
aal_mc_syscall_arg4(ctx), aal_mc_syscall_pc(ctx),
|
||||
aal_mc_syscall_sp(ctx));
|
||||
|
||||
if (syscall_table[num]) {
|
||||
l = syscall_table[num](num, ctx);
|
||||
return l;
|
||||
|
||||
@ -166,6 +166,11 @@ int mcexec_wait_syscall(aal_os_t os, struct syscall_wait_desc *__user req)
|
||||
}
|
||||
}
|
||||
*c->param.doorbell_va = 0;
|
||||
printk("(%p) %ld SC %ld: %lx\n",
|
||||
c->param.request_va,
|
||||
c->param.request_va->valid,
|
||||
c->param.request_va->number,
|
||||
c->param.request_va->args[0]);
|
||||
if (__do_in_kernel_syscall(os, c, c->param.request_va)) {
|
||||
#endif
|
||||
if (copy_to_user(&req->sr, c->param.request_va,
|
||||
|
||||
Reference in New Issue
Block a user