pub enum Interface {
Show 42 variants
Error {
target_info: TargetInfo,
error_code: FfaError,
error_arg: u32,
},
Success {
target_info: TargetInfo,
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: MsgSend2Flags,
},
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: MemReclaimFlags,
},
MemPermGet {
addr: MemAddr,
page_cnt: u32,
},
MemPermSet {
addr: MemAddr,
page_cnt: u32,
mem_perm: MemPermissionsGetSet,
},
ConsoleLog {
chars: 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
Fields
page_cnt: u32The actual number of pages queried by the call. It is calculated by adding one to the corresponding register’s value, i.e. zero in the register means one page. For FF-A v1.2 and lower the register value MBZ, so the page count is always 1. For higher versions the page count can be any nonzero value.
MemPermSet
ConsoleLog
Fields
chars: ConsoleLogCharsNotificationBitmapCreate
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.