pub type ProcessLoaderSequentialComponentType<C, D> = SequentialProcessLoaderMachine<'static, C, D>;
Aliased Type§
struct ProcessLoaderSequentialComponentType<C, D> { /* private fields */ }
Implementations
Source§impl<'a, C, D> SequentialProcessLoaderMachine<'a, C, D>where
C: Chip,
D: ProcessStandardDebug,
impl<'a, C, D> SequentialProcessLoaderMachine<'a, C, D>where
C: Chip,
D: ProcessStandardDebug,
Sourcepub 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,
) -> SequentialProcessLoaderMachine<'a, C, D>
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, ) -> SequentialProcessLoaderMachine<'a, C, D>
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.
Sourcepub fn set_runtime_client(&self, client: &'a dyn ProcessLoadingAsyncClient)
pub fn set_runtime_client(&self, client: &'a dyn ProcessLoadingAsyncClient)
Set the runtime client to receive callbacks about process loading and when process loading has finished.
Sourcepub fn check_if_within_flash_bounds(&self, offset: usize, length: usize) -> bool
pub fn check_if_within_flash_bounds(&self, offset: usize, length: usize) -> bool
Function to check if the object with address offset
of size length
lies
within flash bounds.
Sourcepub fn check_flash_for_new_address(
&self,
new_app_size: usize,
) -> Result<(usize, PaddingRequirement, usize, usize), ProcessBinaryError>
pub fn check_flash_for_new_address( &self, new_app_size: usize, ) -> Result<(usize, PaddingRequirement, usize, usize), ProcessBinaryError>
Function to compute an available address for the new application binary.
Sourcepub fn load_new_process_binary(
&self,
app_address: usize,
app_size: usize,
) -> Result<(), ProcessLoadError>
pub fn load_new_process_binary( &self, app_address: usize, app_size: usize, ) -> Result<(), ProcessLoadError>
Function to start loading the new application at address app_address
with size
app_size
.
Trait Implementations
Source§impl<C, D> DeferredCallClient for SequentialProcessLoaderMachine<'_, C, D>where
C: Chip,
D: ProcessStandardDebug,
impl<C, D> DeferredCallClient for SequentialProcessLoaderMachine<'_, C, D>where
C: Chip,
D: ProcessStandardDebug,
Source§impl<C, D> ProcessCheckerMachineClient for SequentialProcessLoaderMachine<'_, C, D>where
C: Chip,
D: ProcessStandardDebug,
impl<C, D> ProcessCheckerMachineClient for SequentialProcessLoaderMachine<'_, C, D>where
C: Chip,
D: ProcessStandardDebug,
Source§fn done(
&self,
process_binary: ProcessBinary,
result: Result<Option<AcceptedCredential>, ProcessCheckError>,
)
fn done( &self, process_binary: ProcessBinary, result: Result<Option<AcceptedCredential>, ProcessCheckError>, )
Check is finished, and the check result is in
result
.0 Read moreSource§impl<'a, C, D> ProcessLoadingAsync<'a> for SequentialProcessLoaderMachine<'a, C, D>where
C: Chip,
D: ProcessStandardDebug,
impl<'a, C, D> ProcessLoadingAsync<'a> for SequentialProcessLoaderMachine<'a, C, D>where
C: Chip,
D: ProcessStandardDebug,
Source§fn set_client(&self, client: &'a dyn ProcessLoadingAsyncClient)
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)
fn set_policy(&self, policy: &'a dyn AppIdPolicy)
Set the credential checking policy for the loader.