Skip to content

Commit 6a9af3c

Browse files
committed
change static type
1 parent 5887503 commit 6a9af3c

File tree

18 files changed

+18
-18
lines changed
  • 04_zero_overhead_abstraction
  • 05_safe_globals/src/bsp/raspberrypi
  • 06_drivers_gpio_uart/src/bsp/raspberrypi
  • 07_uart_chainloader/src/bsp/raspberrypi
  • 08_timestamps/src/bsp/raspberrypi
  • 09_hw_debug_JTAG/src/bsp/raspberrypi
  • 10_privilege_level/src/bsp/raspberrypi
  • 11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi
  • 12_exceptions_part1_groundwork/src/bsp/raspberrypi
  • 13_integrated_testing/src/bsp/raspberrypi
  • 14_exceptions_part2_peripheral_IRQs
  • 15_virtual_mem_part2_mmio_remap
  • X1_JTAG_boot/src/bsp/raspberrypi

18 files changed

+18
-18
lines changed

04_zero_overhead_abstraction/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/cpu.rs 04_zero_overhead_abstr
165165
+//--------------------------------------------------------------------------------------------------
166166
+
167167
+/// Used by `arch` code to find the early boot core.
168-
+pub const BOOT_CORE_ID: usize = 0;
168+
+pub const BOOT_CORE_ID: u64 = 0;
169169

170170
diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/link.ld 04_zero_overhead_abstraction/src/bsp/raspberrypi/link.ld
171171
--- 03_hacky_hello_world/src/bsp/raspberrypi/link.ld

04_zero_overhead_abstraction/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

05_safe_globals/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

06_drivers_gpio_uart/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

07_uart_chainloader/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

08_timestamps/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

09_hw_debug_JTAG/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

10_privilege_level/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

11_virtual_mem_part1_identity_mapping/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

12_exceptions_part1_groundwork/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

13_integrated_testing/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

14_exceptions_part2_peripheral_IRQs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 14_exceptions
13571357
+ }
13581358
+
13591359
+ unsafe fn init(&self) -> Result<(), &'static str> {
1360-
+ if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID {
1360+
+ if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
13611361
+ self.gicd.boot_core_init();
13621362
+ }
13631363
+

14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl driver::interface::DeviceDriver for GICv2 {
139139
}
140140

141141
unsafe fn init(&self) -> Result<(), &'static str> {
142-
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID {
142+
if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
143143
self.gicd.boot_core_init();
144144
}
145145

14_exceptions_part2_peripheral_IRQs/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

15_virtual_mem_part2_mmio_remap/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs
10771077
+ self.is_mmio_remapped.store(true, Ordering::Relaxed);
10781078
+ }
10791079
+
1080-
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID {
1080+
if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
10811081
self.gicd.boot_core_init();
10821082
}
10831083

15_virtual_mem_part2_mmio_remap/src/bsp/device_driver/arm/gicv2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl driver::interface::DeviceDriver for GICv2 {
168168
self.is_mmio_remapped.store(true, Ordering::Relaxed);
169169
}
170170

171-
if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID {
171+
if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
172172
self.gicd.boot_core_init();
173173
}
174174

15_virtual_mem_part2_mmio_remap/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

X1_JTAG_boot/src/bsp/raspberrypi/cpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//--------------------------------------------------------------------------------------------------
1010

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

0 commit comments

Comments
 (0)