diff --git a/kernel/host.c b/kernel/host.c index 29a6e64b..cc595b3a 100644 --- a/kernel/host.c +++ b/kernel/host.c @@ -191,38 +191,10 @@ int prepare_process_ranges_args_envs(struct process *proc, proc->vm->region.data_end; #endif - /* Map system call stuffs */ - flags = VR_RESERVED | VR_PROT_READ | VR_PROT_WRITE; - flags |= VRFLAG_PROT_TO_MAXPROT(flags); - addr = proc->vm->region.map_start - PAGE_SIZE * SCD_RESERVED_COUNT; - e = addr + PAGE_SIZE * DOORBELL_PAGE_COUNT; - if(add_process_memory_range(proc, addr, e, - cpu_local_var(scp).doorbell_pa, - VR_REMOTE | flags, NULL, 0) != 0){ - kprintf("ERROR: adding memory range for syscalls dorbell\n"); - goto err; - } - addr = e; - e = addr + PAGE_SIZE * REQUEST_PAGE_COUNT; - if(add_process_memory_range(proc, addr, e, - cpu_local_var(scp).request_pa, - VR_REMOTE | flags, NULL, 0) != 0){ - kprintf("ERROR: adding memory range for syscalls request pa\n"); - goto err; - } - addr = e; - e = addr + PAGE_SIZE * RESPONSE_PAGE_COUNT; - if(add_process_memory_range(proc, addr, e, - cpu_local_var(scp).response_pa, - flags, NULL, 0) != 0){ - kprintf("ERROR: adding memory range for syscalls response pa\n"); - goto err; - } - /* Map, copy and update args and envs */ flags = VR_PROT_READ | VR_PROT_WRITE; flags |= VRFLAG_PROT_TO_MAXPROT(flags); - addr = e; + addr = proc->vm->region.map_start - PAGE_SIZE * SCD_RESERVED_COUNT; e = addr + PAGE_SIZE * ARGENV_PAGE_COUNT; if((args_envs = ihk_mc_alloc_pages(ARGENV_PAGE_COUNT, IHK_MC_AP_NOWAIT)) == NULL){ diff --git a/kernel/include/syscall.h b/kernel/include/syscall.h index 284930aa..543ef47b 100644 --- a/kernel/include/syscall.h +++ b/kernel/include/syscall.h @@ -22,8 +22,7 @@ #define RESPONSE_PAGE_COUNT 16 #define DOORBELL_PAGE_COUNT 1 #define ARGENV_PAGE_COUNT 8 -#define SCD_RESERVED_COUNT \ - (REQUEST_PAGE_COUNT + RESPONSE_PAGE_COUNT + DOORBELL_PAGE_COUNT + ARGENV_PAGE_COUNT) +#define SCD_RESERVED_COUNT ARGENV_PAGE_COUNT #define SCD_MSG_PREPARE_PROCESS 0x1 #define SCD_MSG_PREPARE_PROCESS_ACKED 0x2