diff --git a/src/arch/x86_64/kernel/apic.rs b/src/arch/x86_64/kernel/apic.rs index 538a24c429..829802e686 100644 --- a/src/arch/x86_64/kernel/apic.rs +++ b/src/arch/x86_64/kernel/apic.rs @@ -82,9 +82,7 @@ const SMP_BOOT_CODE_OFFSET_ENTRY: usize = 0x08; #[cfg(feature = "smp")] const SMP_BOOT_CODE_OFFSET_CPU_ID: usize = SMP_BOOT_CODE_OFFSET_ENTRY + 0x08; #[cfg(feature = "smp")] -const SMP_BOOT_CODE_OFFSET_BOOTINFO: usize = SMP_BOOT_CODE_OFFSET_CPU_ID + 0x04; -#[cfg(feature = "smp")] -const SMP_BOOT_CODE_OFFSET_PML4: usize = SMP_BOOT_CODE_OFFSET_BOOTINFO + 0x08; +const SMP_BOOT_CODE_OFFSET_PML4: usize = SMP_BOOT_CODE_OFFSET_CPU_ID + 0x04; const X2APIC_ENABLE: u64 = 1 << 10; @@ -699,7 +697,7 @@ pub fn init_next_processor_variables() { pub fn boot_application_processors() { use core::hint; - use super::{raw_boot_info, start}; + use super::start; let smp_boot_code = include_bytes!(concat!(core::env!("OUT_DIR"), "/boot.bin")); @@ -744,10 +742,6 @@ pub fn boot_application_processors() { (SMP_BOOT_CODE_ADDRESS + SMP_BOOT_CODE_OFFSET_ENTRY).as_mut_ptr(), start::_start as usize, ); - ptr::write_unaligned( - (SMP_BOOT_CODE_ADDRESS + SMP_BOOT_CODE_OFFSET_BOOTINFO).as_mut_ptr(), - ptr::from_ref(raw_boot_info()).addr() as u64, - ); } // Now wake up each application processor. diff --git a/src/arch/x86_64/kernel/boot.s b/src/arch/x86_64/kernel/boot.s index 6b244aba33..a6c7065c70 100644 --- a/src/arch/x86_64/kernel/boot.s +++ b/src/arch/x86_64/kernel/boot.s @@ -25,7 +25,6 @@ _start: .align 8 entry_point: .8byte 0xDEADC0DE cpu_id: .4byte 0xC0DECAFE - boot_info: .8byte 0xBEEFBEEF pml4: .4byte 0xDEADBEEF pad: .4byte 0 diff --git a/src/arch/x86_64/kernel/mod.rs b/src/arch/x86_64/kernel/mod.rs index a75f645a25..de7dbb249c 100644 --- a/src/arch/x86_64/kernel/mod.rs +++ b/src/arch/x86_64/kernel/mod.rs @@ -45,11 +45,6 @@ pub fn boot_info() -> &'static BootInfo { unsafe { BOOT_INFO.as_ref().unwrap() } } -#[cfg(feature = "smp")] -pub fn raw_boot_info() -> &'static RawBootInfo { - unsafe { RAW_BOOT_INFO.unwrap() } -} - /// Serial port to print kernel messages pub(crate) static COM1: InterruptSpinMutex> = InterruptSpinMutex::new(None);