Arch

Struct Arch 

Source
pub struct Arch;

Trait Implementations§

Source§

impl IMemoryProtection for Arch

Source§

type MemoryRegion = MemoryRegion

Precalculated memory region configuration.
Source§

fn enable_memory_protection()

Enable memory protection hardware.
Source§

fn disable_memory_protection()

Disable memory protection hardware.
Source§

fn enable_memory_region(region: u8, config: Config)

Setup and enable one memory region. Read more
Source§

fn disable_memory_region(region: u8)

Disable one memory region.
Source§

fn prepare_memory_region(region: u8, config: Config) -> Self::MemoryRegion

Compile register values from configuration and store in MemoryRegion. Read more
Source§

fn prepare_unused_region(region: u8) -> Self::MemoryRegion

Compile register values for an unused memory region.
Source§

fn apply_regions(memory_regions: &[MemoryRegion; 3])

Apply 3 precompiled memory regions.
Source§

fn min_region_size() -> Byte

Minimal region size that can be protected.
Source§

fn n_memory_regions() -> u8

Returns the number of memory regions.
Source§

impl IScheduler for Arch

Source§

unsafe fn init_task_stack( stack_ptr: *mut usize, entry: *const usize, arg: *const usize, exit: *const usize, ) -> *mut usize

Init the stack of task. Read more
Source§

fn start_first_task(stack_ptr: *const usize)

Start the first task.
Source§

fn trigger_context_switch()

Trigger context switch exception.
Source§

impl IStartup for Arch

Source§

fn init_static_region(region: Region)

Init static region.
Source§

fn kernel_data() -> Region

Kernel data region.
Source§

fn kernel_heap() -> Region

Kernel heap region.
Source§

impl ISync for Arch

Source§

fn disable_interrupts(priority: usize)

Disable any interrupt below priority.
Source§

fn enable_interrupts()

Enable all interrupts.
Source§

impl ISyscall for Arch

Source§

fn syscall(service: u8, arg0: usize, arg1: usize, arg2: usize) -> usize

A system call with a service ID and 3 arguments.

Auto Trait Implementations§

§

impl Freeze for Arch

§

impl RefUnwindSafe for Arch

§

impl Send for Arch

§

impl Sync for Arch

§

impl Unpin for Arch

§

impl UnwindSafe for Arch

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

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.