From e7a13e81b8def38515050ae64209ab8cc280fbbf Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Wed, 28 Oct 2020 11:27:43 +0100 Subject: [PATCH] Upgrade to cortex-a 4.x.x --- 04_zero_overhead_abstraction/Cargo.lock | 16 +++++++--------- 04_zero_overhead_abstraction/Cargo.toml | 2 +- 04_zero_overhead_abstraction/README.md | 2 +- 05_safe_globals/Cargo.lock | 16 +++++++--------- 05_safe_globals/Cargo.toml | 2 +- 06_drivers_gpio_uart/Cargo.lock | 18 ++++++++---------- 06_drivers_gpio_uart/Cargo.toml | 2 +- 06_drivers_gpio_uart/README.md | 2 +- 07_uart_chainloader/Cargo.lock | 18 ++++++++---------- 07_uart_chainloader/Cargo.toml | 2 +- 08_timestamps/Cargo.lock | 18 ++++++++---------- 08_timestamps/Cargo.toml | 2 +- 08_timestamps/README.md | 5 +++-- 08_timestamps/src/_arch/aarch64/time.rs | 3 ++- 09_hw_debug_JTAG/Cargo.lock | 18 ++++++++---------- 09_hw_debug_JTAG/Cargo.toml | 2 +- 09_hw_debug_JTAG/src/_arch/aarch64/time.rs | 3 ++- 10_privilege_level/Cargo.lock | 18 ++++++++---------- 10_privilege_level/Cargo.toml | 2 +- 10_privilege_level/README.md | 10 +++++----- .../_arch/aarch64/exception/asynchronous.rs | 10 +++++----- 10_privilege_level/src/_arch/aarch64/time.rs | 3 ++- .../Cargo.lock | 18 ++++++++---------- .../Cargo.toml | 2 +- .../_arch/aarch64/exception/asynchronous.rs | 10 +++++----- .../src/_arch/aarch64/time.rs | 3 ++- 12_exceptions_part1_groundwork/Cargo.lock | 18 ++++++++---------- 12_exceptions_part1_groundwork/Cargo.toml | 2 +- 12_exceptions_part1_groundwork/README.md | 4 ++-- .../src/_arch/aarch64/exception.S | 2 +- .../src/_arch/aarch64/exception.rs | 2 +- .../_arch/aarch64/exception/asynchronous.rs | 10 +++++----- .../src/_arch/aarch64/time.rs | 3 ++- 13_integrated_testing/Cargo.lock | 12 ++++++------ 13_integrated_testing/Cargo.toml | 2 +- 13_integrated_testing/README.md | 2 +- .../src/_arch/aarch64/exception.S | 2 +- .../src/_arch/aarch64/exception.rs | 2 +- .../_arch/aarch64/exception/asynchronous.rs | 10 +++++----- .../src/_arch/aarch64/time.rs | 3 ++- .../Cargo.lock | 12 ++++++------ .../Cargo.toml | 2 +- 14_exceptions_part2_peripheral_IRQs/README.md | 6 +++--- .../src/_arch/aarch64/exception.S | 2 +- .../src/_arch/aarch64/exception.rs | 2 +- .../_arch/aarch64/exception/asynchronous.rs | 14 +++++++------- .../src/_arch/aarch64/time.rs | 3 ++- 15_virtual_mem_part2_mmio_remap/Cargo.lock | 12 ++++++------ 15_virtual_mem_part2_mmio_remap/Cargo.toml | 2 +- 15_virtual_mem_part2_mmio_remap/README.md | 13 +++++++++++++ .../src/_arch/aarch64/exception.S | 2 +- .../src/_arch/aarch64/exception.rs | 2 +- .../_arch/aarch64/exception/asynchronous.rs | 14 +++++++------- .../src/_arch/aarch64/time.rs | 5 +++-- X1_JTAG_boot/Cargo.lock | 18 ++++++++---------- X1_JTAG_boot/Cargo.toml | 2 +- X1_JTAG_boot/jtag_boot_rpi3.img | Bin 7376 -> 7392 bytes X1_JTAG_boot/jtag_boot_rpi4.img | Bin 7360 -> 7360 bytes X1_JTAG_boot/src/_arch/aarch64/time.rs | 3 ++- 59 files changed, 199 insertions(+), 196 deletions(-) diff --git a/04_zero_overhead_abstraction/Cargo.lock b/04_zero_overhead_abstraction/Cargo.lock index ce6da734..9f7767f8 100644 --- a/04_zero_overhead_abstraction/Cargo.lock +++ b/04_zero_overhead_abstraction/Cargo.lock @@ -2,33 +2,31 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/04_zero_overhead_abstraction/Cargo.toml b/04_zero_overhead_abstraction/Cargo.toml index 781328f2..850ca5b0 100644 --- a/04_zero_overhead_abstraction/Cargo.toml +++ b/04_zero_overhead_abstraction/Cargo.toml @@ -13,4 +13,4 @@ bsp_rpi4 = ["cortex-a"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } diff --git a/04_zero_overhead_abstraction/README.md b/04_zero_overhead_abstraction/README.md index 06f1b4f8..40271ab1 100644 --- a/04_zero_overhead_abstraction/README.md +++ b/04_zero_overhead_abstraction/README.md @@ -25,7 +25,7 @@ diff -uNr 03_hacky_hello_world/Cargo.toml 04_zero_overhead_abstraction/Cargo.tom [dependencies] + +# Optional dependencies -+cortex-a = { version = "3.0.x", optional = true } ++cortex-a = { version = "4.x.x", optional = true } diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu/smp.rs 04_zero_overhead_abstraction/src/_arch/aarch64/cpu/smp.rs --- 03_hacky_hello_world/src/_arch/aarch64/cpu/smp.rs diff --git a/05_safe_globals/Cargo.lock b/05_safe_globals/Cargo.lock index ce6da734..9f7767f8 100644 --- a/05_safe_globals/Cargo.lock +++ b/05_safe_globals/Cargo.lock @@ -2,33 +2,31 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/05_safe_globals/Cargo.toml b/05_safe_globals/Cargo.toml index 781328f2..850ca5b0 100644 --- a/05_safe_globals/Cargo.toml +++ b/05_safe_globals/Cargo.toml @@ -13,4 +13,4 @@ bsp_rpi4 = ["cortex-a"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } diff --git a/06_drivers_gpio_uart/Cargo.lock b/06_drivers_gpio_uart/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/06_drivers_gpio_uart/Cargo.lock +++ b/06_drivers_gpio_uart/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/06_drivers_gpio_uart/Cargo.toml b/06_drivers_gpio_uart/Cargo.toml index d5956e2b..82941512 100644 --- a/06_drivers_gpio_uart/Cargo.toml +++ b/06_drivers_gpio_uart/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/06_drivers_gpio_uart/README.md b/06_drivers_gpio_uart/README.md index 6481a31f..96ba5474 100644 --- a/06_drivers_gpio_uart/README.md +++ b/06_drivers_gpio_uart/README.md @@ -106,7 +106,7 @@ diff -uNr 05_safe_globals/Cargo.toml 06_drivers_gpio_uart/Cargo.toml [dependencies] # Optional dependencies - cortex-a = { version = "3.0.x", optional = true } + cortex-a = { version = "4.x.x", optional = true } +register = { version = "0.5.x", optional = true } diff -uNr 05_safe_globals/src/_arch/aarch64/cpu.rs 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs diff --git a/07_uart_chainloader/Cargo.lock b/07_uart_chainloader/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/07_uart_chainloader/Cargo.lock +++ b/07_uart_chainloader/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/07_uart_chainloader/Cargo.toml b/07_uart_chainloader/Cargo.toml index d5956e2b..82941512 100644 --- a/07_uart_chainloader/Cargo.toml +++ b/07_uart_chainloader/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/08_timestamps/Cargo.lock b/08_timestamps/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/08_timestamps/Cargo.lock +++ b/08_timestamps/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/08_timestamps/Cargo.toml b/08_timestamps/Cargo.toml index d5956e2b..82941512 100644 --- a/08_timestamps/Cargo.toml +++ b/08_timestamps/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/08_timestamps/README.md b/08_timestamps/README.md index a5bc09c9..655ea304 100644 --- a/08_timestamps/README.md +++ b/08_timestamps/README.md @@ -122,7 +122,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/a 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 -@@ -0,0 +1,97 @@ +@@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// +// Copyright (c) 2018-2020 Andre Richter @@ -193,6 +193,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/time.rs 08_timestamps/src/_arch/ + // Check if it is within supported bounds. + let warn: Option<&str> = if tval == 0 { + Some("smaller") ++ // The upper 32 bits of CNTP_TVAL_EL0 are reserved. + } else if tval > u32::max_value().into() { + Some("bigger") + } else { @@ -208,7 +209,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/time.rs 08_timestamps/src/_arch/ + } + + // Set the compare value register. -+ CNTP_TVAL_EL0.set(tval as u32); ++ CNTP_TVAL_EL0.set(tval); + + // Kick off the counting. // Disable timer interrupt. + CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/08_timestamps/src/_arch/aarch64/time.rs b/08_timestamps/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/08_timestamps/src/_arch/aarch64/time.rs +++ b/08_timestamps/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/09_hw_debug_JTAG/Cargo.lock b/09_hw_debug_JTAG/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/09_hw_debug_JTAG/Cargo.lock +++ b/09_hw_debug_JTAG/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/09_hw_debug_JTAG/Cargo.toml b/09_hw_debug_JTAG/Cargo.toml index d5956e2b..82941512 100644 --- a/09_hw_debug_JTAG/Cargo.toml +++ b/09_hw_debug_JTAG/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/time.rs b/09_hw_debug_JTAG/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/09_hw_debug_JTAG/src/_arch/aarch64/time.rs +++ b/09_hw_debug_JTAG/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/10_privilege_level/Cargo.lock b/10_privilege_level/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/10_privilege_level/Cargo.lock +++ b/10_privilege_level/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/10_privilege_level/Cargo.toml b/10_privilege_level/Cargo.toml index d5956e2b..82941512 100644 --- a/10_privilege_level/Cargo.toml +++ b/10_privilege_level/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/10_privilege_level/README.md b/10_privilege_level/README.md index 68046efe..8765505b 100644 --- a/10_privilege_level/README.md +++ b/10_privilege_level/README.md @@ -308,7 +308,7 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs 10_privil +//-------------------------------------------------------------------------------------------------- + +trait DaifField { -+ fn daif_field() -> register::Field; ++ fn daif_field() -> register::Field; +} + +struct Debug; @@ -321,25 +321,25 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/exception/asynchronous.rs 10_privil +//-------------------------------------------------------------------------------------------------- + +impl DaifField for Debug { -+ fn daif_field() -> register::Field { ++ fn daif_field() -> register::Field { + DAIF::D + } +} + +impl DaifField for SError { -+ fn daif_field() -> register::Field { ++ fn daif_field() -> register::Field { + DAIF::A + } +} + +impl DaifField for IRQ { -+ fn daif_field() -> register::Field { ++ fn daif_field() -> register::Field { + DAIF::I + } +} + +impl DaifField for FIQ { -+ fn daif_field() -> register::Field { ++ fn daif_field() -> register::Field { + DAIF::F + } +} diff --git a/10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs b/10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs index 1cc2fba8..b57ce029 100644 --- a/10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs +++ b/10_privilege_level/src/_arch/aarch64/exception/asynchronous.rs @@ -11,7 +11,7 @@ use cortex_a::regs::*; //-------------------------------------------------------------------------------------------------- trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -24,25 +24,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } diff --git a/10_privilege_level/src/_arch/aarch64/time.rs b/10_privilege_level/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/10_privilege_level/src/_arch/aarch64/time.rs +++ b/10_privilege_level/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/11_virtual_mem_part1_identity_mapping/Cargo.lock b/11_virtual_mem_part1_identity_mapping/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/11_virtual_mem_part1_identity_mapping/Cargo.lock +++ b/11_virtual_mem_part1_identity_mapping/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/11_virtual_mem_part1_identity_mapping/Cargo.toml b/11_virtual_mem_part1_identity_mapping/Cargo.toml index d5956e2b..82941512 100644 --- a/11_virtual_mem_part1_identity_mapping/Cargo.toml +++ b/11_virtual_mem_part1_identity_mapping/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs index 1cc2fba8..b57ce029 100644 --- a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs +++ b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception/asynchronous.rs @@ -11,7 +11,7 @@ use cortex_a::regs::*; //-------------------------------------------------------------------------------------------------- trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -24,25 +24,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs +++ b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/12_exceptions_part1_groundwork/Cargo.lock b/12_exceptions_part1_groundwork/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/12_exceptions_part1_groundwork/Cargo.lock +++ b/12_exceptions_part1_groundwork/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/12_exceptions_part1_groundwork/Cargo.toml b/12_exceptions_part1_groundwork/Cargo.toml index d5956e2b..82941512 100644 --- a/12_exceptions_part1_groundwork/Cargo.toml +++ b/12_exceptions_part1_groundwork/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/12_exceptions_part1_groundwork/README.md b/12_exceptions_part1_groundwork/README.md index 7b9c15c4..e99ba7a2 100644 --- a/12_exceptions_part1_groundwork/README.md +++ b/12_exceptions_part1_groundwork/README.md @@ -499,7 +499,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.rs 1 + +/// Wrapper struct for memory copy of SPSR_EL1. +#[repr(transparent)] -+struct SpsrEL1(InMemoryRegister); ++struct SpsrEL1(InMemoryRegister); + +/// The exception context as it is stored on the stack on exception entry. +#[repr(C)] @@ -774,7 +774,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/exception.S 12 + mrs x2, SPSR_EL1 + + stp lr, x1, [sp, #16 * 15] -+ str w2, [sp, #16 * 16] ++ str x2, [sp, #16 * 16] + + // x0 is the first argument for the function called through `\handler`. + mov x0, sp diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.S b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.S index 70817be4..ee3b5497 100644 --- a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.S +++ b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.S @@ -30,7 +30,7 @@ mrs x2, SPSR_EL1 stp lr, x1, [sp, #16 * 15] - str w2, [sp, #16 * 16] + str x2, [sp, #16 * 16] // x0 is the first argument for the function called through `\handler`. mov x0, sp diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs index 91287bf6..d932445c 100644 --- a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs +++ b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception.rs @@ -17,7 +17,7 @@ global_asm!(include_str!("exception.S")); /// Wrapper struct for memory copy of SPSR_EL1. #[repr(transparent)] -struct SpsrEL1(InMemoryRegister); +struct SpsrEL1(InMemoryRegister); /// The exception context as it is stored on the stack on exception entry. #[repr(C)] diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs index 1cc2fba8..b57ce029 100644 --- a/12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs +++ b/12_exceptions_part1_groundwork/src/_arch/aarch64/exception/asynchronous.rs @@ -11,7 +11,7 @@ use cortex_a::regs::*; //-------------------------------------------------------------------------------------------------- trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -24,25 +24,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs b/12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs +++ b/12_exceptions_part1_groundwork/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/13_integrated_testing/Cargo.lock b/13_integrated_testing/Cargo.lock index c0df2028..b7cf3d96 100644 --- a/13_integrated_testing/Cargo.lock +++ b/13_integrated_testing/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ "register", ] @@ -22,9 +22,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ef7cd2518ead700af67bf9d1a658d90b6037d77110fd9c0445429d0ba1c6c9" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ "unicode-xid", ] @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.42" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ "proc-macro2", "quote", diff --git a/13_integrated_testing/Cargo.toml b/13_integrated_testing/Cargo.toml index 07292a2e..4a4ca49b 100644 --- a/13_integrated_testing/Cargo.toml +++ b/13_integrated_testing/Cargo.toml @@ -15,7 +15,7 @@ qemu-exit = "1.0.x" test-types = { path = "test-types" } # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", features = ["no_std_unit_tests"], optional = true } ##-------------------------------------------------------------------------------------------------- diff --git a/13_integrated_testing/README.md b/13_integrated_testing/README.md index f4829121..e4f87078 100644 --- a/13_integrated_testing/README.md +++ b/13_integrated_testing/README.md @@ -805,7 +805,7 @@ diff -uNr 12_exceptions_part1_groundwork/Cargo.toml 13_integrated_testing/Cargo. +test-types = { path = "test-types" } # Optional dependencies - cortex-a = { version = "3.0.x", optional = true } + cortex-a = { version = "4.x.x", optional = true } -register = { version = "0.5.x", optional = true } +register = { version = "0.5.x", features = ["no_std_unit_tests"], optional = true } + diff --git a/13_integrated_testing/src/_arch/aarch64/exception.S b/13_integrated_testing/src/_arch/aarch64/exception.S index 70817be4..ee3b5497 100644 --- a/13_integrated_testing/src/_arch/aarch64/exception.S +++ b/13_integrated_testing/src/_arch/aarch64/exception.S @@ -30,7 +30,7 @@ mrs x2, SPSR_EL1 stp lr, x1, [sp, #16 * 15] - str w2, [sp, #16 * 16] + str x2, [sp, #16 * 16] // x0 is the first argument for the function called through `\handler`. mov x0, sp diff --git a/13_integrated_testing/src/_arch/aarch64/exception.rs b/13_integrated_testing/src/_arch/aarch64/exception.rs index bbb09b79..56f3e607 100644 --- a/13_integrated_testing/src/_arch/aarch64/exception.rs +++ b/13_integrated_testing/src/_arch/aarch64/exception.rs @@ -17,7 +17,7 @@ global_asm!(include_str!("exception.S")); /// Wrapper struct for memory copy of SPSR_EL1. #[repr(transparent)] -struct SpsrEL1(InMemoryRegister); +struct SpsrEL1(InMemoryRegister); /// The exception context as it is stored on the stack on exception entry. #[repr(C)] diff --git a/13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs b/13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs index 1cc2fba8..b57ce029 100644 --- a/13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs +++ b/13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs @@ -11,7 +11,7 @@ use cortex_a::regs::*; //-------------------------------------------------------------------------------------------------- trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -24,25 +24,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } diff --git a/13_integrated_testing/src/_arch/aarch64/time.rs b/13_integrated_testing/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/13_integrated_testing/src/_arch/aarch64/time.rs +++ b/13_integrated_testing/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/14_exceptions_part2_peripheral_IRQs/Cargo.lock b/14_exceptions_part2_peripheral_IRQs/Cargo.lock index c0df2028..b7cf3d96 100644 --- a/14_exceptions_part2_peripheral_IRQs/Cargo.lock +++ b/14_exceptions_part2_peripheral_IRQs/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ "register", ] @@ -22,9 +22,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ef7cd2518ead700af67bf9d1a658d90b6037d77110fd9c0445429d0ba1c6c9" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ "unicode-xid", ] @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.42" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ "proc-macro2", "quote", diff --git a/14_exceptions_part2_peripheral_IRQs/Cargo.toml b/14_exceptions_part2_peripheral_IRQs/Cargo.toml index 07292a2e..4a4ca49b 100644 --- a/14_exceptions_part2_peripheral_IRQs/Cargo.toml +++ b/14_exceptions_part2_peripheral_IRQs/Cargo.toml @@ -15,7 +15,7 @@ qemu-exit = "1.0.x" test-types = { path = "test-types" } # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", features = ["no_std_unit_tests"], optional = true } ##-------------------------------------------------------------------------------------------------- diff --git a/14_exceptions_part2_peripheral_IRQs/README.md b/14_exceptions_part2_peripheral_IRQs/README.md index 3e6a4f5b..fa54ab95 100644 --- a/14_exceptions_part2_peripheral_IRQs/README.md +++ b/14_exceptions_part2_peripheral_IRQs/README.md @@ -770,7 +770,7 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 14_e +} + trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } @@ -55,6 +59,71 @@ // Public Code @@ -823,7 +823,7 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 14_e +/// +/// - Changes the HW state of the executing core. +#[inline(always)] -+pub unsafe fn local_irq_mask_save() -> u32 { ++pub unsafe fn local_irq_mask_save() -> u64 { + let saved = DAIF.get(); + local_irq_mask(); + @@ -837,7 +837,7 @@ diff -uNr 13_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 14_e +/// - Changes the HW state of the executing core. +/// - No sanity checks on the input. +#[inline(always)] -+pub unsafe fn local_irq_restore(saved: u32) { ++pub unsafe fn local_irq_restore(saved: u64) { + DAIF.set(saved); +} + diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.S b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.S index 70817be4..ee3b5497 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.S +++ b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.S @@ -30,7 +30,7 @@ mrs x2, SPSR_EL1 stp lr, x1, [sp, #16 * 15] - str w2, [sp, #16 * 16] + str x2, [sp, #16 * 16] // x0 is the first argument for the function called through `\handler`. mov x0, sp diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs index 047a2195..a4451cde 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs @@ -18,7 +18,7 @@ global_asm!(include_str!("exception.S")); /// Wrapper struct for memory copy of SPSR_EL1. #[repr(transparent)] -struct SpsrEL1(InMemoryRegister); +struct SpsrEL1(InMemoryRegister); /// The exception context as it is stored on the stack on exception entry. #[repr(C)] diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs index f09a92e6..63789a8e 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs @@ -15,7 +15,7 @@ mod daif_bits { } trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -28,25 +28,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } @@ -106,7 +106,7 @@ pub unsafe fn local_irq_mask() { /// /// - Changes the HW state of the executing core. #[inline(always)] -pub unsafe fn local_irq_mask_save() -> u32 { +pub unsafe fn local_irq_mask_save() -> u64 { let saved = DAIF.get(); local_irq_mask(); @@ -120,7 +120,7 @@ pub unsafe fn local_irq_mask_save() -> u32 { /// - Changes the HW state of the executing core. /// - No sanity checks on the input. #[inline(always)] -pub unsafe fn local_irq_restore(saved: u32) { +pub unsafe fn local_irq_restore(saved: u64) { DAIF.set(saved); } diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs index d23864f3..af98ddd0 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/15_virtual_mem_part2_mmio_remap/Cargo.lock b/15_virtual_mem_part2_mmio_remap/Cargo.lock index c0df2028..b7cf3d96 100644 --- a/15_virtual_mem_part2_mmio_remap/Cargo.lock +++ b/15_virtual_mem_part2_mmio_remap/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ "register", ] @@ -22,9 +22,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ef7cd2518ead700af67bf9d1a658d90b6037d77110fd9c0445429d0ba1c6c9" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ "unicode-xid", ] @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.42" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ "proc-macro2", "quote", diff --git a/15_virtual_mem_part2_mmio_remap/Cargo.toml b/15_virtual_mem_part2_mmio_remap/Cargo.toml index 07292a2e..4a4ca49b 100644 --- a/15_virtual_mem_part2_mmio_remap/Cargo.toml +++ b/15_virtual_mem_part2_mmio_remap/Cargo.toml @@ -15,7 +15,7 @@ qemu-exit = "1.0.x" test-types = { path = "test-types" } # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", features = ["no_std_unit_tests"], optional = true } ##-------------------------------------------------------------------------------------------------- diff --git a/15_virtual_mem_part2_mmio_remap/README.md b/15_virtual_mem_part2_mmio_remap/README.md index f15bc444..7421cc9b 100644 --- a/15_virtual_mem_part2_mmio_remap/README.md +++ b/15_virtual_mem_part2_mmio_remap/README.md @@ -782,6 +782,19 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs 15 assert!(bss_range.contains(&kernel_tables_addr)); } +diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs +--- 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/time.rs ++++ 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs +@@ -55,7 +55,7 @@ + } + + // Calculate the register compare value. +- let frq = CNTFRQ_EL0.get() as u64; ++ let frq = CNTFRQ_EL0.get(); + let x = match frq.checked_mul(duration.as_nanos() as u64) { + None => { + warn!("Spin duration too long, skipping"); + 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 --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.S b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.S index 70817be4..ee3b5497 100644 --- a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.S +++ b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.S @@ -30,7 +30,7 @@ mrs x2, SPSR_EL1 stp lr, x1, [sp, #16 * 15] - str w2, [sp, #16 * 16] + str x2, [sp, #16 * 16] // x0 is the first argument for the function called through `\handler`. mov x0, sp diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs index 047a2195..a4451cde 100644 --- a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs +++ b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception.rs @@ -18,7 +18,7 @@ global_asm!(include_str!("exception.S")); /// Wrapper struct for memory copy of SPSR_EL1. #[repr(transparent)] -struct SpsrEL1(InMemoryRegister); +struct SpsrEL1(InMemoryRegister); /// The exception context as it is stored on the stack on exception entry. #[repr(C)] diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs index f09a92e6..63789a8e 100644 --- a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs +++ b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/exception/asynchronous.rs @@ -15,7 +15,7 @@ mod daif_bits { } trait DaifField { - fn daif_field() -> register::Field; + fn daif_field() -> register::Field; } struct Debug; @@ -28,25 +28,25 @@ struct FIQ; //-------------------------------------------------------------------------------------------------- impl DaifField for Debug { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::D } } impl DaifField for SError { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::A } } impl DaifField for IRQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::I } } impl DaifField for FIQ { - fn daif_field() -> register::Field { + fn daif_field() -> register::Field { DAIF::F } } @@ -106,7 +106,7 @@ pub unsafe fn local_irq_mask() { /// /// - Changes the HW state of the executing core. #[inline(always)] -pub unsafe fn local_irq_mask_save() -> u32 { +pub unsafe fn local_irq_mask_save() -> u64 { let saved = DAIF.get(); local_irq_mask(); @@ -120,7 +120,7 @@ pub unsafe fn local_irq_mask_save() -> u32 { /// - Changes the HW state of the executing core. /// - No sanity checks on the input. #[inline(always)] -pub unsafe fn local_irq_restore(saved: u32) { +pub unsafe fn local_irq_restore(saved: u64) { DAIF.set(saved); } diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs index d23864f3..e9b0234d 100644 --- a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs +++ b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/time.rs @@ -55,7 +55,7 @@ impl time::interface::TimeManager for GenericTimer { } // Calculate the register compare value. - let frq = CNTFRQ_EL0.get() as u64; + let frq = CNTFRQ_EL0.get(); let x = match frq.checked_mul(duration.as_nanos() as u64) { None => { warn!("Spin duration too long, skipping"); @@ -68,6 +68,7 @@ impl time::interface::TimeManager for GenericTimer { // Check if it is within supported bounds. let warn: Option<&str> = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET); diff --git a/X1_JTAG_boot/Cargo.lock b/X1_JTAG_boot/Cargo.lock index ac1a3bad..ab29d823 100644 --- a/X1_JTAG_boot/Cargo.lock +++ b/X1_JTAG_boot/Cargo.lock @@ -2,34 +2,32 @@ # It is not intended for manual editing. [[package]] name = "cortex-a" -version = "3.0.4" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda21b8ec67b82099401559fe28cea4508eb1e33217b4dacf60ba22e39b486b1" dependencies = [ - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "register", ] [[package]] name = "kernel" version = "0.1.0" dependencies = [ - "cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cortex-a", + "register", ] [[package]] name = "register" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" dependencies = [ - "tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tock-registers", ] [[package]] name = "tock-registers" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum cortex-a 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6922a40af4d1a2deac8c963b9f3e57311b8912490740234f1ad182425c547f80" -"checksum register 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deaba5b0e477d21f61a57504bb5cef4a1e86de30300b457d38971c1cfc98b815" -"checksum tock-registers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" +checksum = "70323afdb8082186c0986da0e10f6e4ed103d681c921c00597e98d9806dac20f" diff --git a/X1_JTAG_boot/Cargo.toml b/X1_JTAG_boot/Cargo.toml index d5956e2b..82941512 100644 --- a/X1_JTAG_boot/Cargo.toml +++ b/X1_JTAG_boot/Cargo.toml @@ -13,5 +13,5 @@ bsp_rpi4 = ["cortex-a", "register"] [dependencies] # Optional dependencies -cortex-a = { version = "3.0.x", optional = true } +cortex-a = { version = "4.x.x", optional = true } register = { version = "0.5.x", optional = true } diff --git a/X1_JTAG_boot/jtag_boot_rpi3.img b/X1_JTAG_boot/jtag_boot_rpi3.img index 41c4110be90b0a7bff8c9fc6e5c751f2def2c599..64da0156c54c9b92d3945b69d0a7294c8185e63f 100755 GIT binary patch delta 1715 zcmah|eN0IcLiG=~G*&gv((#Ad!pNI~wqZuqGZ7$Xb2Ke@_qv@SM=lw<6E{KIQev@WFdmvs- z^{AjN)DUd}OJ1lEwI-y%3*IX{F{t(QM}VUUA#c+~Vdm}*$VurPR|B|rnITo89uN1o z4}I5u_@hYw+SIK@)3saCQl5OEWOPJI-|Ahq)1`Ajt!U$5>MR%D%U|vb(P3LTU9FM5Dj#PsOL4fyqMrIv*|Md!5()m)>+w z-QEqfC%wTayO#2MHyZp%>s1YTPNYRCF^3ZiBG>_kY9G!c&p~+m?ybuY9JY0$a}Gb8 z62AH6Lq)N$rTgJr(4>wZlg7w zFG-pAeu}Se=iSj3OP(!lCir^i%hs{`%04HP$@673CNjq|6*r^=0#w^`2BOuVeIs+C-4hpL>9e`PL2Tr%W!Lsl9m z3SNL`#KK>nAt&4gJyuna7YzLr`=QFS9hB8`MjAs${`0Fzy4SzTKnrVBT5Y?GXs;2y ZpA9OvUHgq26vO%?jy` delta 1641 zcmah}Z){Ul6hHU9z4f(Q=Q`ST-7B<92VGlW)(YEP;@*IWmIOjw;v~`0EYUz0WW^6? zvaAG6FdNaEivsS;rWp5@Eg4QD^8>a*NQlvZ6Om7L;{)rqgo%l)CfoDe_D%ifO>XZy zf9^Tw_dDk{+j6Vr12;KLH{P`lz)Dld4OI(b`B<1qBt%jyOq`C>0(5i{^Wrd``y6U> z!U0uw_6qTk4eS(gTEAP>JI>ndkwwuOv@ne*jyOO^C4k-I74MW2HGkHnPEW9V#4m+b z^qtq3Bs}Q?H=PrK&JZ}arl@&cBs48{{W51_`-N(A57sg(mW^#^y@Ee*7&C9RtIdO$ zdE8MO>B@+`-Kc8=^I{6mAljm6+rTn{vUvgPsKV?^q9-^jn#a~}%we59SSRAcI?bZ8 zjn`Rb)LDjg_F$dkdSla30@FOUMN;!o38+Pa{0KWJ+J&^6y)M2=1a?DwvH##Ex_}U} zrc#XnOxAff(d=%Z^ZpX;c}T?;{E}uyeIUM(>ivS2^ARnFFmpapYeLvw@cs;F2ME#M z0L}@xxlR{_+iR_mH)mV#G~hmBf~PI&#aK=>2csuGPbQ)RKP5JN`KaHDm*qao(4utr z(SV$Nv~&&VM8-}lxZZs8<3jS;r|6Hf6?CZyw1@YBF8=|v=hjdx*MeLsX0 zOeW$U`mmK~fz^F8J>8?ph7pT$^qco$(eh7{%dLX;J_4%fOU0~xV?!LQ+&A7oRE{4L ztFO&0wv}jOSV#h$2IF3uQy?EjeNF@#{i;H#!)9mi6Kpu4@@jHssZr8$jiuUr$P}nR zCR74Dx^Px>U3YRukcml91GG*|#df6|=nn=n+$Q2K;dVISqupsAjZ3N6JE{6Y@NvVD zPm+vIoB_E#LIZUX>UkGdJUGTTb-m+lT|dvM=6?D$a(gWT`7hY4R71k-FDd8^Nbox! z-VFL$;6m(XRVrrr5T@7lY)@%`06SLdcaQivw|Tw41RE@B^FADakfhCFFRrl5rIG)S zRbt|?wwrw3I*es1#+na_8b=_<{dB&+81D@0HQ9aHdfGj_*?_%;@Fcq+(uFSx@@8Z9BxlKkJtCx3F zhZV{vhBtp-xG9mV@9IU_@}C|fI^A*b+n)6}w6lE?`AvucsFvqO%L z*h%|mLOR4ej%P^w)FDSJ;nMl)Eo7Kot=`Wnoi#R9Kmu_!K=G7Wi?h-8tg|Rp7i{D8l7(G+Nt*kRQAS-Ja)w=Y`NMGuPg1h2+z|6Hxq>{DQwvp@XRIT&i zsHy02#W=4UXHD^ffem1fSoG^K&PjJsK3;3wH{=T}SLDqFj5ZrV0V<~Ad2nTmwhivG-mS}W*jiP6Kh9<hS zboqj^1vMjbOGwZng=kBO(u&NohX|&p#@r-)DnITK1DfQJw&bADAf0n`-gdpH<+e7E|XdlaM=`z zZqoCS9*-YTwr+)IB=`QHZSDn{OKvh=5~mU3lnm-tFj|6HDqzA~@yX~;i#LQc?qKu5 zjvfR71+(ctLj1p#ch!XujB6M{@-ZN47?2bP%^PwcLv&Jfa2^0~BRxSiZ^P?!t=@~^ zh8^smNO=TOZt)x5r?Pe*QNx%<81VZpKI{zpq94Os$JVmUm$fLHS&K|u^&is>b}s)0 z(bc7itxSSgLfETuqqx!pi7M{(Z7z3o&eb&&bLCp*s^S`}hV*^uVln$2#A1@akMGWN z95ylQL5XD#l?Z)^`9tkPokRnFRe8AK7@Ipk$93s&2~&x*xR%+DrtulZi4wS%aq^dB z`KIDr8A_f+vwyuHJ;u)&GwQ|j%v1CP_iuTDuHaU+v!WXEQ!bJvvMM2wq1hzRKz1NV z=dh@5WY`mjBpaSp8%=P_&kex%8$*v@c^57Qex+qOfK_a*UT+o2PDXU(TRH$@cmey^ zZWPDU>}ll04lae-M;AG&2>&cK8w83ae-)q#@{y%REv8op-N6fH6M4UqIf$kTc}LkQ v$=fWZnjv)_{j3nD3eo&u3kq5Q$LT!oEKXR0Wp*}yDu4hLk{zQC>s|B@J6r;k delta 852 zcmZXRUr1AN6vxl+{=Dtpx%p>qZBEBrB6C{`HnoWl4x&FQJ~)O?!IDS<=fmtVM4^ZN zsLx)Bb%T{^dGMhBV!oza;UhZktz3if?OOy0-biF!Zk zTGma>HDv(W@6>EhP%-lFiP!0jcf3^VOj5O7$?lR0T`z#Q1l{H;x~3v-dA!{HVurmZ zR^G9fX-rF>C#+|t}stmh;)9Wn`U)X zPeSY@UE+33thk_QxS2q(3aUN+QS;%C(*}f8P zd+d|{YXWMlL})6F8zubjQ58nw1W5g}tVb9o0k$smkQ!De#)xxnOXSpO`1`RRhYgxW zPWaQQg = if tval == 0 { Some("smaller") + // The upper 32 bits of CNTP_TVAL_EL0 are reserved. } else if tval > u32::max_value().into() { Some("bigger") } else { @@ -83,7 +84,7 @@ impl time::interface::TimeManager for GenericTimer { } // Set the compare value register. - CNTP_TVAL_EL0.set(tval as u32); + CNTP_TVAL_EL0.set(tval); // Kick off the counting. // Disable timer interrupt. CNTP_CTL_EL0.modify(CNTP_CTL_EL0::ENABLE::SET + CNTP_CTL_EL0::IMASK::SET);