Interface

Enum Interface 

Source
pub enum Interface {
Show 46 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: VersionOut, }, 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, }, MemOpPause { handle: Handle, }, MemOpResume { handle: Handle, }, MemFragRx { handle: Handle, frag_offset: u32, endpoint_id: u16, }, MemFragTx { handle: Handle, frag_len: u32, endpoint_id: u16, }, 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

Fields

§target_info: TargetInfo
§error_code: FfaError
§error_arg: u32
§

Success

Fields

§target_info: TargetInfo
§

Interrupt

Fields

§target_info: TargetInfo
§interrupt_id: u32
§

Version

Fields

§input_version: Version
§

VersionOut

Fields

§output_version: VersionOut
§

Features

Fields

§feat_id: Feature
§input_properties: u32
§

RxAcquire

Fields

§vm_id: u16
§

RxRelease

Fields

§vm_id: u16
§

RxTxMap

Fields

§page_cnt: u32
§

RxTxUnmap

Fields

§id: u16
§

PartitionInfoGet

§

PartitionInfoGetRegs

Fields

§uuid: Uuid
§start_index: u16
§info_tag: u16
§

IdGet

§

SpmIdGet

§

MsgWait

Fields

§

Yield

§

Run

Fields

§target_info: TargetInfo
§

NormalWorldResume

§

SecondaryEpRegister

Fields

§

MsgSend2

Fields

§sender_vm_id: u16
§

MsgSendDirectReq

Fields

§src_id: u16
§dst_id: u16
§

MsgSendDirectResp

Fields

§src_id: u16
§dst_id: u16
§

MsgSendDirectReq2

Fields

§src_id: u16
§dst_id: u16
§uuid: Uuid
§

MsgSendDirectResp2

Fields

§src_id: u16
§dst_id: u16
§

MemDonate

Fields

§total_len: u32
§frag_len: u32
§

MemLend

Fields

§total_len: u32
§frag_len: u32
§

MemShare

Fields

§total_len: u32
§frag_len: u32
§

MemRetrieveReq

Fields

§total_len: u32
§frag_len: u32
§

MemRetrieveResp

Fields

§total_len: u32
§frag_len: u32
§

MemRelinquish

§

MemReclaim

Fields

§handle: Handle
§

MemPermGet

Fields

§addr: MemAddr
§page_cnt: u32

The 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

Fields

§addr: MemAddr
§page_cnt: u32
§

MemOpPause

Fields

§handle: Handle
§

MemOpResume

Fields

§handle: Handle
§

MemFragRx

Fields

§handle: Handle
§frag_offset: u32
§endpoint_id: u16
§

MemFragTx

Fields

§handle: Handle
§frag_len: u32
§endpoint_id: u16
§

ConsoleLog

Fields

§

NotificationBitmapCreate

Fields

§vm_id: u16
§vcpu_cnt: u32
§

NotificationBitmapDestroy

Fields

§vm_id: u16
§

NotificationBind

Fields

§sender_id: u16
§receiver_id: u16
§bitmap: u64
§

NotificationUnbind

Fields

§sender_id: u16
§receiver_id: u16
§bitmap: u64
§

NotificationSet

Fields

§sender_id: u16
§receiver_id: u16
§bitmap: u64
§

NotificationGet

Fields

§vcpu_id: u16
§endpoint_id: u16
§

NotificationInfoGet

Fields

§is_32bit: bool
§

El3IntrHandle

Implementations§

Source§

impl Interface

Source

pub fn function_id(&self) -> Option<FuncId>

Returns the function ID for the call, if it has one.

Source

pub fn is_32bit(&self) -> bool

Returns true if this is a 32-bit call, or false if it is a 64-bit call.

Source

pub fn minimum_ffa_version(&self) -> Version

Returns the FF-A version that has introduced the function ID.

Source

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.

Source

pub fn to_regs(&self, version: Version, regs: &mut [u64])

Create register contents for an interface.

Source

pub fn success32_noargs() -> Self

Helper function to create an FFA_SUCCESS interface without any arguments.

Source

pub fn error(error_code: FfaError) -> Self

Helper function to create an FFA_ERROR interface with an error code.

Trait Implementations§

Source§

impl Clone for Interface

Source§

fn clone(&self) -> Interface

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Interface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Interface

Source§

fn eq(&self, other: &Interface) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Interface

Source§

impl Eq for Interface

Source§

impl StructuralPartialEq for Interface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.