diff --git a/12_integrated_testing/README.md b/12_integrated_testing/README.md index eefbfa4d..600efa2a 100644 --- a/12_integrated_testing/README.md +++ b/12_integrated_testing/README.md @@ -1098,7 +1098,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/_arch/aarch64/memory/mmu.rs 12_inte diff -uNr 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs 12_integrated_testing/src/bsp/raspberrypi/console.rs --- 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs +++ 12_integrated_testing/src/bsp/raspberrypi/console.rs -@@ -35,3 +35,13 @@ +@@ -35,3 +35,14 @@ pub fn console() -> &'static impl console::interface::All { &super::PL011_UART } @@ -1111,6 +1111,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/bsp/raspberrypi/console.rs 12_integ +/// than on real hardware due to QEMU's abstractions. +/// +/// For the RPi, nothing needs to be done. ++#[cfg(feature = "test_build")] +pub fn qemu_bring_up_console() {} diff -uNr 11_exceptions_part1_groundwork/src/bsp/raspberrypi/memory/mmu.rs 12_integrated_testing/src/bsp/raspberrypi/memory/mmu.rs diff --git a/12_integrated_testing/src/bsp/raspberrypi/console.rs b/12_integrated_testing/src/bsp/raspberrypi/console.rs index d6f95e4e..75c0540b 100644 --- a/12_integrated_testing/src/bsp/raspberrypi/console.rs +++ b/12_integrated_testing/src/bsp/raspberrypi/console.rs @@ -44,4 +44,5 @@ pub fn console() -> &'static impl console::interface::All { /// than on real hardware due to QEMU's abstractions. /// /// For the RPi, nothing needs to be done. +#[cfg(feature = "test_build")] pub fn qemu_bring_up_console() {} diff --git a/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs index d6f95e4e..75c0540b 100644 --- a/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs +++ b/13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/console.rs @@ -44,4 +44,5 @@ pub fn console() -> &'static impl console::interface::All { /// than on real hardware due to QEMU's abstractions. /// /// For the RPi, nothing needs to be done. +#[cfg(feature = "test_build")] pub fn qemu_bring_up_console() {} diff --git a/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs index abf8f89c..0d0f8e40 100644 --- a/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs +++ b/14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs @@ -58,4 +58,5 @@ pub fn console() -> &'static impl console::interface::All { /// than on real hardware due to QEMU's abstractions. /// /// For the RPi, nothing needs to be done. +#[cfg(feature = "test_build")] pub fn qemu_bring_up_console() {} diff --git a/15_virtual_mem_part3_precomputed_tables/README.md b/15_virtual_mem_part3_precomputed_tables/README.md index f83ff5b4..25d9cc36 100644 --- a/15_virtual_mem_part3_precomputed_tables/README.md +++ b/15_virtual_mem_part3_precomputed_tables/README.md @@ -1024,14 +1024,14 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/console.rs 15_virt /// Return a reference to the console. pub fn console() -> &'static impl console::interface::All { &super::PL011_UART -@@ -56,6 +74,15 @@ +@@ -56,7 +74,15 @@ /// Minimal code needed to bring up the console in QEMU (for testing only). This is often less steps /// than on real hardware due to QEMU's abstractions. -/// -/// For the RPi, nothing needs to be done. + #[cfg(feature = "test_build")] -pub fn qemu_bring_up_console() {} -+#[cfg(feature = "test_build")] +pub fn qemu_bring_up_console() { + use driver::interface::DeviceDriver; +