Use a virtual manifest starting tutorial 12

This is finally possible since the new feature resolver.

For reference:
https://github.com/rust-lang/rust-analyzer/issues/6197#issuecomment-827564835
pull/158/head
Andre Richter 2 years ago
parent e13edf9992
commit 8c661977b8
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -39,9 +39,9 @@ checksum = "9ff023245bfcc73fb890e1f8d5383825b3131cc920020a5c487d6f113dfc428a"
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.17" version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]

@ -1,60 +1,9 @@
[package] [workspace]
name = "mingo"
version = "0.12.0" members = [
authors = ["Andre Richter <andre.o.richter@gmail.com>"] "libraries/*",
edition = "2021" "kernel"
]
[profile.release] [profile.release]
lto = true lto = true
[features]
default = []
bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
##--------------------------------------------------------------------------------------------------
## Dependencies
##--------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "test-types" }
# Optional dependencies
tock-registers = { version = "0.7.x", default-features = false, features = ["register_types"], optional = true }
qemu-exit = { version = "3.x.x", optional = true }
# Platform specific dependencies
[target.'cfg(target_arch = "aarch64")'.dependencies]
cortex-a = { version = "7.x.x" }
##--------------------------------------------------------------------------------------------------
## Testing
##--------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "test-macros" }
# Unit tests are done in the library part of the kernel.
[lib]
name = "libkernel"
test = true
# Disable unit tests for the kernel binary.
[[bin]]
name = "kernel"
path = "src/main.rs"
test = false
# List of tests without harness.
[[test]]
name = "00_console_sanity"
harness = false
[[test]]
name = "02_exception_sync_page_fault"
harness = false
[[test]]
name = "03_exception_restore_sanity"
harness = false

@ -41,7 +41,7 @@ ifeq ($(BSP),rpi3)
READELF_BINARY = aarch64-none-elf-readelf READELF_BINARY = aarch64-none-elf-readelf
OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi3.cfg OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi3.cfg
JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi3.img JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi3.img
LD_SCRIPT_PATH = $(shell pwd)/src/bsp/raspberrypi LD_SCRIPT_PATH = $(shell pwd)/kernel/src/bsp/raspberrypi
RUSTC_MISC_ARGS = -C target-cpu=cortex-a53 RUSTC_MISC_ARGS = -C target-cpu=cortex-a53
else ifeq ($(BSP),rpi4) else ifeq ($(BSP),rpi4)
TARGET = aarch64-unknown-none-softfloat TARGET = aarch64-unknown-none-softfloat
@ -55,7 +55,7 @@ else ifeq ($(BSP),rpi4)
READELF_BINARY = aarch64-none-elf-readelf READELF_BINARY = aarch64-none-elf-readelf
OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi4.cfg OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi4.cfg
JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi4.img JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi4.img
LD_SCRIPT_PATH = $(shell pwd)/src/bsp/raspberrypi LD_SCRIPT_PATH = $(shell pwd)/kernel/src/bsp/raspberrypi
RUSTC_MISC_ARGS = -C target-cpu=cortex-a72 RUSTC_MISC_ARGS = -C target-cpu=cortex-a72
endif endif
@ -67,9 +67,9 @@ export LD_SCRIPT_PATH
##-------------------------------------------------------------------------------------------------- ##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites ## Targets and Prerequisites
##-------------------------------------------------------------------------------------------------- ##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
LAST_BUILD_CONFIG = target/$(BSP).build_config
KERNEL_ELF = target/$(TARGET)/release/kernel KERNEL_ELF = target/$(TARGET)/release/kernel
# This parses cargo's dep-info file. # This parses cargo's dep-info file.
@ -94,11 +94,11 @@ COMPILER_ARGS = --target=$(TARGET) \
$(FEATURES) \ $(FEATURES) \
--release --release
RUSTC_CMD = cargo rustc $(COMPILER_ARGS) RUSTC_CMD = cargo rustc $(COMPILER_ARGS) --manifest-path $(KERNEL_MANIFEST)
DOC_CMD = cargo doc $(COMPILER_ARGS) DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS) CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS) CHECK_CMD = cargo check $(COMPILER_ARGS)
TEST_CMD = cargo test $(COMPILER_ARGS) TEST_CMD = cargo test $(COMPILER_ARGS) --manifest-path $(KERNEL_MANIFEST)
OBJCOPY_CMD = rust-objcopy \ OBJCOPY_CMD = rust-objcopy \
--strip-all \ --strip-all \
-O binary -O binary
@ -203,6 +203,8 @@ chainboot: $(KERNEL_BIN)
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
clippy: clippy:
@RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD)
@RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) --features test_build --tests \
--manifest-path $(KERNEL_MANIFEST)
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
## Clean ## Clean
@ -299,6 +301,10 @@ test_boot: $(KERNEL_BIN)
define KERNEL_TEST_RUNNER define KERNEL_TEST_RUNNER
#!/usr/bin/env bash #!/usr/bin/env bash
# The cargo test runner seems to change into the crate under test's directory. Therefore, ensure
# this script executes from the root.
cd $(shell pwd)
TEST_ELF=$$(echo $$1 | sed -e 's/.*target/target/g') TEST_ELF=$$(echo $$1 | sed -e 's/.*target/target/g')
TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g') TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g')

File diff suppressed because it is too large Load Diff

@ -0,0 +1,58 @@
[package]
name = "mingo"
version = "0.12.0"
authors = ["Andre Richter <andre.o.richter@gmail.com>"]
edition = "2021"
[features]
default = []
bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
##--------------------------------------------------------------------------------------------------
## Dependencies
##--------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "../libraries/test-types" }
# Optional dependencies
tock-registers = { version = "0.7.x", default-features = false, features = ["register_types"], optional = true }
qemu-exit = { version = "3.x.x", optional = true }
# Platform specific dependencies
[target.'cfg(target_arch = "aarch64")'.dependencies]
cortex-a = { version = "7.x.x" }
##--------------------------------------------------------------------------------------------------
## Testing
##--------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "../libraries/test-macros" }
# Unit tests are done in the library part of the kernel.
[lib]
name = "libkernel"
test = true
# Disable unit tests for the kernel binary.
[[bin]]
name = "kernel"
path = "src/main.rs"
test = false
# List of tests without harness.
[[test]]
name = "00_console_sanity"
harness = false
[[test]]
name = "02_exception_sync_page_fault"
harness = false
[[test]]
name = "03_exception_restore_sanity"
harness = false

@ -39,9 +39,9 @@ checksum = "9ff023245bfcc73fb890e1f8d5383825b3131cc920020a5c487d6f113dfc428a"
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.17" version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]

@ -1,60 +1,9 @@
[package] [workspace]
name = "mingo"
version = "0.13.0" members = [
authors = ["Andre Richter <andre.o.richter@gmail.com>"] "libraries/*",
edition = "2021" "kernel"
]
[profile.release] [profile.release]
lto = true lto = true
[features]
default = []
bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
##--------------------------------------------------------------------------------------------------
## Dependencies
##--------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "test-types" }
# Optional dependencies
tock-registers = { version = "0.7.x", default-features = false, features = ["register_types"], optional = true }
qemu-exit = { version = "3.x.x", optional = true }
# Platform specific dependencies
[target.'cfg(target_arch = "aarch64")'.dependencies]
cortex-a = { version = "7.x.x" }
##--------------------------------------------------------------------------------------------------
## Testing
##--------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "test-macros" }
# Unit tests are done in the library part of the kernel.
[lib]
name = "libkernel"
test = true
# Disable unit tests for the kernel binary.
[[bin]]
name = "kernel"
path = "src/main.rs"
test = false
# List of tests without harness.
[[test]]
name = "00_console_sanity"
harness = false
[[test]]
name = "02_exception_sync_page_fault"
harness = false
[[test]]
name = "03_exception_restore_sanity"
harness = false

@ -41,7 +41,7 @@ ifeq ($(BSP),rpi3)
READELF_BINARY = aarch64-none-elf-readelf READELF_BINARY = aarch64-none-elf-readelf
OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi3.cfg OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi3.cfg
JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi3.img JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi3.img
LD_SCRIPT_PATH = $(shell pwd)/src/bsp/raspberrypi LD_SCRIPT_PATH = $(shell pwd)/kernel/src/bsp/raspberrypi
RUSTC_MISC_ARGS = -C target-cpu=cortex-a53 RUSTC_MISC_ARGS = -C target-cpu=cortex-a53
else ifeq ($(BSP),rpi4) else ifeq ($(BSP),rpi4)
TARGET = aarch64-unknown-none-softfloat TARGET = aarch64-unknown-none-softfloat
@ -55,7 +55,7 @@ else ifeq ($(BSP),rpi4)
READELF_BINARY = aarch64-none-elf-readelf READELF_BINARY = aarch64-none-elf-readelf
OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi4.cfg OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi4.cfg
JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi4.img JTAG_BOOT_IMAGE = ../X1_JTAG_boot/jtag_boot_rpi4.img
LD_SCRIPT_PATH = $(shell pwd)/src/bsp/raspberrypi LD_SCRIPT_PATH = $(shell pwd)/kernel/src/bsp/raspberrypi
RUSTC_MISC_ARGS = -C target-cpu=cortex-a72 RUSTC_MISC_ARGS = -C target-cpu=cortex-a72
endif endif
@ -67,9 +67,9 @@ export LD_SCRIPT_PATH
##-------------------------------------------------------------------------------------------------- ##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites ## Targets and Prerequisites
##-------------------------------------------------------------------------------------------------- ##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
LAST_BUILD_CONFIG = target/$(BSP).build_config
KERNEL_ELF = target/$(TARGET)/release/kernel KERNEL_ELF = target/$(TARGET)/release/kernel
# This parses cargo's dep-info file. # This parses cargo's dep-info file.
@ -94,11 +94,11 @@ COMPILER_ARGS = --target=$(TARGET) \
$(FEATURES) \ $(FEATURES) \
--release --release
RUSTC_CMD = cargo rustc $(COMPILER_ARGS) RUSTC_CMD = cargo rustc $(COMPILER_ARGS) --manifest-path $(KERNEL_MANIFEST)
DOC_CMD = cargo doc $(COMPILER_ARGS) DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS) CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS) CHECK_CMD = cargo check $(COMPILER_ARGS)
TEST_CMD = cargo test $(COMPILER_ARGS) TEST_CMD = cargo test $(COMPILER_ARGS) --manifest-path $(KERNEL_MANIFEST)
OBJCOPY_CMD = rust-objcopy \ OBJCOPY_CMD = rust-objcopy \
--strip-all \ --strip-all \
-O binary -O binary
@ -203,6 +203,8 @@ chainboot: $(KERNEL_BIN)
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
clippy: clippy:
@RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD)
@RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(CLIPPY_CMD) --features test_build --tests \
--manifest-path $(KERNEL_MANIFEST)
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
## Clean ## Clean
@ -299,6 +301,10 @@ test_boot: $(KERNEL_BIN)
define KERNEL_TEST_RUNNER define KERNEL_TEST_RUNNER
#!/usr/bin/env bash #!/usr/bin/env bash
# The cargo test runner seems to change into the crate under test's directory. Therefore, ensure
# this script executes from the root.
cd $(shell pwd)
TEST_ELF=$$(echo $$1 | sed -e 's/.*target/target/g') TEST_ELF=$$(echo $$1 | sed -e 's/.*target/target/g')
TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g') TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g')

@ -489,7 +489,7 @@ sequences might be needed.
Since nothing complex is happening in the implementation, it is not covered in detail here. Please Since nothing complex is happening in the implementation, it is not covered in detail here. Please
refer to [the source of the **peripheral** controller] to check it out. refer to [the source of the **peripheral** controller] to check it out.
[the source of the **peripheral** controller]: src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs [the source of the **peripheral** controller]: kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs
##### The IRQ Handler Table ##### The IRQ Handler Table
@ -639,7 +639,7 @@ As with the implementation of the BCM interrupt controller driver, we won't cove
parts in exhaustive detail. For that, please refer to [this folder] folder which contains all the parts in exhaustive detail. For that, please refer to [this folder] folder which contains all the
sources. sources.
[this folder]: src/bsp/device_driver/arm [this folder]: kernel/src/bsp/device_driver/arm
## Test it ## Test it
@ -746,9 +746,9 @@ Minipush 1.0
## Diff to previous ## Diff to previous
```diff ```diff
diff -uNr 12_integrated_testing/Cargo.toml 13_exceptions_part2_peripheral_IRQs/Cargo.toml diff -uNr 12_integrated_testing/kernel/Cargo.toml 13_exceptions_part2_peripheral_IRQs/kernel/Cargo.toml
--- 12_integrated_testing/Cargo.toml --- 12_integrated_testing/kernel/Cargo.toml
+++ 13_exceptions_part2_peripheral_IRQs/Cargo.toml +++ 13_exceptions_part2_peripheral_IRQs/kernel/Cargo.toml
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
[package] [package]
name = "mingo" name = "mingo"
@ -758,9 +758,9 @@ diff -uNr 12_integrated_testing/Cargo.toml 13_exceptions_part2_peripheral_IRQs/C
edition = "2021" edition = "2021"
diff -uNr 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs diff -uNr 12_integrated_testing/kernel/src/_arch/aarch64/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/cpu/smp.rs
--- 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs --- 12_integrated_testing/kernel/src/_arch/aarch64/cpu/smp.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/cpu/smp.rs
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -793,9 +793,9 @@ diff -uNr 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs 13_exceptions_part2
+ T::from((MPIDR_EL1.get() & CORE_MASK) as u8) + T::from((MPIDR_EL1.get() & CORE_MASK) as u8)
+} +}
diff -uNr 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs diff -uNr 12_integrated_testing/kernel/src/_arch/aarch64/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/exception/asynchronous.rs
--- 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs --- 12_integrated_testing/kernel/src/_arch/aarch64/exception/asynchronous.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception/asynchronous.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/exception/asynchronous.rs
@@ -11,13 +11,18 @@ @@ -11,13 +11,18 @@
//! //!
//! crate::exception::asynchronous::arch_asynchronous //! crate::exception::asynchronous::arch_asynchronous
@ -889,9 +889,9 @@ diff -uNr 12_integrated_testing/src/_arch/aarch64/exception/asynchronous.rs 13_e
#[rustfmt::skip] #[rustfmt::skip]
pub fn print_state() { pub fn print_state() {
diff -uNr 12_integrated_testing/src/_arch/aarch64/exception.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs diff -uNr 12_integrated_testing/kernel/src/_arch/aarch64/exception.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/exception.rs
--- 12_integrated_testing/src/_arch/aarch64/exception.rs --- 12_integrated_testing/kernel/src/_arch/aarch64/exception.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/exception.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/_arch/aarch64/exception.rs
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
//! //!
//! crate::exception::arch_exception //! crate::exception::arch_exception
@ -915,9 +915,9 @@ diff -uNr 12_integrated_testing/src/_arch/aarch64/exception.rs 13_exceptions_par
#[no_mangle] #[no_mangle]
diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2/gicc.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2/gicc.rs
--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2/gicc.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicc.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2/gicc.rs
@@ -0,0 +1,141 @@ @@ -0,0 +1,141 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1061,9 +1061,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicc.rs 13_excep
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2/gicd.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2/gicd.rs
--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2/gicd.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2/gicd.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2/gicd.rs
@@ -0,0 +1,199 @@ @@ -0,0 +1,199 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1265,9 +1265,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2/gicd.rs 13_excep
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2.rs
--- 12_integrated_testing/src/bsp/device_driver/arm/gicv2.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/arm/gicv2.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm/gicv2.rs
@@ -0,0 +1,219 @@ @@ -0,0 +1,219 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1489,9 +1489,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 13_exceptions
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/arm.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/arm.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm.rs
--- 12_integrated_testing/src/bsp/device_driver/arm.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/arm.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/arm.rs
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1503,9 +1503,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/arm.rs 13_exceptions_part2
+ +
+pub use gicv2::*; +pub use gicv2::*;
diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs
--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
use crate::{ use crate::{
@ -1534,9 +1534,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_gpio.rs 13_exc
} }
diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs
--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller/peripheral_ic.rs
@@ -0,0 +1,167 @@ @@ -0,0 +1,167 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1706,9 +1706,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_cont
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs
--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_interrupt_controller.rs
@@ -0,0 +1,131 @@ @@ -0,0 +1,131 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -1842,9 +1842,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_interrupt_cont
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs
--- 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs
@@ -10,8 +10,8 @@ @@ -10,8 +10,8 @@
//! - <https://developer.arm.com/documentation/ddi0183/latest> //! - <https://developer.arm.com/documentation/ddi0183/latest>
@ -2010,9 +2010,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver/bcm.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm.rs
--- 12_integrated_testing/src/bsp/device_driver/bcm.rs --- 12_integrated_testing/kernel/src/bsp/device_driver/bcm.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/bcm.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver/bcm.rs
@@ -5,7 +5,11 @@ @@ -5,7 +5,11 @@
//! BCM driver top level. //! BCM driver top level.
@ -2026,9 +2026,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver/bcm.rs 13_exceptions_part2
+pub use bcm2xxx_interrupt_controller::*; +pub use bcm2xxx_interrupt_controller::*;
pub use bcm2xxx_pl011_uart::*; pub use bcm2xxx_pl011_uart::*;
diff -uNr 12_integrated_testing/src/bsp/device_driver.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs diff -uNr 12_integrated_testing/kernel/src/bsp/device_driver.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver.rs
--- 12_integrated_testing/src/bsp/device_driver.rs --- 12_integrated_testing/kernel/src/bsp/device_driver.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/device_driver.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/device_driver.rs
@@ -4,9 +4,13 @@ @@ -4,9 +4,13 @@
//! Device driver. //! Device driver.
@ -2044,9 +2044,9 @@ diff -uNr 12_integrated_testing/src/bsp/device_driver.rs 13_exceptions_part2_per
#[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))] #[cfg(any(feature = "bsp_rpi3", feature = "bsp_rpi4"))]
pub use bcm::*; pub use bcm::*;
diff -uNr 12_integrated_testing/src/bsp/raspberrypi/driver.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs diff -uNr 12_integrated_testing/kernel/src/bsp/raspberrypi/driver.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/driver.rs
--- 12_integrated_testing/src/bsp/raspberrypi/driver.rs --- 12_integrated_testing/kernel/src/bsp/raspberrypi/driver.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/driver.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/driver.rs
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
/// Device Driver Manager type. /// Device Driver Manager type.
@ -2070,9 +2070,9 @@ diff -uNr 12_integrated_testing/src/bsp/raspberrypi/driver.rs 13_exceptions_part
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs diff -uNr 12_integrated_testing/kernel/src/bsp/raspberrypi/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/exception/asynchronous.rs
--- 12_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs --- 12_integrated_testing/kernel/src/bsp/raspberrypi/exception/asynchronous.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception/asynchronous.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/exception/asynchronous.rs
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -2111,9 +2111,9 @@ diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception/asynchronous.rs 13
+ &super::super::INTERRUPT_CONTROLLER + &super::super::INTERRUPT_CONTROLLER
+} +}
diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs diff -uNr 12_integrated_testing/kernel/src/bsp/raspberrypi/exception.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/exception.rs
--- 12_integrated_testing/src/bsp/raspberrypi/exception.rs --- 12_integrated_testing/kernel/src/bsp/raspberrypi/exception.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/exception.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/exception.rs
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -2123,9 +2123,9 @@ diff -uNr 12_integrated_testing/src/bsp/raspberrypi/exception.rs 13_exceptions_p
+ +
+pub mod asynchronous; +pub mod asynchronous;
diff -uNr 12_integrated_testing/src/bsp/raspberrypi/memory.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs diff -uNr 12_integrated_testing/kernel/src/bsp/raspberrypi/memory.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/memory.rs
--- 12_integrated_testing/src/bsp/raspberrypi/memory.rs --- 12_integrated_testing/kernel/src/bsp/raspberrypi/memory.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/memory.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi/memory.rs
@@ -73,10 +73,12 @@ @@ -73,10 +73,12 @@
pub mod mmio { pub mod mmio {
use super::*; use super::*;
@ -2153,9 +2153,9 @@ diff -uNr 12_integrated_testing/src/bsp/raspberrypi/memory.rs 13_exceptions_part
} }
} }
diff -uNr 12_integrated_testing/src/bsp/raspberrypi.rs 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs diff -uNr 12_integrated_testing/kernel/src/bsp/raspberrypi.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi.rs
--- 12_integrated_testing/src/bsp/raspberrypi.rs --- 12_integrated_testing/kernel/src/bsp/raspberrypi.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/bsp/raspberrypi.rs
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
pub mod console; pub mod console;
pub mod cpu; pub mod cpu;
@ -2193,9 +2193,9 @@ diff -uNr 12_integrated_testing/src/bsp/raspberrypi.rs 13_exceptions_part2_perip
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
// Public Code // Public Code
diff -uNr 12_integrated_testing/src/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs diff -uNr 12_integrated_testing/kernel/src/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/cpu/smp.rs
--- 12_integrated_testing/src/cpu/smp.rs --- 12_integrated_testing/kernel/src/cpu/smp.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/cpu/smp.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/cpu/smp.rs
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -2212,9 +2212,9 @@ diff -uNr 12_integrated_testing/src/cpu/smp.rs 13_exceptions_part2_peripheral_IR
+//-------------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------------
+pub use arch_smp::core_id; +pub use arch_smp::core_id;
diff -uNr 12_integrated_testing/src/cpu.rs 13_exceptions_part2_peripheral_IRQs/src/cpu.rs diff -uNr 12_integrated_testing/kernel/src/cpu.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/cpu.rs
--- 12_integrated_testing/src/cpu.rs --- 12_integrated_testing/kernel/src/cpu.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/cpu.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/cpu.rs
@@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
mod boot; mod boot;
@ -2225,9 +2225,9 @@ diff -uNr 12_integrated_testing/src/cpu.rs 13_exceptions_part2_peripheral_IRQs/s
// Architectural Public Reexports // Architectural Public Reexports
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
diff -uNr 12_integrated_testing/src/driver.rs 13_exceptions_part2_peripheral_IRQs/src/driver.rs diff -uNr 12_integrated_testing/kernel/src/driver.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/driver.rs
--- 12_integrated_testing/src/driver.rs --- 12_integrated_testing/kernel/src/driver.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/driver.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/driver.rs
@@ -23,6 +23,14 @@ @@ -23,6 +23,14 @@
unsafe fn init(&self) -> Result<(), &'static str> { unsafe fn init(&self) -> Result<(), &'static str> {
Ok(()) Ok(())
@ -2244,9 +2244,9 @@ diff -uNr 12_integrated_testing/src/driver.rs 13_exceptions_part2_peripheral_IRQ
/// Device driver management functions. /// Device driver management functions.
diff -uNr 12_integrated_testing/src/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs diff -uNr 12_integrated_testing/kernel/src/exception/asynchronous.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/exception/asynchronous.rs
--- 12_integrated_testing/src/exception/asynchronous.rs --- 12_integrated_testing/kernel/src/exception/asynchronous.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/exception/asynchronous.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/exception/asynchronous.rs
@@ -8,7 +8,145 @@ @@ -8,7 +8,145 @@
#[path = "../_arch/aarch64/exception/asynchronous.rs"] #[path = "../_arch/aarch64/exception/asynchronous.rs"]
mod arch_asynchronous; mod arch_asynchronous;
@ -2395,9 +2395,9 @@ diff -uNr 12_integrated_testing/src/exception/asynchronous.rs 13_exceptions_part
+ ret + ret
+} +}
diff -uNr 12_integrated_testing/src/lib.rs 13_exceptions_part2_peripheral_IRQs/src/lib.rs diff -uNr 12_integrated_testing/kernel/src/lib.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/lib.rs
--- 12_integrated_testing/src/lib.rs --- 12_integrated_testing/kernel/src/lib.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/lib.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/lib.rs
@@ -108,6 +108,7 @@ @@ -108,6 +108,7 @@
#![allow(clippy::upper_case_acronyms)] #![allow(clippy::upper_case_acronyms)]
@ -2415,9 +2415,9 @@ diff -uNr 12_integrated_testing/src/lib.rs 13_exceptions_part2_peripheral_IRQs/s
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
diff -uNr 12_integrated_testing/src/main.rs 13_exceptions_part2_peripheral_IRQs/src/main.rs diff -uNr 12_integrated_testing/kernel/src/main.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/main.rs
--- 12_integrated_testing/src/main.rs --- 12_integrated_testing/kernel/src/main.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/main.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/main.rs
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
#![no_main] #![no_main]
#![no_std] #![no_std]
@ -2484,9 +2484,9 @@ diff -uNr 12_integrated_testing/src/main.rs 13_exceptions_part2_peripheral_IRQs/
+ cpu::wait_forever(); + cpu::wait_forever();
} }
diff -uNr 12_integrated_testing/src/panic_wait.rs 13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs diff -uNr 12_integrated_testing/kernel/src/panic_wait.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/panic_wait.rs
--- 12_integrated_testing/src/panic_wait.rs --- 12_integrated_testing/kernel/src/panic_wait.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/panic_wait.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/panic_wait.rs
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
//! A panic handler that infinitely waits. //! A panic handler that infinitely waits.
@ -2506,9 +2506,9 @@ diff -uNr 12_integrated_testing/src/panic_wait.rs 13_exceptions_part2_peripheral
panic_prevent_reenter(); panic_prevent_reenter();
diff -uNr 12_integrated_testing/src/state.rs 13_exceptions_part2_peripheral_IRQs/src/state.rs diff -uNr 12_integrated_testing/kernel/src/state.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/state.rs
--- 12_integrated_testing/src/state.rs --- 12_integrated_testing/kernel/src/state.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/state.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/state.rs
@@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//
@ -2603,9 +2603,9 @@ diff -uNr 12_integrated_testing/src/state.rs 13_exceptions_part2_peripheral_IRQs
+ } + }
+} +}
diff -uNr 12_integrated_testing/src/synchronization.rs 13_exceptions_part2_peripheral_IRQs/src/synchronization.rs diff -uNr 12_integrated_testing/kernel/src/synchronization.rs 13_exceptions_part2_peripheral_IRQs/kernel/src/synchronization.rs
--- 12_integrated_testing/src/synchronization.rs --- 12_integrated_testing/kernel/src/synchronization.rs
+++ 13_exceptions_part2_peripheral_IRQs/src/synchronization.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/src/synchronization.rs
@@ -28,6 +28,21 @@ @@ -28,6 +28,21 @@
/// Locks the mutex and grants the closure temporary mutable access to the wrapped data. /// Locks the mutex and grants the closure temporary mutable access to the wrapped data.
fn lock<R>(&self, f: impl FnOnce(&mut Self::Data) -> R) -> R; fn lock<R>(&self, f: impl FnOnce(&mut Self::Data) -> R) -> R;
@ -2738,9 +2738,9 @@ diff -uNr 12_integrated_testing/src/synchronization.rs 13_exceptions_part2_perip
+ } + }
} }
diff -uNr 12_integrated_testing/tests/04_exception_irq_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/04_exception_irq_sanity.rs diff -uNr 12_integrated_testing/kernel/tests/04_exception_irq_sanity.rs 13_exceptions_part2_peripheral_IRQs/kernel/tests/04_exception_irq_sanity.rs
--- 12_integrated_testing/tests/04_exception_irq_sanity.rs --- 12_integrated_testing/kernel/tests/04_exception_irq_sanity.rs
+++ 13_exceptions_part2_peripheral_IRQs/tests/04_exception_irq_sanity.rs +++ 13_exceptions_part2_peripheral_IRQs/kernel/tests/04_exception_irq_sanity.rs
@@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-License-Identifier: MIT OR Apache-2.0
+// +//

@ -0,0 +1,58 @@
[package]
name = "mingo"
version = "0.13.0"
authors = ["Andre Richter <andre.o.richter@gmail.com>"]
edition = "2021"
[features]
default = []
bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
##--------------------------------------------------------------------------------------------------
## Dependencies
##--------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "../libraries/test-types" }
# Optional dependencies
tock-registers = { version = "0.7.x", default-features = false, features = ["register_types"], optional = true }
qemu-exit = { version = "3.x.x", optional = true }
# Platform specific dependencies
[target.'cfg(target_arch = "aarch64")'.dependencies]
cortex-a = { version = "7.x.x" }
##--------------------------------------------------------------------------------------------------
## Testing
##--------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "../libraries/test-macros" }
# Unit tests are done in the library part of the kernel.
[lib]
name = "libkernel"
test = true
# Disable unit tests for the kernel binary.
[[bin]]
name = "kernel"
path = "src/main.rs"
test = false
# List of tests without harness.
[[test]]
name = "00_console_sanity"
harness = false
[[test]]
name = "02_exception_sync_page_fault"
harness = false
[[test]]
name = "03_exception_restore_sanity"
harness = false

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save