pub enum Interface {
Show 42 variants
Error {
target_info: TargetInfo,
error_code: FfaError,
error_arg: u32,
},
Success {
target_info: u32,
args: SuccessArgs,
},
Interrupt {
target_info: TargetInfo,
interrupt_id: u32,
},
Version {
input_version: Version,
},
VersionOut {
output_version: Version,
},
Features {
feat_id: Feature,
input_properties: u32,
},
RxAcquire {
vm_id: u16,
},
RxRelease {
vm_id: u16,
},
RxTxMap {
addr: RxTxAddr,
page_cnt: u32,
},
RxTxUnmap {
id: u16,
},
PartitionInfoGet {
uuid: Uuid,
flags: PartitionInfoGetFlags,
},
PartitionInfoGetRegs {
uuid: Uuid,
start_index: u16,
info_tag: u16,
},
IdGet,
SpmIdGet,
MsgWait {
flags: Option<MsgWaitFlags>,
},
Yield,
Run {
target_info: TargetInfo,
},
NormalWorldResume,
SecondaryEpRegister {
entrypoint: SecondaryEpRegisterAddr,
},
MsgSend2 {
sender_vm_id: u16,
flags: u32,
},
MsgSendDirectReq {
src_id: u16,
dst_id: u16,
args: DirectMsgArgs,
},
MsgSendDirectResp {
src_id: u16,
dst_id: u16,
args: DirectMsgArgs,
},
MsgSendDirectReq2 {
src_id: u16,
dst_id: u16,
uuid: Uuid,
args: DirectMsg2Args,
},
MsgSendDirectResp2 {
src_id: u16,
dst_id: u16,
args: DirectMsg2Args,
},
MemDonate {
total_len: u32,
frag_len: u32,
buf: Option<MemOpBuf>,
},
MemLend {
total_len: u32,
frag_len: u32,
buf: Option<MemOpBuf>,
},
MemShare {
total_len: u32,
frag_len: u32,
buf: Option<MemOpBuf>,
},
MemRetrieveReq {
total_len: u32,
frag_len: u32,
buf: Option<MemOpBuf>,
},
MemRetrieveResp {
total_len: u32,
frag_len: u32,
},
MemRelinquish,
MemReclaim {
handle: Handle,
flags: u32,
},
MemPermGet {
addr: MemAddr,
page_cnt: Option<u32>,
},
MemPermSet {
addr: MemAddr,
page_cnt: u32,
mem_perm: u32,
},
ConsoleLog {
char_cnt: u8,
char_lists: ConsoleLogChars,
},
NotificationBitmapCreate {
vm_id: u16,
vcpu_cnt: u32,
},
NotificationBitmapDestroy {
vm_id: u16,
},
NotificationBind {
sender_id: u16,
receiver_id: u16,
flags: NotificationBindFlags,
bitmap: u64,
},
NotificationUnBind {
sender_id: u16,
receiver_id: u16,
bitmap: u64,
},
NotificationSet {
sender_id: u16,
receiver_id: u16,
flags: NotificationSetFlags,
bitmap: u64,
},
NotificationGet {
vcpu_id: u16,
endpoint_id: u16,
flags: NotificationGetFlags,
},
NotificationInfoGet {
is_32bit: bool,
},
El3IntrHandle,
}Expand description
FF-A “message types”, the terminology used by the spec is “interfaces”.
The interfaces are used by FF-A components for communication at an FF-A instance. The spec also describes the valid FF-A instances and conduits for each interface.
Variants§
Error
Success
Interrupt
Version
VersionOut
Features
RxAcquire
RxRelease
RxTxMap
RxTxUnmap
PartitionInfoGet
PartitionInfoGetRegs
IdGet
SpmIdGet
MsgWait
Fields
§
flags: Option<MsgWaitFlags>Yield
Run
Fields
§
target_info: TargetInfoNormalWorldResume
SecondaryEpRegister
Fields
§
entrypoint: SecondaryEpRegisterAddrMsgSend2
MsgSendDirectReq
MsgSendDirectResp
MsgSendDirectReq2
MsgSendDirectResp2
MemDonate
MemLend
MemRetrieveReq
MemRetrieveResp
MemRelinquish
MemReclaim
MemPermGet
MemPermSet
ConsoleLog
NotificationBitmapCreate
NotificationBitmapDestroy
NotificationBind
NotificationUnBind
NotificationSet
NotificationGet
NotificationInfoGet
El3IntrHandle
Implementations§
Source§impl Interface
impl Interface
Sourcepub fn function_id(&self) -> Option<FuncId>
pub fn function_id(&self) -> Option<FuncId>
Returns the function ID for the call, if it has one.
Sourcepub fn is_32bit(&self) -> bool
pub fn is_32bit(&self) -> bool
Returns true if this is a 32-bit call, or false if it is a 64-bit call.
Sourcepub fn minimum_ffa_version(&self) -> Version
pub fn minimum_ffa_version(&self) -> Version
Returns the FF-A version that has introduced the function ID.
Sourcepub fn from_regs(version: Version, regs: &[u64]) -> Result<Self, Error>
pub fn from_regs(version: Version, regs: &[u64]) -> Result<Self, Error>
Parse interface from register contents. The caller must ensure that the regs argument has
the correct length: 8 registers for FF-A v1.1 and lower, 18 registers for v1.2 and higher.
Sourcepub fn to_regs(&self, version: Version, regs: &mut [u64])
pub fn to_regs(&self, version: Version, regs: &mut [u64])
Create register contents for an interface.
Sourcepub fn success32_noargs() -> Self
pub fn success32_noargs() -> Self
Helper function to create an FFA_SUCCESS interface without any arguments.
Trait Implementations§
impl Copy for Interface
impl Eq for Interface
impl StructuralPartialEq for Interface
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more