diff options
author | AlmuHS <almuhs@github.com> | 2019-10-05 00:55:35 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-10-05 00:55:35 +0200 |
commit | a974cddce30241001bad2596ebd6edd7dd86ee6f (patch) | |
tree | 19747b8577c1003b5dedf669bd54e33c74faabc9 /i386/i386/mp_desc.c | |
parent | d9038d6af2bebe98f41936ec812dc87a36077e38 (diff) |
Revert "refactor: moved BSP's apic_id initialization to c_boot_entry"
This reverts commit b076434a3c6303d817dc839d2097bc6f308b6dea.
Diffstat (limited to 'i386/i386/mp_desc.c')
-rw-r--r-- | i386/i386/mp_desc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 10caeb19..aad81014 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -566,6 +566,9 @@ start_other_cpus(void) /*TODO: Copy the routine in a physical page */ memcpy((void*)phystokv(AP_BOOT_ADDR), (void*) &apboot, (uint32_t)&apbootend - (uint32_t)&apboot); + //update BSP machine_slot and apic2kernel + machine_slot[0].apic_id = apic_id; + apic2kernel[apic_id] = 0; //Reserve memory for cpu stack if (!init_alloc_aligned(STACK_SIZE*(ncpu-1), &stack_start)) @@ -592,7 +595,6 @@ start_other_cpus(void) } } - /* Get rid of the temporary direct mapping and flush it out of the TLB. */ for (i = 0 ; i < nb_direct_value; i++){ kernel_page_dir[lin2pdenum_cont(INIT_VM_MIN_KERNEL_ADDRESS) + i] = 0; |