Skip to content

Commit 0ac788f

Browse files
unstable-book: Update cmse feature descriptions
1 parent ef1a8cf commit 0ac788f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/doc/unstable-book/src/language-features/abi-c-cmse-nonsecure-call.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ LLVM, the Rust compiler and the linker are providing
1414
[support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
1515
TrustZone-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
17+
One of the things provided with this unstable feature is the
18+
"cmse-nonsecure-call" function ABI. This ABI is used on function pointers to
1919
non-secure code to mark a non-secure function call (see [section
2020
5.5](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
2121

@@ -28,9 +28,6 @@ With this ABI, the compiler will do the following to perform the call:
2828
To avoid using the non-secure stack, the compiler will constrain the number and
2929
type of parameters/return value.
3030

31-
The `extern "C-cmse-nonsecure-call"` ABI is otherwise equivalent to the
32-
`extern "C"` ABI.
33-
3431
<!-- NOTE(ignore) this example is specific to thumbv8m targets -->
3532

3633
``` rust,ignore
@@ -40,7 +37,7 @@ The `extern "C-cmse-nonsecure-call"` ABI is otherwise equivalent to the
4037
#[no_mangle]
4138
pub fn call_nonsecure_function(addr: usize) -> u32 {
4239
let non_secure_function =
43-
unsafe { core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn() -> u32>(addr) };
40+
unsafe { core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn() -> u32>(addr) };
4441
non_secure_function()
4542
}
4643
```

src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ LLVM, the Rust compiler and the linker are providing
1414
[support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
1515
TrustZone-M feature.
1616

17-
One of the things provided, with this unstable feature, is the
18-
`C-cmse-nonsecure-entry` ABI. This ABI marks a Secure function as an
17+
One of the things provided with this unstable feature is the
18+
"cmse-nonsecure-entry" ABI. This ABI marks a Secure function as an
1919
entry function (see [section
2020
5.4](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
2121
With this ABI, the compiler will do the following:
@@ -30,7 +30,6 @@ Because the stack can not be used to pass parameters, there will be compilation
3030
errors if:
3131
* the total size of all parameters is too big (for example more than four 32
3232
bits integers)
33-
* the entry function is not using a C ABI
3433

3534
The special symbol `__acle_se_` will be used by the linker to generate a secure
3635
gateway veneer.
@@ -42,7 +41,7 @@ gateway veneer.
4241
#![feature(cmse_nonsecure_entry)]
4342
4443
#[no_mangle]
45-
pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
44+
pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
4645
input + 6
4746
}
4847
```

0 commit comments

Comments
 (0)