From d212348931b08b2d37b0a120cc053e863b4910a2 Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Wed, 9 Dec 2020 22:27:30 +0100 Subject: [PATCH] Bump compiler version. We have to remove the `#[naked]` attribute from `_start` for now, since it emits a warning now when used with non-asm statements in the function body. For now, just hope for the compiler's mercy to not emit code using the stack pointer before we've actually set up a stack. --- 04_zero_overhead_abstraction/README.md | 9 +++++---- .../src/_arch/aarch64/cpu.rs | 5 +++-- 05_safe_globals/src/_arch/aarch64/cpu.rs | 5 +++-- 06_drivers_gpio_uart/README.md | 2 +- 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs | 5 +++-- 07_uart_chainloader/README.md | 6 +++--- 07_uart_chainloader/src/_arch/aarch64/cpu.rs | 5 +++-- 08_timestamps/README.md | 8 ++++---- 08_timestamps/src/_arch/aarch64/cpu.rs | 5 +++-- 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs | 5 +++-- 10_privilege_level/README.md | 12 ++++++++++-- 10_privilege_level/src/_arch/aarch64/cpu.rs | 7 +++++-- .../src/_arch/aarch64/cpu.rs | 7 +++++-- .../src/_arch/aarch64/cpu.rs | 7 +++++-- 13_integrated_testing/README.md | 2 +- .../src/_arch/aarch64/cpu.rs | 7 +++++-- .../src/_arch/aarch64/cpu.rs | 7 +++++-- 15_virtual_mem_part2_mmio_remap/README.md | 2 +- .../src/_arch/aarch64/cpu.rs | 7 +++++-- X1_JTAG_boot/jtag_boot_rpi3.img | Bin 8400 -> 8064 bytes X1_JTAG_boot/jtag_boot_rpi4.img | Bin 7088 -> 6800 bytes X1_JTAG_boot/src/_arch/aarch64/cpu.rs | 5 +++-- rust-toolchain | 2 +- 23 files changed, 77 insertions(+), 43 deletions(-) diff --git a/04_zero_overhead_abstraction/README.md b/04_zero_overhead_abstraction/README.md index c7ff8a5f..ca679c52 100644 --- a/04_zero_overhead_abstraction/README.md +++ b/04_zero_overhead_abstraction/README.md @@ -53,7 +53,7 @@ diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu/smp.rs 04_zero_overhead_abs diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu.rs 04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs --- 03_hacky_hello_world/src/_arch/aarch64/cpu.rs +++ 04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs -@@ -4,8 +4,34 @@ +@@ -4,8 +4,35 @@ //! Architectural processor code. @@ -72,8 +72,9 @@ diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu.rs 04_zero_overhead_abstrac +/// +/// # Safety +/// -+/// - Linker script must ensure to place this function at `0x80_000`. -+#[naked] ++/// - Linker script must ensure to place this function where it is expected by the target machine. ++/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is ++/// actually set (`SP.set()`). +#[no_mangle] +pub unsafe fn _start() -> ! { + use crate::runtime_init; @@ -90,7 +91,7 @@ diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu.rs 04_zero_overhead_abstrac //-------------------------------------------------------------------------------------------------- // Public Code -@@ -14,13 +40,7 @@ +@@ -14,13 +41,7 @@ /// Pause execution on the core. #[inline(always)] pub fn wait_forever() -> ! { diff --git a/04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs b/04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs index d49c8aba..64c5397f 100644 --- a/04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs +++ b/04_zero_overhead_abstraction/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/05_safe_globals/src/_arch/aarch64/cpu.rs b/05_safe_globals/src/_arch/aarch64/cpu.rs index d49c8aba..64c5397f 100644 --- a/05_safe_globals/src/_arch/aarch64/cpu.rs +++ b/05_safe_globals/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/06_drivers_gpio_uart/README.md b/06_drivers_gpio_uart/README.md index 1bd8b26a..08568cf5 100644 --- a/06_drivers_gpio_uart/README.md +++ b/06_drivers_gpio_uart/README.md @@ -183,7 +183,7 @@ diff -uNr 05_safe_globals/Makefile 06_drivers_gpio_uart/Makefile diff -uNr 05_safe_globals/src/_arch/aarch64/cpu.rs 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs --- 05_safe_globals/src/_arch/aarch64/cpu.rs +++ 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs -@@ -37,6 +37,17 @@ +@@ -38,6 +38,17 @@ // Public Code //-------------------------------------------------------------------------------------------------- diff --git a/06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs b/06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs index 53f131f8..1d5190ee 100644 --- a/06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs +++ b/06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/07_uart_chainloader/README.md b/07_uart_chainloader/README.md index 378b6eb5..0b48ef90 100644 --- a/07_uart_chainloader/README.md +++ b/07_uart_chainloader/README.md @@ -179,8 +179,8 @@ diff -uNr 06_drivers_gpio_uart/Makefile 07_uart_chainloader/Makefile diff -uNr 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs 07_uart_chainloader/src/_arch/aarch64/cpu.rs --- 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs +++ 07_uart_chainloader/src/_arch/aarch64/cpu.rs -@@ -21,12 +21,12 @@ - #[naked] +@@ -22,12 +22,12 @@ + /// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { - use crate::runtime_init; @@ -194,7 +194,7 @@ diff -uNr 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs 07_uart_chainloader/src/ } else { // If not core0, infinitely wait for events. wait_forever() -@@ -55,3 +55,19 @@ +@@ -56,3 +56,19 @@ asm::wfe() } } diff --git a/07_uart_chainloader/src/_arch/aarch64/cpu.rs b/07_uart_chainloader/src/_arch/aarch64/cpu.rs index 3121e75e..bd974d4d 100644 --- a/07_uart_chainloader/src/_arch/aarch64/cpu.rs +++ b/07_uart_chainloader/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::relocate; diff --git a/08_timestamps/README.md b/08_timestamps/README.md index b1244dce..3148aa3a 100644 --- a/08_timestamps/README.md +++ b/08_timestamps/README.md @@ -115,8 +115,8 @@ diff -uNr 07_uart_chainloader/Makefile 08_timestamps/Makefile diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/aarch64/cpu.rs --- 07_uart_chainloader/src/_arch/aarch64/cpu.rs +++ 08_timestamps/src/_arch/aarch64/cpu.rs -@@ -21,12 +21,12 @@ - #[naked] +@@ -22,12 +22,12 @@ + /// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { - use crate::relocate; @@ -130,7 +130,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/a } else { // If not core0, infinitely wait for events. wait_forever() -@@ -39,15 +39,6 @@ +@@ -40,15 +40,6 @@ pub use asm::nop; @@ -146,7 +146,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/a /// Pause execution on the core. #[inline(always)] pub fn wait_forever() -> ! { -@@ -55,19 +46,3 @@ +@@ -56,19 +47,3 @@ asm::wfe() } } diff --git a/08_timestamps/src/_arch/aarch64/cpu.rs b/08_timestamps/src/_arch/aarch64/cpu.rs index 3f502ee0..eac29d8d 100644 --- a/08_timestamps/src/_arch/aarch64/cpu.rs +++ b/08_timestamps/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs b/09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs index 3f502ee0..eac29d8d 100644 --- a/09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs +++ b/09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/10_privilege_level/README.md b/10_privilege_level/README.md index c1e16287..a9035cec 100644 --- a/10_privilege_level/README.md +++ b/10_privilege_level/README.md @@ -225,8 +225,14 @@ Minipush 1.0 diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs 10_privilege_level/src/_arch/aarch64/cpu.rs --- 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs +++ 10_privilege_level/src/_arch/aarch64/cpu.rs -@@ -21,18 +21,59 @@ - #[naked] +@@ -18,22 +18,65 @@ + /// # Safety + /// + /// - Linker script must ensure to place this function where it is expected by the target machine. +-/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +-/// actually set (`SP.set()`). ++/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up ++/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { - use crate::runtime_init; @@ -252,6 +258,8 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs 10_privilege_level/src/_arch +/// - The HW state of EL1 must be prepared in a sound way. +/// - Exception return from EL2 must must continue execution in EL1 with +/// `runtime_init::runtime_init()`. ++/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up ++/// a stack for EL2. +#[inline(always)] +unsafe fn el2_to_el1_transition() -> ! { + use crate::runtime_init; diff --git a/10_privilege_level/src/_arch/aarch64/cpu.rs b/10_privilege_level/src/_arch/aarch64/cpu.rs index 3e5e5753..e546dd60 100644 --- a/10_privilege_level/src/_arch/aarch64/cpu.rs +++ b/10_privilege_level/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs index 3e5e5753..e546dd60 100644 --- a/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs +++ b/11_virtual_mem_part1_identity_mapping/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs b/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs index 3e5e5753..e546dd60 100644 --- a/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs +++ b/12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/13_integrated_testing/README.md b/13_integrated_testing/README.md index 755576f9..e9509fd7 100644 --- a/13_integrated_testing/README.md +++ b/13_integrated_testing/README.md @@ -935,7 +935,7 @@ diff -uNr 12_exceptions_part1_groundwork/Makefile 13_integrated_testing/Makefile diff -uNr 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs 13_integrated_testing/src/_arch/aarch64/cpu.rs --- 12_exceptions_part1_groundwork/src/_arch/aarch64/cpu.rs +++ 13_integrated_testing/src/_arch/aarch64/cpu.rs -@@ -87,3 +87,20 @@ +@@ -90,3 +90,20 @@ asm::wfe() } } diff --git a/13_integrated_testing/src/_arch/aarch64/cpu.rs b/13_integrated_testing/src/_arch/aarch64/cpu.rs index 7d146d23..3e3ac706 100644 --- a/13_integrated_testing/src/_arch/aarch64/cpu.rs +++ b/13_integrated_testing/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs index 7d146d23..3e3ac706 100644 --- a/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs +++ b/14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/15_virtual_mem_part2_mmio_remap/README.md b/15_virtual_mem_part2_mmio_remap/README.md index 44a9eebd..6dd7d630 100644 --- a/15_virtual_mem_part2_mmio_remap/README.md +++ b/15_virtual_mem_part2_mmio_remap/README.md @@ -311,7 +311,7 @@ Minipush 1.0 diff -uNr 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs --- 14_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu.rs +++ 15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs -@@ -68,7 +68,7 @@ +@@ -71,7 +71,7 @@ ELR_EL2.set(runtime_init::runtime_init as *const () as u64); // Set up SP_EL1 (stack pointer), which will be used by EL1 once we "return" to it. diff --git a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs index c68f1817..d8bcc895 100644 --- a/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs +++ b/15_virtual_mem_part2_mmio_remap/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[no_mangle] pub unsafe fn _start() -> ! { // Expect the boot core to start in EL2. @@ -39,6 +40,8 @@ pub unsafe fn _start() -> ! { /// - The HW state of EL1 must be prepared in a sound way. /// - Exception return from EL2 must must continue execution in EL1 with /// `runtime_init::runtime_init()`. +/// - We have to hope that the compiler omits any stack pointer usage, because we are not setting up +/// a stack for EL2. #[inline(always)] unsafe fn el2_to_el1_transition() -> ! { use crate::runtime_init; diff --git a/X1_JTAG_boot/jtag_boot_rpi3.img b/X1_JTAG_boot/jtag_boot_rpi3.img index 064b41a451738e818b8ee9fe4b4aed8939d8088f..6d23c37d397a23916acbf64b4df727d723bf9647 100755 GIT binary patch delta 2821 zcmcgudu&@*8UOCRwsUWuwd2@HocLbH6e9s~{@LS?Q7D_lCWO-o%}%zS0xqVfX`|zLz4Akn zF#pEq{w<>n2AE`qXtRno zD?tdL6OzW};l%0RnP5f+ZZ%y3gINI*zM93Z-bS!Z!CGfpkP_eEwcJj&IF4H#=3!7W zMYRBkK-z1-CRxEIpA<&>P{5qTurIZ1UHvFKR#WenQ^M#(QMQP^h%ymnc67KZ$iB3| zCANHso5o_a#;~x_tk01SB)K=Z5$-oLL(L}Cz^poERY*nGX^&YLV6ng7!%aZ*GGSZ z8Rh_fk$xLNTJ(^s0+6S8nAvn`IYZzG%lziRZ}kkWpJmHGQ zkHqqU{|!tAh;r zRdt50n|{3=wbWD-$+Z4PPnU3*86XD`+O48X_s~Bm-HDsSFJ8V0BWe1M`Ci@=pt7Z# zCmuRvS>jKzuJNK)vSH%qJv3PUn%xVz500AkwIPfC{(~j@-v>nfLF%dSMx7E|id1U3 zM-OYd%+;*EI6gW1ei>YvEY)an9Qz@eJ@-AmkAq7=32w|WPTIt2)r?04SG(%LvH0$Z=#|K^ z$ePG$IhB>E7xe78llm(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Lufg-Z`e#sYLH)kn-O+IL)nHE~+7}#*_5^qBj|KNfdK;pH1q9ix z;puSjfK!w4<_l|kG#ZKG$>Y-vmAc_xN3)Y%sce2wc4_g*j>4+eW#n{W-J7q*#abQL z+LInF?2zvMp)QZ;a?GmPwSRz>{g_=leWLGpA+I^t-M`|lCxw;l{T4mY&CWa52{Ue% xbvC#EpZ7U^M(RA(rS1y;zSQ;Qcvjc9ZWeVt#wJ~|;PkLL*G}PO58LA2`42fO)4l)z diff --git a/X1_JTAG_boot/src/_arch/aarch64/cpu.rs b/X1_JTAG_boot/src/_arch/aarch64/cpu.rs index 3f502ee0..eac29d8d 100644 --- a/X1_JTAG_boot/src/_arch/aarch64/cpu.rs +++ b/X1_JTAG_boot/src/_arch/aarch64/cpu.rs @@ -17,8 +17,9 @@ use cortex_a::{asm, regs::*}; /// /// # Safety /// -/// - Linker script must ensure to place this function at `0x80_000`. -#[naked] +/// - Linker script must ensure to place this function where it is expected by the target machine. +/// - We have to hope that the compiler omits any stack pointer usage before the stack pointer is +/// actually set (`SP.set()`). #[no_mangle] pub unsafe fn _start() -> ! { use crate::runtime_init; diff --git a/rust-toolchain b/rust-toolchain index 9c4710ce..23eb5681 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2020-12-08" +channel = "nightly-2020-12-09" components = ["llvm-tools-preview"] targets = ["aarch64-unknown-none-softfloat"]