1- # ` abi_c_cmse_nonsecure_call `
1+ # ` abi_cmse_nonsecure_call `
22
33The tracking issue for this feature is: [ #81391 ]
44
@@ -14,10 +14,9 @@ LLVM, the Rust compiler and the linker are providing
1414[ support] ( https://developer.arm.com/documentation/ecm0359818/latest/ ) for the
1515TrustZone-M feature.
1616
17- One of the things provided, with this unstable feature, is the
18- ` C-cmse-nonsecure-call ` function ABI. This ABI is used on function pointers to
19- non-secure code to mark a non-secure function call (see [ section
20- 5.5] ( https://developer.arm.com/documentation/ecm0359818/latest/ ) for details).
17+ One of the things provided with this unstable feature is the "cmse-nonsecure-call" function ABI.
18+ This ABI is used on function pointers to non-secure code to mark a non-secure function call
19+ (see [ section 5.5] ( https://developer.arm.com/documentation/ecm0359818/latest/ ) for details).
2120
2221With this ABI, the compiler will do the following to perform the call:
2322* save registers needed after the call to Secure memory
@@ -28,19 +27,16 @@ With this ABI, the compiler will do the following to perform the call:
2827To avoid using the non-secure stack, the compiler will constrain the number and
2928type of parameters/return value.
3029
31- The ` extern "C-cmse-nonsecure-call" ` ABI is otherwise equivalent to the
32- ` extern "C" ` ABI.
33-
3430<!-- NOTE(ignore) this example is specific to thumbv8m targets -->
3531
3632``` rust,ignore
3733#![no_std]
38- #![feature(abi_c_cmse_nonsecure_call )]
34+ #![feature(abi_cmse_nonsecure_call )]
3935
4036#[no_mangle]
4137pub fn call_nonsecure_function(addr: usize) -> u32 {
4238 let non_secure_function =
43- unsafe { core::mem::transmute::<usize, extern "C- cmse-nonsecure-call" fn() -> u32>(addr) };
39+ unsafe { core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn() -> u32>(addr) };
4440 non_secure_function()
4541}
4642```
0 commit comments