diff --git a/05_safe_globals/.vscode/settings.json b/04_safe_globals/.vscode/settings.json similarity index 100% rename from 05_safe_globals/.vscode/settings.json rename to 04_safe_globals/.vscode/settings.json diff --git a/05_safe_globals/Cargo.lock b/04_safe_globals/Cargo.lock similarity index 100% rename from 05_safe_globals/Cargo.lock rename to 04_safe_globals/Cargo.lock diff --git a/05_safe_globals/Cargo.toml b/04_safe_globals/Cargo.toml similarity index 100% rename from 05_safe_globals/Cargo.toml rename to 04_safe_globals/Cargo.toml diff --git a/05_safe_globals/Makefile b/04_safe_globals/Makefile similarity index 100% rename from 05_safe_globals/Makefile rename to 04_safe_globals/Makefile diff --git a/05_safe_globals/README.md b/04_safe_globals/README.md similarity index 92% rename from 05_safe_globals/README.md rename to 04_safe_globals/README.md index ea61489e..13b9e298 100644 --- a/05_safe_globals/README.md +++ b/04_safe_globals/README.md @@ -1,4 +1,4 @@ -# Tutorial 05 - Safe Globals +# Tutorial 04 - Safe Globals ## tl;dr @@ -54,9 +54,9 @@ $ make qemu ## Diff to previous ```diff -diff -uNr 04_zero_overhead_abstraction/src/bsp/raspberrypi/console.rs 05_safe_globals/src/bsp/raspberrypi/console.rs ---- 04_zero_overhead_abstraction/src/bsp/raspberrypi/console.rs -+++ 05_safe_globals/src/bsp/raspberrypi/console.rs +diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/console.rs 04_safe_globals/src/bsp/raspberrypi/console.rs +--- 03_hacky_hello_world/src/bsp/raspberrypi/console.rs ++++ 04_safe_globals/src/bsp/raspberrypi/console.rs @@ -4,7 +4,7 @@ //! BSP console facilities. @@ -176,9 +176,9 @@ diff -uNr 04_zero_overhead_abstraction/src/bsp/raspberrypi/console.rs 05_safe_gl + } } -diff -uNr 04_zero_overhead_abstraction/src/console.rs 05_safe_globals/src/console.rs ---- 04_zero_overhead_abstraction/src/console.rs -+++ 05_safe_globals/src/console.rs +diff -uNr 03_hacky_hello_world/src/console.rs 04_safe_globals/src/console.rs +--- 03_hacky_hello_world/src/console.rs ++++ 04_safe_globals/src/console.rs @@ -10,10 +10,22 @@ /// Console interfaces. @@ -208,12 +208,12 @@ diff -uNr 04_zero_overhead_abstraction/src/console.rs 05_safe_globals/src/consol + pub trait All = Write + Statistics; } -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 +diff -uNr 03_hacky_hello_world/src/main.rs 04_safe_globals/src/main.rs +--- 03_hacky_hello_world/src/main.rs ++++ 04_safe_globals/src/main.rs @@ -109,6 +109,7 @@ - #![feature(format_args_nl)] + #![feature(global_asm)] #![feature(panic_info_message)] +#![feature(trait_alias)] #![no_main] @@ -227,27 +227,28 @@ diff -uNr 04_zero_overhead_abstraction/src/main.rs 05_safe_globals/src/main.rs /// Early init code. /// -@@ -126,8 +128,15 @@ +@@ -126,7 +128,15 @@ /// /// - Only a single core must be active and running this function. unsafe fn kernel_init() -> ! { +- println!("[0] Hello from Rust!"); + use console::interface::Statistics; -+ - println!("[0] Hello from pure Rust!"); -- println!("[1] Stopping here."); +- panic!("Stopping here.") ++ println!("[0] Hello from pure Rust!"); ++ + println!( + "[1] Chars written: {}", + bsp::console::console().chars_written() + ); + + println!("[2] Stopping here."); - cpu::wait_forever() ++ cpu::wait_forever() } -diff -uNr 04_zero_overhead_abstraction/src/synchronization.rs 05_safe_globals/src/synchronization.rs ---- 04_zero_overhead_abstraction/src/synchronization.rs -+++ 05_safe_globals/src/synchronization.rs +diff -uNr 03_hacky_hello_world/src/synchronization.rs 04_safe_globals/src/synchronization.rs +--- 03_hacky_hello_world/src/synchronization.rs ++++ 04_safe_globals/src/synchronization.rs @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// diff --git a/05_safe_globals/build.rs b/04_safe_globals/build.rs similarity index 100% rename from 05_safe_globals/build.rs rename to 04_safe_globals/build.rs diff --git a/05_safe_globals/src/_arch/aarch64/cpu.rs b/04_safe_globals/src/_arch/aarch64/cpu.rs similarity index 100% rename from 05_safe_globals/src/_arch/aarch64/cpu.rs rename to 04_safe_globals/src/_arch/aarch64/cpu.rs diff --git a/05_safe_globals/src/_arch/aarch64/cpu/boot.rs b/04_safe_globals/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 05_safe_globals/src/_arch/aarch64/cpu/boot.rs rename to 04_safe_globals/src/_arch/aarch64/cpu/boot.rs diff --git a/05_safe_globals/src/_arch/aarch64/cpu/boot.s b/04_safe_globals/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 05_safe_globals/src/_arch/aarch64/cpu/boot.s rename to 04_safe_globals/src/_arch/aarch64/cpu/boot.s diff --git a/05_safe_globals/src/bsp.rs b/04_safe_globals/src/bsp.rs similarity index 100% rename from 05_safe_globals/src/bsp.rs rename to 04_safe_globals/src/bsp.rs diff --git a/05_safe_globals/src/bsp/raspberrypi.rs b/04_safe_globals/src/bsp/raspberrypi.rs similarity index 100% rename from 05_safe_globals/src/bsp/raspberrypi.rs rename to 04_safe_globals/src/bsp/raspberrypi.rs diff --git a/05_safe_globals/src/bsp/raspberrypi/console.rs b/04_safe_globals/src/bsp/raspberrypi/console.rs similarity index 100% rename from 05_safe_globals/src/bsp/raspberrypi/console.rs rename to 04_safe_globals/src/bsp/raspberrypi/console.rs diff --git a/05_safe_globals/src/bsp/raspberrypi/cpu.rs b/04_safe_globals/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 05_safe_globals/src/bsp/raspberrypi/cpu.rs rename to 04_safe_globals/src/bsp/raspberrypi/cpu.rs diff --git a/05_safe_globals/src/bsp/raspberrypi/link.ld b/04_safe_globals/src/bsp/raspberrypi/link.ld similarity index 100% rename from 05_safe_globals/src/bsp/raspberrypi/link.ld rename to 04_safe_globals/src/bsp/raspberrypi/link.ld diff --git a/05_safe_globals/src/bsp/raspberrypi/memory.rs b/04_safe_globals/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 05_safe_globals/src/bsp/raspberrypi/memory.rs rename to 04_safe_globals/src/bsp/raspberrypi/memory.rs diff --git a/05_safe_globals/src/console.rs b/04_safe_globals/src/console.rs similarity index 100% rename from 05_safe_globals/src/console.rs rename to 04_safe_globals/src/console.rs diff --git a/05_safe_globals/src/cpu.rs b/04_safe_globals/src/cpu.rs similarity index 100% rename from 05_safe_globals/src/cpu.rs rename to 04_safe_globals/src/cpu.rs diff --git a/05_safe_globals/src/cpu/boot.rs b/04_safe_globals/src/cpu/boot.rs similarity index 100% rename from 05_safe_globals/src/cpu/boot.rs rename to 04_safe_globals/src/cpu/boot.rs diff --git a/05_safe_globals/src/main.rs b/04_safe_globals/src/main.rs similarity index 100% rename from 05_safe_globals/src/main.rs rename to 04_safe_globals/src/main.rs diff --git a/05_safe_globals/src/memory.rs b/04_safe_globals/src/memory.rs similarity index 100% rename from 05_safe_globals/src/memory.rs rename to 04_safe_globals/src/memory.rs diff --git a/05_safe_globals/src/panic_wait.rs b/04_safe_globals/src/panic_wait.rs similarity index 100% rename from 05_safe_globals/src/panic_wait.rs rename to 04_safe_globals/src/panic_wait.rs diff --git a/05_safe_globals/src/print.rs b/04_safe_globals/src/print.rs similarity index 100% rename from 05_safe_globals/src/print.rs rename to 04_safe_globals/src/print.rs diff --git a/05_safe_globals/src/runtime_init.rs b/04_safe_globals/src/runtime_init.rs similarity index 100% rename from 05_safe_globals/src/runtime_init.rs rename to 04_safe_globals/src/runtime_init.rs diff --git a/05_safe_globals/src/synchronization.rs b/04_safe_globals/src/synchronization.rs similarity index 100% rename from 05_safe_globals/src/synchronization.rs rename to 04_safe_globals/src/synchronization.rs diff --git a/06_drivers_gpio_uart/.vscode/settings.json b/05_drivers_gpio_uart/.vscode/settings.json similarity index 100% rename from 06_drivers_gpio_uart/.vscode/settings.json rename to 05_drivers_gpio_uart/.vscode/settings.json diff --git a/06_drivers_gpio_uart/Cargo.lock b/05_drivers_gpio_uart/Cargo.lock similarity index 100% rename from 06_drivers_gpio_uart/Cargo.lock rename to 05_drivers_gpio_uart/Cargo.lock diff --git a/06_drivers_gpio_uart/Cargo.toml b/05_drivers_gpio_uart/Cargo.toml similarity index 100% rename from 06_drivers_gpio_uart/Cargo.toml rename to 05_drivers_gpio_uart/Cargo.toml diff --git a/06_drivers_gpio_uart/Makefile b/05_drivers_gpio_uart/Makefile similarity index 100% rename from 06_drivers_gpio_uart/Makefile rename to 05_drivers_gpio_uart/Makefile diff --git a/06_drivers_gpio_uart/README.md b/05_drivers_gpio_uart/README.md similarity index 93% rename from 06_drivers_gpio_uart/README.md rename to 05_drivers_gpio_uart/README.md index bd7c0208..4ecdd41a 100644 --- a/06_drivers_gpio_uart/README.md +++ b/05_drivers_gpio_uart/README.md @@ -1,4 +1,4 @@ -# Tutorial 06 - Drivers: GPIO and UART +# Tutorial 05 - Drivers: GPIO and UART ## tl;dr @@ -108,9 +108,9 @@ Miniterm 1.0 ## Diff to previous ```diff -diff -uNr 05_safe_globals/Cargo.toml 06_drivers_gpio_uart/Cargo.toml ---- 05_safe_globals/Cargo.toml -+++ 06_drivers_gpio_uart/Cargo.toml +diff -uNr 04_safe_globals/Cargo.toml 05_drivers_gpio_uart/Cargo.toml +--- 04_safe_globals/Cargo.toml ++++ 05_drivers_gpio_uart/Cargo.toml @@ -9,8 +9,8 @@ [features] @@ -133,9 +133,9 @@ diff -uNr 05_safe_globals/Cargo.toml 06_drivers_gpio_uart/Cargo.toml [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } -diff -uNr 05_safe_globals/Makefile 06_drivers_gpio_uart/Makefile ---- 05_safe_globals/Makefile -+++ 06_drivers_gpio_uart/Makefile +diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile +--- 04_safe_globals/Makefile ++++ 05_drivers_gpio_uart/Makefile @@ -7,6 +7,12 @@ # Default to the RPi3 BSP ?= rpi3 @@ -186,9 +186,9 @@ diff -uNr 05_safe_globals/Makefile 06_drivers_gpio_uart/Makefile @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) -diff -uNr 05_safe_globals/src/_arch/aarch64/cpu.rs 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs ---- 05_safe_globals/src/_arch/aarch64/cpu.rs -+++ 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs +diff -uNr 04_safe_globals/src/_arch/aarch64/cpu.rs 05_drivers_gpio_uart/src/_arch/aarch64/cpu.rs +--- 04_safe_globals/src/_arch/aarch64/cpu.rs ++++ 05_drivers_gpio_uart/src/_arch/aarch64/cpu.rs @@ -17,6 +17,17 @@ // Public Code //-------------------------------------------------------------------------------------------------- @@ -208,9 +208,9 @@ diff -uNr 05_safe_globals/src/_arch/aarch64/cpu.rs 06_drivers_gpio_uart/src/_arc #[inline(always)] pub fn wait_forever() -> ! { -diff -uNr 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ---- 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs -+++ 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +diff -uNr 04_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +--- 04_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ++++ 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs @@ -0,0 +1,221 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -434,9 +434,9 @@ diff -uNr 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 06_drivers_g + } +} -diff -uNr 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ---- 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs -+++ 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +diff -uNr 04_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +--- 04_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ++++ 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs @@ -0,0 +1,403 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -842,9 +842,9 @@ diff -uNr 05_safe_globals/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 06_dri + } +} -diff -uNr 05_safe_globals/src/bsp/device_driver/bcm.rs 06_drivers_gpio_uart/src/bsp/device_driver/bcm.rs ---- 05_safe_globals/src/bsp/device_driver/bcm.rs -+++ 06_drivers_gpio_uart/src/bsp/device_driver/bcm.rs +diff -uNr 04_safe_globals/src/bsp/device_driver/bcm.rs 05_drivers_gpio_uart/src/bsp/device_driver/bcm.rs +--- 04_safe_globals/src/bsp/device_driver/bcm.rs ++++ 05_drivers_gpio_uart/src/bsp/device_driver/bcm.rs @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -858,9 +858,9 @@ diff -uNr 05_safe_globals/src/bsp/device_driver/bcm.rs 06_drivers_gpio_uart/src/ +pub use bcm2xxx_gpio::*; +pub use bcm2xxx_pl011_uart::*; -diff -uNr 05_safe_globals/src/bsp/device_driver/common.rs 06_drivers_gpio_uart/src/bsp/device_driver/common.rs ---- 05_safe_globals/src/bsp/device_driver/common.rs -+++ 06_drivers_gpio_uart/src/bsp/device_driver/common.rs +diff -uNr 04_safe_globals/src/bsp/device_driver/common.rs 05_drivers_gpio_uart/src/bsp/device_driver/common.rs +--- 04_safe_globals/src/bsp/device_driver/common.rs ++++ 05_drivers_gpio_uart/src/bsp/device_driver/common.rs @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -901,9 +901,9 @@ diff -uNr 05_safe_globals/src/bsp/device_driver/common.rs 06_drivers_gpio_uart/s + } +} -diff -uNr 05_safe_globals/src/bsp/device_driver.rs 06_drivers_gpio_uart/src/bsp/device_driver.rs ---- 05_safe_globals/src/bsp/device_driver.rs -+++ 06_drivers_gpio_uart/src/bsp/device_driver.rs +diff -uNr 04_safe_globals/src/bsp/device_driver.rs 05_drivers_gpio_uart/src/bsp/device_driver.rs +--- 04_safe_globals/src/bsp/device_driver.rs ++++ 05_drivers_gpio_uart/src/bsp/device_driver.rs @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -918,9 +918,9 @@ diff -uNr 05_safe_globals/src/bsp/device_driver.rs 06_drivers_gpio_uart/src/bsp/ +#[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))] +pub use bcm::*; -diff -uNr 05_safe_globals/src/bsp/raspberrypi/console.rs 06_drivers_gpio_uart/src/bsp/raspberrypi/console.rs ---- 05_safe_globals/src/bsp/raspberrypi/console.rs -+++ 06_drivers_gpio_uart/src/bsp/raspberrypi/console.rs +diff -uNr 04_safe_globals/src/bsp/raspberrypi/console.rs 05_drivers_gpio_uart/src/bsp/raspberrypi/console.rs +--- 04_safe_globals/src/bsp/raspberrypi/console.rs ++++ 05_drivers_gpio_uart/src/bsp/raspberrypi/console.rs @@ -4,113 +4,34 @@ //! BSP console facilities. @@ -1054,9 +1054,9 @@ diff -uNr 05_safe_globals/src/bsp/raspberrypi/console.rs 06_drivers_gpio_uart/sr + &super::PL011_UART } -diff -uNr 05_safe_globals/src/bsp/raspberrypi/driver.rs 06_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs ---- 05_safe_globals/src/bsp/raspberrypi/driver.rs -+++ 06_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs +diff -uNr 04_safe_globals/src/bsp/raspberrypi/driver.rs 05_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs +--- 04_safe_globals/src/bsp/raspberrypi/driver.rs ++++ 05_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1108,9 +1108,9 @@ diff -uNr 05_safe_globals/src/bsp/raspberrypi/driver.rs 06_drivers_gpio_uart/src + } +} -diff -uNr 05_safe_globals/src/bsp/raspberrypi/memory.rs 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs ---- 05_safe_globals/src/bsp/raspberrypi/memory.rs -+++ 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs +diff -uNr 04_safe_globals/src/bsp/raspberrypi/memory.rs 05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs +--- 04_safe_globals/src/bsp/raspberrypi/memory.rs ++++ 05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs @@ -17,6 +17,38 @@ } @@ -1151,9 +1151,9 @@ diff -uNr 05_safe_globals/src/bsp/raspberrypi/memory.rs 06_drivers_gpio_uart/src //-------------------------------------------------------------------------------------------------- -diff -uNr 05_safe_globals/src/bsp/raspberrypi.rs 06_drivers_gpio_uart/src/bsp/raspberrypi.rs ---- 05_safe_globals/src/bsp/raspberrypi.rs -+++ 06_drivers_gpio_uart/src/bsp/raspberrypi.rs +diff -uNr 04_safe_globals/src/bsp/raspberrypi.rs 05_drivers_gpio_uart/src/bsp/raspberrypi.rs +--- 04_safe_globals/src/bsp/raspberrypi.rs ++++ 05_drivers_gpio_uart/src/bsp/raspberrypi.rs @@ -6,4 +6,33 @@ pub mod console; @@ -1189,9 +1189,9 @@ diff -uNr 05_safe_globals/src/bsp/raspberrypi.rs 06_drivers_gpio_uart/src/bsp/ra + } +} -diff -uNr 05_safe_globals/src/bsp.rs 06_drivers_gpio_uart/src/bsp.rs ---- 05_safe_globals/src/bsp.rs -+++ 06_drivers_gpio_uart/src/bsp.rs +diff -uNr 04_safe_globals/src/bsp.rs 05_drivers_gpio_uart/src/bsp.rs +--- 04_safe_globals/src/bsp.rs ++++ 05_drivers_gpio_uart/src/bsp.rs @@ -4,6 +4,8 @@ //! Conditional reexporting of Board Support Packages. @@ -1202,9 +1202,9 @@ diff -uNr 05_safe_globals/src/bsp.rs 06_drivers_gpio_uart/src/bsp.rs mod raspberrypi; -diff -uNr 05_safe_globals/src/console.rs 06_drivers_gpio_uart/src/console.rs ---- 05_safe_globals/src/console.rs -+++ 06_drivers_gpio_uart/src/console.rs +diff -uNr 04_safe_globals/src/console.rs 05_drivers_gpio_uart/src/console.rs +--- 04_safe_globals/src/console.rs ++++ 05_drivers_gpio_uart/src/console.rs @@ -14,8 +14,25 @@ /// Console write functions. @@ -1247,9 +1247,9 @@ diff -uNr 05_safe_globals/src/console.rs 06_drivers_gpio_uart/src/console.rs + pub trait All = Write + Read + Statistics; } -diff -uNr 05_safe_globals/src/cpu.rs 06_drivers_gpio_uart/src/cpu.rs ---- 05_safe_globals/src/cpu.rs -+++ 06_drivers_gpio_uart/src/cpu.rs +diff -uNr 04_safe_globals/src/cpu.rs 05_drivers_gpio_uart/src/cpu.rs +--- 04_safe_globals/src/cpu.rs ++++ 05_drivers_gpio_uart/src/cpu.rs @@ -13,4 +13,7 @@ //-------------------------------------------------------------------------------------------------- // Architectural Public Reexports @@ -1260,9 +1260,9 @@ diff -uNr 05_safe_globals/src/cpu.rs 06_drivers_gpio_uart/src/cpu.rs +#[cfg(feature = "bsp_rpi3")] +pub use arch_cpu::spin_for_cycles; -diff -uNr 05_safe_globals/src/driver.rs 06_drivers_gpio_uart/src/driver.rs ---- 05_safe_globals/src/driver.rs -+++ 06_drivers_gpio_uart/src/driver.rs +diff -uNr 04_safe_globals/src/driver.rs 05_drivers_gpio_uart/src/driver.rs +--- 04_safe_globals/src/driver.rs ++++ 05_drivers_gpio_uart/src/driver.rs @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1309,9 +1309,9 @@ diff -uNr 05_safe_globals/src/driver.rs 06_drivers_gpio_uart/src/driver.rs + } +} -diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs ---- 05_safe_globals/src/main.rs -+++ 06_drivers_gpio_uart/src/main.rs +diff -uNr 04_safe_globals/src/main.rs 05_drivers_gpio_uart/src/main.rs +--- 04_safe_globals/src/main.rs ++++ 05_drivers_gpio_uart/src/main.rs @@ -106,6 +106,8 @@ //! //! [`runtime_init::runtime_init()`]: runtime_init/fn.runtime_init.html @@ -1385,9 +1385,9 @@ diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs + } } -diff -uNr 05_safe_globals/src/panic_wait.rs 06_drivers_gpio_uart/src/panic_wait.rs ---- 05_safe_globals/src/panic_wait.rs -+++ 06_drivers_gpio_uart/src/panic_wait.rs +diff -uNr 04_safe_globals/src/panic_wait.rs 05_drivers_gpio_uart/src/panic_wait.rs +--- 04_safe_globals/src/panic_wait.rs ++++ 05_drivers_gpio_uart/src/panic_wait.rs @@ -4,15 +4,35 @@ //! A panic handler that infinitely waits. diff --git a/06_drivers_gpio_uart/build.rs b/05_drivers_gpio_uart/build.rs similarity index 100% rename from 06_drivers_gpio_uart/build.rs rename to 05_drivers_gpio_uart/build.rs diff --git a/06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs b/05_drivers_gpio_uart/src/_arch/aarch64/cpu.rs similarity index 100% rename from 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs rename to 05_drivers_gpio_uart/src/_arch/aarch64/cpu.rs diff --git a/06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.rs b/05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.rs rename to 05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.rs diff --git a/06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s b/05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s rename to 05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s diff --git a/06_drivers_gpio_uart/src/bsp.rs b/05_drivers_gpio_uart/src/bsp.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp.rs rename to 05_drivers_gpio_uart/src/bsp.rs diff --git a/06_drivers_gpio_uart/src/bsp/device_driver.rs b/05_drivers_gpio_uart/src/bsp/device_driver.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/device_driver.rs rename to 05_drivers_gpio_uart/src/bsp/device_driver.rs diff --git a/06_drivers_gpio_uart/src/bsp/device_driver/bcm.rs b/05_drivers_gpio_uart/src/bsp/device_driver/bcm.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/device_driver/bcm.rs rename to 05_drivers_gpio_uart/src/bsp/device_driver/bcm.rs diff --git a/06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/06_drivers_gpio_uart/src/bsp/device_driver/common.rs b/05_drivers_gpio_uart/src/bsp/device_driver/common.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/device_driver/common.rs rename to 05_drivers_gpio_uart/src/bsp/device_driver/common.rs diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi.rs b/05_drivers_gpio_uart/src/bsp/raspberrypi.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi.rs rename to 05_drivers_gpio_uart/src/bsp/raspberrypi.rs diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi/console.rs b/05_drivers_gpio_uart/src/bsp/raspberrypi/console.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi/console.rs rename to 05_drivers_gpio_uart/src/bsp/raspberrypi/console.rs diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi/cpu.rs b/05_drivers_gpio_uart/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi/cpu.rs rename to 05_drivers_gpio_uart/src/bsp/raspberrypi/cpu.rs diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs b/05_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs rename to 05_drivers_gpio_uart/src/bsp/raspberrypi/driver.rs diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld b/05_drivers_gpio_uart/src/bsp/raspberrypi/link.ld similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld rename to 05_drivers_gpio_uart/src/bsp/raspberrypi/link.ld diff --git a/06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs b/05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs rename to 05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs diff --git a/06_drivers_gpio_uart/src/console.rs b/05_drivers_gpio_uart/src/console.rs similarity index 100% rename from 06_drivers_gpio_uart/src/console.rs rename to 05_drivers_gpio_uart/src/console.rs diff --git a/06_drivers_gpio_uart/src/cpu.rs b/05_drivers_gpio_uart/src/cpu.rs similarity index 100% rename from 06_drivers_gpio_uart/src/cpu.rs rename to 05_drivers_gpio_uart/src/cpu.rs diff --git a/06_drivers_gpio_uart/src/cpu/boot.rs b/05_drivers_gpio_uart/src/cpu/boot.rs similarity index 100% rename from 06_drivers_gpio_uart/src/cpu/boot.rs rename to 05_drivers_gpio_uart/src/cpu/boot.rs diff --git a/06_drivers_gpio_uart/src/driver.rs b/05_drivers_gpio_uart/src/driver.rs similarity index 100% rename from 06_drivers_gpio_uart/src/driver.rs rename to 05_drivers_gpio_uart/src/driver.rs diff --git a/06_drivers_gpio_uart/src/main.rs b/05_drivers_gpio_uart/src/main.rs similarity index 100% rename from 06_drivers_gpio_uart/src/main.rs rename to 05_drivers_gpio_uart/src/main.rs diff --git a/06_drivers_gpio_uart/src/memory.rs b/05_drivers_gpio_uart/src/memory.rs similarity index 100% rename from 06_drivers_gpio_uart/src/memory.rs rename to 05_drivers_gpio_uart/src/memory.rs diff --git a/06_drivers_gpio_uart/src/panic_wait.rs b/05_drivers_gpio_uart/src/panic_wait.rs similarity index 100% rename from 06_drivers_gpio_uart/src/panic_wait.rs rename to 05_drivers_gpio_uart/src/panic_wait.rs diff --git a/06_drivers_gpio_uart/src/print.rs b/05_drivers_gpio_uart/src/print.rs similarity index 100% rename from 06_drivers_gpio_uart/src/print.rs rename to 05_drivers_gpio_uart/src/print.rs diff --git a/06_drivers_gpio_uart/src/runtime_init.rs b/05_drivers_gpio_uart/src/runtime_init.rs similarity index 100% rename from 06_drivers_gpio_uart/src/runtime_init.rs rename to 05_drivers_gpio_uart/src/runtime_init.rs diff --git a/06_drivers_gpio_uart/src/synchronization.rs b/05_drivers_gpio_uart/src/synchronization.rs similarity index 100% rename from 06_drivers_gpio_uart/src/synchronization.rs rename to 05_drivers_gpio_uart/src/synchronization.rs diff --git a/07_uart_chainloader/.vscode/settings.json b/06_uart_chainloader/.vscode/settings.json similarity index 100% rename from 07_uart_chainloader/.vscode/settings.json rename to 06_uart_chainloader/.vscode/settings.json diff --git a/07_uart_chainloader/Cargo.lock b/06_uart_chainloader/Cargo.lock similarity index 100% rename from 07_uart_chainloader/Cargo.lock rename to 06_uart_chainloader/Cargo.lock diff --git a/07_uart_chainloader/Cargo.toml b/06_uart_chainloader/Cargo.toml similarity index 100% rename from 07_uart_chainloader/Cargo.toml rename to 06_uart_chainloader/Cargo.toml diff --git a/07_uart_chainloader/Makefile b/06_uart_chainloader/Makefile similarity index 100% rename from 07_uart_chainloader/Makefile rename to 06_uart_chainloader/Makefile diff --git a/07_uart_chainloader/README.md b/06_uart_chainloader/README.md similarity index 88% rename from 07_uart_chainloader/README.md rename to 06_uart_chainloader/README.md index a60fe905..457a96cd 100644 --- a/07_uart_chainloader/README.md +++ b/06_uart_chainloader/README.md @@ -1,4 +1,4 @@ -# Tutorial 07 - UART Chainloader +# Tutorial 06 - UART Chainloader ## tl;dr @@ -118,12 +118,12 @@ IN: ## Diff to previous ```diff -Binary files 06_drivers_gpio_uart/demo_payload_rpi3.img and 07_uart_chainloader/demo_payload_rpi3.img differ -Binary files 06_drivers_gpio_uart/demo_payload_rpi4.img and 07_uart_chainloader/demo_payload_rpi4.img differ +Binary files 05_drivers_gpio_uart/demo_payload_rpi3.img and 06_uart_chainloader/demo_payload_rpi3.img differ +Binary files 05_drivers_gpio_uart/demo_payload_rpi4.img and 06_uart_chainloader/demo_payload_rpi4.img differ -diff -uNr 06_drivers_gpio_uart/Makefile 07_uart_chainloader/Makefile ---- 06_drivers_gpio_uart/Makefile -+++ 07_uart_chainloader/Makefile +diff -uNr 05_drivers_gpio_uart/Makefile 06_uart_chainloader/Makefile +--- 05_drivers_gpio_uart/Makefile ++++ 06_uart_chainloader/Makefile @@ -25,6 +25,7 @@ READELF_BINARY = aarch64-none-elf-readelf LINKER_FILE = src/bsp/raspberrypi/link.ld @@ -176,9 +176,9 @@ diff -uNr 06_drivers_gpio_uart/Makefile 07_uart_chainloader/Makefile clippy: @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) -diff -uNr 06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s ---- 06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s -+++ 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s +diff -uNr 05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s 06_uart_chainloader/src/_arch/aarch64/cpu/boot.s +--- 05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s ++++ 06_uart_chainloader/src/_arch/aarch64/cpu/boot.s @@ -22,20 +22,31 @@ and x1, x1, _core_id_mask ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs @@ -218,9 +218,9 @@ diff -uNr 06_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s 07_uart_chainloader/ .size _start, . - _start .type _start, function -diff -uNr 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ---- 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs -+++ 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +diff -uNr 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +--- 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ++++ 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs @@ -144,7 +144,7 @@ // Make an educated guess for a good delay value (Sequence described in the BCM2837 // peripherals PDF). @@ -231,9 +231,9 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 07_uart // // So lets try to be on the safe side and default to 2000 cycles, which would equal 1 µs -diff -uNr 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ---- 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs -+++ 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +diff -uNr 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +--- 05_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ++++ 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs @@ -279,7 +279,7 @@ } @@ -275,9 +275,9 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 0 {} } -diff -uNr 06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld 07_uart_chainloader/src/bsp/raspberrypi/link.ld ---- 06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld -+++ 07_uart_chainloader/src/bsp/raspberrypi/link.ld +diff -uNr 05_drivers_gpio_uart/src/bsp/raspberrypi/link.ld 06_uart_chainloader/src/bsp/raspberrypi/link.ld +--- 05_drivers_gpio_uart/src/bsp/raspberrypi/link.ld ++++ 06_uart_chainloader/src/bsp/raspberrypi/link.ld @@ -16,7 +16,8 @@ SECTIONS @@ -311,9 +311,9 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/raspberrypi/link.ld 07_uart_chainloader/s __bss_start = .; *(.bss*); -diff -uNr 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs 07_uart_chainloader/src/bsp/raspberrypi/memory.rs ---- 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs -+++ 07_uart_chainloader/src/bsp/raspberrypi/memory.rs +diff -uNr 05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs 06_uart_chainloader/src/bsp/raspberrypi/memory.rs +--- 05_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs ++++ 06_uart_chainloader/src/bsp/raspberrypi/memory.rs @@ -23,9 +23,10 @@ /// The board's physical memory map. #[rustfmt::skip] @@ -343,9 +343,9 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/raspberrypi/memory.rs 07_uart_chainloader /// # Safety /// -diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs ---- 06_drivers_gpio_uart/src/main.rs -+++ 07_uart_chainloader/src/main.rs +diff -uNr 05_drivers_gpio_uart/src/main.rs 06_uart_chainloader/src/main.rs +--- 05_drivers_gpio_uart/src/main.rs ++++ 06_uart_chainloader/src/main.rs @@ -107,6 +107,7 @@ //! [`runtime_init::runtime_init()`]: runtime_init/fn.runtime_init.html @@ -425,17 +425,17 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs + kernel() } -diff -uNr 06_drivers_gpio_uart/update.sh 07_uart_chainloader/update.sh ---- 06_drivers_gpio_uart/update.sh -+++ 07_uart_chainloader/update.sh +diff -uNr 05_drivers_gpio_uart/update.sh 06_uart_chainloader/update.sh +--- 05_drivers_gpio_uart/update.sh ++++ 06_uart_chainloader/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + -+cd ../06_drivers_gpio_uart ++cd ../05_drivers_gpio_uart +BSP=rpi4 make -+cp kernel8.img ../07_uart_chainloader/demo_payload_rpi4.img ++cp kernel8.img ../06_uart_chainloader/demo_payload_rpi4.img +make -+cp kernel8.img ../07_uart_chainloader/demo_payload_rpi3.img ++cp kernel8.img ../06_uart_chainloader/demo_payload_rpi3.img +rm kernel8.img ``` diff --git a/07_uart_chainloader/build.rs b/06_uart_chainloader/build.rs similarity index 100% rename from 07_uart_chainloader/build.rs rename to 06_uart_chainloader/build.rs diff --git a/07_uart_chainloader/demo_payload_rpi3.img b/06_uart_chainloader/demo_payload_rpi3.img similarity index 100% rename from 07_uart_chainloader/demo_payload_rpi3.img rename to 06_uart_chainloader/demo_payload_rpi3.img diff --git a/07_uart_chainloader/demo_payload_rpi4.img b/06_uart_chainloader/demo_payload_rpi4.img similarity index 100% rename from 07_uart_chainloader/demo_payload_rpi4.img rename to 06_uart_chainloader/demo_payload_rpi4.img diff --git a/07_uart_chainloader/src/_arch/aarch64/cpu.rs b/06_uart_chainloader/src/_arch/aarch64/cpu.rs similarity index 100% rename from 07_uart_chainloader/src/_arch/aarch64/cpu.rs rename to 06_uart_chainloader/src/_arch/aarch64/cpu.rs diff --git a/07_uart_chainloader/src/_arch/aarch64/cpu/boot.rs b/06_uart_chainloader/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 07_uart_chainloader/src/_arch/aarch64/cpu/boot.rs rename to 06_uart_chainloader/src/_arch/aarch64/cpu/boot.rs diff --git a/07_uart_chainloader/src/_arch/aarch64/cpu/boot.s b/06_uart_chainloader/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s rename to 06_uart_chainloader/src/_arch/aarch64/cpu/boot.s diff --git a/07_uart_chainloader/src/bsp.rs b/06_uart_chainloader/src/bsp.rs similarity index 100% rename from 07_uart_chainloader/src/bsp.rs rename to 06_uart_chainloader/src/bsp.rs diff --git a/07_uart_chainloader/src/bsp/device_driver.rs b/06_uart_chainloader/src/bsp/device_driver.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/device_driver.rs rename to 06_uart_chainloader/src/bsp/device_driver.rs diff --git a/07_uart_chainloader/src/bsp/device_driver/bcm.rs b/06_uart_chainloader/src/bsp/device_driver/bcm.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/device_driver/bcm.rs rename to 06_uart_chainloader/src/bsp/device_driver/bcm.rs diff --git a/07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/07_uart_chainloader/src/bsp/device_driver/common.rs b/06_uart_chainloader/src/bsp/device_driver/common.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/device_driver/common.rs rename to 06_uart_chainloader/src/bsp/device_driver/common.rs diff --git a/07_uart_chainloader/src/bsp/raspberrypi.rs b/06_uart_chainloader/src/bsp/raspberrypi.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi.rs rename to 06_uart_chainloader/src/bsp/raspberrypi.rs diff --git a/07_uart_chainloader/src/bsp/raspberrypi/console.rs b/06_uart_chainloader/src/bsp/raspberrypi/console.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi/console.rs rename to 06_uart_chainloader/src/bsp/raspberrypi/console.rs diff --git a/07_uart_chainloader/src/bsp/raspberrypi/cpu.rs b/06_uart_chainloader/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi/cpu.rs rename to 06_uart_chainloader/src/bsp/raspberrypi/cpu.rs diff --git a/07_uart_chainloader/src/bsp/raspberrypi/driver.rs b/06_uart_chainloader/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi/driver.rs rename to 06_uart_chainloader/src/bsp/raspberrypi/driver.rs diff --git a/07_uart_chainloader/src/bsp/raspberrypi/link.ld b/06_uart_chainloader/src/bsp/raspberrypi/link.ld similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi/link.ld rename to 06_uart_chainloader/src/bsp/raspberrypi/link.ld diff --git a/07_uart_chainloader/src/bsp/raspberrypi/memory.rs b/06_uart_chainloader/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 07_uart_chainloader/src/bsp/raspberrypi/memory.rs rename to 06_uart_chainloader/src/bsp/raspberrypi/memory.rs diff --git a/07_uart_chainloader/src/console.rs b/06_uart_chainloader/src/console.rs similarity index 100% rename from 07_uart_chainloader/src/console.rs rename to 06_uart_chainloader/src/console.rs diff --git a/07_uart_chainloader/src/cpu.rs b/06_uart_chainloader/src/cpu.rs similarity index 100% rename from 07_uart_chainloader/src/cpu.rs rename to 06_uart_chainloader/src/cpu.rs diff --git a/07_uart_chainloader/src/cpu/boot.rs b/06_uart_chainloader/src/cpu/boot.rs similarity index 100% rename from 07_uart_chainloader/src/cpu/boot.rs rename to 06_uart_chainloader/src/cpu/boot.rs diff --git a/07_uart_chainloader/src/driver.rs b/06_uart_chainloader/src/driver.rs similarity index 100% rename from 07_uart_chainloader/src/driver.rs rename to 06_uart_chainloader/src/driver.rs diff --git a/07_uart_chainloader/src/main.rs b/06_uart_chainloader/src/main.rs similarity index 100% rename from 07_uart_chainloader/src/main.rs rename to 06_uart_chainloader/src/main.rs diff --git a/07_uart_chainloader/src/memory.rs b/06_uart_chainloader/src/memory.rs similarity index 100% rename from 07_uart_chainloader/src/memory.rs rename to 06_uart_chainloader/src/memory.rs diff --git a/07_uart_chainloader/src/panic_wait.rs b/06_uart_chainloader/src/panic_wait.rs similarity index 100% rename from 07_uart_chainloader/src/panic_wait.rs rename to 06_uart_chainloader/src/panic_wait.rs diff --git a/07_uart_chainloader/src/print.rs b/06_uart_chainloader/src/print.rs similarity index 100% rename from 07_uart_chainloader/src/print.rs rename to 06_uart_chainloader/src/print.rs diff --git a/07_uart_chainloader/src/runtime_init.rs b/06_uart_chainloader/src/runtime_init.rs similarity index 100% rename from 07_uart_chainloader/src/runtime_init.rs rename to 06_uart_chainloader/src/runtime_init.rs diff --git a/07_uart_chainloader/src/synchronization.rs b/06_uart_chainloader/src/synchronization.rs similarity index 100% rename from 07_uart_chainloader/src/synchronization.rs rename to 06_uart_chainloader/src/synchronization.rs diff --git a/06_uart_chainloader/update.sh b/06_uart_chainloader/update.sh new file mode 100755 index 00000000..5fac48ba --- /dev/null +++ b/06_uart_chainloader/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +cd ../05_drivers_gpio_uart +BSP=rpi4 make +cp kernel8.img ../06_uart_chainloader/demo_payload_rpi4.img +make +cp kernel8.img ../06_uart_chainloader/demo_payload_rpi3.img +rm kernel8.img diff --git a/08_timestamps/.vscode/settings.json b/07_timestamps/.vscode/settings.json similarity index 100% rename from 08_timestamps/.vscode/settings.json rename to 07_timestamps/.vscode/settings.json diff --git a/08_timestamps/Cargo.lock b/07_timestamps/Cargo.lock similarity index 100% rename from 08_timestamps/Cargo.lock rename to 07_timestamps/Cargo.lock diff --git a/08_timestamps/Cargo.toml b/07_timestamps/Cargo.toml similarity index 100% rename from 08_timestamps/Cargo.toml rename to 07_timestamps/Cargo.toml diff --git a/08_timestamps/Makefile b/07_timestamps/Makefile similarity index 100% rename from 08_timestamps/Makefile rename to 07_timestamps/Makefile diff --git a/08_timestamps/README.md b/07_timestamps/README.md similarity index 89% rename from 08_timestamps/README.md rename to 07_timestamps/README.md index 122308a6..b115dc09 100644 --- a/08_timestamps/README.md +++ b/07_timestamps/README.md @@ -1,4 +1,4 @@ -# Tutorial 08 - Timestamps +# Tutorial 07 - Timestamps ## tl;dr @@ -43,12 +43,12 @@ Minipush 1.0 ## Diff to previous ```diff -Binary files 07_uart_chainloader/demo_payload_rpi3.img and 08_timestamps/demo_payload_rpi3.img differ -Binary files 07_uart_chainloader/demo_payload_rpi4.img and 08_timestamps/demo_payload_rpi4.img differ +Binary files 06_uart_chainloader/demo_payload_rpi3.img and 07_timestamps/demo_payload_rpi3.img differ +Binary files 06_uart_chainloader/demo_payload_rpi4.img and 07_timestamps/demo_payload_rpi4.img differ -diff -uNr 07_uart_chainloader/Makefile 08_timestamps/Makefile ---- 07_uart_chainloader/Makefile -+++ 08_timestamps/Makefile +diff -uNr 06_uart_chainloader/Makefile 07_timestamps/Makefile +--- 06_uart_chainloader/Makefile ++++ 07_timestamps/Makefile @@ -25,7 +25,6 @@ READELF_BINARY = aarch64-none-elf-readelf LINKER_FILE = src/bsp/raspberrypi/link.ld @@ -93,9 +93,9 @@ diff -uNr 07_uart_chainloader/Makefile 08_timestamps/Makefile clippy: @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) -diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s 08_timestamps/src/_arch/aarch64/cpu/boot.s ---- 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s -+++ 08_timestamps/src/_arch/aarch64/cpu/boot.s +diff -uNr 06_uart_chainloader/src/_arch/aarch64/cpu/boot.s 07_timestamps/src/_arch/aarch64/cpu/boot.s +--- 06_uart_chainloader/src/_arch/aarch64/cpu/boot.s ++++ 07_timestamps/src/_arch/aarch64/cpu/boot.s @@ -22,31 +22,20 @@ and x1, x1, _core_id_mask ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs @@ -135,9 +135,9 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu/boot.s 08_timestamps/src/_ar .size _start, . - _start .type _start, function -diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/aarch64/cpu.rs ---- 07_uart_chainloader/src/_arch/aarch64/cpu.rs -+++ 08_timestamps/src/_arch/aarch64/cpu.rs +diff -uNr 06_uart_chainloader/src/_arch/aarch64/cpu.rs 07_timestamps/src/_arch/aarch64/cpu.rs +--- 06_uart_chainloader/src/_arch/aarch64/cpu.rs ++++ 07_timestamps/src/_arch/aarch64/cpu.rs @@ -19,15 +19,6 @@ pub use asm::nop; @@ -155,9 +155,9 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/a #[inline(always)] pub fn wait_forever() -> ! { -diff -uNr 07_uart_chainloader/src/_arch/aarch64/time.rs 08_timestamps/src/_arch/aarch64/time.rs ---- 07_uart_chainloader/src/_arch/aarch64/time.rs -+++ 08_timestamps/src/_arch/aarch64/time.rs +diff -uNr 06_uart_chainloader/src/_arch/aarch64/time.rs 07_timestamps/src/_arch/aarch64/time.rs +--- 06_uart_chainloader/src/_arch/aarch64/time.rs ++++ 07_timestamps/src/_arch/aarch64/time.rs @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -278,9 +278,9 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/time.rs 08_timestamps/src/_arch/ + } +} -diff -uNr 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ---- 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs -+++ 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +diff -uNr 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +--- 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ++++ 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs @@ -139,25 +139,19 @@ /// Disable pull-up/down on pins 14 and 15. #[cfg(feature = "bsp_rpi3")] @@ -314,9 +314,9 @@ diff -uNr 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 08_times self.registers.GPPUD.write(GPPUD::PUD::Off); self.registers.GPPUDCLK0.set(0); -diff -uNr 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ---- 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs -+++ 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +diff -uNr 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +--- 06_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ++++ 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs @@ -279,7 +279,7 @@ } @@ -358,9 +358,9 @@ diff -uNr 07_uart_chainloader/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 08 {} } -diff -uNr 07_uart_chainloader/src/bsp/raspberrypi/link.ld 08_timestamps/src/bsp/raspberrypi/link.ld ---- 07_uart_chainloader/src/bsp/raspberrypi/link.ld -+++ 08_timestamps/src/bsp/raspberrypi/link.ld +diff -uNr 06_uart_chainloader/src/bsp/raspberrypi/link.ld 07_timestamps/src/bsp/raspberrypi/link.ld +--- 06_uart_chainloader/src/bsp/raspberrypi/link.ld ++++ 07_timestamps/src/bsp/raspberrypi/link.ld @@ -16,8 +16,7 @@ SECTIONS @@ -394,9 +394,9 @@ diff -uNr 07_uart_chainloader/src/bsp/raspberrypi/link.ld 08_timestamps/src/bsp/ __bss_start = .; *(.bss*); -diff -uNr 07_uart_chainloader/src/bsp/raspberrypi/memory.rs 08_timestamps/src/bsp/raspberrypi/memory.rs ---- 07_uart_chainloader/src/bsp/raspberrypi/memory.rs -+++ 08_timestamps/src/bsp/raspberrypi/memory.rs +diff -uNr 06_uart_chainloader/src/bsp/raspberrypi/memory.rs 07_timestamps/src/bsp/raspberrypi/memory.rs +--- 06_uart_chainloader/src/bsp/raspberrypi/memory.rs ++++ 07_timestamps/src/bsp/raspberrypi/memory.rs @@ -23,10 +23,9 @@ /// The board's physical memory map. #[rustfmt::skip] @@ -426,9 +426,9 @@ diff -uNr 07_uart_chainloader/src/bsp/raspberrypi/memory.rs 08_timestamps/src/bs /// # Safety /// -diff -uNr 07_uart_chainloader/src/cpu.rs 08_timestamps/src/cpu.rs ---- 07_uart_chainloader/src/cpu.rs -+++ 08_timestamps/src/cpu.rs +diff -uNr 06_uart_chainloader/src/cpu.rs 07_timestamps/src/cpu.rs +--- 06_uart_chainloader/src/cpu.rs ++++ 07_timestamps/src/cpu.rs @@ -14,6 +14,3 @@ // Architectural Public Reexports //-------------------------------------------------------------------------------------------------- @@ -437,9 +437,9 @@ diff -uNr 07_uart_chainloader/src/cpu.rs 08_timestamps/src/cpu.rs -#[cfg(feature = "bsp_rpi3")] -pub use arch_cpu::spin_for_cycles; -diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs ---- 07_uart_chainloader/src/main.rs -+++ 08_timestamps/src/main.rs +diff -uNr 06_uart_chainloader/src/main.rs 07_timestamps/src/main.rs +--- 06_uart_chainloader/src/main.rs ++++ 07_timestamps/src/main.rs @@ -107,7 +107,6 @@ //! [`runtime_init::runtime_init()`]: runtime_init/fn.runtime_init.html @@ -531,9 +531,9 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs + } } -diff -uNr 07_uart_chainloader/src/print.rs 08_timestamps/src/print.rs ---- 07_uart_chainloader/src/print.rs -+++ 08_timestamps/src/print.rs +diff -uNr 06_uart_chainloader/src/print.rs 07_timestamps/src/print.rs +--- 06_uart_chainloader/src/print.rs ++++ 07_timestamps/src/print.rs @@ -36,3 +36,71 @@ $crate::print::_print(format_args_nl!($($arg)*)); }) @@ -607,9 +607,9 @@ diff -uNr 07_uart_chainloader/src/print.rs 08_timestamps/src/print.rs + }) +} -diff -uNr 07_uart_chainloader/src/time.rs 08_timestamps/src/time.rs ---- 07_uart_chainloader/src/time.rs -+++ 08_timestamps/src/time.rs +diff -uNr 06_uart_chainloader/src/time.rs 07_timestamps/src/time.rs +--- 06_uart_chainloader/src/time.rs ++++ 07_timestamps/src/time.rs @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -649,17 +649,17 @@ diff -uNr 07_uart_chainloader/src/time.rs 08_timestamps/src/time.rs + } +} -diff -uNr 07_uart_chainloader/update.sh 08_timestamps/update.sh ---- 07_uart_chainloader/update.sh -+++ 08_timestamps/update.sh +diff -uNr 06_uart_chainloader/update.sh 07_timestamps/update.sh +--- 06_uart_chainloader/update.sh ++++ 07_timestamps/update.sh @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - --cd ../06_drivers_gpio_uart +-cd ../05_drivers_gpio_uart -BSP=rpi4 make --cp kernel8.img ../07_uart_chainloader/demo_payload_rpi4.img +-cp kernel8.img ../06_uart_chainloader/demo_payload_rpi4.img -make --cp kernel8.img ../07_uart_chainloader/demo_payload_rpi3.img +-cp kernel8.img ../06_uart_chainloader/demo_payload_rpi3.img -rm kernel8.img ``` diff --git a/08_timestamps/build.rs b/07_timestamps/build.rs similarity index 100% rename from 08_timestamps/build.rs rename to 07_timestamps/build.rs diff --git a/08_timestamps/src/_arch/aarch64/cpu.rs b/07_timestamps/src/_arch/aarch64/cpu.rs similarity index 100% rename from 08_timestamps/src/_arch/aarch64/cpu.rs rename to 07_timestamps/src/_arch/aarch64/cpu.rs diff --git a/08_timestamps/src/_arch/aarch64/cpu/boot.rs b/07_timestamps/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 08_timestamps/src/_arch/aarch64/cpu/boot.rs rename to 07_timestamps/src/_arch/aarch64/cpu/boot.rs diff --git a/08_timestamps/src/_arch/aarch64/cpu/boot.s b/07_timestamps/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 08_timestamps/src/_arch/aarch64/cpu/boot.s rename to 07_timestamps/src/_arch/aarch64/cpu/boot.s diff --git a/08_timestamps/src/_arch/aarch64/time.rs b/07_timestamps/src/_arch/aarch64/time.rs similarity index 100% rename from 08_timestamps/src/_arch/aarch64/time.rs rename to 07_timestamps/src/_arch/aarch64/time.rs diff --git a/08_timestamps/src/bsp.rs b/07_timestamps/src/bsp.rs similarity index 100% rename from 08_timestamps/src/bsp.rs rename to 07_timestamps/src/bsp.rs diff --git a/08_timestamps/src/bsp/device_driver.rs b/07_timestamps/src/bsp/device_driver.rs similarity index 100% rename from 08_timestamps/src/bsp/device_driver.rs rename to 07_timestamps/src/bsp/device_driver.rs diff --git a/08_timestamps/src/bsp/device_driver/bcm.rs b/07_timestamps/src/bsp/device_driver/bcm.rs similarity index 100% rename from 08_timestamps/src/bsp/device_driver/bcm.rs rename to 07_timestamps/src/bsp/device_driver/bcm.rs diff --git a/08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 08_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 07_timestamps/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/08_timestamps/src/bsp/device_driver/common.rs b/07_timestamps/src/bsp/device_driver/common.rs similarity index 100% rename from 08_timestamps/src/bsp/device_driver/common.rs rename to 07_timestamps/src/bsp/device_driver/common.rs diff --git a/08_timestamps/src/bsp/raspberrypi.rs b/07_timestamps/src/bsp/raspberrypi.rs similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi.rs rename to 07_timestamps/src/bsp/raspberrypi.rs diff --git a/08_timestamps/src/bsp/raspberrypi/console.rs b/07_timestamps/src/bsp/raspberrypi/console.rs similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi/console.rs rename to 07_timestamps/src/bsp/raspberrypi/console.rs diff --git a/08_timestamps/src/bsp/raspberrypi/cpu.rs b/07_timestamps/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi/cpu.rs rename to 07_timestamps/src/bsp/raspberrypi/cpu.rs diff --git a/08_timestamps/src/bsp/raspberrypi/driver.rs b/07_timestamps/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi/driver.rs rename to 07_timestamps/src/bsp/raspberrypi/driver.rs diff --git a/08_timestamps/src/bsp/raspberrypi/link.ld b/07_timestamps/src/bsp/raspberrypi/link.ld similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi/link.ld rename to 07_timestamps/src/bsp/raspberrypi/link.ld diff --git a/08_timestamps/src/bsp/raspberrypi/memory.rs b/07_timestamps/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 08_timestamps/src/bsp/raspberrypi/memory.rs rename to 07_timestamps/src/bsp/raspberrypi/memory.rs diff --git a/08_timestamps/src/console.rs b/07_timestamps/src/console.rs similarity index 100% rename from 08_timestamps/src/console.rs rename to 07_timestamps/src/console.rs diff --git a/08_timestamps/src/cpu.rs b/07_timestamps/src/cpu.rs similarity index 100% rename from 08_timestamps/src/cpu.rs rename to 07_timestamps/src/cpu.rs diff --git a/08_timestamps/src/cpu/boot.rs b/07_timestamps/src/cpu/boot.rs similarity index 100% rename from 08_timestamps/src/cpu/boot.rs rename to 07_timestamps/src/cpu/boot.rs diff --git a/08_timestamps/src/driver.rs b/07_timestamps/src/driver.rs similarity index 100% rename from 08_timestamps/src/driver.rs rename to 07_timestamps/src/driver.rs diff --git a/08_timestamps/src/main.rs b/07_timestamps/src/main.rs similarity index 100% rename from 08_timestamps/src/main.rs rename to 07_timestamps/src/main.rs diff --git a/08_timestamps/src/memory.rs b/07_timestamps/src/memory.rs similarity index 100% rename from 08_timestamps/src/memory.rs rename to 07_timestamps/src/memory.rs diff --git a/08_timestamps/src/panic_wait.rs b/07_timestamps/src/panic_wait.rs similarity index 100% rename from 08_timestamps/src/panic_wait.rs rename to 07_timestamps/src/panic_wait.rs diff --git a/08_timestamps/src/print.rs b/07_timestamps/src/print.rs similarity index 100% rename from 08_timestamps/src/print.rs rename to 07_timestamps/src/print.rs diff --git a/08_timestamps/src/runtime_init.rs b/07_timestamps/src/runtime_init.rs similarity index 100% rename from 08_timestamps/src/runtime_init.rs rename to 07_timestamps/src/runtime_init.rs diff --git a/08_timestamps/src/synchronization.rs b/07_timestamps/src/synchronization.rs similarity index 100% rename from 08_timestamps/src/synchronization.rs rename to 07_timestamps/src/synchronization.rs diff --git a/08_timestamps/src/time.rs b/07_timestamps/src/time.rs similarity index 100% rename from 08_timestamps/src/time.rs rename to 07_timestamps/src/time.rs diff --git a/07_uart_chainloader/update.sh b/07_uart_chainloader/update.sh deleted file mode 100755 index 7d57d0a6..00000000 --- a/07_uart_chainloader/update.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -cd ../06_drivers_gpio_uart -BSP=rpi4 make -cp kernel8.img ../07_uart_chainloader/demo_payload_rpi4.img -make -cp kernel8.img ../07_uart_chainloader/demo_payload_rpi3.img -rm kernel8.img diff --git a/09_hw_debug_JTAG/.vscode/settings.json b/08_hw_debug_JTAG/.vscode/settings.json similarity index 100% rename from 09_hw_debug_JTAG/.vscode/settings.json rename to 08_hw_debug_JTAG/.vscode/settings.json diff --git a/09_hw_debug_JTAG/Cargo.lock b/08_hw_debug_JTAG/Cargo.lock similarity index 100% rename from 09_hw_debug_JTAG/Cargo.lock rename to 08_hw_debug_JTAG/Cargo.lock diff --git a/09_hw_debug_JTAG/Cargo.toml b/08_hw_debug_JTAG/Cargo.toml similarity index 100% rename from 09_hw_debug_JTAG/Cargo.toml rename to 08_hw_debug_JTAG/Cargo.toml diff --git a/09_hw_debug_JTAG/Makefile b/08_hw_debug_JTAG/Makefile similarity index 100% rename from 09_hw_debug_JTAG/Makefile rename to 08_hw_debug_JTAG/Makefile diff --git a/09_hw_debug_JTAG/README.md b/08_hw_debug_JTAG/README.md similarity index 98% rename from 09_hw_debug_JTAG/README.md rename to 08_hw_debug_JTAG/README.md index 0c9fb497..03d16a4f 100644 --- a/09_hw_debug_JTAG/README.md +++ b/08_hw_debug_JTAG/README.md @@ -1,4 +1,4 @@ -# Tutorial 09 - Hardware Debugging using JTAG +# Tutorial 08 - Hardware Debugging using JTAG ## tl;dr @@ -305,9 +305,9 @@ Thanks to [@naotaco](https://github.com/naotaco) for laying the groundwork for t ## Diff to previous ```diff -diff -uNr 08_timestamps/Makefile 09_hw_debug_JTAG/Makefile ---- 08_timestamps/Makefile -+++ 09_hw_debug_JTAG/Makefile +diff -uNr 07_timestamps/Makefile 08_hw_debug_JTAG/Makefile +--- 07_timestamps/Makefile ++++ 08_hw_debug_JTAG/Makefile @@ -23,6 +23,8 @@ OBJDUMP_BINARY = aarch64-none-elf-objdump NM_BINARY = aarch64-none-elf-nm diff --git a/09_hw_debug_JTAG/build.rs b/08_hw_debug_JTAG/build.rs similarity index 100% rename from 09_hw_debug_JTAG/build.rs rename to 08_hw_debug_JTAG/build.rs diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs b/08_hw_debug_JTAG/src/_arch/aarch64/cpu.rs similarity index 100% rename from 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs rename to 08_hw_debug_JTAG/src/_arch/aarch64/cpu.rs diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs b/08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs rename to 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s b/08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s rename to 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/time.rs b/08_hw_debug_JTAG/src/_arch/aarch64/time.rs similarity index 100% rename from 09_hw_debug_JTAG/src/_arch/aarch64/time.rs rename to 08_hw_debug_JTAG/src/_arch/aarch64/time.rs diff --git a/09_hw_debug_JTAG/src/bsp.rs b/08_hw_debug_JTAG/src/bsp.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp.rs rename to 08_hw_debug_JTAG/src/bsp.rs diff --git a/09_hw_debug_JTAG/src/bsp/device_driver.rs b/08_hw_debug_JTAG/src/bsp/device_driver.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/device_driver.rs rename to 08_hw_debug_JTAG/src/bsp/device_driver.rs diff --git a/09_hw_debug_JTAG/src/bsp/device_driver/bcm.rs b/08_hw_debug_JTAG/src/bsp/device_driver/bcm.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/device_driver/bcm.rs rename to 08_hw_debug_JTAG/src/bsp/device_driver/bcm.rs diff --git a/09_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/08_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 08_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/09_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/08_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 08_hw_debug_JTAG/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/09_hw_debug_JTAG/src/bsp/device_driver/common.rs b/08_hw_debug_JTAG/src/bsp/device_driver/common.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/device_driver/common.rs rename to 08_hw_debug_JTAG/src/bsp/device_driver/common.rs diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi.rs b/08_hw_debug_JTAG/src/bsp/raspberrypi.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi.rs rename to 08_hw_debug_JTAG/src/bsp/raspberrypi.rs diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi/console.rs b/08_hw_debug_JTAG/src/bsp/raspberrypi/console.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi/console.rs rename to 08_hw_debug_JTAG/src/bsp/raspberrypi/console.rs diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi/cpu.rs b/08_hw_debug_JTAG/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi/cpu.rs rename to 08_hw_debug_JTAG/src/bsp/raspberrypi/cpu.rs diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi/driver.rs b/08_hw_debug_JTAG/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi/driver.rs rename to 08_hw_debug_JTAG/src/bsp/raspberrypi/driver.rs diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi/link.ld b/08_hw_debug_JTAG/src/bsp/raspberrypi/link.ld similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi/link.ld rename to 08_hw_debug_JTAG/src/bsp/raspberrypi/link.ld diff --git a/09_hw_debug_JTAG/src/bsp/raspberrypi/memory.rs b/08_hw_debug_JTAG/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 09_hw_debug_JTAG/src/bsp/raspberrypi/memory.rs rename to 08_hw_debug_JTAG/src/bsp/raspberrypi/memory.rs diff --git a/09_hw_debug_JTAG/src/console.rs b/08_hw_debug_JTAG/src/console.rs similarity index 100% rename from 09_hw_debug_JTAG/src/console.rs rename to 08_hw_debug_JTAG/src/console.rs diff --git a/09_hw_debug_JTAG/src/cpu.rs b/08_hw_debug_JTAG/src/cpu.rs similarity index 100% rename from 09_hw_debug_JTAG/src/cpu.rs rename to 08_hw_debug_JTAG/src/cpu.rs diff --git a/09_hw_debug_JTAG/src/cpu/boot.rs b/08_hw_debug_JTAG/src/cpu/boot.rs similarity index 100% rename from 09_hw_debug_JTAG/src/cpu/boot.rs rename to 08_hw_debug_JTAG/src/cpu/boot.rs diff --git a/09_hw_debug_JTAG/src/driver.rs b/08_hw_debug_JTAG/src/driver.rs similarity index 100% rename from 09_hw_debug_JTAG/src/driver.rs rename to 08_hw_debug_JTAG/src/driver.rs diff --git a/09_hw_debug_JTAG/src/main.rs b/08_hw_debug_JTAG/src/main.rs similarity index 100% rename from 09_hw_debug_JTAG/src/main.rs rename to 08_hw_debug_JTAG/src/main.rs diff --git a/09_hw_debug_JTAG/src/memory.rs b/08_hw_debug_JTAG/src/memory.rs similarity index 100% rename from 09_hw_debug_JTAG/src/memory.rs rename to 08_hw_debug_JTAG/src/memory.rs diff --git a/09_hw_debug_JTAG/src/panic_wait.rs b/08_hw_debug_JTAG/src/panic_wait.rs similarity index 100% rename from 09_hw_debug_JTAG/src/panic_wait.rs rename to 08_hw_debug_JTAG/src/panic_wait.rs diff --git a/09_hw_debug_JTAG/src/print.rs b/08_hw_debug_JTAG/src/print.rs similarity index 100% rename from 09_hw_debug_JTAG/src/print.rs rename to 08_hw_debug_JTAG/src/print.rs diff --git a/09_hw_debug_JTAG/src/runtime_init.rs b/08_hw_debug_JTAG/src/runtime_init.rs similarity index 100% rename from 09_hw_debug_JTAG/src/runtime_init.rs rename to 08_hw_debug_JTAG/src/runtime_init.rs diff --git a/09_hw_debug_JTAG/src/synchronization.rs b/08_hw_debug_JTAG/src/synchronization.rs similarity index 100% rename from 09_hw_debug_JTAG/src/synchronization.rs rename to 08_hw_debug_JTAG/src/synchronization.rs diff --git a/09_hw_debug_JTAG/src/time.rs b/08_hw_debug_JTAG/src/time.rs similarity index 100% rename from 09_hw_debug_JTAG/src/time.rs rename to 08_hw_debug_JTAG/src/time.rs diff --git a/10_privilege_level/.vscode/settings.json b/09_privilege_level/.vscode/settings.json similarity index 100% rename from 10_privilege_level/.vscode/settings.json rename to 09_privilege_level/.vscode/settings.json diff --git a/10_privilege_level/Cargo.lock b/09_privilege_level/Cargo.lock similarity index 100% rename from 10_privilege_level/Cargo.lock rename to 09_privilege_level/Cargo.lock diff --git a/10_privilege_level/Cargo.toml b/09_privilege_level/Cargo.toml similarity index 100% rename from 10_privilege_level/Cargo.toml rename to 09_privilege_level/Cargo.toml diff --git a/10_privilege_level/Makefile b/09_privilege_level/Makefile similarity index 100% rename from 10_privilege_level/Makefile rename to 09_privilege_level/Makefile diff --git a/10_privilege_level/README.md b/09_privilege_level/README.md similarity index 93% rename from 10_privilege_level/README.md rename to 09_privilege_level/README.md index 3e160e22..b8af3021 100644 --- a/10_privilege_level/README.md +++ b/09_privilege_level/README.md @@ -1,4 +1,4 @@ -# Tutorial 10 - Privilege Level +# Tutorial 09 - Privilege Level ## tl;dr @@ -71,7 +71,7 @@ pub unsafe extern "C" fn _start_rust(phys_boot_core_stack_end_exclusive_addr: u6 Since `EL2` is more privileged than `EL1`, it has control over various processor features and can allow or disallow `EL1` code to use them. One such example is access to timer and counter registers. -We are already using them since [tutorial 08](../08_timestamps/), so of course we want to keep them. +We are already using them since [tutorial 07](../07_timestamps/), so of course we want to keep them. Therefore we set the respective flags in the [Counter-timer Hypervisor Control register] and additionally set the virtual offset to zero so that we get the real physical value everytime: @@ -198,9 +198,9 @@ Minipush 1.0 ## Diff to previous ```diff -diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs 10_privilege_level/src/_arch/aarch64/cpu/boot.rs ---- 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs -+++ 10_privilege_level/src/_arch/aarch64/cpu/boot.rs +diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs 09_privilege_level/src/_arch/aarch64/cpu/boot.rs +--- 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs ++++ 09_privilege_level/src/_arch/aarch64/cpu/boot.rs @@ -12,11 +12,53 @@ //! crate::cpu::boot::arch_boot @@ -270,9 +270,9 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs 10_privilege_level/src/ + asm::eret() } -diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s 10_privilege_level/src/_arch/aarch64/cpu/boot.s ---- 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s -+++ 10_privilege_level/src/_arch/aarch64/cpu/boot.s +diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s 09_privilege_level/src/_arch/aarch64/cpu/boot.s +--- 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s ++++ 09_privilege_level/src/_arch/aarch64/cpu/boot.s @@ -6,6 +6,7 @@ // Definitions //-------------------------------------------------------------------------------------------------- @@ -308,9 +308,9 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s 10_privilege_level/src/_ // Infinitely wait for events (aka "park the core"). -diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs 10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs ---- 09_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs -+++ 10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs +diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs 09_privilege_level/src/_arch/aarch64/exception/asynchronous.rs +--- 08_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs ++++ 09_privilege_level/src/_arch/aarch64/exception/asynchronous.rs @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -394,9 +394,9 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs 10_privil + info!(" FIQ: {}", to_mask_str(is_masked::())); +} -diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception.rs 10_privilege_level/src/_arch/aarch64/exception.rs ---- 09_hw_debug_JTAG/src/_arch/aarch64/exception.rs -+++ 10_privilege_level/src/_arch/aarch64/exception.rs +diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/exception.rs 09_privilege_level/src/_arch/aarch64/exception.rs +--- 08_hw_debug_JTAG/src/_arch/aarch64/exception.rs ++++ 09_privilege_level/src/_arch/aarch64/exception.rs @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -429,9 +429,9 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception.rs 10_privilege_level/src + } +} -diff -uNr 09_hw_debug_JTAG/src/exception/asynchronous.rs 10_privilege_level/src/exception/asynchronous.rs ---- 09_hw_debug_JTAG/src/exception/asynchronous.rs -+++ 10_privilege_level/src/exception/asynchronous.rs +diff -uNr 08_hw_debug_JTAG/src/exception/asynchronous.rs 09_privilege_level/src/exception/asynchronous.rs +--- 08_hw_debug_JTAG/src/exception/asynchronous.rs ++++ 09_privilege_level/src/exception/asynchronous.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -448,9 +448,9 @@ diff -uNr 09_hw_debug_JTAG/src/exception/asynchronous.rs 10_privilege_level/src/ +//-------------------------------------------------------------------------------------------------- +pub use arch_asynchronous::print_state; -diff -uNr 09_hw_debug_JTAG/src/exception.rs 10_privilege_level/src/exception.rs ---- 09_hw_debug_JTAG/src/exception.rs -+++ 10_privilege_level/src/exception.rs +diff -uNr 08_hw_debug_JTAG/src/exception.rs 09_privilege_level/src/exception.rs +--- 08_hw_debug_JTAG/src/exception.rs ++++ 09_privilege_level/src/exception.rs @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -483,9 +483,9 @@ diff -uNr 09_hw_debug_JTAG/src/exception.rs 10_privilege_level/src/exception.rs + Unknown, +} -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 +diff -uNr 08_hw_debug_JTAG/src/main.rs 09_privilege_level/src/main.rs +--- 08_hw_debug_JTAG/src/main.rs ++++ 09_privilege_level/src/main.rs @@ -119,6 +119,7 @@ mod console; mod cpu; diff --git a/10_privilege_level/build.rs b/09_privilege_level/build.rs similarity index 100% rename from 10_privilege_level/build.rs rename to 09_privilege_level/build.rs diff --git a/10_privilege_level/src/_arch/aarch64/cpu.rs b/09_privilege_level/src/_arch/aarch64/cpu.rs similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/cpu.rs rename to 09_privilege_level/src/_arch/aarch64/cpu.rs diff --git a/10_privilege_level/src/_arch/aarch64/cpu/boot.rs b/09_privilege_level/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/cpu/boot.rs rename to 09_privilege_level/src/_arch/aarch64/cpu/boot.rs diff --git a/10_privilege_level/src/_arch/aarch64/cpu/boot.s b/09_privilege_level/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/cpu/boot.s rename to 09_privilege_level/src/_arch/aarch64/cpu/boot.s diff --git a/10_privilege_level/src/_arch/aarch64/exception.rs b/09_privilege_level/src/_arch/aarch64/exception.rs similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/exception.rs rename to 09_privilege_level/src/_arch/aarch64/exception.rs diff --git a/10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs b/09_privilege_level/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs rename to 09_privilege_level/src/_arch/aarch64/exception/asynchronous.rs diff --git a/10_privilege_level/src/_arch/aarch64/time.rs b/09_privilege_level/src/_arch/aarch64/time.rs similarity index 100% rename from 10_privilege_level/src/_arch/aarch64/time.rs rename to 09_privilege_level/src/_arch/aarch64/time.rs diff --git a/10_privilege_level/src/bsp.rs b/09_privilege_level/src/bsp.rs similarity index 100% rename from 10_privilege_level/src/bsp.rs rename to 09_privilege_level/src/bsp.rs diff --git a/10_privilege_level/src/bsp/device_driver.rs b/09_privilege_level/src/bsp/device_driver.rs similarity index 100% rename from 10_privilege_level/src/bsp/device_driver.rs rename to 09_privilege_level/src/bsp/device_driver.rs diff --git a/10_privilege_level/src/bsp/device_driver/bcm.rs b/09_privilege_level/src/bsp/device_driver/bcm.rs similarity index 100% rename from 10_privilege_level/src/bsp/device_driver/bcm.rs rename to 09_privilege_level/src/bsp/device_driver/bcm.rs diff --git a/10_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/09_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 10_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 09_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/10_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/09_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 10_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 09_privilege_level/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/10_privilege_level/src/bsp/device_driver/common.rs b/09_privilege_level/src/bsp/device_driver/common.rs similarity index 100% rename from 10_privilege_level/src/bsp/device_driver/common.rs rename to 09_privilege_level/src/bsp/device_driver/common.rs diff --git a/10_privilege_level/src/bsp/raspberrypi.rs b/09_privilege_level/src/bsp/raspberrypi.rs similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi.rs rename to 09_privilege_level/src/bsp/raspberrypi.rs diff --git a/10_privilege_level/src/bsp/raspberrypi/console.rs b/09_privilege_level/src/bsp/raspberrypi/console.rs similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi/console.rs rename to 09_privilege_level/src/bsp/raspberrypi/console.rs diff --git a/10_privilege_level/src/bsp/raspberrypi/cpu.rs b/09_privilege_level/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi/cpu.rs rename to 09_privilege_level/src/bsp/raspberrypi/cpu.rs diff --git a/10_privilege_level/src/bsp/raspberrypi/driver.rs b/09_privilege_level/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi/driver.rs rename to 09_privilege_level/src/bsp/raspberrypi/driver.rs diff --git a/10_privilege_level/src/bsp/raspberrypi/link.ld b/09_privilege_level/src/bsp/raspberrypi/link.ld similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi/link.ld rename to 09_privilege_level/src/bsp/raspberrypi/link.ld diff --git a/10_privilege_level/src/bsp/raspberrypi/memory.rs b/09_privilege_level/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 10_privilege_level/src/bsp/raspberrypi/memory.rs rename to 09_privilege_level/src/bsp/raspberrypi/memory.rs diff --git a/10_privilege_level/src/console.rs b/09_privilege_level/src/console.rs similarity index 100% rename from 10_privilege_level/src/console.rs rename to 09_privilege_level/src/console.rs diff --git a/10_privilege_level/src/cpu.rs b/09_privilege_level/src/cpu.rs similarity index 100% rename from 10_privilege_level/src/cpu.rs rename to 09_privilege_level/src/cpu.rs diff --git a/10_privilege_level/src/cpu/boot.rs b/09_privilege_level/src/cpu/boot.rs similarity index 100% rename from 10_privilege_level/src/cpu/boot.rs rename to 09_privilege_level/src/cpu/boot.rs diff --git a/10_privilege_level/src/driver.rs b/09_privilege_level/src/driver.rs similarity index 100% rename from 10_privilege_level/src/driver.rs rename to 09_privilege_level/src/driver.rs diff --git a/10_privilege_level/src/exception.rs b/09_privilege_level/src/exception.rs similarity index 100% rename from 10_privilege_level/src/exception.rs rename to 09_privilege_level/src/exception.rs diff --git a/10_privilege_level/src/exception/asynchronous.rs b/09_privilege_level/src/exception/asynchronous.rs similarity index 100% rename from 10_privilege_level/src/exception/asynchronous.rs rename to 09_privilege_level/src/exception/asynchronous.rs diff --git a/10_privilege_level/src/main.rs b/09_privilege_level/src/main.rs similarity index 100% rename from 10_privilege_level/src/main.rs rename to 09_privilege_level/src/main.rs diff --git a/10_privilege_level/src/memory.rs b/09_privilege_level/src/memory.rs similarity index 100% rename from 10_privilege_level/src/memory.rs rename to 09_privilege_level/src/memory.rs diff --git a/10_privilege_level/src/panic_wait.rs b/09_privilege_level/src/panic_wait.rs similarity index 100% rename from 10_privilege_level/src/panic_wait.rs rename to 09_privilege_level/src/panic_wait.rs diff --git a/10_privilege_level/src/print.rs b/09_privilege_level/src/print.rs similarity index 100% rename from 10_privilege_level/src/print.rs rename to 09_privilege_level/src/print.rs diff --git a/10_privilege_level/src/runtime_init.rs b/09_privilege_level/src/runtime_init.rs similarity index 100% rename from 10_privilege_level/src/runtime_init.rs rename to 09_privilege_level/src/runtime_init.rs diff --git a/10_privilege_level/src/synchronization.rs b/09_privilege_level/src/synchronization.rs similarity index 100% rename from 10_privilege_level/src/synchronization.rs rename to 09_privilege_level/src/synchronization.rs diff --git a/10_privilege_level/src/time.rs b/09_privilege_level/src/time.rs similarity index 100% rename from 10_privilege_level/src/time.rs rename to 09_privilege_level/src/time.rs diff --git a/11_virtual_mem_part1_identity_mapping/.vscode/settings.json b/10_virtual_mem_part1_identity_mapping/.vscode/settings.json similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/.vscode/settings.json rename to 10_virtual_mem_part1_identity_mapping/.vscode/settings.json diff --git a/11_virtual_mem_part1_identity_mapping/Cargo.lock b/10_virtual_mem_part1_identity_mapping/Cargo.lock similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/Cargo.lock rename to 10_virtual_mem_part1_identity_mapping/Cargo.lock diff --git a/11_virtual_mem_part1_identity_mapping/Cargo.toml b/10_virtual_mem_part1_identity_mapping/Cargo.toml similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/Cargo.toml rename to 10_virtual_mem_part1_identity_mapping/Cargo.toml diff --git a/11_virtual_mem_part1_identity_mapping/Makefile b/10_virtual_mem_part1_identity_mapping/Makefile similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/Makefile rename to 10_virtual_mem_part1_identity_mapping/Makefile diff --git a/11_virtual_mem_part1_identity_mapping/README.md b/10_virtual_mem_part1_identity_mapping/README.md similarity index 96% rename from 11_virtual_mem_part1_identity_mapping/README.md rename to 10_virtual_mem_part1_identity_mapping/README.md index b2313e1c..d2d72ea5 100644 --- a/11_virtual_mem_part1_identity_mapping/README.md +++ b/10_virtual_mem_part1_identity_mapping/README.md @@ -1,4 +1,4 @@ -# Tutorial 11 - Virtual Memory Part 1: Identity Map All The Things! +# Tutorial 10 - Virtual Memory Part 1: Identity Map All The Things! ## tl;dr @@ -348,9 +348,9 @@ Minipush 1.0 ## Diff to previous ```diff -diff -uNr 10_privilege_level/src/_arch/aarch64/memory/mmu/translation_table.rs 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs ---- 10_privilege_level/src/_arch/aarch64/memory/mmu/translation_table.rs -+++ 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs +diff -uNr 09_privilege_level/src/_arch/aarch64/memory/mmu/translation_table.rs 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs +--- 09_privilege_level/src/_arch/aarch64/memory/mmu/translation_table.rs ++++ 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs @@ -0,0 +1,288 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -641,9 +641,9 @@ diff -uNr 10_privilege_level/src/_arch/aarch64/memory/mmu/translation_table.rs 1 + } +} -diff -uNr 10_privilege_level/src/_arch/aarch64/memory/mmu.rs 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs ---- 10_privilege_level/src/_arch/aarch64/memory/mmu.rs -+++ 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs +diff -uNr 09_privilege_level/src/_arch/aarch64/memory/mmu.rs 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs +--- 09_privilege_level/src/_arch/aarch64/memory/mmu.rs ++++ 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -810,9 +810,9 @@ diff -uNr 10_privilege_level/src/_arch/aarch64/memory/mmu.rs 11_virtual_mem_part + } +} -diff -uNr 10_privilege_level/src/bsp/raspberrypi/link.ld 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld ---- 10_privilege_level/src/bsp/raspberrypi/link.ld -+++ 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld +diff -uNr 09_privilege_level/src/bsp/raspberrypi/link.ld 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld +--- 09_privilege_level/src/bsp/raspberrypi/link.ld ++++ 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld @@ -26,6 +26,7 @@ /*********************************************************************************************** * Code + RO Data + Global Offset Table @@ -832,9 +832,9 @@ diff -uNr 10_privilege_level/src/bsp/raspberrypi/link.ld 11_virtual_mem_part1_id * Data + BSS ***********************************************************************************************/ -diff -uNr 10_privilege_level/src/bsp/raspberrypi/memory/mmu.rs 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs ---- 10_privilege_level/src/bsp/raspberrypi/memory/mmu.rs -+++ 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs +diff -uNr 09_privilege_level/src/bsp/raspberrypi/memory/mmu.rs 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs +--- 09_privilege_level/src/bsp/raspberrypi/memory/mmu.rs ++++ 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -923,9 +923,9 @@ diff -uNr 10_privilege_level/src/bsp/raspberrypi/memory/mmu.rs 11_virtual_mem_pa + &LAYOUT +} -diff -uNr 10_privilege_level/src/bsp/raspberrypi/memory.rs 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs ---- 10_privilege_level/src/bsp/raspberrypi/memory.rs -+++ 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs +diff -uNr 09_privilege_level/src/bsp/raspberrypi/memory.rs 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs +--- 09_privilege_level/src/bsp/raspberrypi/memory.rs ++++ 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs @@ -4,6 +4,8 @@ //! BSP Memory Management. @@ -1011,9 +1011,9 @@ diff -uNr 10_privilege_level/src/bsp/raspberrypi/memory.rs 11_virtual_mem_part1_ //-------------------------------------------------------------------------------------------------- -diff -uNr 10_privilege_level/src/bsp.rs 11_virtual_mem_part1_identity_mapping/src/bsp.rs ---- 10_privilege_level/src/bsp.rs -+++ 11_virtual_mem_part1_identity_mapping/src/bsp.rs +diff -uNr 09_privilege_level/src/bsp.rs 10_virtual_mem_part1_identity_mapping/src/bsp.rs +--- 09_privilege_level/src/bsp.rs ++++ 10_virtual_mem_part1_identity_mapping/src/bsp.rs @@ -4,7 +4,7 @@ //! Conditional reexporting of Board Support Packages. @@ -1024,9 +1024,9 @@ diff -uNr 10_privilege_level/src/bsp.rs 11_virtual_mem_part1_identity_mapping/sr #[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))] mod raspberrypi; -diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/src/main.rs ---- 10_privilege_level/src/main.rs -+++ 11_virtual_mem_part1_identity_mapping/src/main.rs +diff -uNr 09_privilege_level/src/main.rs 10_virtual_mem_part1_identity_mapping/src/main.rs +--- 09_privilege_level/src/main.rs ++++ 10_virtual_mem_part1_identity_mapping/src/main.rs @@ -107,7 +107,11 @@ //! [`runtime_init::runtime_init()`]: runtime_init/fn.runtime_init.html @@ -1083,9 +1083,9 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s // Discard any spurious received characters before going into echo mode. -diff -uNr 10_privilege_level/src/memory/mmu/translation_table.rs 11_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs ---- 10_privilege_level/src/memory/mmu/translation_table.rs -+++ 11_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs +diff -uNr 09_privilege_level/src/memory/mmu/translation_table.rs 10_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs +--- 09_privilege_level/src/memory/mmu/translation_table.rs ++++ 10_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1102,9 +1102,9 @@ diff -uNr 10_privilege_level/src/memory/mmu/translation_table.rs 11_virtual_mem_ +//-------------------------------------------------------------------------------------------------- +pub use arch_translation_table::KernelTranslationTable; -diff -uNr 10_privilege_level/src/memory/mmu.rs 11_virtual_mem_part1_identity_mapping/src/memory/mmu.rs ---- 10_privilege_level/src/memory/mmu.rs -+++ 11_virtual_mem_part1_identity_mapping/src/memory/mmu.rs +diff -uNr 09_privilege_level/src/memory/mmu.rs 10_virtual_mem_part1_identity_mapping/src/memory/mmu.rs +--- 09_privilege_level/src/memory/mmu.rs ++++ 10_virtual_mem_part1_identity_mapping/src/memory/mmu.rs @@ -0,0 +1,264 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1371,9 +1371,9 @@ diff -uNr 10_privilege_level/src/memory/mmu.rs 11_virtual_mem_part1_identity_map + } +} -diff -uNr 10_privilege_level/src/memory.rs 11_virtual_mem_part1_identity_mapping/src/memory.rs ---- 10_privilege_level/src/memory.rs -+++ 11_virtual_mem_part1_identity_mapping/src/memory.rs +diff -uNr 09_privilege_level/src/memory.rs 10_virtual_mem_part1_identity_mapping/src/memory.rs +--- 09_privilege_level/src/memory.rs ++++ 10_virtual_mem_part1_identity_mapping/src/memory.rs @@ -4,6 +4,8 @@ //! Memory Management. diff --git a/11_virtual_mem_part1_identity_mapping/build.rs b/10_virtual_mem_part1_identity_mapping/build.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/build.rs rename to 10_virtual_mem_part1_identity_mapping/build.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.s b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.s rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu/boot.s diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/memory/mmu/translation_table.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs b/10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs rename to 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp.rs b/10_virtual_mem_part1_identity_mapping/src/bsp.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/device_driver.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/device_driver.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/device_driver.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/console.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/console.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/console.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/console.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/cpu.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/cpu.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/cpu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/driver.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/driver.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/driver.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/link.ld diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs b/10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs rename to 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/console.rs b/10_virtual_mem_part1_identity_mapping/src/console.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/console.rs rename to 10_virtual_mem_part1_identity_mapping/src/console.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/cpu.rs b/10_virtual_mem_part1_identity_mapping/src/cpu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/cpu.rs rename to 10_virtual_mem_part1_identity_mapping/src/cpu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/cpu/boot.rs b/10_virtual_mem_part1_identity_mapping/src/cpu/boot.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/cpu/boot.rs rename to 10_virtual_mem_part1_identity_mapping/src/cpu/boot.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/driver.rs b/10_virtual_mem_part1_identity_mapping/src/driver.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/driver.rs rename to 10_virtual_mem_part1_identity_mapping/src/driver.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/exception.rs b/10_virtual_mem_part1_identity_mapping/src/exception.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/exception.rs rename to 10_virtual_mem_part1_identity_mapping/src/exception.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/exception/asynchronous.rs b/10_virtual_mem_part1_identity_mapping/src/exception/asynchronous.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/exception/asynchronous.rs rename to 10_virtual_mem_part1_identity_mapping/src/exception/asynchronous.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/main.rs b/10_virtual_mem_part1_identity_mapping/src/main.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/main.rs rename to 10_virtual_mem_part1_identity_mapping/src/main.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/memory.rs b/10_virtual_mem_part1_identity_mapping/src/memory.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/memory.rs rename to 10_virtual_mem_part1_identity_mapping/src/memory.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/memory/mmu.rs b/10_virtual_mem_part1_identity_mapping/src/memory/mmu.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/memory/mmu.rs rename to 10_virtual_mem_part1_identity_mapping/src/memory/mmu.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs b/10_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs rename to 10_virtual_mem_part1_identity_mapping/src/memory/mmu/translation_table.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/panic_wait.rs b/10_virtual_mem_part1_identity_mapping/src/panic_wait.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/panic_wait.rs rename to 10_virtual_mem_part1_identity_mapping/src/panic_wait.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/print.rs b/10_virtual_mem_part1_identity_mapping/src/print.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/print.rs rename to 10_virtual_mem_part1_identity_mapping/src/print.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/runtime_init.rs b/10_virtual_mem_part1_identity_mapping/src/runtime_init.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/runtime_init.rs rename to 10_virtual_mem_part1_identity_mapping/src/runtime_init.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/synchronization.rs b/10_virtual_mem_part1_identity_mapping/src/synchronization.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/synchronization.rs rename to 10_virtual_mem_part1_identity_mapping/src/synchronization.rs diff --git a/11_virtual_mem_part1_identity_mapping/src/time.rs b/10_virtual_mem_part1_identity_mapping/src/time.rs similarity index 100% rename from 11_virtual_mem_part1_identity_mapping/src/time.rs rename to 10_virtual_mem_part1_identity_mapping/src/time.rs diff --git a/12_exceptions_part1_groundwork/.vscode/settings.json b/11_exceptions_part1_groundwork/.vscode/settings.json similarity index 100% rename from 12_exceptions_part1_groundwork/.vscode/settings.json rename to 11_exceptions_part1_groundwork/.vscode/settings.json diff --git a/12_exceptions_part1_groundwork/Cargo.lock b/11_exceptions_part1_groundwork/Cargo.lock similarity index 100% rename from 12_exceptions_part1_groundwork/Cargo.lock rename to 11_exceptions_part1_groundwork/Cargo.lock diff --git a/12_exceptions_part1_groundwork/Cargo.toml b/11_exceptions_part1_groundwork/Cargo.toml similarity index 100% rename from 12_exceptions_part1_groundwork/Cargo.toml rename to 11_exceptions_part1_groundwork/Cargo.toml diff --git a/12_exceptions_part1_groundwork/Makefile b/11_exceptions_part1_groundwork/Makefile similarity index 100% rename from 12_exceptions_part1_groundwork/Makefile rename to 11_exceptions_part1_groundwork/Makefile diff --git a/12_exceptions_part1_groundwork/README.md b/11_exceptions_part1_groundwork/README.md similarity index 96% rename from 12_exceptions_part1_groundwork/README.md rename to 11_exceptions_part1_groundwork/README.md index cc4b043f..878ea436 100644 --- a/12_exceptions_part1_groundwork/README.md +++ b/11_exceptions_part1_groundwork/README.md @@ -1,4 +1,4 @@ -# Tutorial 12 - Exceptions Part 1: Groundwork +# Tutorial 11 - Exceptions Part 1: Groundwork ## tl;dr @@ -476,9 +476,9 @@ General purpose register: ## Diff to previous ```diff -diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs ---- 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs -+++ 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs +diff -uNr 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs +--- 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs ++++ 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs @@ -11,7 +11,224 @@ //! //! crate::exception::arch_exception @@ -730,9 +730,9 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs 1 + barrier::isb(barrier::SY); +} -diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.s 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.s ---- 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.s -+++ 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.s +diff -uNr 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.s 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.s +--- 10_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.s ++++ 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.s @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -883,9 +883,9 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.s 12 +.size __exception_restore_context, . - __exception_restore_context +.type __exception_restore_context, function -diff -uNr 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs ---- 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs -+++ 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs +diff -uNr 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs +--- 10_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.rs ++++ 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs @@ -15,7 +15,7 @@ /// The kernel's address space defined by this BSP. pub type KernelAddrSpace = AddressSpace<{ memory_map::END_INCLUSIVE + 1 }>; @@ -925,9 +925,9 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/memory/mmu.r RangeInclusive::new(memory_map::mmio::START, memory_map::mmio::END_INCLUSIVE) } -diff -uNr 11_virtual_mem_part1_identity_mapping/src/bsp.rs 12_exceptions_part1_groundwork/src/bsp.rs ---- 11_virtual_mem_part1_identity_mapping/src/bsp.rs -+++ 12_exceptions_part1_groundwork/src/bsp.rs +diff -uNr 10_virtual_mem_part1_identity_mapping/src/bsp.rs 11_exceptions_part1_groundwork/src/bsp.rs +--- 10_virtual_mem_part1_identity_mapping/src/bsp.rs ++++ 11_exceptions_part1_groundwork/src/bsp.rs @@ -4,7 +4,7 @@ //! Conditional reexporting of Board Support Packages. @@ -938,9 +938,9 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/bsp.rs 12_exceptions_part1_g #[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))] mod raspberrypi; -diff -uNr 11_virtual_mem_part1_identity_mapping/src/exception.rs 12_exceptions_part1_groundwork/src/exception.rs ---- 11_virtual_mem_part1_identity_mapping/src/exception.rs -+++ 12_exceptions_part1_groundwork/src/exception.rs +diff -uNr 10_virtual_mem_part1_identity_mapping/src/exception.rs 11_exceptions_part1_groundwork/src/exception.rs +--- 10_virtual_mem_part1_identity_mapping/src/exception.rs ++++ 11_exceptions_part1_groundwork/src/exception.rs @@ -13,7 +13,7 @@ //-------------------------------------------------------------------------------------------------- // Architectural Public Reexports @@ -951,9 +951,9 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/exception.rs 12_exceptions_p //-------------------------------------------------------------------------------------------------- // Public Definitions -diff -uNr 11_virtual_mem_part1_identity_mapping/src/main.rs 12_exceptions_part1_groundwork/src/main.rs ---- 11_virtual_mem_part1_identity_mapping/src/main.rs -+++ 12_exceptions_part1_groundwork/src/main.rs +diff -uNr 10_virtual_mem_part1_identity_mapping/src/main.rs 11_exceptions_part1_groundwork/src/main.rs +--- 10_virtual_mem_part1_identity_mapping/src/main.rs ++++ 11_exceptions_part1_groundwork/src/main.rs @@ -144,6 +144,8 @@ use driver::interface::DriverManager; use memory::mmu::interface::MMU; diff --git a/12_exceptions_part1_groundwork/build.rs b/11_exceptions_part1_groundwork/build.rs similarity index 100% rename from 12_exceptions_part1_groundwork/build.rs rename to 11_exceptions_part1_groundwork/build.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.s b/11_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.s rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/cpu/boot.s diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.s b/11_exceptions_part1_groundwork/src/_arch/aarch64/exception.s similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.s rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.s diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs b/11_exceptions_part1_groundwork/src/_arch/aarch64/time.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs rename to 11_exceptions_part1_groundwork/src/_arch/aarch64/time.rs diff --git a/12_exceptions_part1_groundwork/src/bsp.rs b/11_exceptions_part1_groundwork/src/bsp.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp.rs rename to 11_exceptions_part1_groundwork/src/bsp.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver.rs b/11_exceptions_part1_groundwork/src/bsp/device_driver.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/device_driver.rs rename to 11_exceptions_part1_groundwork/src/bsp/device_driver.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver/bcm.rs b/11_exceptions_part1_groundwork/src/bsp/device_driver/bcm.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/device_driver/bcm.rs rename to 11_exceptions_part1_groundwork/src/bsp/device_driver/bcm.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/11_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 11_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/11_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 11_exceptions_part1_groundwork/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs b/11_exceptions_part1_groundwork/src/bsp/device_driver/common.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs rename to 11_exceptions_part1_groundwork/src/bsp/device_driver/common.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/cpu.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/cpu.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/cpu.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/driver.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/driver.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/driver.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/link.ld b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/link.ld similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/link.ld rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/link.ld diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory.rs diff --git a/12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs b/11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs rename to 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs diff --git a/12_exceptions_part1_groundwork/src/console.rs b/11_exceptions_part1_groundwork/src/console.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/console.rs rename to 11_exceptions_part1_groundwork/src/console.rs diff --git a/12_exceptions_part1_groundwork/src/cpu.rs b/11_exceptions_part1_groundwork/src/cpu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/cpu.rs rename to 11_exceptions_part1_groundwork/src/cpu.rs diff --git a/12_exceptions_part1_groundwork/src/cpu/boot.rs b/11_exceptions_part1_groundwork/src/cpu/boot.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/cpu/boot.rs rename to 11_exceptions_part1_groundwork/src/cpu/boot.rs diff --git a/12_exceptions_part1_groundwork/src/driver.rs b/11_exceptions_part1_groundwork/src/driver.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/driver.rs rename to 11_exceptions_part1_groundwork/src/driver.rs diff --git a/12_exceptions_part1_groundwork/src/exception.rs b/11_exceptions_part1_groundwork/src/exception.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/exception.rs rename to 11_exceptions_part1_groundwork/src/exception.rs diff --git a/12_exceptions_part1_groundwork/src/exception/asynchronous.rs b/11_exceptions_part1_groundwork/src/exception/asynchronous.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/exception/asynchronous.rs rename to 11_exceptions_part1_groundwork/src/exception/asynchronous.rs diff --git a/12_exceptions_part1_groundwork/src/main.rs b/11_exceptions_part1_groundwork/src/main.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/main.rs rename to 11_exceptions_part1_groundwork/src/main.rs diff --git a/12_exceptions_part1_groundwork/src/memory.rs b/11_exceptions_part1_groundwork/src/memory.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/memory.rs rename to 11_exceptions_part1_groundwork/src/memory.rs diff --git a/12_exceptions_part1_groundwork/src/memory/mmu.rs b/11_exceptions_part1_groundwork/src/memory/mmu.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/memory/mmu.rs rename to 11_exceptions_part1_groundwork/src/memory/mmu.rs diff --git a/12_exceptions_part1_groundwork/src/memory/mmu/translation_table.rs b/11_exceptions_part1_groundwork/src/memory/mmu/translation_table.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/memory/mmu/translation_table.rs rename to 11_exceptions_part1_groundwork/src/memory/mmu/translation_table.rs diff --git a/12_exceptions_part1_groundwork/src/panic_wait.rs b/11_exceptions_part1_groundwork/src/panic_wait.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/panic_wait.rs rename to 11_exceptions_part1_groundwork/src/panic_wait.rs diff --git a/12_exceptions_part1_groundwork/src/print.rs b/11_exceptions_part1_groundwork/src/print.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/print.rs rename to 11_exceptions_part1_groundwork/src/print.rs diff --git a/12_exceptions_part1_groundwork/src/runtime_init.rs b/11_exceptions_part1_groundwork/src/runtime_init.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/runtime_init.rs rename to 11_exceptions_part1_groundwork/src/runtime_init.rs diff --git a/12_exceptions_part1_groundwork/src/synchronization.rs b/11_exceptions_part1_groundwork/src/synchronization.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/synchronization.rs rename to 11_exceptions_part1_groundwork/src/synchronization.rs diff --git a/12_exceptions_part1_groundwork/src/time.rs b/11_exceptions_part1_groundwork/src/time.rs similarity index 100% rename from 12_exceptions_part1_groundwork/src/time.rs rename to 11_exceptions_part1_groundwork/src/time.rs diff --git a/13_integrated_testing/.cargo/config.toml b/12_integrated_testing/.cargo/config.toml similarity index 100% rename from 13_integrated_testing/.cargo/config.toml rename to 12_integrated_testing/.cargo/config.toml diff --git a/13_integrated_testing/.vscode/settings.json b/12_integrated_testing/.vscode/settings.json similarity index 100% rename from 13_integrated_testing/.vscode/settings.json rename to 12_integrated_testing/.vscode/settings.json diff --git a/13_integrated_testing/Cargo.lock b/12_integrated_testing/Cargo.lock similarity index 100% rename from 13_integrated_testing/Cargo.lock rename to 12_integrated_testing/Cargo.lock diff --git a/13_integrated_testing/Cargo.toml b/12_integrated_testing/Cargo.toml similarity index 100% rename from 13_integrated_testing/Cargo.toml rename to 12_integrated_testing/Cargo.toml diff --git a/13_integrated_testing/Makefile b/12_integrated_testing/Makefile similarity index 100% rename from 13_integrated_testing/Makefile rename to 12_integrated_testing/Makefile diff --git a/13_integrated_testing/README.md b/12_integrated_testing/README.md similarity index 92% rename from 13_integrated_testing/README.md rename to 12_integrated_testing/README.md index 046607ba..6b76c190 100644 --- a/13_integrated_testing/README.md +++ b/12_integrated_testing/README.md @@ -1,4 +1,4 @@ -# Tutorial 13 - Integrated Testing +# Tutorial 12 - Integrated Testing ## tl;dr @@ -404,7 +404,7 @@ provided to it by `cargo`, and finally compiles a `docker` command to execute th reference, here it is fully resolved for an `RPi3 BSP`: ```bash -docker run -i --rm -v /opt/rust-raspberrypi-OS-tutorials/13_integrated_testing:/work/tutorial -w /work/tutorial rustembedded/osdev-utils ruby tests/runner.rb qemu-system-aarch64 -M raspi3 -serial stdio -display none -semihosting -kernel $TEST_BINARY +docker run -i --rm -v /opt/rust-raspberrypi-OS-tutorials/12_integrated_testing:/work/tutorial -w /work/tutorial rustembedded/osdev-utils ruby tests/runner.rb qemu-system-aarch64 -M raspi3 -serial stdio -display none -semihosting -kernel $TEST_BINARY ``` We're still not done with all the redirections. Spotted the `ruby tests/runner.rb` part that gets @@ -809,16 +809,16 @@ RUSTFLAGS="-C link-arg=-Tsrc/bsp/raspberrypi/link.ld -C target-cpu=cortex-a53 -D ## Diff to previous ```diff -diff -uNr 12_exceptions_part1_groundwork/.cargo/config.toml 13_integrated_testing/.cargo/config.toml ---- 12_exceptions_part1_groundwork/.cargo/config.toml -+++ 13_integrated_testing/.cargo/config.toml +diff -uNr 11_exceptions_part1_groundwork/.cargo/config.toml 12_integrated_testing/.cargo/config.toml +--- 11_exceptions_part1_groundwork/.cargo/config.toml ++++ 12_integrated_testing/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.'cfg(target_os = "none")'] +runner = "target/kernel_test_runner.sh" -diff -uNr 12_exceptions_part1_groundwork/Cargo.toml 13_integrated_testing/Cargo.toml ---- 12_exceptions_part1_groundwork/Cargo.toml -+++ 13_integrated_testing/Cargo.toml +diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo.toml +--- 11_exceptions_part1_groundwork/Cargo.toml ++++ 12_integrated_testing/Cargo.toml @@ -11,17 +11,45 @@ default = [] bsp_rpi3 = ["register"] @@ -867,9 +867,9 @@ diff -uNr 12_exceptions_part1_groundwork/Cargo.toml 13_integrated_testing/Cargo. +name = "02_exception_sync_page_fault" +harness = false -diff -uNr 12_exceptions_part1_groundwork/Makefile 13_integrated_testing/Makefile ---- 12_exceptions_part1_groundwork/Makefile -+++ 13_integrated_testing/Makefile +diff -uNr 11_exceptions_part1_groundwork/Makefile 12_integrated_testing/Makefile +--- 11_exceptions_part1_groundwork/Makefile ++++ 12_integrated_testing/Makefile @@ -20,6 +20,7 @@ QEMU_BINARY = qemu-system-aarch64 QEMU_MACHINE_TYPE = raspi3 @@ -963,9 +963,9 @@ diff -uNr 12_exceptions_part1_groundwork/Makefile 13_integrated_testing/Makefile chainboot: $(KERNEL_BIN) -diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs 13_integrated_testing/src/_arch/aarch64/cpu.rs ---- 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs -+++ 13_integrated_testing/src/_arch/aarch64/cpu.rs +diff -uNr 11_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs 12_integrated_testing/src/_arch/aarch64/cpu.rs +--- 11_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs ++++ 12_integrated_testing/src/_arch/aarch64/cpu.rs @@ -26,3 +26,24 @@ asm::wfe() } @@ -992,9 +992,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs 13_integrated_ + QEMU_EXIT_HANDLE.exit_success() +} -diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs 13_integrated_testing/src/_arch/aarch64/exception.rs ---- 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs -+++ 13_integrated_testing/src/_arch/aarch64/exception.rs +diff -uNr 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs 12_integrated_testing/src/_arch/aarch64/exception.rs +--- 11_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs ++++ 12_integrated_testing/src/_arch/aarch64/exception.rs @@ -12,7 +12,7 @@ //! crate::exception::arch_exception @@ -1022,9 +1022,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs 13_integ } -diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs 13_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs ---- 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs -+++ 13_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs +diff -uNr 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs 12_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs +--- 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translation_table.rs ++++ 12_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs @@ -286,3 +286,31 @@ self.lvl2.phys_start_addr_u64() } @@ -1058,9 +1058,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu/translatio + } +} -diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs 13_integrated_testing/src/_arch/aarch64/memory/mmu.rs ---- 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs -+++ 13_integrated_testing/src/_arch/aarch64/memory/mmu.rs +diff -uNr 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs 12_integrated_testing/src/_arch/aarch64/memory/mmu.rs +--- 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs ++++ 12_integrated_testing/src/_arch/aarch64/memory/mmu.rs @@ -162,3 +162,22 @@ SCTLR_EL1.matches_all(SCTLR_EL1::M::Enable) } @@ -1085,9 +1085,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs 13_inte + } +} -diff -uNr 12_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs 13_integrated_testing/src/bsp/raspberrypi/console.rs ---- 12_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs -+++ 13_integrated_testing/src/bsp/raspberrypi/console.rs +diff -uNr 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs 12_integrated_testing/src/bsp/raspberrypi/console.rs +--- 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs ++++ 12_integrated_testing/src/bsp/raspberrypi/console.rs @@ -35,3 +35,13 @@ pub fn console() -> &'static impl console::interface::All { &super::PL011_UART @@ -1103,9 +1103,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs 13_integ +/// For the RPi, nothing needs to be done. +pub fn qemu_bring_up_console() {} -diff -uNr 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs 13_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs ---- 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs -+++ 13_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs +diff -uNr 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs 12_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs +--- 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs ++++ 12_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs @@ -69,3 +69,46 @@ pub fn virt_mem_layout() -> &'static KernelVirtualLayout { &LAYOUT @@ -1154,9 +1154,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs 13_in + } +} -diff -uNr 12_exceptions_part1_groundwork/src/cpu.rs 13_integrated_testing/src/cpu.rs ---- 12_exceptions_part1_groundwork/src/cpu.rs -+++ 13_integrated_testing/src/cpu.rs +diff -uNr 11_exceptions_part1_groundwork/src/cpu.rs 12_integrated_testing/src/cpu.rs +--- 11_exceptions_part1_groundwork/src/cpu.rs ++++ 12_integrated_testing/src/cpu.rs @@ -14,3 +14,6 @@ // Architectural Public Reexports //-------------------------------------------------------------------------------------------------- @@ -1165,9 +1165,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/cpu.rs 13_integrated_testing/src/cp +#[cfg(feature = "test_build")] +pub use arch_cpu::{qemu_exit_failure, qemu_exit_success}; -diff -uNr 12_exceptions_part1_groundwork/src/exception.rs 13_integrated_testing/src/exception.rs ---- 12_exceptions_part1_groundwork/src/exception.rs -+++ 13_integrated_testing/src/exception.rs +diff -uNr 11_exceptions_part1_groundwork/src/exception.rs 12_integrated_testing/src/exception.rs +--- 11_exceptions_part1_groundwork/src/exception.rs ++++ 12_integrated_testing/src/exception.rs @@ -28,3 +28,21 @@ Hypervisor, Unknown, @@ -1191,9 +1191,9 @@ 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 +diff -uNr 11_exceptions_part1_groundwork/src/lib.rs 12_integrated_testing/src/lib.rs +--- 11_exceptions_part1_groundwork/src/lib.rs ++++ 12_integrated_testing/src/lib.rs @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1367,9 +1367,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/li + cpu::qemu_exit_success() +} -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 +diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/main.rs +--- 11_exceptions_part1_groundwork/src/main.rs ++++ 12_integrated_testing/src/main.rs @@ -6,130 +6,12 @@ #![doc(html_logo_url = "https://git.io/JeGIp")] @@ -1554,9 +1554,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m // Discard any spurious received characters before going into echo mode. -diff -uNr 12_exceptions_part1_groundwork/src/memory/mmu.rs 13_integrated_testing/src/memory/mmu.rs ---- 12_exceptions_part1_groundwork/src/memory/mmu.rs -+++ 13_integrated_testing/src/memory/mmu.rs +diff -uNr 11_exceptions_part1_groundwork/src/memory/mmu.rs 12_integrated_testing/src/memory/mmu.rs +--- 11_exceptions_part1_groundwork/src/memory/mmu.rs ++++ 12_integrated_testing/src/memory/mmu.rs @@ -66,7 +66,6 @@ /// Architecture agnostic translation types. @@ -1576,9 +1576,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/memory/mmu.rs 13_integrated_testing + } } -diff -uNr 12_exceptions_part1_groundwork/src/memory.rs 13_integrated_testing/src/memory.rs ---- 12_exceptions_part1_groundwork/src/memory.rs -+++ 13_integrated_testing/src/memory.rs +diff -uNr 11_exceptions_part1_groundwork/src/memory.rs 12_integrated_testing/src/memory.rs +--- 11_exceptions_part1_groundwork/src/memory.rs ++++ 12_integrated_testing/src/memory.rs @@ -30,3 +30,40 @@ ptr = ptr.offset(1); } @@ -1621,9 +1621,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/memory.rs 13_integrated_testing/src + } +} -diff -uNr 12_exceptions_part1_groundwork/src/panic_wait.rs 13_integrated_testing/src/panic_wait.rs ---- 12_exceptions_part1_groundwork/src/panic_wait.rs -+++ 13_integrated_testing/src/panic_wait.rs +diff -uNr 11_exceptions_part1_groundwork/src/panic_wait.rs 12_integrated_testing/src/panic_wait.rs +--- 11_exceptions_part1_groundwork/src/panic_wait.rs ++++ 12_integrated_testing/src/panic_wait.rs @@ -17,6 +17,23 @@ unsafe { bsp::console::panic_console_out().write_fmt(args).unwrap() }; } @@ -1656,9 +1656,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/panic_wait.rs 13_integrated_testing + _panic_exit() } -diff -uNr 12_exceptions_part1_groundwork/src/runtime_init.rs 13_integrated_testing/src/runtime_init.rs ---- 12_exceptions_part1_groundwork/src/runtime_init.rs -+++ 13_integrated_testing/src/runtime_init.rs +diff -uNr 11_exceptions_part1_groundwork/src/runtime_init.rs 12_integrated_testing/src/runtime_init.rs +--- 11_exceptions_part1_groundwork/src/runtime_init.rs ++++ 12_integrated_testing/src/runtime_init.rs @@ -31,7 +31,10 @@ /// /// - Only a single core must be active and running this function. @@ -1673,9 +1673,9 @@ diff -uNr 12_exceptions_part1_groundwork/src/runtime_init.rs 13_integrated_testi + kernel_init() } -diff -uNr 12_exceptions_part1_groundwork/test-macros/Cargo.toml 13_integrated_testing/test-macros/Cargo.toml ---- 12_exceptions_part1_groundwork/test-macros/Cargo.toml -+++ 13_integrated_testing/test-macros/Cargo.toml +diff -uNr 11_exceptions_part1_groundwork/test-macros/Cargo.toml 12_integrated_testing/test-macros/Cargo.toml +--- 11_exceptions_part1_groundwork/test-macros/Cargo.toml ++++ 12_integrated_testing/test-macros/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "test-macros" @@ -1692,9 +1692,9 @@ diff -uNr 12_exceptions_part1_groundwork/test-macros/Cargo.toml 13_integrated_te +syn = { version = "1.x", features = ["full"] } +test-types = { path = "../test-types" } -diff -uNr 12_exceptions_part1_groundwork/test-macros/src/lib.rs 13_integrated_testing/test-macros/src/lib.rs ---- 12_exceptions_part1_groundwork/test-macros/src/lib.rs -+++ 13_integrated_testing/test-macros/src/lib.rs +diff -uNr 11_exceptions_part1_groundwork/test-macros/src/lib.rs 12_integrated_testing/test-macros/src/lib.rs +--- 11_exceptions_part1_groundwork/test-macros/src/lib.rs ++++ 12_integrated_testing/test-macros/src/lib.rs @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1726,9 +1726,9 @@ diff -uNr 12_exceptions_part1_groundwork/test-macros/src/lib.rs 13_integrated_te + .into() +} -diff -uNr 12_exceptions_part1_groundwork/tests/00_console_sanity.rb 13_integrated_testing/tests/00_console_sanity.rb ---- 12_exceptions_part1_groundwork/tests/00_console_sanity.rb -+++ 13_integrated_testing/tests/00_console_sanity.rb +diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rb 12_integrated_testing/tests/00_console_sanity.rb +--- 11_exceptions_part1_groundwork/tests/00_console_sanity.rb ++++ 12_integrated_testing/tests/00_console_sanity.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + @@ -1781,9 +1781,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/00_console_sanity.rb 13_integrate + [TxRxHandshake.new, TxStatistics.new, RxStatistics.new] +end -diff -uNr 12_exceptions_part1_groundwork/tests/00_console_sanity.rs 13_integrated_testing/tests/00_console_sanity.rs ---- 12_exceptions_part1_groundwork/tests/00_console_sanity.rs -+++ 13_integrated_testing/tests/00_console_sanity.rs +diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rs 12_integrated_testing/tests/00_console_sanity.rs +--- 11_exceptions_part1_groundwork/tests/00_console_sanity.rs ++++ 12_integrated_testing/tests/00_console_sanity.rs @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1821,9 +1821,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/00_console_sanity.rs 13_integrate + cpu::wait_forever() +} -diff -uNr 12_exceptions_part1_groundwork/tests/01_timer_sanity.rs 13_integrated_testing/tests/01_timer_sanity.rs ---- 12_exceptions_part1_groundwork/tests/01_timer_sanity.rs -+++ 13_integrated_testing/tests/01_timer_sanity.rs +diff -uNr 11_exceptions_part1_groundwork/tests/01_timer_sanity.rs 12_integrated_testing/tests/01_timer_sanity.rs +--- 11_exceptions_part1_groundwork/tests/01_timer_sanity.rs ++++ 12_integrated_testing/tests/01_timer_sanity.rs @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1875,9 +1875,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/01_timer_sanity.rs 13_integrated_ + assert_eq!((t2 - t1).as_secs(), 1) +} -diff -uNr 12_exceptions_part1_groundwork/tests/02_exception_sync_page_fault.rs 13_integrated_testing/tests/02_exception_sync_page_fault.rs ---- 12_exceptions_part1_groundwork/tests/02_exception_sync_page_fault.rs -+++ 13_integrated_testing/tests/02_exception_sync_page_fault.rs +diff -uNr 11_exceptions_part1_groundwork/tests/02_exception_sync_page_fault.rs 12_integrated_testing/tests/02_exception_sync_page_fault.rs +--- 11_exceptions_part1_groundwork/tests/02_exception_sync_page_fault.rs ++++ 12_integrated_testing/tests/02_exception_sync_page_fault.rs @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1923,9 +1923,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/02_exception_sync_page_fault.rs 1 + cpu::qemu_exit_failure() +} -diff -uNr 12_exceptions_part1_groundwork/tests/panic_exit_success/mod.rs 13_integrated_testing/tests/panic_exit_success/mod.rs ---- 12_exceptions_part1_groundwork/tests/panic_exit_success/mod.rs -+++ 13_integrated_testing/tests/panic_exit_success/mod.rs +diff -uNr 11_exceptions_part1_groundwork/tests/panic_exit_success/mod.rs 12_integrated_testing/tests/panic_exit_success/mod.rs +--- 11_exceptions_part1_groundwork/tests/panic_exit_success/mod.rs ++++ 12_integrated_testing/tests/panic_exit_success/mod.rs @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1937,9 +1937,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/panic_exit_success/mod.rs 13_inte + libkernel::cpu::qemu_exit_success() +} -diff -uNr 12_exceptions_part1_groundwork/tests/runner.rb 13_integrated_testing/tests/runner.rb ---- 12_exceptions_part1_groundwork/tests/runner.rb -+++ 13_integrated_testing/tests/runner.rb +diff -uNr 11_exceptions_part1_groundwork/tests/runner.rb 12_integrated_testing/tests/runner.rb +--- 11_exceptions_part1_groundwork/tests/runner.rb ++++ 12_integrated_testing/tests/runner.rb @@ -0,0 +1,143 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true @@ -2085,9 +2085,9 @@ diff -uNr 12_exceptions_part1_groundwork/tests/runner.rb 13_integrated_testing/t + +test_runner.exec -diff -uNr 12_exceptions_part1_groundwork/test-types/Cargo.toml 13_integrated_testing/test-types/Cargo.toml ---- 12_exceptions_part1_groundwork/test-types/Cargo.toml -+++ 13_integrated_testing/test-types/Cargo.toml +diff -uNr 11_exceptions_part1_groundwork/test-types/Cargo.toml 12_integrated_testing/test-types/Cargo.toml +--- 11_exceptions_part1_groundwork/test-types/Cargo.toml ++++ 12_integrated_testing/test-types/Cargo.toml @@ -0,0 +1,5 @@ +[package] +name = "test-types" @@ -2095,9 +2095,9 @@ diff -uNr 12_exceptions_part1_groundwork/test-types/Cargo.toml 13_integrated_tes +authors = ["Andre Richter "] +edition = "2018" -diff -uNr 12_exceptions_part1_groundwork/test-types/src/lib.rs 13_integrated_testing/test-types/src/lib.rs ---- 12_exceptions_part1_groundwork/test-types/src/lib.rs -+++ 13_integrated_testing/test-types/src/lib.rs +diff -uNr 11_exceptions_part1_groundwork/test-types/src/lib.rs 12_integrated_testing/test-types/src/lib.rs +--- 11_exceptions_part1_groundwork/test-types/src/lib.rs ++++ 12_integrated_testing/test-types/src/lib.rs @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// diff --git a/13_integrated_testing/build.rs b/12_integrated_testing/build.rs similarity index 100% rename from 13_integrated_testing/build.rs rename to 12_integrated_testing/build.rs diff --git a/13_integrated_testing/src/_arch/aarch64/cpu.rs b/12_integrated_testing/src/_arch/aarch64/cpu.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/cpu.rs rename to 12_integrated_testing/src/_arch/aarch64/cpu.rs diff --git a/13_integrated_testing/src/_arch/aarch64/cpu/boot.rs b/12_integrated_testing/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/cpu/boot.rs rename to 12_integrated_testing/src/_arch/aarch64/cpu/boot.rs diff --git a/13_integrated_testing/src/_arch/aarch64/cpu/boot.s b/12_integrated_testing/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/cpu/boot.s rename to 12_integrated_testing/src/_arch/aarch64/cpu/boot.s diff --git a/13_integrated_testing/src/_arch/aarch64/exception.rs b/12_integrated_testing/src/_arch/aarch64/exception.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/exception.rs rename to 12_integrated_testing/src/_arch/aarch64/exception.rs diff --git a/13_integrated_testing/src/_arch/aarch64/exception.s b/12_integrated_testing/src/_arch/aarch64/exception.s similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/exception.s rename to 12_integrated_testing/src/_arch/aarch64/exception.s diff --git a/13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs b/12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs rename to 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs diff --git a/13_integrated_testing/src/_arch/aarch64/memory/mmu.rs b/12_integrated_testing/src/_arch/aarch64/memory/mmu.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/memory/mmu.rs rename to 12_integrated_testing/src/_arch/aarch64/memory/mmu.rs diff --git a/13_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs b/12_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs rename to 12_integrated_testing/src/_arch/aarch64/memory/mmu/translation_table.rs diff --git a/13_integrated_testing/src/_arch/aarch64/time.rs b/12_integrated_testing/src/_arch/aarch64/time.rs similarity index 100% rename from 13_integrated_testing/src/_arch/aarch64/time.rs rename to 12_integrated_testing/src/_arch/aarch64/time.rs diff --git a/13_integrated_testing/src/bsp.rs b/12_integrated_testing/src/bsp.rs similarity index 100% rename from 13_integrated_testing/src/bsp.rs rename to 12_integrated_testing/src/bsp.rs diff --git a/13_integrated_testing/src/bsp/device_driver.rs b/12_integrated_testing/src/bsp/device_driver.rs similarity index 100% rename from 13_integrated_testing/src/bsp/device_driver.rs rename to 12_integrated_testing/src/bsp/device_driver.rs diff --git a/13_integrated_testing/src/bsp/device_driver/bcm.rs b/12_integrated_testing/src/bsp/device_driver/bcm.rs similarity index 100% rename from 13_integrated_testing/src/bsp/device_driver/bcm.rs rename to 12_integrated_testing/src/bsp/device_driver/bcm.rs diff --git a/13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/13_integrated_testing/src/bsp/device_driver/common.rs b/12_integrated_testing/src/bsp/device_driver/common.rs similarity index 100% rename from 13_integrated_testing/src/bsp/device_driver/common.rs rename to 12_integrated_testing/src/bsp/device_driver/common.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi.rs b/12_integrated_testing/src/bsp/raspberrypi.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi.rs rename to 12_integrated_testing/src/bsp/raspberrypi.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi/console.rs b/12_integrated_testing/src/bsp/raspberrypi/console.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/console.rs rename to 12_integrated_testing/src/bsp/raspberrypi/console.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi/cpu.rs b/12_integrated_testing/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/cpu.rs rename to 12_integrated_testing/src/bsp/raspberrypi/cpu.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi/driver.rs b/12_integrated_testing/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/driver.rs rename to 12_integrated_testing/src/bsp/raspberrypi/driver.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi/link.ld b/12_integrated_testing/src/bsp/raspberrypi/link.ld similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/link.ld rename to 12_integrated_testing/src/bsp/raspberrypi/link.ld diff --git a/13_integrated_testing/src/bsp/raspberrypi/memory.rs b/12_integrated_testing/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/memory.rs rename to 12_integrated_testing/src/bsp/raspberrypi/memory.rs diff --git a/13_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs b/12_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs similarity index 100% rename from 13_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs rename to 12_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs diff --git a/13_integrated_testing/src/console.rs b/12_integrated_testing/src/console.rs similarity index 100% rename from 13_integrated_testing/src/console.rs rename to 12_integrated_testing/src/console.rs diff --git a/13_integrated_testing/src/cpu.rs b/12_integrated_testing/src/cpu.rs similarity index 100% rename from 13_integrated_testing/src/cpu.rs rename to 12_integrated_testing/src/cpu.rs diff --git a/13_integrated_testing/src/cpu/boot.rs b/12_integrated_testing/src/cpu/boot.rs similarity index 100% rename from 13_integrated_testing/src/cpu/boot.rs rename to 12_integrated_testing/src/cpu/boot.rs diff --git a/13_integrated_testing/src/driver.rs b/12_integrated_testing/src/driver.rs similarity index 100% rename from 13_integrated_testing/src/driver.rs rename to 12_integrated_testing/src/driver.rs diff --git a/13_integrated_testing/src/exception.rs b/12_integrated_testing/src/exception.rs similarity index 100% rename from 13_integrated_testing/src/exception.rs rename to 12_integrated_testing/src/exception.rs diff --git a/13_integrated_testing/src/exception/asynchronous.rs b/12_integrated_testing/src/exception/asynchronous.rs similarity index 100% rename from 13_integrated_testing/src/exception/asynchronous.rs rename to 12_integrated_testing/src/exception/asynchronous.rs diff --git a/13_integrated_testing/src/lib.rs b/12_integrated_testing/src/lib.rs similarity index 100% rename from 13_integrated_testing/src/lib.rs rename to 12_integrated_testing/src/lib.rs diff --git a/13_integrated_testing/src/main.rs b/12_integrated_testing/src/main.rs similarity index 100% rename from 13_integrated_testing/src/main.rs rename to 12_integrated_testing/src/main.rs diff --git a/13_integrated_testing/src/memory.rs b/12_integrated_testing/src/memory.rs similarity index 100% rename from 13_integrated_testing/src/memory.rs rename to 12_integrated_testing/src/memory.rs diff --git a/13_integrated_testing/src/memory/mmu.rs b/12_integrated_testing/src/memory/mmu.rs similarity index 100% rename from 13_integrated_testing/src/memory/mmu.rs rename to 12_integrated_testing/src/memory/mmu.rs diff --git a/13_integrated_testing/src/memory/mmu/translation_table.rs b/12_integrated_testing/src/memory/mmu/translation_table.rs similarity index 100% rename from 13_integrated_testing/src/memory/mmu/translation_table.rs rename to 12_integrated_testing/src/memory/mmu/translation_table.rs diff --git a/13_integrated_testing/src/panic_wait.rs b/12_integrated_testing/src/panic_wait.rs similarity index 100% rename from 13_integrated_testing/src/panic_wait.rs rename to 12_integrated_testing/src/panic_wait.rs diff --git a/13_integrated_testing/src/print.rs b/12_integrated_testing/src/print.rs similarity index 100% rename from 13_integrated_testing/src/print.rs rename to 12_integrated_testing/src/print.rs diff --git a/13_integrated_testing/src/runtime_init.rs b/12_integrated_testing/src/runtime_init.rs similarity index 100% rename from 13_integrated_testing/src/runtime_init.rs rename to 12_integrated_testing/src/runtime_init.rs diff --git a/13_integrated_testing/src/synchronization.rs b/12_integrated_testing/src/synchronization.rs similarity index 100% rename from 13_integrated_testing/src/synchronization.rs rename to 12_integrated_testing/src/synchronization.rs diff --git a/13_integrated_testing/src/time.rs b/12_integrated_testing/src/time.rs similarity index 100% rename from 13_integrated_testing/src/time.rs rename to 12_integrated_testing/src/time.rs diff --git a/13_integrated_testing/test-macros/Cargo.toml b/12_integrated_testing/test-macros/Cargo.toml similarity index 100% rename from 13_integrated_testing/test-macros/Cargo.toml rename to 12_integrated_testing/test-macros/Cargo.toml diff --git a/13_integrated_testing/test-macros/src/lib.rs b/12_integrated_testing/test-macros/src/lib.rs similarity index 100% rename from 13_integrated_testing/test-macros/src/lib.rs rename to 12_integrated_testing/test-macros/src/lib.rs diff --git a/13_integrated_testing/test-types/Cargo.toml b/12_integrated_testing/test-types/Cargo.toml similarity index 100% rename from 13_integrated_testing/test-types/Cargo.toml rename to 12_integrated_testing/test-types/Cargo.toml diff --git a/13_integrated_testing/test-types/src/lib.rs b/12_integrated_testing/test-types/src/lib.rs similarity index 100% rename from 13_integrated_testing/test-types/src/lib.rs rename to 12_integrated_testing/test-types/src/lib.rs diff --git a/13_integrated_testing/tests/00_console_sanity.rb b/12_integrated_testing/tests/00_console_sanity.rb similarity index 100% rename from 13_integrated_testing/tests/00_console_sanity.rb rename to 12_integrated_testing/tests/00_console_sanity.rb diff --git a/13_integrated_testing/tests/00_console_sanity.rs b/12_integrated_testing/tests/00_console_sanity.rs similarity index 100% rename from 13_integrated_testing/tests/00_console_sanity.rs rename to 12_integrated_testing/tests/00_console_sanity.rs diff --git a/13_integrated_testing/tests/01_timer_sanity.rs b/12_integrated_testing/tests/01_timer_sanity.rs similarity index 100% rename from 13_integrated_testing/tests/01_timer_sanity.rs rename to 12_integrated_testing/tests/01_timer_sanity.rs diff --git a/13_integrated_testing/tests/02_exception_sync_page_fault.rs b/12_integrated_testing/tests/02_exception_sync_page_fault.rs similarity index 100% rename from 13_integrated_testing/tests/02_exception_sync_page_fault.rs rename to 12_integrated_testing/tests/02_exception_sync_page_fault.rs diff --git a/13_integrated_testing/tests/panic_exit_success/mod.rs b/12_integrated_testing/tests/panic_exit_success/mod.rs similarity index 100% rename from 13_integrated_testing/tests/panic_exit_success/mod.rs rename to 12_integrated_testing/tests/panic_exit_success/mod.rs diff --git a/13_integrated_testing/tests/runner.rb b/12_integrated_testing/tests/runner.rb similarity index 100% rename from 13_integrated_testing/tests/runner.rb rename to 12_integrated_testing/tests/runner.rb diff --git a/14_exceptions_part2_peripheral_IRQs/.cargo/config.toml b/13_exceptions_part2_peripheral_IRQs/.cargo/config.toml similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/.cargo/config.toml rename to 13_exceptions_part2_peripheral_IRQs/.cargo/config.toml diff --git a/14_exceptions_part2_peripheral_IRQs/.vscode/settings.json b/13_exceptions_part2_peripheral_IRQs/.vscode/settings.json similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/.vscode/settings.json rename to 13_exceptions_part2_peripheral_IRQs/.vscode/settings.json diff --git a/14_exceptions_part2_peripheral_IRQs/Cargo.lock b/13_exceptions_part2_peripheral_IRQs/Cargo.lock similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/Cargo.lock rename to 13_exceptions_part2_peripheral_IRQs/Cargo.lock diff --git a/14_exceptions_part2_peripheral_IRQs/Cargo.toml b/13_exceptions_part2_peripheral_IRQs/Cargo.toml similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/Cargo.toml rename to 13_exceptions_part2_peripheral_IRQs/Cargo.toml diff --git a/14_exceptions_part2_peripheral_IRQs/Makefile b/13_exceptions_part2_peripheral_IRQs/Makefile similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/Makefile rename to 13_exceptions_part2_peripheral_IRQs/Makefile diff --git a/14_exceptions_part2_peripheral_IRQs/README.md b/13_exceptions_part2_peripheral_IRQs/README.md similarity index 94% rename from 14_exceptions_part2_peripheral_IRQs/README.md rename to 13_exceptions_part2_peripheral_IRQs/README.md index b78da716..ea327b77 100644 --- a/14_exceptions_part2_peripheral_IRQs/README.md +++ b/13_exceptions_part2_peripheral_IRQs/README.md @@ -1,4 +1,4 @@ -# Tutorial 14 - Exceptions Part 2: Peripheral IRQs +# Tutorial 13 - Exceptions Part 2: Peripheral IRQs ## tl;dr @@ -35,11 +35,11 @@ ## Introduction -In [tutorial 12], we laid the groundwork for exception handling from the processor architecture +In [tutorial 11], we laid the groundwork for exception handling from the processor architecture side. Handler stubs for the different exception types were set up, and a first glimpse at exception handling was presented by causing a `synchronous` exception by means of a `page fault`. -[tutorial 12]: ../12_exceptions_part1_groundwork +[tutorial 11]: ../11_exceptions_part1_groundwork In this tutorial, we will add a first level of support for one of the three types of `asynchronous` exceptions that are defined for `AArch64`: `IRQs`. The overall goal for this tutorial is to get rid @@ -350,13 +350,13 @@ fn handle_pending_irqs<'irq_context>( An important aspect of this function signature is that we want to ensure that IRQ handling is only possible from IRQ context. Part of the reason is that this invariant allows us to make some implicit assumptions (which might depend on the target architecture, though). For example, as we have learned -in [tutorial 12], in `AArch64`, _"all kinds of exceptions are turned off upon taking an exception, +in [tutorial 11], in `AArch64`, _"all kinds of exceptions are turned off upon taking an exception, so that by default, exception handlers can not get interrupted themselves"_ (note that an IRQ is an exception). This is a useful property that relieves us from explicitly protecting IRQ handling from being interrupted itself. Another reason would be that calling IRQ handling functions from arbitrary execution contexts just doesn't make a lot of sense. -[tutorial 12]: ../12_exceptions_part1_groundwork/ +[tutorial 11]: ../11_exceptions_part1_groundwork/ So in order to ensure that this function is only being called from IRQ context, we borrow a technique that I first saw in the [Rust embedded WG]'s [bare-metal crate]. It uses Rust's type @@ -744,9 +744,9 @@ Minipush 1.0 ## Diff to previous ```diff -diff -uNr 13_integrated_testing/src/_arch/aarch64/cpu/smp.rs 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs ---- 13_integrated_testing/src/_arch/aarch64/cpu/smp.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs +diff -uNr 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs +--- 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -778,9 +778,9 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/cpu/smp.rs 14_exceptions_part2 + T::from((MPIDR_EL1.get() & CORE_MASK) as u8) +} -diff -uNr 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs ---- 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs +diff -uNr 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs +--- 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs @@ -17,6 +17,10 @@ // Private Definitions //-------------------------------------------------------------------------------------------------- @@ -865,9 +865,9 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 14_e #[rustfmt::skip] pub fn print_state() { -diff -uNr 13_integrated_testing/src/_arch/aarch64/exception.rs 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs ---- 13_integrated_testing/src/_arch/aarch64/exception.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs +diff -uNr 12_integrated_testing/src/_arch/aarch64/exception.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs +--- 12_integrated_testing/src/_arch/aarch64/exception.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs @@ -11,6 +11,7 @@ //! //! crate::exception::arch_exception @@ -891,9 +891,9 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/exception.rs 14_exceptions_par #[no_mangle] -diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs ---- 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs +--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1033,9 +1033,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs 14_excep + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs ---- 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs +--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1233,9 +1233,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs 14_excep + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs ---- 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs +--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs @@ -0,0 +1,219 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1457,9 +1457,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 14_exceptions + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/arm.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs ---- 13_integrated_testing/src/bsp/device_driver/arm.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/arm.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs +--- 12_integrated_testing/src/bsp/device_driver/arm.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1471,9 +1471,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm.rs 14_exceptions_part2 + +pub use gicv2::*; -diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ---- 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs @@ -6,7 +6,7 @@ use crate::{ @@ -1502,9 +1502,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 14_exc } -diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs ---- 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs +--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1670,9 +1670,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_cont + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs ---- 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs +--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -1806,9 +1806,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_cont + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ---- 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs @@ -10,8 +10,8 @@ //! - @@ -1974,9 +1974,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs + } +} -diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs ---- 13_integrated_testing/src/bsp/device_driver/bcm.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs +--- 12_integrated_testing/src/bsp/device_driver/bcm.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs @@ -5,7 +5,11 @@ //! BCM driver top level. @@ -1990,9 +1990,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/bcm.rs 14_exceptions_part2 +pub use bcm2xxx_interrupt_controller::*; pub use bcm2xxx_pl011_uart::*; -diff -uNr 13_integrated_testing/src/bsp/device_driver.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs ---- 13_integrated_testing/src/bsp/device_driver.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs +diff -uNr 12_integrated_testing/src/bsp/device_driver.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs +--- 12_integrated_testing/src/bsp/device_driver.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs @@ -4,9 +4,13 @@ //! Device driver. @@ -2008,9 +2008,9 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver.rs 14_exceptions_part2_per #[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))] pub use bcm::*; -diff -uNr 13_integrated_testing/src/bsp/raspberrypi/driver.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs ---- 13_integrated_testing/src/bsp/raspberrypi/driver.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs +diff -uNr 12_integrated_testing/src/bsp/raspberrypi/driver.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs +--- 12_integrated_testing/src/bsp/raspberrypi/driver.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs @@ -12,7 +12,7 @@ /// Device Driver Manager type. @@ -2034,9 +2034,9 @@ diff -uNr 13_integrated_testing/src/bsp/raspberrypi/driver.rs 14_exceptions_part //-------------------------------------------------------------------------------------------------- -diff -uNr 13_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs ---- 13_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs +diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs +--- 12_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2075,9 +2075,9 @@ diff -uNr 13_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs 14 + &super::super::INTERRUPT_CONTROLLER +} -diff -uNr 13_integrated_testing/src/bsp/raspberrypi/exception.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs ---- 13_integrated_testing/src/bsp/raspberrypi/exception.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs +diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs +--- 12_integrated_testing/src/bsp/raspberrypi/exception.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2087,9 +2087,9 @@ diff -uNr 13_integrated_testing/src/bsp/raspberrypi/exception.rs 14_exceptions_p + +pub mod asynchronous; -diff -uNr 13_integrated_testing/src/bsp/raspberrypi/memory.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs ---- 13_integrated_testing/src/bsp/raspberrypi/memory.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs +diff -uNr 12_integrated_testing/src/bsp/raspberrypi/memory.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs +--- 12_integrated_testing/src/bsp/raspberrypi/memory.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs @@ -51,10 +51,12 @@ pub mod mmio { use super::*; @@ -2117,9 +2117,9 @@ diff -uNr 13_integrated_testing/src/bsp/raspberrypi/memory.rs 14_exceptions_part } } -diff -uNr 13_integrated_testing/src/bsp/raspberrypi.rs 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs ---- 13_integrated_testing/src/bsp/raspberrypi.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs +diff -uNr 12_integrated_testing/src/bsp/raspberrypi.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs +--- 12_integrated_testing/src/bsp/raspberrypi.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs @@ -7,6 +7,7 @@ pub mod console; pub mod cpu; @@ -2157,9 +2157,9 @@ diff -uNr 13_integrated_testing/src/bsp/raspberrypi.rs 14_exceptions_part2_perip //-------------------------------------------------------------------------------------------------- // Public Code -diff -uNr 13_integrated_testing/src/cpu/smp.rs 14_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs ---- 13_integrated_testing/src/cpu/smp.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs +diff -uNr 12_integrated_testing/src/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs +--- 12_integrated_testing/src/cpu/smp.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2176,9 +2176,9 @@ diff -uNr 13_integrated_testing/src/cpu/smp.rs 14_exceptions_part2_peripheral_IR +//-------------------------------------------------------------------------------------------------- +pub use arch_smp::core_id; -diff -uNr 13_integrated_testing/src/cpu.rs 14_exceptions_part2_peripheral_IRQs/src/cpu.rs ---- 13_integrated_testing/src/cpu.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/cpu.rs +diff -uNr 12_integrated_testing/src/cpu.rs 13_exceptions_part2_peripheral_IRQs/src/cpu.rs +--- 12_integrated_testing/src/cpu.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/cpu.rs @@ -10,6 +10,8 @@ mod boot; @@ -2189,9 +2189,9 @@ diff -uNr 13_integrated_testing/src/cpu.rs 14_exceptions_part2_peripheral_IRQs/s // Architectural Public Reexports //-------------------------------------------------------------------------------------------------- -diff -uNr 13_integrated_testing/src/driver.rs 14_exceptions_part2_peripheral_IRQs/src/driver.rs ---- 13_integrated_testing/src/driver.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/driver.rs +diff -uNr 12_integrated_testing/src/driver.rs 13_exceptions_part2_peripheral_IRQs/src/driver.rs +--- 12_integrated_testing/src/driver.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/driver.rs @@ -23,6 +23,14 @@ unsafe fn init(&self) -> Result<(), &'static str> { Ok(()) @@ -2208,9 +2208,9 @@ diff -uNr 13_integrated_testing/src/driver.rs 14_exceptions_part2_peripheral_IRQ /// Device driver management functions. -diff -uNr 13_integrated_testing/src/exception/asynchronous.rs 14_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs ---- 13_integrated_testing/src/exception/asynchronous.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs +diff -uNr 12_integrated_testing/src/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs +--- 12_integrated_testing/src/exception/asynchronous.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs @@ -8,7 +8,145 @@ #[path = "../_arch/aarch64/exception/asynchronous.rs"] mod arch_asynchronous; @@ -2359,9 +2359,9 @@ diff -uNr 13_integrated_testing/src/exception/asynchronous.rs 14_exceptions_part + ret +} -diff -uNr 13_integrated_testing/src/lib.rs 14_exceptions_part2_peripheral_IRQs/src/lib.rs ---- 13_integrated_testing/src/lib.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/lib.rs +diff -uNr 12_integrated_testing/src/lib.rs 13_exceptions_part2_peripheral_IRQs/src/lib.rs +--- 12_integrated_testing/src/lib.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/lib.rs @@ -110,6 +110,7 @@ #![allow(clippy::clippy::upper_case_acronyms)] @@ -2379,9 +2379,9 @@ diff -uNr 13_integrated_testing/src/lib.rs 14_exceptions_part2_peripheral_IRQs/s //-------------------------------------------------------------------------------------------------- -diff -uNr 13_integrated_testing/src/main.rs 14_exceptions_part2_peripheral_IRQs/src/main.rs ---- 13_integrated_testing/src/main.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/main.rs +diff -uNr 12_integrated_testing/src/main.rs 13_exceptions_part2_peripheral_IRQs/src/main.rs +--- 12_integrated_testing/src/main.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/main.rs @@ -11,7 +11,7 @@ #![no_main] #![no_std] @@ -2448,9 +2448,9 @@ diff -uNr 13_integrated_testing/src/main.rs 14_exceptions_part2_peripheral_IRQs/ + cpu::wait_forever(); } -diff -uNr 13_integrated_testing/src/panic_wait.rs 14_exceptions_part2_peripheral_IRQs/src/panic_wait.rs ---- 13_integrated_testing/src/panic_wait.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/panic_wait.rs +diff -uNr 12_integrated_testing/src/panic_wait.rs 13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs +--- 12_integrated_testing/src/panic_wait.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs @@ -4,7 +4,7 @@ //! A panic handler that infinitely waits. @@ -2470,9 +2470,9 @@ diff -uNr 13_integrated_testing/src/panic_wait.rs 14_exceptions_part2_peripheral panic_println!("\nKernel panic: {}", args); } else { -diff -uNr 13_integrated_testing/src/state.rs 14_exceptions_part2_peripheral_IRQs/src/state.rs ---- 13_integrated_testing/src/state.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/state.rs +diff -uNr 12_integrated_testing/src/state.rs 13_exceptions_part2_peripheral_IRQs/src/state.rs +--- 12_integrated_testing/src/state.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/state.rs @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2567,9 +2567,9 @@ diff -uNr 13_integrated_testing/src/state.rs 14_exceptions_part2_peripheral_IRQs + } +} -diff -uNr 13_integrated_testing/src/synchronization.rs 14_exceptions_part2_peripheral_IRQs/src/synchronization.rs ---- 13_integrated_testing/src/synchronization.rs -+++ 14_exceptions_part2_peripheral_IRQs/src/synchronization.rs +diff -uNr 12_integrated_testing/src/synchronization.rs 13_exceptions_part2_peripheral_IRQs/src/synchronization.rs +--- 12_integrated_testing/src/synchronization.rs ++++ 13_exceptions_part2_peripheral_IRQs/src/synchronization.rs @@ -28,6 +28,21 @@ /// Locks the mutex and grants the closure temporary mutable access to the wrapped data. fn lock(&self, f: impl FnOnce(&mut Self::Data) -> R) -> R; @@ -2702,9 +2702,9 @@ diff -uNr 13_integrated_testing/src/synchronization.rs 14_exceptions_part2_perip + } } -diff -uNr 13_integrated_testing/tests/03_exception_irq_sanity.rs 14_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs ---- 13_integrated_testing/tests/03_exception_irq_sanity.rs -+++ 14_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs +diff -uNr 12_integrated_testing/tests/03_exception_irq_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs +--- 12_integrated_testing/tests/03_exception_irq_sanity.rs ++++ 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// diff --git a/14_exceptions_part2_peripheral_IRQs/build.rs b/13_exceptions_part2_peripheral_IRQs/build.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/build.rs rename to 13_exceptions_part2_peripheral_IRQs/build.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.s b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.s rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/boot.s diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.s b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.s similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.s rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.s diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs b/13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs rename to 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/cpu.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/cpu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/cpu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/console.rs b/13_exceptions_part2_peripheral_IRQs/src/console.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/console.rs rename to 13_exceptions_part2_peripheral_IRQs/src/console.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/cpu.rs b/13_exceptions_part2_peripheral_IRQs/src/cpu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/cpu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/cpu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/cpu/boot.rs b/13_exceptions_part2_peripheral_IRQs/src/cpu/boot.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/cpu/boot.rs rename to 13_exceptions_part2_peripheral_IRQs/src/cpu/boot.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs b/13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs rename to 13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/driver.rs b/13_exceptions_part2_peripheral_IRQs/src/driver.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/driver.rs rename to 13_exceptions_part2_peripheral_IRQs/src/driver.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/exception.rs b/13_exceptions_part2_peripheral_IRQs/src/exception.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/exception.rs rename to 13_exceptions_part2_peripheral_IRQs/src/exception.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs b/13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs rename to 13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/lib.rs b/13_exceptions_part2_peripheral_IRQs/src/lib.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/lib.rs rename to 13_exceptions_part2_peripheral_IRQs/src/lib.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/main.rs b/13_exceptions_part2_peripheral_IRQs/src/main.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/main.rs rename to 13_exceptions_part2_peripheral_IRQs/src/main.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/memory.rs b/13_exceptions_part2_peripheral_IRQs/src/memory.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/memory.rs rename to 13_exceptions_part2_peripheral_IRQs/src/memory.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs b/13_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs rename to 13_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs b/13_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs rename to 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/panic_wait.rs b/13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/panic_wait.rs rename to 13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/print.rs b/13_exceptions_part2_peripheral_IRQs/src/print.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/print.rs rename to 13_exceptions_part2_peripheral_IRQs/src/print.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/runtime_init.rs b/13_exceptions_part2_peripheral_IRQs/src/runtime_init.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/runtime_init.rs rename to 13_exceptions_part2_peripheral_IRQs/src/runtime_init.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/state.rs b/13_exceptions_part2_peripheral_IRQs/src/state.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/state.rs rename to 13_exceptions_part2_peripheral_IRQs/src/state.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/synchronization.rs b/13_exceptions_part2_peripheral_IRQs/src/synchronization.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/synchronization.rs rename to 13_exceptions_part2_peripheral_IRQs/src/synchronization.rs diff --git a/14_exceptions_part2_peripheral_IRQs/src/time.rs b/13_exceptions_part2_peripheral_IRQs/src/time.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/src/time.rs rename to 13_exceptions_part2_peripheral_IRQs/src/time.rs diff --git a/14_exceptions_part2_peripheral_IRQs/test-macros/Cargo.toml b/13_exceptions_part2_peripheral_IRQs/test-macros/Cargo.toml similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/test-macros/Cargo.toml rename to 13_exceptions_part2_peripheral_IRQs/test-macros/Cargo.toml diff --git a/14_exceptions_part2_peripheral_IRQs/test-macros/src/lib.rs b/13_exceptions_part2_peripheral_IRQs/test-macros/src/lib.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/test-macros/src/lib.rs rename to 13_exceptions_part2_peripheral_IRQs/test-macros/src/lib.rs diff --git a/14_exceptions_part2_peripheral_IRQs/test-types/Cargo.toml b/13_exceptions_part2_peripheral_IRQs/test-types/Cargo.toml similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/test-types/Cargo.toml rename to 13_exceptions_part2_peripheral_IRQs/test-types/Cargo.toml diff --git a/14_exceptions_part2_peripheral_IRQs/test-types/src/lib.rs b/13_exceptions_part2_peripheral_IRQs/test-types/src/lib.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/test-types/src/lib.rs rename to 13_exceptions_part2_peripheral_IRQs/test-types/src/lib.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rb b/13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rb similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rb rename to 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rb diff --git a/14_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs b/13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs rename to 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/01_timer_sanity.rs b/13_exceptions_part2_peripheral_IRQs/tests/01_timer_sanity.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/01_timer_sanity.rs rename to 13_exceptions_part2_peripheral_IRQs/tests/01_timer_sanity.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs b/13_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs rename to 13_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs b/13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs rename to 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/panic_exit_success/mod.rs b/13_exceptions_part2_peripheral_IRQs/tests/panic_exit_success/mod.rs similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/panic_exit_success/mod.rs rename to 13_exceptions_part2_peripheral_IRQs/tests/panic_exit_success/mod.rs diff --git a/14_exceptions_part2_peripheral_IRQs/tests/runner.rb b/13_exceptions_part2_peripheral_IRQs/tests/runner.rb similarity index 100% rename from 14_exceptions_part2_peripheral_IRQs/tests/runner.rb rename to 13_exceptions_part2_peripheral_IRQs/tests/runner.rb diff --git a/15_virtual_mem_part2_mmio_remap/.cargo/config.toml b/14_virtual_mem_part2_mmio_remap/.cargo/config.toml similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/.cargo/config.toml rename to 14_virtual_mem_part2_mmio_remap/.cargo/config.toml diff --git a/15_virtual_mem_part2_mmio_remap/.vscode/settings.json b/14_virtual_mem_part2_mmio_remap/.vscode/settings.json similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/.vscode/settings.json rename to 14_virtual_mem_part2_mmio_remap/.vscode/settings.json diff --git a/15_virtual_mem_part2_mmio_remap/Cargo.lock b/14_virtual_mem_part2_mmio_remap/Cargo.lock similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/Cargo.lock rename to 14_virtual_mem_part2_mmio_remap/Cargo.lock diff --git a/15_virtual_mem_part2_mmio_remap/Cargo.toml b/14_virtual_mem_part2_mmio_remap/Cargo.toml similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/Cargo.toml rename to 14_virtual_mem_part2_mmio_remap/Cargo.toml diff --git a/15_virtual_mem_part2_mmio_remap/Makefile b/14_virtual_mem_part2_mmio_remap/Makefile similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/Makefile rename to 14_virtual_mem_part2_mmio_remap/Makefile diff --git a/15_virtual_mem_part2_mmio_remap/README.md b/14_virtual_mem_part2_mmio_remap/README.md similarity index 95% rename from 15_virtual_mem_part2_mmio_remap/README.md rename to 14_virtual_mem_part2_mmio_remap/README.md index 1745d4b1..cf387da9 100644 --- a/15_virtual_mem_part2_mmio_remap/README.md +++ b/14_virtual_mem_part2_mmio_remap/README.md @@ -1,4 +1,4 @@ -# Tutorial 15 - Virtual Memory Part 2: MMIO Remap +# Tutorial 14 - Virtual Memory Part 2: MMIO Remap ## tl;dr @@ -369,9 +369,9 @@ Minipush 1.0 ## Diff to previous ```diff -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs ---- 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs -+++ 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs +--- 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs ++++ 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs @@ -11,7 +11,11 @@ //! //! crate::exception::arch_exception @@ -418,9 +418,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs 15_ } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs ---- 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs -+++ 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs +--- 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/translation_table.rs ++++ 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs @@ -15,9 +15,12 @@ use crate::{ @@ -730,9 +730,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu/trans use super::*; use test_macros::kernel_test; -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs ---- 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs -+++ 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs +--- 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs ++++ 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs @@ -15,7 +15,7 @@ use crate::{ @@ -816,9 +816,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs 15 - } -} -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs @@ -4,7 +4,9 @@ //! GICC Driver - GIC CPU interface. @@ -905,9 +905,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gi } } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs @@ -8,8 +8,9 @@ //! - SPI - Shared Peripheral Interrupt. @@ -981,9 +981,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gi _ => { let enable_reg_index_shared = enable_reg_index - 1; -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs @@ -79,7 +79,8 @@ mod gicc; mod gicd; @@ -1059,9 +1059,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs self.gicd.boot_core_init(); } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs @@ -5,9 +5,10 @@ //! GPIO Driver. @@ -1147,9 +1147,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_ + } } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs @@ -2,12 +2,12 @@ // // Copyright (c) 2020-2021 Andre Richter @@ -1240,9 +1240,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_ type IRQNumberType = PeripheralIRQ; -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs @@ -6,7 +6,7 @@ mod peripheral_ic; @@ -1281,9 +1281,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_ impl exception::asynchronous::interface::IRQManager for InterruptController { -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs @@ -10,10 +10,13 @@ //! - @@ -1390,9 +1390,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_ impl console::interface::Write for PL011Uart { -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs @@ -5,7 +5,7 @@ //! BSP console facilities. @@ -1432,9 +1432,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs 15_ } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs @@ -46,7 +46,15 @@ &self.device_drivers[..] } @@ -1453,9 +1453,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs 15_v super::GPIO.map_pl011_uart(); } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld @@ -17,11 +17,6 @@ SECTIONS { @@ -1501,9 +1501,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/link.ld 15_vir + __boot_core_stack_end_exclusive = .; /* | */ } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs @@ -4,70 +4,164 @@ //! BSP Memory Management Unit. @@ -1779,9 +1779,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory/mmu.rs + } } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs @@ -3,9 +3,40 @@ // Copyright (c) 2018-2021 Andre Richter @@ -1995,9 +1995,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs 15_v //-------------------------------------------------------------------------------------------------- -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs ---- 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs -+++ 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs +--- 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs ++++ 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs @@ -10,17 +10,20 @@ pub mod exception; pub mod memory; @@ -2044,9 +2044,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs 15_virtual_ //-------------------------------------------------------------------------------------------------- -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/common.rs 15_virtual_mem_part2_mmio_remap/src/common.rs ---- 14_exceptions_part2_peripheral_IRQs/src/common.rs -+++ 15_virtual_mem_part2_mmio_remap/src/common.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/common.rs 14_virtual_mem_part2_mmio_remap/src/common.rs +--- 13_exceptions_part2_peripheral_IRQs/src/common.rs ++++ 14_virtual_mem_part2_mmio_remap/src/common.rs @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2070,9 +2070,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/common.rs 15_virtual_mem_part2 + value & !(alignment - 1) +} -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/driver.rs 15_virtual_mem_part2_mmio_remap/src/driver.rs ---- 14_exceptions_part2_peripheral_IRQs/src/driver.rs -+++ 15_virtual_mem_part2_mmio_remap/src/driver.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/driver.rs 14_virtual_mem_part2_mmio_remap/src/driver.rs +--- 13_exceptions_part2_peripheral_IRQs/src/driver.rs ++++ 14_virtual_mem_part2_mmio_remap/src/driver.rs @@ -31,6 +31,14 @@ fn register_and_enable_irq_handler(&'static self) -> Result<(), &'static str> { Ok(()) @@ -2114,9 +2114,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/driver.rs 15_virtual_mem_part2 } } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/lib.rs 15_virtual_mem_part2_mmio_remap/src/lib.rs ---- 14_exceptions_part2_peripheral_IRQs/src/lib.rs -+++ 15_virtual_mem_part2_mmio_remap/src/lib.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/lib.rs 14_virtual_mem_part2_mmio_remap/src/lib.rs +--- 13_exceptions_part2_peripheral_IRQs/src/lib.rs ++++ 14_virtual_mem_part2_mmio_remap/src/lib.rs @@ -111,6 +111,8 @@ #![allow(clippy::clippy::upper_case_acronyms)] #![allow(incomplete_features)] @@ -2135,9 +2135,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/lib.rs 15_virtual_mem_part2_mm pub mod cpu; pub mod driver; -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/main.rs 15_virtual_mem_part2_mmio_remap/src/main.rs ---- 14_exceptions_part2_peripheral_IRQs/src/main.rs -+++ 15_virtual_mem_part2_mmio_remap/src/main.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/main.rs 14_virtual_mem_part2_mmio_remap/src/main.rs +--- 13_exceptions_part2_peripheral_IRQs/src/main.rs ++++ 14_virtual_mem_part2_mmio_remap/src/main.rs @@ -25,21 +25,39 @@ #[no_mangle] unsafe fn kernel_init() -> ! { @@ -2196,9 +2196,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/main.rs 15_virtual_mem_part2_m let (_, privilege_level) = exception::current_privilege_level(); info!("Current privilege level: {}", privilege_level); -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/mapping_record.rs 15_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs ---- 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/mapping_record.rs -+++ 15_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/mapping_record.rs 14_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs +--- 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/mapping_record.rs ++++ 14_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs @@ -0,0 +1,221 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2422,9 +2422,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/mapping_record.rs 1 + KERNEL_MAPPING_RECORD.read(|mr| mr.print()); +} -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs 15_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs ---- 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs -+++ 15_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs 14_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs +--- 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.rs ++++ 14_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs @@ -8,7 +8,105 @@ #[path = "../../_arch/aarch64/memory/mmu/translation_table.rs"] mod arch_translation_table; @@ -2533,9 +2533,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/translation_table.r + } +} -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/types.rs 15_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs ---- 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/types.rs -+++ 15_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/types.rs 14_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs +--- 13_exceptions_part2_peripheral_IRQs/src/memory/mmu/types.rs ++++ 14_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs @@ -0,0 +1,210 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// @@ -2748,9 +2748,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu/types.rs 15_virtual + } +} -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs 15_virtual_mem_part2_mmio_remap/src/memory/mmu.rs ---- 14_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs -+++ 15_virtual_mem_part2_mmio_remap/src/memory/mmu.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs 14_virtual_mem_part2_mmio_remap/src/memory/mmu.rs +--- 13_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs ++++ 14_virtual_mem_part2_mmio_remap/src/memory/mmu.rs @@ -3,29 +3,23 @@ // Copyright (c) 2020-2021 Andre Richter @@ -3119,9 +3119,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory/mmu.rs 15_virtual_mem_p + mapping_record::kernel_print() } -diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory.rs 15_virtual_mem_part2_mmio_remap/src/memory.rs ---- 14_exceptions_part2_peripheral_IRQs/src/memory.rs -+++ 15_virtual_mem_part2_mmio_remap/src/memory.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/src/memory.rs 14_virtual_mem_part2_mmio_remap/src/memory.rs +--- 13_exceptions_part2_peripheral_IRQs/src/memory.rs ++++ 14_virtual_mem_part2_mmio_remap/src/memory.rs @@ -6,12 +6,136 @@ pub mod mmu; @@ -3261,9 +3261,9 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/memory.rs 15_virtual_mem_part2 /// /// # Safety -diff -uNr 14_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs 15_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs ---- 14_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs -+++ 15_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs +diff -uNr 13_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs 14_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs +--- 13_exceptions_part2_peripheral_IRQs/tests/02_exception_sync_page_fault.rs ++++ 14_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs @@ -21,7 +21,7 @@ #[no_mangle] diff --git a/15_virtual_mem_part2_mmio_remap/build.rs b/14_virtual_mem_part2_mmio_remap/build.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/build.rs rename to 14_virtual_mem_part2_mmio_remap/build.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.s b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.s similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.s rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/boot.s diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/smp.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/smp.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/smp.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu/smp.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.s b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.s similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.s rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.s diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/memory/mmu/translation_table.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs b/14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs rename to 14_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp.rs b/14_virtual_mem_part2_mmio_remap/src/bsp.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicc.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2/gicd.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/cpu.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/cpu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/cpu.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/cpu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/driver.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception/asynchronous.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception/asynchronous.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception/asynchronous.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/exception/asynchronous.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/link.ld diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs rename to 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/common.rs b/14_virtual_mem_part2_mmio_remap/src/common.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/common.rs rename to 14_virtual_mem_part2_mmio_remap/src/common.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/console.rs b/14_virtual_mem_part2_mmio_remap/src/console.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/console.rs rename to 14_virtual_mem_part2_mmio_remap/src/console.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/cpu.rs b/14_virtual_mem_part2_mmio_remap/src/cpu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/cpu.rs rename to 14_virtual_mem_part2_mmio_remap/src/cpu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/cpu/boot.rs b/14_virtual_mem_part2_mmio_remap/src/cpu/boot.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/cpu/boot.rs rename to 14_virtual_mem_part2_mmio_remap/src/cpu/boot.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/cpu/smp.rs b/14_virtual_mem_part2_mmio_remap/src/cpu/smp.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/cpu/smp.rs rename to 14_virtual_mem_part2_mmio_remap/src/cpu/smp.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/driver.rs b/14_virtual_mem_part2_mmio_remap/src/driver.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/driver.rs rename to 14_virtual_mem_part2_mmio_remap/src/driver.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/exception.rs b/14_virtual_mem_part2_mmio_remap/src/exception.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/exception.rs rename to 14_virtual_mem_part2_mmio_remap/src/exception.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/exception/asynchronous.rs b/14_virtual_mem_part2_mmio_remap/src/exception/asynchronous.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/exception/asynchronous.rs rename to 14_virtual_mem_part2_mmio_remap/src/exception/asynchronous.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/lib.rs b/14_virtual_mem_part2_mmio_remap/src/lib.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/lib.rs rename to 14_virtual_mem_part2_mmio_remap/src/lib.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/main.rs b/14_virtual_mem_part2_mmio_remap/src/main.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/main.rs rename to 14_virtual_mem_part2_mmio_remap/src/main.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/memory.rs b/14_virtual_mem_part2_mmio_remap/src/memory.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/memory.rs rename to 14_virtual_mem_part2_mmio_remap/src/memory.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/memory/mmu.rs b/14_virtual_mem_part2_mmio_remap/src/memory/mmu.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/memory/mmu.rs rename to 14_virtual_mem_part2_mmio_remap/src/memory/mmu.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs b/14_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs rename to 14_virtual_mem_part2_mmio_remap/src/memory/mmu/mapping_record.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs b/14_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs rename to 14_virtual_mem_part2_mmio_remap/src/memory/mmu/translation_table.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs b/14_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs rename to 14_virtual_mem_part2_mmio_remap/src/memory/mmu/types.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/panic_wait.rs b/14_virtual_mem_part2_mmio_remap/src/panic_wait.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/panic_wait.rs rename to 14_virtual_mem_part2_mmio_remap/src/panic_wait.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/print.rs b/14_virtual_mem_part2_mmio_remap/src/print.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/print.rs rename to 14_virtual_mem_part2_mmio_remap/src/print.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/runtime_init.rs b/14_virtual_mem_part2_mmio_remap/src/runtime_init.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/runtime_init.rs rename to 14_virtual_mem_part2_mmio_remap/src/runtime_init.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/state.rs b/14_virtual_mem_part2_mmio_remap/src/state.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/state.rs rename to 14_virtual_mem_part2_mmio_remap/src/state.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/synchronization.rs b/14_virtual_mem_part2_mmio_remap/src/synchronization.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/synchronization.rs rename to 14_virtual_mem_part2_mmio_remap/src/synchronization.rs diff --git a/15_virtual_mem_part2_mmio_remap/src/time.rs b/14_virtual_mem_part2_mmio_remap/src/time.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/src/time.rs rename to 14_virtual_mem_part2_mmio_remap/src/time.rs diff --git a/15_virtual_mem_part2_mmio_remap/test-macros/Cargo.toml b/14_virtual_mem_part2_mmio_remap/test-macros/Cargo.toml similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/test-macros/Cargo.toml rename to 14_virtual_mem_part2_mmio_remap/test-macros/Cargo.toml diff --git a/15_virtual_mem_part2_mmio_remap/test-macros/src/lib.rs b/14_virtual_mem_part2_mmio_remap/test-macros/src/lib.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/test-macros/src/lib.rs rename to 14_virtual_mem_part2_mmio_remap/test-macros/src/lib.rs diff --git a/15_virtual_mem_part2_mmio_remap/test-types/Cargo.toml b/14_virtual_mem_part2_mmio_remap/test-types/Cargo.toml similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/test-types/Cargo.toml rename to 14_virtual_mem_part2_mmio_remap/test-types/Cargo.toml diff --git a/15_virtual_mem_part2_mmio_remap/test-types/src/lib.rs b/14_virtual_mem_part2_mmio_remap/test-types/src/lib.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/test-types/src/lib.rs rename to 14_virtual_mem_part2_mmio_remap/test-types/src/lib.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rb b/14_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rb similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rb rename to 14_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rb diff --git a/15_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rs b/14_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rs rename to 14_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/01_timer_sanity.rs b/14_virtual_mem_part2_mmio_remap/tests/01_timer_sanity.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/01_timer_sanity.rs rename to 14_virtual_mem_part2_mmio_remap/tests/01_timer_sanity.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs b/14_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs rename to 14_virtual_mem_part2_mmio_remap/tests/02_exception_sync_page_fault.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/03_exception_irq_sanity.rs b/14_virtual_mem_part2_mmio_remap/tests/03_exception_irq_sanity.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/03_exception_irq_sanity.rs rename to 14_virtual_mem_part2_mmio_remap/tests/03_exception_irq_sanity.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/panic_exit_success/mod.rs b/14_virtual_mem_part2_mmio_remap/tests/panic_exit_success/mod.rs similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/panic_exit_success/mod.rs rename to 14_virtual_mem_part2_mmio_remap/tests/panic_exit_success/mod.rs diff --git a/15_virtual_mem_part2_mmio_remap/tests/runner.rb b/14_virtual_mem_part2_mmio_remap/tests/runner.rb similarity index 100% rename from 15_virtual_mem_part2_mmio_remap/tests/runner.rb rename to 14_virtual_mem_part2_mmio_remap/tests/runner.rb diff --git a/README.md b/README.md index daf3b7d7..183b33d4 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ Have fun! _Best regards,
Andre ([@andre-richter])_ -P.S.: In the future, Chinese :cn: versions of the tutorials will be maintained as -[`README.CN.md`](README.CN.md) by [@colachg] and [@readlnh]. +P.S.: Chinese :cn: versions of the tutorials were started by [@colachg] and [@readlnh]. You can find +them as [`README.CN.md`](README.CN.md) in the respective folders. They are a bit out-of-date at the +moment though. [ARMv8-A architecture]: https://developer.arm.com/products/architecture/cpu-architecture/a-profile/docs [monolithic]: https://en.wikipedia.org/wiki/Monolithic_kernel @@ -40,7 +41,7 @@ P.S.: In the future, Chinese :cn: versions of the tutorials will be maintained a - The code written in these tutorials supports and runs on the **Raspberry Pi 3** and the **Raspberry Pi 4**. - Tutorials 1 till 5 are groundwork code which only makes sense to run in `QEMU`. - - Starting with [tutorial 6](06_drivers_gpio_uart), you can load and run the kernel on the real + - Starting with [tutorial 5](05_drivers_gpio_uart), you can load and run the kernel on the real Raspberrys and observe output over `UART`. - Although the Raspberry Pi 3 and 4 are the main target boards, the code is written in a modular fashion which allows for easy porting to other CPU architectures and/or boards. @@ -125,9 +126,9 @@ get a USB serial cable to get the full experience. - You can find USB-to-serial cables that should work right away at [\[1\]] [\[2\]], but many others will work too. Ideally, your cable is based on the `CP2102` chip. - You connect it to `GND` and GPIO pins `14/15` as shown below. -- [Tutorial 6](06_drivers_gpio_uart) is the first where you can use it. Check it out for +- [Tutorial 5](05_drivers_gpio_uart) is the first where you can use it. Check it out for instructions on how to prepare the SD card to boot your self-made kernel from it. -- Starting with [tutorial 7](07_uart_chainloader), booting kernels on your Raspberry is getting +- Starting with [tutorial 6](06_uart_chainloader), booting kernels on your Raspberry is getting _really_ comfortable. In this tutorial, a so-called `chainloader` is developed, which will be the last file you need to manually copy on the SD card for a while. It will enable you to load the tutorial kernels during boot on demand over `UART`. diff --git a/utils/devtool.rb b/utils/devtool.rb index 66271202..4f870069 100755 --- a/utils/devtool.rb +++ b/utils/devtool.rb @@ -147,7 +147,7 @@ class DevTool return if @user_has_supplied_crates puts 'Make Xtra stuff'.light_blue - system('cd 07_uart_chainloader && bash update.sh') + system('cd *_uart_chainloader && bash update.sh') system('cd X1_JTAG_boot && bash update.sh') end