Commit 49c723d7 authored by Jonathan Schwender's avatar Jonathan Schwender Committed by Stefan Lankes
Browse files

fmt: Fix formatting


Signed-off-by: default avatarJonathan Schwender <schwenderjonathan@gmail.com>
parent 869b4e55
......@@ -12,10 +12,9 @@ pub mod percore;
pub mod processor;
pub mod scheduler;
pub mod serial;
pub mod start;
mod start;
pub mod stubs;
pub mod systemtime;
mod start;
use crate::arch::aarch64::kernel::percore::*;
use crate::arch::aarch64::kernel::serial::SerialPort;
......@@ -94,7 +93,6 @@ static mut BOOT_INFO: BootInfo = BootInfo {
global_asm!(include_str!("start.s"));
pub fn get_image_size() -> usize {
unsafe { core::ptr::read_volatile(&BOOT_INFO.image_size) as usize }
}
......@@ -162,7 +160,7 @@ pub fn message_output_init() {
pub fn output_message_byte(byte: u8) {
#[cfg(feature = "aarch64-qemu-stdout")]
unsafe {
core::ptr::write_volatile(0x3F20_1000 as *mut u8, byte);
core::ptr::write_volatile(0x3F20_1000 as *mut u8, byte);
}
#[cfg(not(feature = "aarch64-qemu-stdout"))]
if environment::is_single_kernel() {
......@@ -302,4 +300,3 @@ pub fn network_adapter_init() -> i32 {
}
pub fn print_statistics() {}
......@@ -6,8 +6,8 @@
// copied, modified, or distributed except according to those terms.
use crate::arch::aarch64::kernel::serial::SerialPort;
use crate::KERNEL_STACK_SIZE;
use crate::arch::aarch64::kernel::BootInfo;
use crate::KERNEL_STACK_SIZE;
static mut BOOT_STACK: [u8; KERNEL_STACK_SIZE] = [0; KERNEL_STACK_SIZE];
......@@ -16,25 +16,25 @@ static mut BOOT_STACK: [u8; KERNEL_STACK_SIZE] = [0; KERNEL_STACK_SIZE];
#[no_mangle]
#[naked]
pub unsafe extern "C" fn _start() -> ! {
asm!("ldr x1, {0}",
"add x1, x1, {1}",
asm!("ldr x1, {0}",
"add x1, x1, {1}",
"sub x1, x1, #0x10", /*Previous version subtracted 0x10 from End, so I'm doing this too. Not sure why though */
"mov sp, x1",
"mov sp, x1",
/* Set exception table */
"adr x8, vector_table",
"adr x8, vector_table",
"msr vbar_el1, x8",
"b pre_init",
sym BOOT_STACK,
const KERNEL_STACK_SIZE,
options(noreturn),
)
"b pre_init",
sym BOOT_STACK,
const KERNEL_STACK_SIZE,
options(noreturn),
)
}
#[inline(never)]
#[no_mangle]
unsafe fn pre_init(boot_info: &'static mut BootInfo) -> ! {
println!("Welcome to hermit kernel.");
if boot_info.cpu_online == 0 {
println!("Welcome to hermit kernel.");
if boot_info.cpu_online == 0 {
crate::boot_processor_main()
} else {
#[cfg(not(feature = "smp"))]
......@@ -47,4 +47,4 @@ unsafe fn pre_init(boot_info: &'static mut BootInfo) -> ! {
#[cfg(feature = "smp")]
crate::application_processor_main();
}
}
\ No newline at end of file
}
......@@ -340,7 +340,7 @@ fn boot_processor_main() -> ! {
environment::get_tls_memsz()
);
info!("Entering Spinloop - please implement / fix more to proceed");
loop {} /* Compiles up to here - loop prevents linker errors */
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