Commit 869b4e55 authored by Jonathan Schwender's avatar Jonathan Schwender Committed by Stefan Lankes
Browse files

aarch64: boot to point before errors appear



- This currently relies on the fact that the bootloader only initialized 1 CPU (0)
- We enter boot_processor_main() and go up to the loop {}
- the loop {} prevents link time errors from stuff that is not working yet.
Signed-off-by: default avatarJonathan Schwender <schwenderjonathan@gmail.com>
parent ae314a5d
......@@ -7,9 +7,11 @@
use crate::arch::aarch64::kernel::serial::SerialPort;
use crate::KERNEL_STACK_SIZE;
use crate::arch::aarch64::kernel::BootInfo;
static mut BOOT_STACK: [u8; KERNEL_STACK_SIZE] = [0; KERNEL_STACK_SIZE];
/// Entrypoint - Initalize Stack pointer and Exception Table
#[inline(never)]
#[no_mangle]
#[naked]
......@@ -32,10 +34,17 @@ pub unsafe extern "C" fn _start() -> ! {
#[no_mangle]
unsafe fn pre_init(boot_info: &'static mut BootInfo) -> ! {
println!("Welcome to hermit kernel.");
loop {}
}
if boot_info.cpu_online == 0 {
crate::boot_processor_main()
} else {
#[cfg(not(feature = "smp"))]
{
error!("SMP support deactivated");
loop {
//processor::halt();
}
}
#[cfg(feature = "smp")]
crate::application_processor_main();
}
}
\ No newline at end of file
......@@ -339,7 +339,8 @@ fn boot_processor_main() -> ! {
environment::get_tls_start(),
environment::get_tls_memsz()
);
info!("Entering Spinloop - please implement / fix more to proceed");
loop {} /* Compiles up to here - loop prevents linker errors */
arch::boot_processor_init();
scheduler::add_current_core();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment