diff --git a/arch/x86_64/acpi/smp.cpp b/arch/x86_64/acpi/smp.cpp index b753238..bb90f96 100644 --- a/arch/x86_64/acpi/smp.cpp +++ b/arch/x86_64/acpi/smp.cpp @@ -29,6 +29,7 @@ extern "C" void ap_trampoline_exit(void) this_cpu->c_cpu_id = cpu_id; struct cpu_data *self = get_this_cpu(); + memset(self, 0x0, sizeof *self); self->c_flags = CPU_ONLINE; self->c_id = cpu_id; this_cpu->c_data = self; diff --git a/arch/x86_64/init.c b/arch/x86_64/init.c index e9b445c..6d15ce8 100644 --- a/arch/x86_64/init.c +++ b/arch/x86_64/init.c @@ -63,6 +63,8 @@ int ml_init(uintptr_t arg) init_per_cpu_areas(); struct cpu_data *this_cpu = get_this_cpu(); + memset(this_cpu, 0x0, sizeof *this_cpu); + this_cpu->c_flags = CPU_ONLINE; this_cpu->c_id = this_cpu(); g_bootstrap_cpu.c_data = this_cpu;