From da05567fbfe7d9e3140f36af41411ca6d3853007 Mon Sep 17 00:00:00 2001 From: Paul Pan Date: Fri, 14 Jun 2024 15:34:24 +0800 Subject: [PATCH] chore: uapi: cap: rename PageTable to Table --- kernel/src/objects/cap.rs | 2 +- kernel/src/objects/table.rs | 4 ++-- uapi/src/cap.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/src/objects/cap.rs b/kernel/src/objects/cap.rs index 47ff0d6..702dc1f 100644 --- a/kernel/src/objects/cap.rs +++ b/kernel/src/objects/cap.rs @@ -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"), diff --git a/kernel/src/objects/table.rs b/kernel/src/objects/table.rs index f1a89c3..02e1cf7 100644 --- a/kernel/src/objects/table.rs +++ b/kernel/src/objects/table.rs @@ -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 { diff --git a/uapi/src/cap.rs b/uapi/src/cap.rs index 912f3f3..9f64ef2 100644 --- a/uapi/src/cap.rs +++ b/uapi/src/cap.rs @@ -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, }