Add missing source comments

pull/41/head
Andre Richter 5 years ago
parent e2e1c7d64c
commit 10090900cc
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

Binary file not shown.

@ -92,7 +92,7 @@ diff -uNr 02_runtime_init/src/bsp/rpi.rs 03_hacky_hello_world/src/bsp/rpi.rs
diff -uNr 02_runtime_init/src/interface.rs 03_hacky_hello_world/src/interface.rs
--- 02_runtime_init/src/interface.rs
+++ 03_hacky_hello_world/src/interface.rs
@@ -0,0 +1,36 @@
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
@ -124,7 +124,8 @@ diff -uNr 02_runtime_init/src/interface.rs 03_hacky_hello_world/src/interface.rs
+
+ /// Console read functions.
+ pub trait Read {
+ fn read_char(&mut self) -> char {
+ /// Read a single character.
+ fn read_char(&self) -> char {
+ ' '
+ }
+ }
@ -203,7 +204,7 @@ diff -uNr 02_runtime_init/src/panic_wait.rs 03_hacky_hello_world/src/panic_wait.
diff -uNr 02_runtime_init/src/print.rs 03_hacky_hello_world/src/print.rs
--- 02_runtime_init/src/print.rs
+++ 03_hacky_hello_world/src/print.rs
@@ -0,0 +1,33 @@
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
@ -213,6 +214,7 @@ diff -uNr 02_runtime_init/src/print.rs 03_hacky_hello_world/src/print.rs
+use crate::{bsp, interface};
+use core::fmt;
+
+#[doc(hidden)]
+pub fn _print(args: fmt::Arguments) {
+ use interface::console::Write;
+

Binary file not shown.

@ -29,7 +29,8 @@ pub mod console {
/// Console read functions.
pub trait Read {
fn read_char(&mut self) -> char {
/// Read a single character.
fn read_char(&self) -> char {
' '
}
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -23,7 +23,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -37,5 +37,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -103,11 +103,14 @@ diff -uNr 03_hacky_hello_world/src/arch/aarch64.rs 04_zero_overhead_abstraction/
diff -uNr 03_hacky_hello_world/src/bsp/rpi.rs 04_zero_overhead_abstraction/src/bsp/rpi.rs
--- 03_hacky_hello_world/src/bsp/rpi.rs
+++ 04_zero_overhead_abstraction/src/bsp/rpi.rs
@@ -7,6 +7,9 @@
@@ -7,6 +7,12 @@
use crate::interface;
use core::fmt;
+/// Used by `arch` code to find the early boot core.
+pub const BOOT_CORE_ID: u64 = 0;
+
+/// The early boot core's stack address.
+pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
+
/// A mystical, magical device for generating QEMU output out of the void.

@ -7,7 +7,10 @@
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
/// A mystical, magical device for generating QEMU output out of the void.

@ -29,7 +29,8 @@ pub mod console {
/// Console read functions.
pub trait Read {
fn read_char(&mut self) -> char {
/// Read a single character.
fn read_char(&self) -> char {
' '
}
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -23,7 +23,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -37,5 +37,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -55,7 +55,7 @@ make qemu
diff -uNr 04_zero_overhead_abstraction/src/arch/aarch64/sync.rs 05_safe_globals/src/arch/aarch64/sync.rs
--- 04_zero_overhead_abstraction/src/arch/aarch64/sync.rs
+++ 05_safe_globals/src/arch/aarch64/sync.rs
@@ -0,0 +1,52 @@
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
@ -88,6 +88,7 @@ diff -uNr 04_zero_overhead_abstraction/src/arch/aarch64/sync.rs 05_safe_globals/
+unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
+
+impl<T> NullLock<T> {
+ /// Wraps `data` into a new `NullLock`.
+ pub const fn new(data: T) -> NullLock<T> {
+ NullLock {
+ data: UnsafeCell::new(data),
@ -125,7 +126,7 @@ diff -uNr 04_zero_overhead_abstraction/src/arch/aarch64.rs 05_safe_globals/src/a
diff -uNr 04_zero_overhead_abstraction/src/bsp/rpi.rs 05_safe_globals/src/bsp/rpi.rs
--- 04_zero_overhead_abstraction/src/bsp/rpi.rs
+++ 05_safe_globals/src/bsp/rpi.rs
@@ -4,38 +4,114 @@
@@ -4,7 +4,7 @@
//! Board Support Package for the Raspberry Pi.
@ -133,7 +134,8 @@ diff -uNr 04_zero_overhead_abstraction/src/bsp/rpi.rs 05_safe_globals/src/bsp/rp
+use crate::{arch::sync::NullLock, interface};
use core::fmt;
pub const BOOT_CORE_ID: u64 = 0;
/// Used by `arch` code to find the early boot core.
@@ -14,31 +14,107 @@
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
/// A mystical, magical device for generating QEMU output out of the void.
@ -254,7 +256,7 @@ diff -uNr 04_zero_overhead_abstraction/src/bsp/rpi.rs 05_safe_globals/src/bsp/rp
diff -uNr 04_zero_overhead_abstraction/src/interface.rs 05_safe_globals/src/interface.rs
--- 04_zero_overhead_abstraction/src/interface.rs
+++ 05_safe_globals/src/interface.rs
@@ -20,17 +20,66 @@
@@ -20,12 +20,13 @@
/// System console operations.
pub mod console {
@ -267,13 +269,13 @@ diff -uNr 04_zero_overhead_abstraction/src/interface.rs 05_safe_globals/src/inte
- /// intention.
- pub use core::fmt::Write;
+ pub trait Write {
+ /// Write a Rust format string.
+ fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
+ }
/// Console read functions.
pub trait Read {
- fn read_char(&mut self) -> char {
+ fn read_char(&self) -> char {
@@ -34,4 +35,53 @@
' '
}
}

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -7,7 +7,10 @@
use crate::{arch::sync::NullLock, interface};
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
/// A mystical, magical device for generating QEMU output out of the void.

@ -24,11 +24,13 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
}
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -642,7 +642,7 @@ diff -uNr 05_safe_globals/src/bsp/rpi/memory_map.rs 06_drivers_gpio_uart/src/bsp
diff -uNr 05_safe_globals/src/bsp/rpi.rs 06_drivers_gpio_uart/src/bsp/rpi.rs
--- 05_safe_globals/src/bsp/rpi.rs
+++ 06_drivers_gpio_uart/src/bsp/rpi.rs
@@ -4,114 +4,68 @@
@@ -4,7 +4,10 @@
//! Board Support Package for the Raspberry Pi.
@ -653,7 +653,9 @@ diff -uNr 05_safe_globals/src/bsp/rpi.rs 06_drivers_gpio_uart/src/bsp/rpi.rs
+use crate::interface;
use core::fmt;
pub const BOOT_CORE_ID: u64 = 0;
/// Used by `arch` code to find the early boot core.
@@ -13,108 +16,59 @@
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
-/// A mystical, magical device for generating QEMU output out of the void.
@ -818,15 +820,17 @@ diff -uNr 05_safe_globals/src/bsp.rs 06_drivers_gpio_uart/src/bsp.rs
diff -uNr 05_safe_globals/src/interface.rs 06_drivers_gpio_uart/src/interface.rs
--- 05_safe_globals/src/interface.rs
+++ 06_drivers_gpio_uart/src/interface.rs
@@ -24,6 +24,7 @@
@@ -24,6 +24,9 @@
/// Console write functions.
pub trait Write {
+ /// Write a single character.
+ fn write_char(&self, c: char);
+
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
}
@@ -83,3 +84,20 @@
@@ -85,3 +88,20 @@
fn lock<R>(&mut self, f: impl FnOnce(&mut Self::Data) -> R) -> R;
}
}

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,12 +24,16 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
}
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -239,8 +239,8 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/rpi/link.ld 07_uart_chainloader/src/bsp/r
diff -uNr 06_drivers_gpio_uart/src/bsp/rpi.rs 07_uart_chainloader/src/bsp/rpi.rs
--- 06_drivers_gpio_uart/src/bsp/rpi.rs
+++ 07_uart_chainloader/src/bsp/rpi.rs
@@ -13,6 +13,9 @@
pub const BOOT_CORE_ID: u64 = 0;
@@ -16,6 +16,9 @@
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
+/// The address on which the RPi3 firmware loads every binary by default.
@ -253,9 +253,9 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/rpi.rs 07_uart_chainloader/src/bsp/rpi.rs
diff -uNr 06_drivers_gpio_uart/src/interface.rs 07_uart_chainloader/src/interface.rs
--- 06_drivers_gpio_uart/src/interface.rs
+++ 07_uart_chainloader/src/interface.rs
@@ -26,6 +26,10 @@
pub trait Write {
fn write_char(&self, c: char);
@@ -29,6 +29,10 @@
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
+
+ /// Block execution until the last character has been physically put on the TX wire
@ -264,7 +264,7 @@ diff -uNr 06_drivers_gpio_uart/src/interface.rs 07_uart_chainloader/src/interfac
}
/// Console read functions.
@@ -33,6 +37,9 @@
@@ -37,6 +41,9 @@
fn read_char(&self) -> char {
' '
}

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
/// The address on which the RPi3 firmware loads every binary by default.

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -287,8 +287,8 @@ diff -uNr 07_uart_chainloader/src/bsp/rpi/link.ld 08_timestamps/src/bsp/rpi/link
diff -uNr 07_uart_chainloader/src/bsp/rpi.rs 08_timestamps/src/bsp/rpi.rs
--- 07_uart_chainloader/src/bsp/rpi.rs
+++ 08_timestamps/src/bsp/rpi.rs
@@ -13,9 +13,6 @@
pub const BOOT_CORE_ID: u64 = 0;
@@ -16,9 +16,6 @@
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
-/// The address on which the RPi3 firmware loads every binary by default.
@ -301,7 +301,7 @@ diff -uNr 07_uart_chainloader/src/bsp/rpi.rs 08_timestamps/src/bsp/rpi.rs
diff -uNr 07_uart_chainloader/src/interface.rs 08_timestamps/src/interface.rs
--- 07_uart_chainloader/src/interface.rs
+++ 08_timestamps/src/interface.rs
@@ -108,3 +108,22 @@
@@ -112,3 +112,22 @@
}
}
}
@ -413,12 +413,12 @@ diff -uNr 07_uart_chainloader/src/main.rs 08_timestamps/src/main.rs
diff -uNr 07_uart_chainloader/src/print.rs 08_timestamps/src/print.rs
--- 07_uart_chainloader/src/print.rs
+++ 08_timestamps/src/print.rs
@@ -31,3 +31,71 @@
@@ -32,3 +32,71 @@
$crate::print::_print(format_args_nl!($($arg)*));
})
}
+
+/// Prints am info, with newline.
+/// Prints an info, with newline.
+#[macro_export]
+macro_rules! info {
+ ($string:expr) => ({

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -334,7 +334,7 @@ diff -uNr 09_hw_debug_JTAG/src/arch/aarch64.rs 10_privilege_level/src/arch/aarch
//--------------------------------------------------------------------------------------------------
// Global instances
//--------------------------------------------------------------------------------------------------
@@ -61,3 +103,36 @@
@@ -61,3 +103,37 @@
asm::wfe()
}
}
@ -353,6 +353,7 @@ diff -uNr 09_hw_debug_JTAG/src/arch/aarch64.rs 10_privilege_level/src/arch/aarch
+ }
+ }
+
+ /// Print the AArch64 exceptions status.
+ #[rustfmt::skip]
+ pub fn print_exception_state() {
+ use super::{
@ -361,7 +362,7 @@ diff -uNr 09_hw_debug_JTAG/src/arch/aarch64.rs 10_privilege_level/src/arch/aarch
+ };
+ use crate::info;
+
+ let to_mask_str = |x: bool| -> &'static str {
+ let to_mask_str = |x| -> _ {
+ if x { "Masked" } else { "Unmasked" }
+ };
+

Binary file not shown.

Binary file not shown.

@ -118,6 +118,7 @@ pub mod state {
}
}
/// Print the AArch64 exceptions status.
#[rustfmt::skip]
pub fn print_exception_state() {
use super::{
@ -126,7 +127,7 @@ pub mod state {
};
use crate::info;
let to_mask_str = |x: bool| -> &'static str {
let to_mask_str = |x| -> _ {
if x { "Masked" } else { "Unmasked" }
};

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

@ -602,15 +602,6 @@ diff -uNr 10_privilege_level/src/arch/aarch64.rs 11_virtual_memory/src/arch/aarc
/// Information about the HW state.
pub mod state {
use cortex_a::regs::*;
@@ -126,7 +133,7 @@
};
use crate::info;
- let to_mask_str = |x: bool| -> &'static str {
+ let to_mask_str = |x| -> _ {
if x { "Masked" } else { "Unmasked" }
};
diff -uNr 10_privilege_level/src/bsp/rpi/link.ld 11_virtual_memory/src/bsp/rpi/link.ld
--- 10_privilege_level/src/bsp/rpi/link.ld
@ -759,8 +750,8 @@ diff -uNr 10_privilege_level/src/bsp/rpi.rs 11_virtual_memory/src/bsp/rpi.rs
+use crate::{interface, memory::KernelVirtualLayout};
use core::fmt;
pub const BOOT_CORE_ID: u64 = 0;
@@ -69,3 +70,13 @@
/// Used by `arch` code to find the early boot core.
@@ -72,3 +73,13 @@
// Configure PL011Uart's output pins.
GPIO.map_pl011_uart();
}
@ -791,13 +782,14 @@ diff -uNr 10_privilege_level/src/bsp.rs 11_virtual_memory/src/bsp.rs
diff -uNr 10_privilege_level/src/interface.rs 11_virtual_memory/src/interface.rs
--- 10_privilege_level/src/interface.rs
+++ 11_virtual_memory/src/interface.rs
@@ -127,3 +127,11 @@
@@ -131,3 +131,12 @@
fn spin_for(&self, duration: Duration);
}
}
+
+/// Memory Management interfaces.
+pub mod mm {
+ /// MMU functions.
+ pub trait MMU {
+ /// Called by the kernel early during init.
+ unsafe fn init(&self) -> Result<(), &'static str>;

Binary file not shown.

Binary file not shown.

@ -125,6 +125,7 @@ pub mod state {
}
}
/// Print the AArch64 exceptions status.
#[rustfmt::skip]
pub fn print_exception_state() {
use super::{

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -11,7 +11,10 @@ use super::driver;
use crate::{interface, memory::KernelVirtualLayout};
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}
@ -130,6 +134,7 @@ pub mod time {
/// Memory Management interfaces.
pub mod mm {
/// MMU functions.
pub trait MMU {
/// Called by the kernel early during init.
unsafe fn init(&self) -> Result<(), &'static str>;

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

Binary file not shown.

@ -134,6 +134,7 @@ pub mod state {
}
}
/// Print the AArch64 exceptions status.
#[rustfmt::skip]
pub fn print_exception_state() {
use super::{

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -11,7 +11,10 @@ use super::driver;
use crate::{interface, memory::KernelVirtualLayout};
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}
@ -130,6 +134,7 @@ pub mod time {
/// Memory Management interfaces.
pub mod mm {
/// MMU functions.
pub trait MMU {
/// Called by the kernel early during init.
unsafe fn init(&self) -> Result<(), &'static str>;

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

@ -5,7 +5,7 @@ name = "cortex-a"
version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -14,7 +14,7 @@ version = "0.1.0"
dependencies = [
"cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "register"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -38,5 +38,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum cortex-a 2.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4aab2f5271d9bf17a52b34dd99993648132df3dacb79312a33332f2b6ae1d0fd"
"checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
"checksum register 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c92f7cc61c67d0f283777ce3c678789788d1b48e8f5e822a257513c16194955"
"checksum register 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f149d257caa7d9aed1f870d573ba5e2429576e6fed0693341f23078c98e55"
"checksum tock-registers 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "50af9c49c55cfb4437dd78c1fada3be5d088cbe1bea641db8171283503606a70"

Binary file not shown.

Binary file not shown.

@ -30,6 +30,7 @@ unsafe impl<T: ?Sized + Send> Send for NullLock<T> {}
unsafe impl<T: ?Sized + Send> Sync for NullLock<T> {}
impl<T> NullLock<T> {
/// Wraps `data` into a new `NullLock`.
pub const fn new(data: T) -> NullLock<T> {
NullLock {
data: UnsafeCell::new(data),

@ -10,7 +10,10 @@ use super::driver;
use crate::interface;
use core::fmt;
/// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: u64 = 0;
/// The early boot core's stack address.
pub const BOOT_CORE_STACK_START: u64 = 0x80_000;
//--------------------------------------------------------------------------------------------------

@ -24,7 +24,10 @@ pub mod console {
/// Console write functions.
pub trait Write {
/// Write a single character.
fn write_char(&self, c: char);
/// Write a Rust format string.
fn write_fmt(&self, args: fmt::Arguments) -> fmt::Result;
/// Block execution until the last character has been physically put on the TX wire
@ -34,6 +37,7 @@ pub mod console {
/// Console read functions.
pub trait Read {
/// Read a single character.
fn read_char(&self) -> char {
' '
}

@ -7,6 +7,7 @@
use crate::{bsp, interface};
use core::fmt;
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use interface::console::Write;
@ -32,7 +33,7 @@ macro_rules! println {
})
}
/// Prints am info, with newline.
/// Prints an info, with newline.
#[macro_export]
macro_rules! info {
($string:expr) => ({

Loading…
Cancel
Save