diff --git a/04_zero_overhead_abstraction/README.md b/04_zero_overhead_abstraction/README.md index 00310821..1e8d4c6d 100644 --- a/04_zero_overhead_abstraction/README.md +++ b/04_zero_overhead_abstraction/README.md @@ -219,18 +219,17 @@ diff -uNr 03_hacky_hello_world/src/cpu.rs 04_zero_overhead_abstraction/src/cpu.r diff -uNr 03_hacky_hello_world/src/main.rs 04_zero_overhead_abstraction/src/main.rs --- 03_hacky_hello_world/src/main.rs +++ 04_zero_overhead_abstraction/src/main.rs -@@ -92,9 +92,8 @@ +@@ -92,9 +92,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` -#![feature(asm)] #![feature(format_args_nl)] -#![feature(global_asm)] -+#![feature(naked_functions)] #![feature(panic_info_message)] #![no_main] #![no_std] -@@ -116,7 +115,8 @@ +@@ -116,7 +114,8 @@ /// /// - Only a single core must be active and running this function. unsafe fn kernel_init() -> ! { diff --git a/04_zero_overhead_abstraction/src/main.rs b/04_zero_overhead_abstraction/src/main.rs index 22e17922..cd4c99e5 100644 --- a/04_zero_overhead_abstraction/src/main.rs +++ b/04_zero_overhead_abstraction/src/main.rs @@ -93,7 +93,6 @@ //! - `crate::bsp::memory::*` #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![no_main] #![no_std] diff --git a/05_safe_globals/README.md b/05_safe_globals/README.md index a66e7f2b..537b0ba3 100644 --- a/05_safe_globals/README.md +++ b/05_safe_globals/README.md @@ -213,15 +213,15 @@ diff -uNr 04_zero_overhead_abstraction/src/console.rs 05_safe_globals/src/consol diff -uNr 04_zero_overhead_abstraction/src/main.rs 05_safe_globals/src/main.rs --- 04_zero_overhead_abstraction/src/main.rs +++ 05_safe_globals/src/main.rs -@@ -95,6 +95,7 @@ +@@ -94,6 +94,7 @@ + #![feature(format_args_nl)] - #![feature(naked_functions)] #![feature(panic_info_message)] +#![feature(trait_alias)] #![no_main] #![no_std] -@@ -108,6 +109,7 @@ +@@ -107,6 +108,7 @@ mod panic_wait; mod print; mod runtime_init; @@ -229,7 +229,7 @@ diff -uNr 04_zero_overhead_abstraction/src/main.rs 05_safe_globals/src/main.rs /// Early init code. /// -@@ -115,8 +117,15 @@ +@@ -114,8 +116,15 @@ /// /// - Only a single core must be active and running this function. unsafe fn kernel_init() -> ! { diff --git a/05_safe_globals/src/main.rs b/05_safe_globals/src/main.rs index 2c29444f..64d4c5fd 100644 --- a/05_safe_globals/src/main.rs +++ b/05_safe_globals/src/main.rs @@ -93,7 +93,6 @@ //! - `crate::bsp::memory::*` #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/06_drivers_gpio_uart/README.md b/06_drivers_gpio_uart/README.md index 0588109d..4c030e74 100644 --- a/06_drivers_gpio_uart/README.md +++ b/06_drivers_gpio_uart/README.md @@ -1206,9 +1206,9 @@ diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] - #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -105,6 +114,7 @@ + #![feature(trait_alias)] +@@ -104,6 +113,7 @@ mod bsp; mod console; mod cpu; @@ -1216,7 +1216,7 @@ diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs mod memory; mod panic_wait; mod print; -@@ -116,16 +126,46 @@ +@@ -115,16 +125,46 @@ /// # Safety /// /// - Only a single core must be active and running this function. diff --git a/06_drivers_gpio_uart/src/main.rs b/06_drivers_gpio_uart/src/main.rs index c45f7f78..e0bf47a9 100644 --- a/06_drivers_gpio_uart/src/main.rs +++ b/06_drivers_gpio_uart/src/main.rs @@ -102,7 +102,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/07_uart_chainloader/README.md b/07_uart_chainloader/README.md index 2b7d797b..b87b4bed 100644 --- a/07_uart_chainloader/README.md +++ b/07_uart_chainloader/README.md @@ -413,9 +413,9 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs #![feature(const_fn_fn_ptr_basics)] +#![feature(core_intrinsics)] #![feature(format_args_nl)] - #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -109,7 +111,8 @@ + #![feature(trait_alias)] +@@ -108,7 +110,8 @@ #![no_std] // `mod cpu` provides the `_start()` function, the first function to run. `_start()` then calls @@ -425,7 +425,7 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs mod bsp; mod console; -@@ -118,6 +121,7 @@ +@@ -117,6 +120,7 @@ mod memory; mod panic_wait; mod print; @@ -433,7 +433,7 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs mod runtime_init; mod synchronization; -@@ -144,28 +148,52 @@ +@@ -143,28 +147,52 @@ /// The main function running after the early init. fn kernel_main() -> ! { diff --git a/07_uart_chainloader/demo_payload_rpi3.img b/07_uart_chainloader/demo_payload_rpi3.img index 983c85c2..34c3214c 100755 Binary files a/07_uart_chainloader/demo_payload_rpi3.img and b/07_uart_chainloader/demo_payload_rpi3.img differ diff --git a/07_uart_chainloader/demo_payload_rpi4.img b/07_uart_chainloader/demo_payload_rpi4.img index 979c0dfd..c7919ed6 100755 Binary files a/07_uart_chainloader/demo_payload_rpi4.img and b/07_uart_chainloader/demo_payload_rpi4.img differ diff --git a/07_uart_chainloader/src/main.rs b/07_uart_chainloader/src/main.rs index e71ab16c..2e436374 100644 --- a/07_uart_chainloader/src/main.rs +++ b/07_uart_chainloader/src/main.rs @@ -104,7 +104,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(core_intrinsics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/08_timestamps/README.md b/08_timestamps/README.md index dedf93c8..0bd34252 100644 --- a/08_timestamps/README.md +++ b/08_timestamps/README.md @@ -462,9 +462,9 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs #![feature(const_fn_fn_ptr_basics)] -#![feature(core_intrinsics)] #![feature(format_args_nl)] - #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -111,8 +111,7 @@ + #![feature(trait_alias)] +@@ -110,8 +110,7 @@ #![no_std] // `mod cpu` provides the `_start()` function, the first function to run. `_start()` then calls @@ -474,7 +474,7 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs mod bsp; mod console; -@@ -121,9 +120,9 @@ +@@ -120,9 +119,9 @@ mod memory; mod panic_wait; mod print; @@ -485,7 +485,7 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs /// Early init code. /// -@@ -148,52 +147,31 @@ +@@ -147,52 +146,31 @@ /// The main function running after the early init. fn kernel_main() -> ! { diff --git a/08_timestamps/src/main.rs b/08_timestamps/src/main.rs index 4dad2571..b9db5fef 100644 --- a/08_timestamps/src/main.rs +++ b/08_timestamps/src/main.rs @@ -104,7 +104,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/09_hw_debug_JTAG/src/main.rs b/09_hw_debug_JTAG/src/main.rs index 4dad2571..b9db5fef 100644 --- a/09_hw_debug_JTAG/src/main.rs +++ b/09_hw_debug_JTAG/src/main.rs @@ -104,7 +104,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/10_privilege_level/README.md b/10_privilege_level/README.md index fab88598..8716099e 100644 --- a/10_privilege_level/README.md +++ b/10_privilege_level/README.md @@ -456,7 +456,7 @@ diff -uNr 09_hw_debug_JTAG/src/exception.rs 10_privilege_level/src/exception.rs diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs --- 09_hw_debug_JTAG/src/main.rs +++ 10_privilege_level/src/main.rs -@@ -117,6 +117,7 @@ +@@ -116,6 +116,7 @@ mod console; mod cpu; mod driver; @@ -464,7 +464,7 @@ diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs mod memory; mod panic_wait; mod print; -@@ -147,12 +148,19 @@ +@@ -146,12 +147,19 @@ /// The main function running after the early init. fn kernel_main() -> ! { @@ -484,7 +484,7 @@ diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs info!( "Architectural timer resolution: {} ns", time::time_manager().resolution().as_nanos() -@@ -167,11 +175,12 @@ +@@ -166,11 +174,12 @@ info!(" {}. {}", i + 1, driver.compatible()); } diff --git a/10_privilege_level/src/main.rs b/10_privilege_level/src/main.rs index faa42f90..0c730ff9 100644 --- a/10_privilege_level/src/main.rs +++ b/10_privilege_level/src/main.rs @@ -104,7 +104,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/11_virtual_mem_part1_identity_mapping/README.md b/11_virtual_mem_part1_identity_mapping/README.md index df84c966..6216fd65 100644 --- a/11_virtual_mem_part1_identity_mapping/README.md +++ b/11_virtual_mem_part1_identity_mapping/README.md @@ -892,9 +892,9 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s +#![feature(const_generics)] +#![feature(const_panic)] #![feature(format_args_nl)] - #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -130,9 +135,18 @@ + #![feature(trait_alias)] +@@ -129,9 +134,18 @@ /// # Safety /// /// - Only a single core must be active and running this function. @@ -914,7 +914,7 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s for i in bsp::driver::driver_manager().all_device_drivers().iter() { if let Err(x) = i.init() { -@@ -155,6 +169,9 @@ +@@ -154,6 +168,9 @@ info!("Booting on: {}", bsp::board_name()); @@ -924,7 +924,7 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s let (_, privilege_level) = exception::current_privilege_level(); info!("Current privilege level: {}", privilege_level); -@@ -178,6 +195,13 @@ +@@ -177,6 +194,13 @@ info!("Timer test, spinning for 1 second"); time::time_manager().spin_for(Duration::from_secs(1)); diff --git a/11_virtual_mem_part1_identity_mapping/src/main.rs b/11_virtual_mem_part1_identity_mapping/src/main.rs index eed8b35c..41ca22e3 100644 --- a/11_virtual_mem_part1_identity_mapping/src/main.rs +++ b/11_virtual_mem_part1_identity_mapping/src/main.rs @@ -109,7 +109,6 @@ #![feature(const_generics)] #![feature(const_panic)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/12_exceptions_part1_groundwork/README.md b/12_exceptions_part1_groundwork/README.md index 97963686..c6264088 100644 --- a/12_exceptions_part1_groundwork/README.md +++ b/12_exceptions_part1_groundwork/README.md @@ -961,10 +961,10 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/main.rs 12_exceptions_part1_ #![feature(const_panic)] #![feature(format_args_nl)] +#![feature(global_asm)] - #![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] -@@ -144,6 +145,8 @@ + #![no_main] +@@ -143,6 +144,8 @@ use driver::interface::DriverManager; use memory::mmu::interface::MMU; @@ -973,7 +973,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/main.rs 12_exceptions_part1_ if let Err(string) = memory::mmu::mmu().init() { panic!("MMU: {}", string); } -@@ -195,13 +198,28 @@ +@@ -194,13 +197,28 @@ info!("Timer test, spinning for 1 second"); time::time_manager().spin_for(Duration::from_secs(1)); diff --git a/12_exceptions_part1_groundwork/src/main.rs b/12_exceptions_part1_groundwork/src/main.rs index 4d8f5d7c..495840e8 100644 --- a/12_exceptions_part1_groundwork/src/main.rs +++ b/12_exceptions_part1_groundwork/src/main.rs @@ -110,7 +110,6 @@ #![feature(const_panic)] #![feature(format_args_nl)] #![feature(global_asm)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main] diff --git a/13_integrated_testing/README.md b/13_integrated_testing/README.md index 5f8baf23..a282e659 100644 --- a/13_integrated_testing/README.md +++ b/13_integrated_testing/README.md @@ -1130,7 +1130,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/exception.rs 13_integrated_testing/ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/lib.rs --- 12_exceptions_part1_groundwork/src/lib.rs +++ 13_integrated_testing/src/lib.rs -@@ -0,0 +1,170 @@ +@@ -0,0 +1,169 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// +// Copyright (c) 2018-2021 Andre Richter @@ -1246,7 +1246,6 @@ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/li +#![feature(format_args_nl)] +#![feature(global_asm)] +#![feature(linkage)] -+#![feature(naked_functions)] +#![feature(panic_info_message)] +#![feature(trait_alias)] +#![no_std] @@ -1305,7 +1304,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/li diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/main.rs --- 12_exceptions_part1_groundwork/src/main.rs +++ 13_integrated_testing/src/main.rs -@@ -6,130 +6,12 @@ +@@ -6,129 +6,12 @@ #![doc(html_logo_url = "https://git.io/JeGIp")] //! The `kernel` binary. @@ -1414,7 +1413,6 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m + #![feature(format_args_nl)] -#![feature(global_asm)] --#![feature(naked_functions)] -#![feature(panic_info_message)] -#![feature(trait_alias)] #![no_main] @@ -1438,7 +1436,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m /// Early init code. /// -@@ -141,6 +23,7 @@ +@@ -140,6 +23,7 @@ /// - Without it, any atomic operations, e.g. the yet-to-be-introduced spinlocks in the device /// drivers (which currently employ NullLocks instead of spinlocks), will fail to work on /// the RPi SoCs. @@ -1446,7 +1444,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m unsafe fn kernel_init() -> ! { use driver::interface::DriverManager; use memory::mmu::interface::MMU; -@@ -166,9 +49,7 @@ +@@ -165,9 +49,7 @@ /// The main function running after the early init. fn kernel_main() -> ! { use console::interface::All; @@ -1456,7 +1454,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m info!("Booting on: {}", bsp::board_name()); -@@ -195,31 +76,6 @@ +@@ -194,31 +76,6 @@ info!(" {}. {}", i + 1, driver.compatible()); } diff --git a/13_integrated_testing/src/lib.rs b/13_integrated_testing/src/lib.rs index 8e60240f..f958ae5d 100644 --- a/13_integrated_testing/src/lib.rs +++ b/13_integrated_testing/src/lib.rs @@ -113,7 +113,6 @@ #![feature(format_args_nl)] #![feature(global_asm)] #![feature(linkage)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_std] diff --git a/14_exceptions_part2_peripheral_IRQs/README.md b/14_exceptions_part2_peripheral_IRQs/README.md index d9baef35..dc18b75f 100644 --- a/14_exceptions_part2_peripheral_IRQs/README.md +++ b/14_exceptions_part2_peripheral_IRQs/README.md @@ -2407,7 +2407,7 @@ diff -uNr 13_integrated_testing/src/lib.rs 14_exceptions_part2_peripheral_IRQs/s #![feature(format_args_nl)] #![feature(global_asm)] #![feature(linkage)] -@@ -137,6 +144,7 @@ +@@ -136,6 +143,7 @@ pub mod exception; pub mod memory; pub mod print; diff --git a/14_exceptions_part2_peripheral_IRQs/src/lib.rs b/14_exceptions_part2_peripheral_IRQs/src/lib.rs index 141adc3a..635732bd 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/lib.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/lib.rs @@ -120,7 +120,6 @@ #![feature(format_args_nl)] #![feature(global_asm)] #![feature(linkage)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_std] diff --git a/15_virtual_mem_part2_mmio_remap/README.md b/15_virtual_mem_part2_mmio_remap/README.md index 77f6ad62..fb574abf 100644 --- a/15_virtual_mem_part2_mmio_remap/README.md +++ b/15_virtual_mem_part2_mmio_remap/README.md @@ -2038,7 +2038,7 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/lib.rs 15_virtual_mem_part2_mm #![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] -@@ -138,6 +139,7 @@ +@@ -137,6 +138,7 @@ mod synchronization; pub mod bsp; diff --git a/15_virtual_mem_part2_mmio_remap/src/lib.rs b/15_virtual_mem_part2_mmio_remap/src/lib.rs index 9ff2a50c..e66dd3e8 100644 --- a/15_virtual_mem_part2_mmio_remap/src/lib.rs +++ b/15_virtual_mem_part2_mmio_remap/src/lib.rs @@ -121,7 +121,6 @@ #![feature(format_args_nl)] #![feature(global_asm)] #![feature(linkage)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_std] diff --git a/X1_JTAG_boot/jtag_boot_rpi3.img b/X1_JTAG_boot/jtag_boot_rpi3.img index e2653eb1..443facda 100755 Binary files a/X1_JTAG_boot/jtag_boot_rpi3.img and b/X1_JTAG_boot/jtag_boot_rpi3.img differ diff --git a/X1_JTAG_boot/jtag_boot_rpi4.img b/X1_JTAG_boot/jtag_boot_rpi4.img index 7517a699..253652d1 100755 Binary files a/X1_JTAG_boot/jtag_boot_rpi4.img and b/X1_JTAG_boot/jtag_boot_rpi4.img differ diff --git a/X1_JTAG_boot/src/main.rs b/X1_JTAG_boot/src/main.rs index 5e54c329..340acd4e 100644 --- a/X1_JTAG_boot/src/main.rs +++ b/X1_JTAG_boot/src/main.rs @@ -104,7 +104,6 @@ #![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] -#![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] #![no_main]