change static type

pull/110/head
Andre Richter 3 years ago
parent 5887503f8a
commit 6a9af3c202
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -165,7 +165,7 @@ diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/cpu.rs 04_zero_overhead_abstr
+//-------------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------------
+ +
+/// Used by `arch` code to find the early boot core. +/// Used by `arch` code to find the early boot core.
+pub const BOOT_CORE_ID: usize = 0; +pub const BOOT_CORE_ID: u64 = 0;
diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/link.ld 04_zero_overhead_abstraction/src/bsp/raspberrypi/link.ld diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/link.ld 04_zero_overhead_abstraction/src/bsp/raspberrypi/link.ld
--- 03_hacky_hello_world/src/bsp/raspberrypi/link.ld --- 03_hacky_hello_world/src/bsp/raspberrypi/link.ld

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -1357,7 +1357,7 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 14_exceptions
+ } + }
+ +
+ unsafe fn init(&self) -> Result<(), &'static str> { + unsafe fn init(&self) -> Result<(), &'static str> {
+ if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID { + if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
+ self.gicd.boot_core_init(); + self.gicd.boot_core_init();
+ } + }
+ +

@ -139,7 +139,7 @@ impl driver::interface::DeviceDriver for GICv2 {
} }
unsafe fn init(&self) -> Result<(), &'static str> { unsafe fn init(&self) -> Result<(), &'static str> {
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID { if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
self.gicd.boot_core_init(); self.gicd.boot_core_init();
} }

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -1077,7 +1077,7 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs
+ self.is_mmio_remapped.store(true, Ordering::Relaxed); + self.is_mmio_remapped.store(true, Ordering::Relaxed);
+ } + }
+ +
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID { if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
self.gicd.boot_core_init(); self.gicd.boot_core_init();
} }

@ -168,7 +168,7 @@ impl driver::interface::DeviceDriver for GICv2 {
self.is_mmio_remapped.store(true, Ordering::Relaxed); self.is_mmio_remapped.store(true, Ordering::Relaxed);
} }
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID { if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
self.gicd.boot_core_init(); self.gicd.boot_core_init();
} }

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

@ -9,4 +9,4 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Used by `arch` code to find the early boot core. /// Used by `arch` code to find the early boot core.
pub const BOOT_CORE_ID: usize = 0; pub const BOOT_CORE_ID: u64 = 0;

Loading…
Cancel
Save