Skip to main content

RiscvFeature

Enum RiscvFeature 

Source
#[repr(u32)]
pub enum RiscvFeature { Sstc = 0, Svpbmt = 1, Vector = 2, Zicbom = 3, Zicboz = 4, Zicntr = 5, }
Expand description

An enumeration of RISC-V features.

This is not intended to be exhaustive, but rather to include the features that the kernel currently depends on.

The discriminants must match arch::RiscvFeature in <lib/arch/riscv64/feature.h>, which is where they are checked.

Variants§

§

Sstc = 0

Extension for supervisor based timer.

§

Svpbmt = 1

SuperVisor extension for Page-Based Memory Types.

§

Vector = 2

The standard V extension for vector support.

§

Zicbom = 3

Cache-Block Management Operations.

§

Zicboz = 4

Cache-Block Zero Operations.

§

Zicntr = 5

Counter CSRs are accessible.

Implementations§

Source§

impl RiscvFeature

Source

pub const ALL: [RiscvFeature; 6]

Every feature, in discriminant order.

Trait Implementations§

Source§

impl Clone for RiscvFeature

Source§

fn clone(&self) -> RiscvFeature

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for RiscvFeature

Source§

impl Debug for RiscvFeature

Source§

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

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

impl Eq for RiscvFeature

Source§

impl PartialEq for RiscvFeature

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable)§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RiscvFeature

Auto Trait Implementations§

§

impl Freeze for RiscvFeature

§

impl RefUnwindSafe for RiscvFeature

§

impl Send for RiscvFeature

§

impl Sync for RiscvFeature

§

impl Unpin for RiscvFeature

§

impl UnsafeUnpin for RiscvFeature

§

impl UnwindSafe for RiscvFeature

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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.
§

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

Performs the conversion.