chore: uapi: cap: rename PageTable to Table

This commit is contained in:
Paul Pan 2024-06-14 15:34:24 +08:00
parent 302de5eae1
commit da05567fbf
3 changed files with 5 additions and 5 deletions

View File

@ -75,7 +75,7 @@ impl Debug for CapEntry {
ObjectType::CNode => write!(f, "{:?}", CNodeCap::try_from(self)),
ObjectType::Frame => write!(f, "{:?}", FrameCap::try_from(self)),
ObjectType::Null => write!(f, "{:?}", NullCap::try_from(self)),
ObjectType::PageTable => write!(f, "{:?}", TableCap::try_from(self)),
ObjectType::Table => write!(f, "{:?}", TableCap::try_from(self)),
ObjectType::TCB => write!(f, "{:?}", TcbCap::try_from(self)),
ObjectType::Untyped => write!(f, "{:?}", UntypedCap::try_from(self)),
_ => write!(f, "UnknownCap"),

View File

@ -10,7 +10,7 @@ use utils::{addr::*, MASK};
/// TableObject is an object that represents a page table
pub struct TableObject([u8]);
impl KernelObject for TableObject {
const OBJ_TYPE: ObjectType = ObjectType::PageTable;
const OBJ_TYPE: ObjectType = ObjectType::Table;
}
/*
@ -40,7 +40,7 @@ impl<'a> TableCap<'a> {
const IS_MAPPED_OFFSET: usize = 0;
pub fn mint(ptr: PhysAddr) -> RawCap {
RawCap::new(0, 0, ptr, ObjectType::PageTable)
RawCap::new(0, 0, ptr, ObjectType::Table)
}
pub fn is_mapped(&self) -> bool {

View File

@ -7,7 +7,7 @@ pub enum ObjectType {
Reply = 4,
Notification = 5,
Frame = 6,
PageTable = 7,
Table = 7,
Interrupt = 8,
Untyped = 9,
}
@ -36,7 +36,7 @@ impl ObjectType {
ObjectType::Reply => 0, // TODO: fill it!
ObjectType::Notification => 0, // TODO: fill it!
ObjectType::Frame => user_obj_bits,
ObjectType::PageTable => user_obj_bits, // arch dependent page table size
ObjectType::Table => user_obj_bits, // arch dependent page table size
ObjectType::Interrupt => 0, // TODO: fill it!
ObjectType::Untyped => user_obj_bits,
}