Remove needless extern C

pull/84/head
Andre Richter 4 years ago
parent 27a1d10cc3
commit 208f547f29
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -223,7 +223,7 @@ diff -uNr 01_wait_forever/src/runtime_init.rs 02_runtime_init/src/runtime_init.r
+///
+/// - Only a single core must be active and running this function.
+#[no_mangle]
+pub unsafe extern "C" fn runtime_init() -> ! {
+pub unsafe fn runtime_init() -> ! {
+ zero_bss();
+
+ crate::kernel_init()

@ -31,7 +31,7 @@ unsafe fn zero_bss() {
///
/// - Only a single core must be active and running this function.
#[no_mangle]
pub unsafe extern "C" fn runtime_init() -> ! {
pub unsafe fn runtime_init() -> ! {
zero_bss();
crate::kernel_init()

@ -31,7 +31,7 @@ unsafe fn zero_bss() {
///
/// - Only a single core must be active and running this function.
#[no_mangle]
pub unsafe extern "C" fn runtime_init() -> ! {
pub unsafe fn runtime_init() -> ! {
zero_bss();
crate::kernel_init()

@ -79,7 +79,7 @@ diff -uNr 03_hacky_hello_world/src/_arch/aarch64/cpu.rs 04_zero_overhead_abstrac
+/// - Linker script must ensure to place this function at `0x80_000`.
+#[naked]
+#[no_mangle]
+pub unsafe extern "C" fn _start() -> ! {
+pub unsafe fn _start() -> ! {
+ use crate::runtime_init;
+
+ // Expect the boot core to start in EL2.
@ -248,15 +248,12 @@ diff -uNr 03_hacky_hello_world/src/main.rs 04_zero_overhead_abstraction/src/main
diff -uNr 03_hacky_hello_world/src/runtime_init.rs 04_zero_overhead_abstraction/src/runtime_init.rs
--- 03_hacky_hello_world/src/runtime_init.rs
+++ 04_zero_overhead_abstraction/src/runtime_init.rs
@@ -30,8 +30,7 @@
@@ -30,7 +30,6 @@
/// # Safety
///
/// - Only a single core must be active and running this function.
-#[no_mangle]
-pub unsafe extern "C" fn runtime_init() -> ! {
+pub unsafe fn runtime_init() -> ! {
pub unsafe fn runtime_init() -> ! {
zero_bss();
crate::kernel_init()
```

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::runtime_init;
// Expect the boot core to start in EL2.

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::runtime_init;
// Expect the boot core to start in EL2.

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::runtime_init;
// Expect the boot core to start in EL2.

@ -181,7 +181,7 @@ diff -uNr 06_drivers_gpio_uart/src/_arch/aarch64/cpu.rs 07_uart_chainloader/src/
@@ -21,12 +21,12 @@
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
- use crate::runtime_init;
+ use crate::relocate;

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::relocate;
// Expect the boot core to start in EL2.

@ -106,7 +106,7 @@ diff -uNr 07_uart_chainloader/src/_arch/aarch64/cpu.rs 08_timestamps/src/_arch/a
@@ -21,12 +21,12 @@
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
- use crate::relocate;
+ use crate::runtime_init;

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::runtime_init;
// Expect the boot core to start in EL2.

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
use crate::runtime_init;
// Expect the boot core to start in EL2.

@ -228,7 +228,7 @@ diff -uNr 09_hw_debug_JTAG/src/_arch/aarch64/cpu.rs 10_privilege_level/src/_arch
@@ -21,18 +21,59 @@
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
- use crate::runtime_init;
-
// Expect the boot core to start in EL2.

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

@ -20,7 +20,7 @@ use cortex_a::{asm, regs::*};
/// - Linker script must ensure to place this function at `0x80_000`.
#[naked]
#[no_mangle]
pub unsafe extern "C" fn _start() -> ! {
pub unsafe fn _start() -> ! {
// Expect the boot core to start in EL2.
if (bsp::cpu::BOOT_CORE_ID == cpu::smp::core_id())
&& (CurrentEL.get() == CurrentEL::EL::EL2.value)

Loading…
Cancel
Save