Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b22b0b1

Browse files
Be more consistent in boot.rs GPR choices
1 parent c21641e commit b22b0b1

File tree

14 files changed

+74
-65
lines changed
  • 02_runtime_init
  • 03_hacky_hello_world/src/_arch/aarch64/cpu
  • 04_safe_globals/src/_arch/aarch64/cpu
  • 05_drivers_gpio_uart/src/_arch/aarch64/cpu
  • 06_uart_chainloader/src/_arch/aarch64/cpu
  • 07_timestamps/src/_arch/aarch64/cpu
  • 08_hw_debug_JTAG/src/_arch/aarch64/cpu
  • 09_privilege_level
  • 16_virtual_mem_part4_higher_half_kernel
  • 17_kernel_symbols/kernel/src/_arch/aarch64/cpu
  • 18_backtrace/kernel/src/_arch/aarch64/cpu
  • 19_kernel_heap/kernel/src/_arch/aarch64/cpu

14 files changed

+74
-65
lines changed

‎02_runtime_init/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ diff -uNr 01_wait_forever/src/_arch/aarch64/cpu/boot.s 02_runtime_init/src/_arch
117117
//------------------------------------------------------------------------------
118118
_start:
119119
+ // Only proceed on the boot core. Park it otherwise.
120-
+ mrs x1, MPIDR_EL1
121-
+ and x1, x1, {CONST_CORE_ID_MASK}
122-
+ ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
123-
+ cmp x1, x2
120+
+ mrs x0, MPIDR_EL1
121+
+ and x0, x0, {CONST_CORE_ID_MASK}
122+
+ ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
123+
+ cmp x0, x1
124124
+ b.ne .L_parking_loop
125125
+
126126
+ // If execution reaches here, it is the boot core.

‎02_runtime_init/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎03_hacky_hello_world/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎04_safe_globals/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎05_drivers_gpio_uart/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎06_uart_chainloader/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
//------------------------------------------------------------------------------
4040
_start:
4141
// Only proceed on the boot core. Park it otherwise.
42-
mrs x1, MPIDR_EL1
43-
and x1, x1, {CONST_CORE_ID_MASK}
44-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
45-
cmp x1, x2
42+
mrs x0, MPIDR_EL1
43+
and x0, x0, {CONST_CORE_ID_MASK}
44+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
45+
cmp x0, x1
4646
b.ne .L_parking_loop
4747

4848
// If execution reaches here, it is the boot core.

‎07_timestamps/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
//------------------------------------------------------------------------------
2929
_start:
3030
// Only proceed on the boot core. Park it otherwise.
31-
mrs x1, MPIDR_EL1
32-
and x1, x1, {CONST_CORE_ID_MASK}
33-
ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34-
cmp x1, x2
31+
mrs x0, MPIDR_EL1
32+
and x0, x0, {CONST_CORE_ID_MASK}
33+
ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
34+
cmp x0, x1
3535
b.ne .L_parking_loop
3636

3737
// If execution reaches here, it is the boot core.

‎09_privilege_level/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.rs 09_privilege_level/src/
291291
diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s 09_privilege_level/src/_arch/aarch64/cpu/boot.s
292292
--- 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s
293293
+++ 09_privilege_level/src/_arch/aarch64/cpu/boot.s
294-
@@ -27,6 +27,11 @@
294+
@@ -27,11 +27,16 @@
295295
// fn _start()
296296
//------------------------------------------------------------------------------
297297
_start:
@@ -301,8 +301,17 @@ diff -uNr 08_hw_debug_JTAG/src/_arch/aarch64/cpu/boot.s 09_privilege_level/src/_
301301
+ b.ne .L_parking_loop
302302
+
303303
// Only proceed on the boot core. Park it otherwise.
304-
mrs x1, MPIDR_EL1
305-
and x1, x1, {CONST_CORE_ID_MASK}
304+
- mrs x0, MPIDR_EL1
305+
- and x0, x0, {CONST_CORE_ID_MASK}
306+
- ldr x1, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
307+
- cmp x0, x1
308+
+ mrs x1, MPIDR_EL1
309+
+ and x1, x1, {CONST_CORE_ID_MASK}
310+
+ ldr x2, BOOT_CORE_ID // provided by bsp/__board_name__/cpu.rs
311+
+ cmp x1, x2
312+
b.ne .L_parking_loop
313+
314+
// If execution reaches here, it is the boot core.
306315
@@ -48,7 +53,7 @@
307316

308317
// Prepare the jump to Rust code.

‎16_virtual_mem_part4_higher_half_kernel/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,20 +432,20 @@ diff -uNr 15_virtual_mem_part3_precomputed_tables/kernel/src/_arch/aarch64/cpu/b
432432
+ // Setting the stack pointer to this value ensures that anything that still runs in EL2,
433433
+ // until the kernel returns to EL1 with the MMU enabled, works as well. After the return to
434434
+ // EL1, the virtual address of the stack retrieved above will be used.
435-
+ ADR_REL x4, __boot_core_stack_end_exclusive
436-
+ mov sp, x4
435+
+ ADR_REL x3, __boot_core_stack_end_exclusive
436+
+ mov sp, x3
437437

438438
// Read the CPU's timer counter frequency and store it in ARCH_TIMER_COUNTER_FREQUENCY.
439439
// Abort if the frequency read back as 0.
440440
- ADR_REL x2, ARCH_TIMER_COUNTER_FREQUENCY // provided by aarch64/time.rs
441441
- mrs x3, CNTFRQ_EL0
442442
- cmp x3, xzr
443-
+ ADR_REL x5, ARCH_TIMER_COUNTER_FREQUENCY // provided by aarch64/time.rs
444-
+ mrs x6, CNTFRQ_EL0
445-
+ cmp x6, xzr
443+
+ ADR_REL x4, ARCH_TIMER_COUNTER_FREQUENCY // provided by aarch64/time.rs
444+
+ mrs x5, CNTFRQ_EL0
445+
+ cmp x5, xzr
446446
b.eq .L_parking_loop
447447
- str w3, [x2]
448-
+ str w6, [x5]
448+
+ str w5, [x4]
449449

450450
- // Jump to Rust code. x0 and x1 hold the function arguments provided to _start_rust().
451451
+ // Jump to Rust code. x0, x1 and x2 hold the function arguments provided to _start_rust().

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /