From d296ad4aa4eacfe13c68e13bbf28e6d602459db8 Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Sun, 4 Apr 2021 22:41:55 +0200 Subject: [PATCH] Minor fixes --- 01_wait_forever/README.md | 2 +- 02_runtime_init/Cargo.toml | 1 - 02_runtime_init/README.md | 3 +-- 03_hacky_hello_world/Cargo.toml | 1 - 04_safe_globals/Cargo.toml | 1 - 05_drivers_gpio_uart/Cargo.toml | 1 - 06_uart_chainloader/Cargo.toml | 1 - 07_timestamps/Cargo.toml | 1 - 08_hw_debug_JTAG/Cargo.toml | 1 - 09_privilege_level/Cargo.toml | 1 - 10_virtual_mem_part1_identity_mapping/Cargo.toml | 1 - 11_exceptions_part1_groundwork/Cargo.toml | 1 - 12_integrated_testing/Cargo.toml | 2 +- 12_integrated_testing/README.md | 6 +++--- 13_exceptions_part2_peripheral_IRQs/README.md | 6 +++--- 14_virtual_mem_part2_mmio_remap/README.md | 2 +- 15_virtual_mem_part3_precomputed_tables/README.md | 9 +++++++-- 15_virtual_mem_part3_precomputed_tables/src/main.rs | 2 ++ 16_virtual_mem_part4_higher_half_kernel/src/main.rs | 2 ++ X1_JTAG_boot/Cargo.toml | 1 - 20 files changed, 21 insertions(+), 24 deletions(-) diff --git a/01_wait_forever/README.md b/01_wait_forever/README.md index bf214b68..9c6eaf76 100644 --- a/01_wait_forever/README.md +++ b/01_wait_forever/README.md @@ -18,7 +18,7 @@ ## Code to look at -- Custom `link.ld` linker script. +- `BSP`-specific `link.ld` linker script. - Load address at `0x8_0000` - Only `.text` section. - `main.rs`: Important [inner attributes]: diff --git a/02_runtime_init/Cargo.toml b/02_runtime_init/Cargo.toml index be6091a4..69f9f06d 100644 --- a/02_runtime_init/Cargo.toml +++ b/02_runtime_init/Cargo.toml @@ -25,4 +25,3 @@ path = "src/main.rs" # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/02_runtime_init/README.md b/02_runtime_init/README.md index dfa43562..5cba10fb 100644 --- a/02_runtime_init/README.md +++ b/02_runtime_init/README.md @@ -39,7 +39,7 @@ diff -uNr 01_wait_forever/Cargo.toml 02_runtime_init/Cargo.toml authors = ["Andre Richter "] edition = "2018" -@@ -21,3 +21,8 @@ +@@ -21,3 +21,7 @@ ##-------------------------------------------------------------------------------------------------- [dependencies] @@ -47,7 +47,6 @@ diff -uNr 01_wait_forever/Cargo.toml 02_runtime_init/Cargo.toml +# Platform specific dependencies +[target.'cfg(target_arch = "aarch64")'.dependencies] +cortex-a = { version = "5.x.x" } -+ diff -uNr 01_wait_forever/Makefile 02_runtime_init/Makefile --- 01_wait_forever/Makefile diff --git a/03_hacky_hello_world/Cargo.toml b/03_hacky_hello_world/Cargo.toml index 6ed23060..ffe9206f 100644 --- a/03_hacky_hello_world/Cargo.toml +++ b/03_hacky_hello_world/Cargo.toml @@ -25,4 +25,3 @@ path = "src/main.rs" # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/04_safe_globals/Cargo.toml b/04_safe_globals/Cargo.toml index 16e4741d..fc077af9 100644 --- a/04_safe_globals/Cargo.toml +++ b/04_safe_globals/Cargo.toml @@ -25,4 +25,3 @@ path = "src/main.rs" # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/05_drivers_gpio_uart/Cargo.toml b/05_drivers_gpio_uart/Cargo.toml index 03ec9cdb..05abef4d 100644 --- a/05_drivers_gpio_uart/Cargo.toml +++ b/05_drivers_gpio_uart/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/06_uart_chainloader/Cargo.toml b/06_uart_chainloader/Cargo.toml index 0e1c5c28..f3b9ba2f 100644 --- a/06_uart_chainloader/Cargo.toml +++ b/06_uart_chainloader/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/07_timestamps/Cargo.toml b/07_timestamps/Cargo.toml index 07aa0517..8d97be1f 100644 --- a/07_timestamps/Cargo.toml +++ b/07_timestamps/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/08_hw_debug_JTAG/Cargo.toml b/08_hw_debug_JTAG/Cargo.toml index e84540ca..7b1adb5b 100644 --- a/08_hw_debug_JTAG/Cargo.toml +++ b/08_hw_debug_JTAG/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/09_privilege_level/Cargo.toml b/09_privilege_level/Cargo.toml index f6750ed4..7af3572f 100644 --- a/09_privilege_level/Cargo.toml +++ b/09_privilege_level/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/10_virtual_mem_part1_identity_mapping/Cargo.toml b/10_virtual_mem_part1_identity_mapping/Cargo.toml index 8e54f2cd..9d47f28d 100644 --- a/10_virtual_mem_part1_identity_mapping/Cargo.toml +++ b/10_virtual_mem_part1_identity_mapping/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/11_exceptions_part1_groundwork/Cargo.toml b/11_exceptions_part1_groundwork/Cargo.toml index 764939bf..2f6683e5 100644 --- a/11_exceptions_part1_groundwork/Cargo.toml +++ b/11_exceptions_part1_groundwork/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - diff --git a/12_integrated_testing/Cargo.toml b/12_integrated_testing/Cargo.toml index 4bb92ff4..d59d5817 100644 --- a/12_integrated_testing/Cargo.toml +++ b/12_integrated_testing/Cargo.toml @@ -4,7 +4,7 @@ version = "0.12.0" authors = ["Andre Richter "] edition = "2018" -# TODO: Fixme +# TODO: FIXME # LTO seems to kill the console integration test (empty text section). Disable until a fix is found. [profile.release] lto = false diff --git a/12_integrated_testing/README.md b/12_integrated_testing/README.md index 4a5940d1..c49f8361 100644 --- a/12_integrated_testing/README.md +++ b/12_integrated_testing/README.md @@ -818,7 +818,7 @@ diff -uNr 11_exceptions_part1_groundwork/.cargo/config.toml 12_integrated_testin diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo.toml --- 11_exceptions_part1_groundwork/Cargo.toml +++ 12_integrated_testing/Cargo.toml -@@ -1,31 +1,58 @@ +@@ -1,30 +1,58 @@ [package] name = "mingo" -version = "0.11.0" @@ -826,7 +826,7 @@ diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo. authors = ["Andre Richter "] edition = "2018" -+# TODO: Fixme ++# TODO: FIXME +# LTO seems to kill the console integration test (empty text section). Disable until a fix is found. [profile.release] -lto = true @@ -857,7 +857,7 @@ diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo. # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } - ++ +##-------------------------------------------------------------------------------------------------- +## Testing +##-------------------------------------------------------------------------------------------------- diff --git a/13_exceptions_part2_peripheral_IRQs/README.md b/13_exceptions_part2_peripheral_IRQs/README.md index 4cb82c6b..6da5a075 100644 --- a/13_exceptions_part2_peripheral_IRQs/README.md +++ b/13_exceptions_part2_peripheral_IRQs/README.md @@ -2,8 +2,8 @@ ## tl;dr -- We write `device drivers` for the two interrupt controllers on the **Raspberry Pi 3** (Broadcom - custom controller) and **Pi 4** (ARM Generic Interrupt Controller v2, `GICv2`). +- We write `device drivers` for the two interrupt controllers on the **Raspberry Pi 3** (`Broadcom` + custom controller) and **Pi 4** (`ARM` Generic Interrupt Controller v2, `GICv2`). - Modularity is ensured by interfacing everything through a trait named `IRQManager`. - Handling for our first peripheral IRQs is implemented: The `UART`'s receive IRQs. @@ -757,7 +757,7 @@ diff -uNr 12_integrated_testing/Cargo.toml 13_exceptions_part2_peripheral_IRQs/C authors = ["Andre Richter "] edition = "2018" --# TODO: Fixme +-# TODO: FIXME -# LTO seems to kill the console integration test (empty text section). Disable until a fix is found. [profile.release] -lto = false diff --git a/14_virtual_mem_part2_mmio_remap/README.md b/14_virtual_mem_part2_mmio_remap/README.md index 95042ed3..3f065102 100644 --- a/14_virtual_mem_part2_mmio_remap/README.md +++ b/14_virtual_mem_part2_mmio_remap/README.md @@ -2,7 +2,7 @@ ## tl;dr -- We introduce a first set of changes which we eventually need for separating `kernel` and `user` +- We introduce a first set of changes which is eventually needed for separating `kernel` and `user` address spaces. - The memory mapping strategy gets more sophisticated as we do away with `identity mapping` the whole of the board's address space. diff --git a/15_virtual_mem_part3_precomputed_tables/README.md b/15_virtual_mem_part3_precomputed_tables/README.md index 459b65d2..fab27816 100644 --- a/15_virtual_mem_part3_precomputed_tables/README.md +++ b/15_virtual_mem_part3_precomputed_tables/README.md @@ -1274,7 +1274,12 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/memory/mmu.rs 15_v diff -uNr 14_virtual_mem_part2_mmio_remap/src/main.rs 15_virtual_mem_part3_precomputed_tables/src/main.rs --- 14_virtual_mem_part2_mmio_remap/src/main.rs +++ 15_virtual_mem_part3_precomputed_tables/src/main.rs -@@ -18,25 +18,16 @@ +@@ -15,28 +15,21 @@ + + /// Early init code. + /// ++/// When this code runs, virtual memory is already enabled. ++/// /// # Safety /// /// - Only a single core must be active and running this function. @@ -1304,7 +1309,7 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/src/main.rs 15_virtual_mem_part3_preco // Bring up the drivers needed for printing first. for i in bsp::driver::driver_manager() -@@ -47,7 +38,7 @@ +@@ -47,7 +40,7 @@ i.init().unwrap_or_else(|_| cpu::wait_forever()); } bsp::driver::driver_manager().post_early_print_device_driver_init(); diff --git a/15_virtual_mem_part3_precomputed_tables/src/main.rs b/15_virtual_mem_part3_precomputed_tables/src/main.rs index 421dcbec..9ecba1e7 100644 --- a/15_virtual_mem_part3_precomputed_tables/src/main.rs +++ b/15_virtual_mem_part3_precomputed_tables/src/main.rs @@ -15,6 +15,8 @@ use libkernel::{bsp, cpu, driver, exception, info, memory, state, time, warn}; /// Early init code. /// +/// When this code runs, virtual memory is already enabled. +/// /// # Safety /// /// - Only a single core must be active and running this function. diff --git a/16_virtual_mem_part4_higher_half_kernel/src/main.rs b/16_virtual_mem_part4_higher_half_kernel/src/main.rs index 421dcbec..9ecba1e7 100644 --- a/16_virtual_mem_part4_higher_half_kernel/src/main.rs +++ b/16_virtual_mem_part4_higher_half_kernel/src/main.rs @@ -15,6 +15,8 @@ use libkernel::{bsp, cpu, driver, exception, info, memory, state, time, warn}; /// Early init code. /// +/// When this code runs, virtual memory is already enabled. +/// /// # Safety /// /// - Only a single core must be active and running this function. diff --git a/X1_JTAG_boot/Cargo.toml b/X1_JTAG_boot/Cargo.toml index e84540ca..7b1adb5b 100644 --- a/X1_JTAG_boot/Cargo.toml +++ b/X1_JTAG_boot/Cargo.toml @@ -28,4 +28,3 @@ register = { version = "1.x.x", optional = true } # Platform specific dependencies [target.'cfg(target_arch = "aarch64")'.dependencies] cortex-a = { version = "5.x.x" } -