diff --git a/06_drivers_gpio_uart/README.md b/06_drivers_gpio_uart/README.md index ec28b067..69a2c263 100644 --- a/06_drivers_gpio_uart/README.md +++ b/06_drivers_gpio_uart/README.md @@ -779,7 +779,7 @@ diff -uNr 05_safe_globals/src/bsp/device_driver/common.rs 06_drivers_gpio_uart/s + +pub struct MMIODerefWrapper { + start_addr: usize, -+ phantom: PhantomData, ++ phantom: PhantomData T>, +} + +//-------------------------------------------------------------------------------------------------- @@ -1205,7 +1205,15 @@ diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs //! # Code organization and architecture //! //! The code is divided into different *modules*, each representing a typical **subsystem** of the -@@ -105,6 +113,7 @@ +@@ -92,6 +100,7 @@ + //! - `crate::memory::*` + //! - `crate::bsp::memory::*` + ++#![feature(const_fn_fn_ptr_basics)] + #![feature(format_args_nl)] + #![feature(naked_functions)] + #![feature(panic_info_message)] +@@ -105,6 +114,7 @@ mod bsp; mod console; mod cpu; @@ -1213,7 +1221,7 @@ diff -uNr 05_safe_globals/src/main.rs 06_drivers_gpio_uart/src/main.rs mod memory; mod panic_wait; mod print; -@@ -116,16 +125,53 @@ +@@ -116,16 +126,53 @@ /// # Safety /// /// - Only a single core must be active and running this function. diff --git a/06_drivers_gpio_uart/src/bsp/device_driver/common.rs b/06_drivers_gpio_uart/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/06_drivers_gpio_uart/src/bsp/device_driver/common.rs +++ b/06_drivers_gpio_uart/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/06_drivers_gpio_uart/src/main.rs b/06_drivers_gpio_uart/src/main.rs index d7306b07..4e6840ad 100644 --- a/06_drivers_gpio_uart/src/main.rs +++ b/06_drivers_gpio_uart/src/main.rs @@ -100,6 +100,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] diff --git a/07_uart_chainloader/README.md b/07_uart_chainloader/README.md index efb9e008..52b308a0 100644 --- a/07_uart_chainloader/README.md +++ b/07_uart_chainloader/README.md @@ -403,16 +403,17 @@ diff -uNr 06_drivers_gpio_uart/src/console.rs 07_uart_chainloader/src/console.rs 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 -@@ -100,6 +100,8 @@ +@@ -100,7 +100,9 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(asm)] + #![feature(const_fn_fn_ptr_basics)] +#![feature(core_intrinsics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -108,7 +110,8 @@ +@@ -109,7 +111,8 @@ #![no_std] // `mod cpu` provides the `_start()` function, the first function to run. `_start()` then calls @@ -422,7 +423,7 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs mod bsp; mod console; -@@ -117,6 +120,7 @@ +@@ -118,6 +121,7 @@ mod memory; mod panic_wait; mod print; @@ -430,7 +431,7 @@ diff -uNr 06_drivers_gpio_uart/src/main.rs 07_uart_chainloader/src/main.rs mod runtime_init; mod synchronization; -@@ -143,35 +147,52 @@ +@@ -144,35 +148,52 @@ /// The main function running after the early init. fn kernel_main() -> ! { diff --git a/07_uart_chainloader/src/bsp/device_driver/common.rs b/07_uart_chainloader/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/07_uart_chainloader/src/bsp/device_driver/common.rs +++ b/07_uart_chainloader/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/07_uart_chainloader/src/main.rs b/07_uart_chainloader/src/main.rs index a375d894..6640c754 100644 --- a/07_uart_chainloader/src/main.rs +++ b/07_uart_chainloader/src/main.rs @@ -101,6 +101,7 @@ //! - `crate::bsp::memory::*` #![feature(asm)] +#![feature(const_fn_fn_ptr_basics)] #![feature(core_intrinsics)] #![feature(format_args_nl)] #![feature(naked_functions)] diff --git a/08_timestamps/README.md b/08_timestamps/README.md index 73684f44..ab1c48c1 100644 --- a/08_timestamps/README.md +++ b/08_timestamps/README.md @@ -454,16 +454,17 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs //! //! # Code organization and architecture //! -@@ -100,8 +102,6 @@ +@@ -100,9 +102,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` -#![feature(asm)] + #![feature(const_fn_fn_ptr_basics)] -#![feature(core_intrinsics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -110,8 +110,7 @@ +@@ -111,8 +111,7 @@ #![no_std] // `mod cpu` provides the `_start()` function, the first function to run. `_start()` then calls @@ -473,7 +474,7 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs mod bsp; mod console; -@@ -120,9 +119,9 @@ +@@ -121,9 +120,9 @@ mod memory; mod panic_wait; mod print; @@ -484,7 +485,7 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs /// Early init code. /// -@@ -147,52 +146,31 @@ +@@ -148,52 +147,31 @@ /// The main function running after the early init. fn kernel_main() -> ! { diff --git a/08_timestamps/src/bsp/device_driver/common.rs b/08_timestamps/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/08_timestamps/src/bsp/device_driver/common.rs +++ b/08_timestamps/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/08_timestamps/src/main.rs b/08_timestamps/src/main.rs index 1966593f..2c9f1fb7 100644 --- a/08_timestamps/src/main.rs +++ b/08_timestamps/src/main.rs @@ -102,6 +102,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] diff --git a/09_hw_debug_JTAG/src/bsp/device_driver/common.rs b/09_hw_debug_JTAG/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/09_hw_debug_JTAG/src/bsp/device_driver/common.rs +++ b/09_hw_debug_JTAG/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/09_hw_debug_JTAG/src/main.rs b/09_hw_debug_JTAG/src/main.rs index 1966593f..2c9f1fb7 100644 --- a/09_hw_debug_JTAG/src/main.rs +++ b/09_hw_debug_JTAG/src/main.rs @@ -102,6 +102,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] diff --git a/10_privilege_level/README.md b/10_privilege_level/README.md index 8765505b..29813513 100644 --- a/10_privilege_level/README.md +++ b/10_privilege_level/README.md @@ -444,7 +444,7 @@ diff -uNr 09_hw_debug_JTAG/src/exception.rs 10_privilege_level/src/exception.rs diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs --- 09_hw_debug_JTAG/src/main.rs +++ 10_privilege_level/src/main.rs -@@ -116,6 +116,7 @@ +@@ -117,6 +117,7 @@ mod console; mod cpu; mod driver; @@ -452,7 +452,7 @@ diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs mod memory; mod panic_wait; mod print; -@@ -146,12 +147,19 @@ +@@ -147,12 +148,19 @@ /// The main function running after the early init. fn kernel_main() -> ! { @@ -472,7 +472,7 @@ diff -uNr 09_hw_debug_JTAG/src/main.rs 10_privilege_level/src/main.rs info!( "Architectural timer resolution: {} ns", time::time_manager().resolution().as_nanos() -@@ -166,11 +174,12 @@ +@@ -167,11 +175,12 @@ info!(" {}. {}", i + 1, driver.compatible()); } diff --git a/10_privilege_level/src/bsp/device_driver/common.rs b/10_privilege_level/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/10_privilege_level/src/bsp/device_driver/common.rs +++ b/10_privilege_level/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/10_privilege_level/src/main.rs b/10_privilege_level/src/main.rs index 84073ee6..1cc057ac 100644 --- a/10_privilege_level/src/main.rs +++ b/10_privilege_level/src/main.rs @@ -102,6 +102,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] diff --git a/11_virtual_mem_part1_identity_mapping/README.md b/11_virtual_mem_part1_identity_mapping/README.md index adaa466f..c8c40b4b 100644 --- a/11_virtual_mem_part1_identity_mapping/README.md +++ b/11_virtual_mem_part1_identity_mapping/README.md @@ -855,17 +855,18 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s //! [timer interface]: ../libkernel/time/interface/trait.TimeManager.html //! //! # Code organization and architecture -@@ -102,6 +104,9 @@ +@@ -102,7 +104,10 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![allow(incomplete_features)] + #![feature(const_fn_fn_ptr_basics)] +#![feature(const_generics)] +#![feature(const_panic)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)] -@@ -129,9 +134,18 @@ +@@ -130,9 +135,18 @@ /// # Safety /// /// - Only a single core must be active and running this function. @@ -885,7 +886,7 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s for i in bsp::driver::driver_manager().all_device_drivers().iter() { if let Err(x) = i.init() { -@@ -154,6 +168,9 @@ +@@ -155,6 +169,9 @@ info!("Booting on: {}", bsp::board_name()); @@ -895,7 +896,7 @@ diff -uNr 10_privilege_level/src/main.rs 11_virtual_mem_part1_identity_mapping/s let (_, privilege_level) = exception::current_privilege_level(); info!("Current privilege level: {}", privilege_level); -@@ -177,6 +194,13 @@ +@@ -178,6 +195,13 @@ info!("Timer test, spinning for 1 second"); time::time_manager().spin_for(Duration::from_secs(1)); diff --git a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs b/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs +++ b/11_virtual_mem_part1_identity_mapping/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/11_virtual_mem_part1_identity_mapping/src/main.rs b/11_virtual_mem_part1_identity_mapping/src/main.rs index f3156773..680e2819 100644 --- a/11_virtual_mem_part1_identity_mapping/src/main.rs +++ b/11_virtual_mem_part1_identity_mapping/src/main.rs @@ -105,6 +105,7 @@ //! - `crate::bsp::memory::*` #![allow(incomplete_features)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] #![feature(format_args_nl)] diff --git a/12_exceptions_part1_groundwork/README.md b/12_exceptions_part1_groundwork/README.md index e99ba7a2..04f20cd6 100644 --- a/12_exceptions_part1_groundwork/README.md +++ b/12_exceptions_part1_groundwork/README.md @@ -955,7 +955,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/bsp.rs 12_exceptions_part1_g 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 -@@ -108,6 +108,7 @@ +@@ -109,6 +109,7 @@ #![feature(const_generics)] #![feature(const_panic)] #![feature(format_args_nl)] @@ -963,7 +963,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/main.rs 12_exceptions_part1_ #![feature(naked_functions)] #![feature(panic_info_message)] #![feature(trait_alias)] -@@ -143,6 +144,8 @@ +@@ -144,6 +145,8 @@ use driver::interface::DriverManager; use memory::mmu::interface::MMU; @@ -972,7 +972,7 @@ diff -uNr 11_virtual_mem_part1_identity_mapping/src/main.rs 12_exceptions_part1_ if let Err(string) = memory::mmu::mmu().init() { panic!("MMU: {}", string); } -@@ -194,13 +197,28 @@ +@@ -195,13 +198,28 @@ info!("Timer test, spinning for 1 second"); time::time_manager().spin_for(Duration::from_secs(1)); diff --git a/12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs b/12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs +++ b/12_exceptions_part1_groundwork/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/12_exceptions_part1_groundwork/src/main.rs b/12_exceptions_part1_groundwork/src/main.rs index 5094311d..6f59108a 100644 --- a/12_exceptions_part1_groundwork/src/main.rs +++ b/12_exceptions_part1_groundwork/src/main.rs @@ -105,6 +105,7 @@ //! - `crate::bsp::memory::*` #![allow(incomplete_features)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] #![feature(format_args_nl)] diff --git a/13_integrated_testing/README.md b/13_integrated_testing/README.md index 50b9436b..854d9a63 100644 --- a/13_integrated_testing/README.md +++ b/13_integrated_testing/README.md @@ -1130,7 +1130,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/exception.rs 13_integrated_testing/ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/lib.rs --- 12_exceptions_part1_groundwork/src/lib.rs +++ 13_integrated_testing/src/lib.rs -@@ -0,0 +1,169 @@ +@@ -0,0 +1,170 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// +// Copyright (c) 2018-2020 Andre Richter @@ -1240,6 +1240,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/li +//! - `crate::bsp::memory::*` + +#![allow(incomplete_features)] ++#![feature(const_fn_fn_ptr_basics)] +#![feature(const_generics)] +#![feature(const_panic)] +#![feature(format_args_nl)] @@ -1304,7 +1305,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/lib.rs 13_integrated_testing/src/li diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/main.rs --- 12_exceptions_part1_groundwork/src/main.rs +++ 13_integrated_testing/src/main.rs -@@ -6,129 +6,12 @@ +@@ -6,130 +6,12 @@ #![doc(html_logo_url = "https://git.io/JeGIp")] //! The `kernel` binary. @@ -1407,6 +1408,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m -//! - `crate::bsp::memory::*` - -#![allow(incomplete_features)] +-#![feature(const_fn_fn_ptr_basics)] -#![feature(const_generics)] -#![feature(const_panic)] + @@ -1436,7 +1438,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m /// Early init code. /// -@@ -140,6 +23,7 @@ +@@ -141,6 +23,7 @@ /// - Without it, any atomic operations, e.g. the yet-to-be-introduced spinlocks in the device /// drivers (which currently employ NullLocks instead of spinlocks), will fail to work on /// the RPi SoCs. @@ -1444,7 +1446,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m unsafe fn kernel_init() -> ! { use driver::interface::DriverManager; use memory::mmu::interface::MMU; -@@ -165,9 +49,7 @@ +@@ -166,9 +49,7 @@ /// The main function running after the early init. fn kernel_main() -> ! { use console::interface::All; @@ -1454,7 +1456,7 @@ diff -uNr 12_exceptions_part1_groundwork/src/main.rs 13_integrated_testing/src/m info!("Booting on: {}", bsp::board_name()); -@@ -194,31 +76,6 @@ +@@ -195,31 +76,6 @@ info!(" {}. {}", i + 1, driver.compatible()); } diff --git a/13_integrated_testing/src/bsp/device_driver/common.rs b/13_integrated_testing/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/13_integrated_testing/src/bsp/device_driver/common.rs +++ b/13_integrated_testing/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/13_integrated_testing/src/lib.rs b/13_integrated_testing/src/lib.rs index 5bd45be4..19e6f24f 100644 --- a/13_integrated_testing/src/lib.rs +++ b/13_integrated_testing/src/lib.rs @@ -107,6 +107,7 @@ //! - `crate::bsp::memory::*` #![allow(incomplete_features)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] #![feature(format_args_nl)] diff --git a/14_exceptions_part2_peripheral_IRQs/README.md b/14_exceptions_part2_peripheral_IRQs/README.md index 23f50fcd..83e771b0 100644 --- a/14_exceptions_part2_peripheral_IRQs/README.md +++ b/14_exceptions_part2_peripheral_IRQs/README.md @@ -2403,18 +2403,19 @@ diff -uNr 13_integrated_testing/src/lib.rs 14_exceptions_part2_peripheral_IRQs/s //! [timer interface]: ../libkernel/time/interface/trait.TimeManager.html //! //! # Code organization and architecture -@@ -107,8 +112,10 @@ +@@ -107,9 +112,11 @@ //! - `crate::bsp::memory::*` #![allow(incomplete_features)] +#![feature(asm)] + #![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] +#![feature(core_intrinsics)] #![feature(format_args_nl)] #![feature(global_asm)] #![feature(linkage)] -@@ -136,6 +143,7 @@ +@@ -137,6 +144,7 @@ pub mod exception; pub mod memory; pub mod print; diff --git a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs b/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/14_exceptions_part2_peripheral_IRQs/src/lib.rs b/14_exceptions_part2_peripheral_IRQs/src/lib.rs index ddb7f67f..100ed3f1 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/lib.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/lib.rs @@ -113,6 +113,7 @@ #![allow(incomplete_features)] #![feature(asm)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] #![feature(core_intrinsics)] diff --git a/15_virtual_mem_part2_mmio_remap/README.md b/15_virtual_mem_part2_mmio_remap/README.md index e82c93ac..0567a34e 100644 --- a/15_virtual_mem_part2_mmio_remap/README.md +++ b/15_virtual_mem_part2_mmio_remap/README.md @@ -2019,10 +2019,10 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/lib.rs 15_virtual_mem_part2_mm #![allow(incomplete_features)] #![feature(asm)] +#![feature(const_fn)] + #![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] - #![feature(core_intrinsics)] -@@ -137,6 +138,7 @@ +@@ -138,6 +139,7 @@ mod synchronization; pub mod bsp; diff --git a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs b/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs +++ b/15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/15_virtual_mem_part2_mmio_remap/src/lib.rs b/15_virtual_mem_part2_mmio_remap/src/lib.rs index 55641341..50789867 100644 --- a/15_virtual_mem_part2_mmio_remap/src/lib.rs +++ b/15_virtual_mem_part2_mmio_remap/src/lib.rs @@ -114,6 +114,7 @@ #![allow(incomplete_features)] #![feature(asm)] #![feature(const_fn)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_panic)] #![feature(core_intrinsics)] diff --git a/X1_JTAG_boot/jtag_boot_rpi3.img b/X1_JTAG_boot/jtag_boot_rpi3.img index 88b5a6b4..4c6a0f60 100755 Binary files a/X1_JTAG_boot/jtag_boot_rpi3.img and b/X1_JTAG_boot/jtag_boot_rpi3.img differ diff --git a/X1_JTAG_boot/jtag_boot_rpi4.img b/X1_JTAG_boot/jtag_boot_rpi4.img index 5b4fc45d..d78987c6 100755 Binary files a/X1_JTAG_boot/jtag_boot_rpi4.img and b/X1_JTAG_boot/jtag_boot_rpi4.img differ diff --git a/X1_JTAG_boot/src/bsp/device_driver/common.rs b/X1_JTAG_boot/src/bsp/device_driver/common.rs index 56afb97a..cd2c0760 100644 --- a/X1_JTAG_boot/src/bsp/device_driver/common.rs +++ b/X1_JTAG_boot/src/bsp/device_driver/common.rs @@ -12,7 +12,7 @@ use core::{marker::PhantomData, ops}; pub struct MMIODerefWrapper { start_addr: usize, - phantom: PhantomData, + phantom: PhantomData T>, } //-------------------------------------------------------------------------------------------------- diff --git a/X1_JTAG_boot/src/main.rs b/X1_JTAG_boot/src/main.rs index 9d18b12c..85db786d 100644 --- a/X1_JTAG_boot/src/main.rs +++ b/X1_JTAG_boot/src/main.rs @@ -102,6 +102,7 @@ //! - `crate::memory::*` //! - `crate::bsp::memory::*` +#![feature(const_fn_fn_ptr_basics)] #![feature(format_args_nl)] #![feature(naked_functions)] #![feature(panic_info_message)]