Formatting, LF and RISC-V kmain

This commit is contained in:
Erin 2023-03-19 13:40:08 +01:00 committed by ondra05
parent e3ce700295
commit cef19a8fe4
3 changed files with 388 additions and 396 deletions

View file

@ -1,35 +1,30 @@
.section .rodata
.global TEXT_START
.section .rodata
.global TEXT_START
.global TEXT_END
.global RODATA_START
.global RODATA_END
.global DATA_START
.global DATA_END
.global SDATA_START
.global SDATA_END
.global BSS_START
.global BSS_END
.global INITIAL_KERNEL_HEAP_START
.global INITIAL_KERNEL_HEAP_SIZE
.global USABLE_MEMORY_START
.global USABLE_MEMORY_SIZE
TEXT_START: .quad _text_start
.global TEXT_END
TEXT_END: .quad _text_end
.global RODATA_START
RODATA_START: .quad _rodata_start
.global RODATA_END
RODATA_END: .quad _rodata_end
.global DATA_START
DATA_START: .quad _data_start
.global DATA_END
DATA_END: .quad _data_end
.global SDATA_START
SDATA_START: .quad _sdata_start
.global SDATA_END
SDATA_END: .quad _sdata_end
.global BSS_START
BSS_START: .quad _bss_start
.global BSS_END
BSS_END: .quad _bss_end
.global INITIAL_KERNEL_HEAP_START
INITIAL_KERNEL_HEAP_START: .quad _initial_kernel_heap_start
.global INITIAL_KERNEL_HEAP_SIZE
INITIAL_KERNEL_HEAP_SIZE: .quad _initial_kernel_heap_size
.global USABLE_MEMORY_START
USABLE_MEMORY_START: .quad _usable_memory_start
.global USABLE_MEMORY_SIZE
USABLE_MEMORY_SIZE: .quad _usable_memory_size

View file

@ -67,7 +67,7 @@ unsafe extern fn _kernel_start() -> ! {
let table_ppn = page_table_addr.as_addr() as usize >> 12;
let satp_value = 8 << 60 | table_ppn;
log::info!("Enabling the MMU...");
log::info!("Enabling MMU");
asm!(
"csrw satp, {}",
@ -75,10 +75,7 @@ unsafe extern fn _kernel_start() -> ! {
in(reg) satp_value,
);
log::info!("We're in PAGING LAND!");
#[allow(unreachable_code)]
match system_reset(ResetType::Shutdown, ResetReason::NoReason).unwrap() {}
crate::kmain::kmain("baka=9", None);
}
/// Spin loop