File tree 4 files changed +9
-11
lines changed
4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change
1
+ use core:: arch:: naked_asm;
1
2
use core:: ptr;
2
3
use core:: sync:: atomic:: { AtomicPtr , Ordering } ;
3
4
@@ -57,7 +58,7 @@ macro_rules! gen_isr_stub {
57
58
#[ no_mangle]
58
59
#[ repr( align( 0x800 ) ) ]
59
60
unsafe extern "C" fn el1_vector_table ( ) {
60
- core :: arch :: asm !(
61
+ naked_asm ! (
61
62
gen_isr_stub!( ) ,
62
63
gen_isr_stub!( ) ,
63
64
gen_isr_stub!( ) ,
@@ -70,7 +71,6 @@ unsafe extern "C" fn el1_vector_table() {
70
71
gen_isr_stub!( ) ,
71
72
gen_isr_stub!( ) ,
72
73
gen_isr_stub!( ) ,
73
- options( noreturn)
74
74
) ;
75
75
}
76
76
Original file line number Diff line number Diff line change 5
5
use cortex_a:: registers:: * ;
6
6
use tock_registers:: interfaces:: Readable ;
7
7
8
- use core:: arch:: asm ;
8
+ use core:: arch:: naked_asm ;
9
9
10
10
pub mod cpu;
11
11
pub mod irq;
@@ -32,14 +32,13 @@ pub fn panic_info() -> PanicInfo {
32
32
#[ naked]
33
33
#[ no_mangle]
34
34
unsafe extern "C" fn _start ( ) -> ! {
35
- asm ! (
35
+ naked_asm ! (
36
36
"
37
37
adrp x9, STACK_START
38
38
msr spsel, xzr
39
39
mov sp, x9
40
40
b k_main
41
- " ,
42
- options( noreturn)
41
+ "
43
42
) ;
44
43
}
45
44
Original file line number Diff line number Diff line change 5
5
use super :: plic:: Plic ;
6
6
use super :: registers;
7
7
8
- use core:: arch:: asm ;
8
+ use core:: arch:: naked_asm ;
9
9
use core:: ptr;
10
10
use core:: sync:: atomic:: { AtomicPtr , Ordering } ;
11
11
@@ -228,7 +228,7 @@ extern "C" fn c_trap_dispatch(cause: u64) -> u64 {
228
228
#[ no_mangle]
229
229
#[ repr( align( 4 ) ) ]
230
230
unsafe extern "C" fn asm_trap_handler ( ) {
231
- asm ! (
231
+ naked_asm ! (
232
232
"
233
233
addi sp, sp, -0x100
234
234
@@ -315,7 +315,6 @@ unsafe extern "C" fn asm_trap_handler() {
315
315
addi sp, sp, 0x100
316
316
317
317
sret" ,
318
- options( noreturn)
319
318
) ;
320
319
// Obviously this isn't done, we need to jump back to the previous context before the
321
320
// interrupt using mpp/spp and mepc/sepc.
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ pub mod mm;
7
7
mod plic;
8
8
mod registers;
9
9
10
- use core:: arch:: asm ;
10
+ use core:: arch:: naked_asm ;
11
11
12
12
pub fn panic_info ( ) { }
13
13
14
14
#[ naked]
15
15
#[ no_mangle]
16
16
unsafe extern "C" fn _start ( ) -> ! {
17
- asm ! ( "la sp, STACK_START" , "call k_main" , options ( noreturn ) ) ;
17
+ naked_asm ! ( "la sp, STACK_START" , "call k_main" ) ;
18
18
}
19
19
20
20
pub struct Riscv64CoreInfo ;
You can’t perform that action at this time.
0 commit comments