arch: implement dummy CpuFeatures for aarch64

This commit is contained in:
Mark Poliakov 2024-10-12 20:47:31 +03:00
parent 7a3acff20d
commit 6c30bd062a
3 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,7 @@ impl ArchitectureImpl {
impl Architecture for ArchitectureImpl {
type PerCpuData = PerCpuData;
type CpuFeatures = ();
fn cpu_index<S: Scheduler + 'static>() -> u32 {
(MPIDR_EL1.get() & 0xFF) as u32
@ -118,4 +119,12 @@ impl Architecture for ArchitectureImpl {
fn message_interrupt_controller() -> &'static dyn MessageInterruptController {
todo!()
}
fn cpu_available_features<S: Scheduler>(_cpu: &CpuImpl<Self, S>) -> Option<&Self::CpuFeatures> {
None
}
fn cpu_enabled_features<S: Scheduler>(_cpu: &CpuImpl<Self, S>) -> Option<&Self::CpuFeatures> {
None
}
}

View File

@ -164,3 +164,9 @@ impl<A: Architecture> IpiQueue<A> {
lock.take()
}
}
impl CpuFeatureSet for () {
fn iter(&self) -> impl Iterator<Item = &'static str> {
core::iter::empty()
}
}

View File

@ -1,4 +1,5 @@
#![feature(iter_chain)]
#![allow(clippy::new_without_default)]
#![no_std]
pub mod cpuid;