diff options
author | AlmuHS <almuhs@github.com> | 2019-04-30 00:53:18 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-04-30 00:53:18 +0200 |
commit | fc65d68bd1a0ff723eac65ab821d8c7812ba3cf4 (patch) | |
tree | 1d24d2195315ce3f6294bb1f987b5a697ded8540 | |
parent | bd91c0d233f81bec878bf91bba2d68a6f6f34fbd (diff) |
add memory reserve to cpu stack
-rw-r--r-- | i386/i386/mp_desc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index eaa7ad91..f3dea0c4 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -543,14 +543,15 @@ start_other_cpus(void) { if (cpu != cpu_number()) { - if (!init_alloc_aligned(STACK_SIZE*(ncpu-1), &stack_start)) + /* if (!init_alloc_aligned(STACK_SIZE*(ncpu-1), &stack_start)) panic("not enough memory for cpu stacks"); - stack_start = phystokv(stack_start); + stack_start = phystokv(stack_start);*/ //Initialize cpu stack /*TODO: Put stacks in an array */ //*stack_ptr = (void*) kalloc(STACK_SIZE); - cpu_stack[cpu] = stack_start; + //cpu_stack[cpu] = stack_start; + cpu_stack[cpu] = (void*) kalloc(STACK_SIZE); _cpu_stack_top[cpu] = stack_start + STACK_SIZE; stack_ptr = cpu_stack[cpu]; |