Module kernel::process_loading

source ยท
Expand description

Helper functions and machines for loading process binaries into in-memory Tock processes.

Process loaders are responsible for parsing the binary formats of Tock processes, checking whether they are allowed to be loaded, and if so initializing a process structure to run it.

This module provides multiple process loader options depending on which features a particular board requires.

Structsยง

Enumsยง

Traitsยง

Functionsยง

  • Find a process binary stored at the beginning of flash and create a ProcessBinary object if the process is viable to run on this kernel.
  • load_process ๐Ÿ”’
    Load a process stored as a TBF process binary with app_memory as the RAM pool that its RAM should be allocated from. Returns Ok if the process object was created, Err with a relevant error if the process object could not be created.
  • Load processes (stored as TBF objects in flash) into runnable process structures stored in the procs array and mark all successfully loaded processes as runnable. This method does not check the cryptographic credentials of TBF objects. Platforms for which code size is tight and do not need to check TBF credentials can call this method because it results in a smaller kernel, as it does not invoke the credential checking state machine.
  • Helper function to load processes from flash into an array of active processes. This is the default template for loading processes, but a board is able to create its own load_processes() function and use that instead.