Struct kernel::process::SequentialProcessLoaderMachine

source ·
pub struct SequentialProcessLoaderMachine<'a, C: Chip + 'static, D: ProcessStandardDebug + 'static> { /* private fields */ }
Expand description

A machine for loading processes stored sequentially in a region of flash.

Load processes (stored as TBF objects in flash) into runnable process structures stored in the procs array. This machine scans the footers in the TBF for cryptographic credentials for binary integrity, passing them to the checker to decide whether the process has sufficient credentials to run.

Implementations§

source§

impl<'a, C: Chip, D: ProcessStandardDebug> SequentialProcessLoaderMachine<'a, C, D>

source

pub fn new( checker: &'static ProcessCheckerMachine, procs: &'static mut [Option<&'static dyn Process>], proc_binaries: &'static mut [Option<ProcessBinary>], kernel: &'static Kernel, chip: &'static C, flash: &'static [u8], app_memory: &'static mut [u8], fault_policy: &'static dyn ProcessFaultPolicy, storage_policy: &'static dyn ProcessStandardStoragePermissionsPolicy<C, D>, policy: &'static dyn AppIdPolicy, _capability_management: &dyn ProcessManagementCapability, ) -> Self

This function is made pub so that board files can use it, but loading processes from slices of flash an memory is fundamentally unsafe. Therefore, we require the ProcessManagementCapability to call this function.

Trait Implementations§

source§

impl<'a, C: Chip, D: ProcessStandardDebug> DeferredCallClient for SequentialProcessLoaderMachine<'a, C, D>

source§

fn handle_deferred_call(&self)

Software interrupt function that is called when the deferred call is triggered.
source§

fn register(&'static self)

source§

impl<'a, C: Chip, D: ProcessStandardDebug> ProcessCheckerMachineClient for SequentialProcessLoaderMachine<'a, C, D>

source§

fn done( &self, process_binary: ProcessBinary, result: Result<Option<AcceptedCredential>, ProcessCheckError>, )

Check is finished, and the check result is in result.0 Read more
source§

impl<'a, C: Chip, D: ProcessStandardDebug> ProcessLoadingAsync<'a> for SequentialProcessLoaderMachine<'a, C, D>

source§

fn set_client(&self, client: &'a dyn ProcessLoadingAsyncClient)

Set the client to receive callbacks about process loading and when process loading has finished.
source§

fn set_policy(&self, policy: &'a dyn AppIdPolicy)

Set the credential checking policy for the loader.
source§

fn start(&self)

Start the process loading operation.

Auto Trait Implementations§

§

impl<'a, C, D> !Freeze for SequentialProcessLoaderMachine<'a, C, D>

§

impl<'a, C, D> !RefUnwindSafe for SequentialProcessLoaderMachine<'a, C, D>

§

impl<'a, C, D> !Send for SequentialProcessLoaderMachine<'a, C, D>

§

impl<'a, C, D> !Sync for SequentialProcessLoaderMachine<'a, C, D>

§

impl<'a, C, D> Unpin for SequentialProcessLoaderMachine<'a, C, D>

§

impl<'a, C, D> !UnwindSafe for SequentialProcessLoaderMachine<'a, C, D>

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> 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>,

§

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>,

§

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.