Skip to content

Commit

Permalink
doc: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Godones committed Dec 23, 2023
1 parent ccd44e1 commit b2c67b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/page_table/src/arch/loongarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ impl const PagingMetaData for LA64MetaData {
const VA_MAX_BITS: usize = 48;
}

/// Page table for LoongArch64 systems.
pub type LA64PageTable<I> = PageTable64<LA64MetaData, LA64PTE, I>;
5 changes: 4 additions & 1 deletion crates/page_table_entry/src/arch/loongarch64.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! loongarch64 page table entries.
use crate::{GenericPTE, MappingFlags};
use aarch64_cpu::registers::SPSR_EL1::M;
use core::fmt;
use memory_addr::PhysAddr;

Expand All @@ -16,10 +15,13 @@ bitflags::bitflags! {
const D = 1 << 1;
/// Privilege Level with 2 bits.
const PLVL = 1 << 2;
/// Privilege Level with 2 bits.
const PLVH = 1 << 3;
/// Memory Access Type controls the type of access, such as whether it
/// can be cached by Cache, etc.
const MATL = 1 << 4;
/// Memory Access Type controls the type of access, such as whether it
/// can be cached by Cache, etc.
const MATH = 1 << 5;
/// Designates a global mapping OR Whether the page is huge page.
const GH = 1 << 6;
Expand Down Expand Up @@ -96,6 +98,7 @@ impl From<MappingFlags> for PTEFlags {
}
}

/// page table entry for LoongArch64 systems.
#[derive(Clone, Copy)]
#[repr(transparent)]
pub struct LA64PTE(u64);
Expand Down

0 comments on commit b2c67b7

Please sign in to comment.