-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for the extern "cmse-nonsecure-entry" ABI #75835
Copy link
Copy link
Open
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)A-codegenArea: Code generationArea: Code generationB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-cmse_nonsecure_entry`#![feature(cmse_nonsecure_entry)]``#![feature(cmse_nonsecure_entry)]`O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateS-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)A-codegenArea: Code generationArea: Code generationB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-cmse_nonsecure_entry`#![feature(cmse_nonsecure_entry)]``#![feature(cmse_nonsecure_entry)]`O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateS-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Tracking
This is a tracking issue for the PR #75810.
It was deemed in that PR that a RFC was not necessary because the changes were small.Feature Gate:
#![feature(cmse_nonsecure_entry)]Description
The
extern "cmse-nonsecure-entry"ABI is a target-dependent ABI available forthumbv8mtargets. It directly maps to the attribute of the same name in LLVM.It is to be used under the TrustZone-M technology for Armv8-M architecture.
It will modify code generation of Secure entry functions:
__acle_se_prefix and thestandard function name
information
BXNSinstruction to returnSee section 5.4 of ARMv8-M Security Extensions: Requirements on Development Tools - Engineering Specification for more details.
Example
Having a Secure entry function named
entry_function:With those commands:
it will emit the following assembly:
You can see from
1cto24the clearing of the registers and theBXNSinstruction used on28.Steps
Implementation history
#[cmse_nonsecure_entry]is applied to a function definition #86622extern "C-cmse-nonsecure-entry" fn#127766C-cmse-nonsecure-entryfunctions #130747extern "C-cmse-nonsecure-*"always matchesextern "C"#142146cmse-nonsecure-entryABI being both async and c-variadic #146551impl Traitincmse-nonsecure-entryreturn types #147243asyncandconstfunctions #148536