From b42869e655ad75342651c0554be7e89ff09c3e4f Mon Sep 17 00:00:00 2001 From: pca006132 Date: Fri, 15 Jan 2021 16:47:14 +0800 Subject: [PATCH] libsupport_zynq: removed naked annotation --- libsupport_zynq/src/abort.rs | 7 ------- libsupport_zynq/src/boot.rs | 7 ++----- libsupport_zynq/src/lib.rs | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/libsupport_zynq/src/abort.rs b/libsupport_zynq/src/abort.rs index 7429bd2..57d63d5 100644 --- a/libsupport_zynq/src/abort.rs +++ b/libsupport_zynq/src/abort.rs @@ -4,7 +4,6 @@ use libboard_zynq::{println, stdio}; #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn UndefinedInstruction() { stdio::drop_uart(); println!("UndefinedInstruction"); @@ -13,7 +12,6 @@ pub unsafe extern "C" fn UndefinedInstruction() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn SoftwareInterrupt() { stdio::drop_uart(); println!("SoftwareInterrupt"); @@ -22,7 +20,6 @@ pub unsafe extern "C" fn SoftwareInterrupt() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn PrefetchAbort() { stdio::drop_uart(); println!("PrefetchAbort"); @@ -31,7 +28,6 @@ pub unsafe extern "C" fn PrefetchAbort() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn DataAbort() { stdio::drop_uart(); @@ -43,7 +39,6 @@ pub unsafe extern "C" fn DataAbort() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn ReservedException() { stdio::drop_uart(); println!("ReservedException"); @@ -52,7 +47,6 @@ pub unsafe extern "C" fn ReservedException() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] #[cfg(feature = "dummy_irq_handler")] pub unsafe extern "C" fn IRQ() { stdio::drop_uart(); @@ -62,7 +56,6 @@ pub unsafe extern "C" fn IRQ() { #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn FIQ() { stdio::drop_uart(); println!("FIQ"); diff --git a/libsupport_zynq/src/boot.rs b/libsupport_zynq/src/boot.rs index 8f16597..57371aa 100644 --- a/libsupport_zynq/src/boot.rs +++ b/libsupport_zynq/src/boot.rs @@ -20,7 +20,6 @@ static mut CORE1_ENABLED: VolatileCell = VolatileCell::new(false); #[link_section = ".text.boot"] #[no_mangle] -#[naked] pub unsafe extern "C" fn Reset() -> ! { match MPIDR.read().cpu_id() { 0 => { @@ -38,9 +37,8 @@ pub unsafe extern "C" fn Reset() -> ! { } } -#[naked] #[inline(never)] -unsafe fn boot_core0() -> ! { +unsafe extern "C" fn boot_core0() -> ! { l1_cache_init(); enable_fpu(); @@ -65,9 +63,8 @@ unsafe fn boot_core0() -> ! { }); } -#[naked] #[inline(never)] -unsafe fn boot_core1() -> ! { +unsafe extern "C" fn boot_core1() -> ! { l1_cache_init(); let mpcore = mpcore::RegisterBlock::mpcore(); diff --git a/libsupport_zynq/src/lib.rs b/libsupport_zynq/src/lib.rs index 04257c2..6b360d6 100644 --- a/libsupport_zynq/src/lib.rs +++ b/libsupport_zynq/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] -#![feature(naked_functions)] #![feature(alloc_error_handler)] #![feature(panic_info_message)]