minor streamlining

pull/35/head
Andre Richter 5 years ago
parent 595f416305
commit e7ae509376
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -108,7 +108,7 @@ diff -uNr 01_wait_forever/src/runtime_init.rs 02_runtime_init/src/runtime_init.r
+/// Equivalent to `crt0` or `c0` code in C/C++ world. Clears the `bss` section,
+/// then calls the kernel entry.
+///
+/// Called from BSP code.
+/// Called from `BSP` code.
+///
+/// # Safety
+///

@ -7,7 +7,7 @@
/// Equivalent to `crt0` or `c0` code in C/C++ world. Clears the `bss` section,
/// then calls the kernel entry.
///
/// Called from BSP code.
/// Called from `BSP` code.
///
/// # Safety
///

@ -7,7 +7,7 @@
/// Equivalent to `crt0` or `c0` code in C/C++ world. Clears the `bss` section,
/// then calls the kernel entry.
///
/// Called from BSP code.
/// Called from `BSP` code.
///
/// # Safety
///

@ -31,15 +31,7 @@ diff -uNr 03_hacky_hello_world/Cargo.toml 04_zero_overhead_abstraction/Cargo.tom
diff -uNr 03_hacky_hello_world/src/bsp/rpi3/panic_wait.rs 04_zero_overhead_abstraction/src/bsp/rpi3/panic_wait.rs
--- 03_hacky_hello_world/src/bsp/rpi3/panic_wait.rs
+++ 04_zero_overhead_abstraction/src/bsp/rpi3/panic_wait.rs
@@ -6,6 +6,7 @@
use crate::println;
use core::panic::PanicInfo;
+use cortex_a::asm;
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
@@ -15,9 +16,7 @@
@@ -15,9 +15,5 @@
println!("Kernel panic!");
}
@ -47,9 +39,8 @@ diff -uNr 03_hacky_hello_world/src/bsp/rpi3/panic_wait.rs 04_zero_overhead_abstr
- loop {
- asm!("wfe" :::: "volatile")
- }
+ loop {
+ asm::wfe();
}
- }
+ super::wait_forever()
}
diff -uNr 03_hacky_hello_world/src/bsp/rpi3/start.S 04_zero_overhead_abstraction/src/bsp/rpi3/start.S

@ -15,5 +15,5 @@ fn panic(info: &PanicInfo) -> ! {
println!("Kernel panic!");
}
super::wait_forever();
super::wait_forever()
}

@ -7,7 +7,7 @@
/// Equivalent to `crt0` or `c0` code in C/C++ world. Clears the `bss` section,
/// then calls the kernel entry.
///
/// Called from BSP code.
/// Called from `BSP` code.
///
/// # Safety
///

Loading…
Cancel
Save