Commit 7decb24f authored by Stefan Lankes's avatar Stefan Lankes Committed by Stefan Lankes
Browse files

replace endless loop by a panic call

parent b6374a2d
...@@ -792,10 +792,7 @@ pub fn configure() { ...@@ -792,10 +792,7 @@ pub fn configure() {
if supports_fsgs() { if supports_fsgs() {
cr4.insert(Cr4::CR4_ENABLE_FSGSBASE); cr4.insert(Cr4::CR4_ENABLE_FSGSBASE);
} else { } else {
error!("libhermit-rs requires the CPU feature FSGSBASE"); panic!("libhermit-rs requires the CPU feature FSGSBASE");
loop {
spin_loop_hint();
}
} }
debug!("Set CR4 to 0x{:x}", cr4); debug!("Set CR4 to 0x{:x}", cr4);
......
...@@ -20,7 +20,6 @@ use crate::arch::mm::physicalmem::total_memory_size; ...@@ -20,7 +20,6 @@ use crate::arch::mm::physicalmem::total_memory_size;
use crate::arch::mm::virtualmem::kernel_heap_end; use crate::arch::mm::virtualmem::kernel_heap_end;
use crate::environment; use crate::environment;
use core::mem; use core::mem;
use core::sync::atomic::spin_loop_hint;
/// Physical and virtual address of the first 2 MiB page that maps the kernel. /// Physical and virtual address of the first 2 MiB page that maps the kernel.
/// Can be easily accessed through kernel_start_address() /// Can be easily accessed through kernel_start_address()
...@@ -108,11 +107,7 @@ pub fn init() { ...@@ -108,11 +107,7 @@ pub fn init() {
//info!("reserved space {} KB", reserved_space >> 10); //info!("reserved space {} KB", reserved_space >> 10);
if total_memory_size() < kernel_end_address() + reserved_space + LargePageSize::SIZE { if total_memory_size() < kernel_end_address() + reserved_space + LargePageSize::SIZE {
error!("No enough memory available!"); panic!("No enough memory available!");
loop {
spin_loop_hint();
}
} }
let mut map_addr: usize; let mut map_addr: usize;
......
Markdown is supported
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