diff options
author | AlmuHS <almuhs@github.com> | 2019-04-30 01:46:46 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-04-30 01:48:14 +0200 |
commit | 7e7894f595f07d0c6b621f6e42a30ba356f88ad4 (patch) | |
tree | eaafc7d78e44cc51cb080a3aa0a8825f63195186 | |
parent | c477c087e6888b148143e94fc9fde67c1c76bbde (diff) |
reenabled cpu_stack and removed useless printf
-rw-r--r-- | i386/i386/mp_desc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 6b197f6d..e7f9408e 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -348,8 +348,6 @@ cpu_setup() //slave_main(i); - printf("launched first thread of cpu %d\n", i); - //printf("cpu %d enabled\n", cpu_number()); return 0; @@ -543,15 +541,14 @@ 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] = (void*) kalloc(STACK_SIZE); + cpu_stack[cpu] = stack_start; _cpu_stack_top[cpu] = stack_start + STACK_SIZE; stack_ptr = &cpu_stack[cpu]; |