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 Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/cpu.rs 04_zero_overhead_abstr
165
165
+ //--------------------------------------------------------------------------------------------------
166
166
+
167
167
+ /// 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;
169
169
170
170
diff -uNr 03_hacky_hello_world/src/bsp/raspberrypi/link.ld 04_zero_overhead_abstraction/src/bsp/raspberrypi/link.ld
171
171
--- 03_hacky_hello_world/src/bsp/raspberrypi/link.ld
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change @@ -1357,7 +1357,7 @@ diff -uNr 13_integrated_testing/src/bsp/device_driver/arm/gicv2.rs 14_exceptions
1357
1357
+ }
1358
1358
+
1359
1359
+ 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() {
1361
1361
+ self.gicd.boot_core_init();
1362
1362
+ }
1363
1363
+
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl driver::interface::DeviceDriver for GICv2 {
139
139
}
140
140
141
141
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 ( ) {
143
143
self . gicd . boot_core_init ( ) ;
144
144
}
145
145
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change @@ -1077,7 +1077,7 @@ diff -uNr 14_exceptions_part2_peripheral_IRQs/src/bsp/device_driver/arm/gicv2.rs
1077
1077
+ self.is_mmio_remapped.store(true, Ordering::Relaxed);
1078
1078
+ }
1079
1079
+
1080
- if cpu::smp::core_id::<usize>() == bsp::cpu::BOOT_CORE_ID {
1080
+ if bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id() {
1081
1081
self.gicd.boot_core_init();
1082
1082
}
1083
1083
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ impl driver::interface::DeviceDriver for GICv2 {
168
168
self . is_mmio_remapped . store ( true , Ordering :: Relaxed ) ;
169
169
}
170
170
171
- if cpu :: smp :: core_id :: < usize > ( ) == bsp :: cpu :: BOOT_CORE_ID {
171
+ if bsp :: cpu :: BOOT_CORE_ID == cpu :: smp :: core_id ( ) {
172
172
self . gicd . boot_core_init ( ) ;
173
173
}
174
174
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
Original file line number Diff line number Diff line change 9
9
//--------------------------------------------------------------------------------------------------
10
10
11
11
/// 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 ;
You can’t perform that action at this time.
0 commit comments