[sq] add missing documentation
This commit is contained in:
parent
389a6971b7
commit
cc163e6d61
|
@ -1,3 +1,5 @@
|
||||||
|
//! Print MMU suported features for debugging.
|
||||||
|
|
||||||
use {
|
use {
|
||||||
crate::println,
|
crate::println,
|
||||||
cortex_a::regs::{RegisterReadOnly, RegisterReadWrite, ID_AA64MMFR0_EL1, SCTLR_EL1, TCR_EL1},
|
cortex_a::regs::{RegisterReadOnly, RegisterReadWrite, ID_AA64MMFR0_EL1, SCTLR_EL1, TCR_EL1},
|
||||||
|
|
|
@ -282,6 +282,7 @@ pub trait HierarchicalLevel: TableLevel {
|
||||||
// fn translate() -> Directory<NextLevel>;
|
// fn translate() -> Directory<NextLevel>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Specify allowed page size for each level.
|
||||||
pub trait HierarchicalPageLevel: TableLevel {
|
pub trait HierarchicalPageLevel: TableLevel {
|
||||||
/// Size of the page that can be contained in this table level.
|
/// Size of the page that can be contained in this table level.
|
||||||
type PageLevel: PageSize;
|
type PageLevel: PageSize;
|
||||||
|
@ -479,9 +480,11 @@ where
|
||||||
/// Errors from mapping layer
|
/// Errors from mapping layer
|
||||||
#[derive(Debug, Snafu)]
|
#[derive(Debug, Snafu)]
|
||||||
pub enum TranslationError {
|
pub enum TranslationError {
|
||||||
|
/// No page found. @todo
|
||||||
NoPage,
|
NoPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Virtual address space. @todo
|
||||||
pub struct VirtSpace {
|
pub struct VirtSpace {
|
||||||
l0: Unique<Directory<L0PageGlobalDirectory>>,
|
l0: Unique<Directory<L0PageGlobalDirectory>>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,11 @@ pub use addr::VirtAddr;
|
||||||
pub use page_size::PageSize;
|
pub use page_size::PageSize;
|
||||||
pub use phys_frame::PhysFrame;
|
pub use phys_frame::PhysFrame;
|
||||||
|
|
||||||
// @todo ??
|
/// @todo ??
|
||||||
pub trait FrameAllocator {
|
pub trait FrameAllocator {
|
||||||
|
/// Allocate a physical memory frame.
|
||||||
fn allocate_frame(&mut self) -> Option<PhysFrame>; // @todo Result<>
|
fn allocate_frame(&mut self) -> Option<PhysFrame>; // @todo Result<>
|
||||||
|
/// Deallocate a physical frame.
|
||||||
fn deallocate_frame(&mut self, frame: PhysFrame);
|
fn deallocate_frame(&mut self, frame: PhysFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue