aboutsummaryrefslogtreecommitdiff
path: root/src/paging.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/paging.rs')
-rw-r--r--src/paging.rs54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/paging.rs b/src/paging.rs
deleted file mode 100644
index 06c86aa..0000000
--- a/src/paging.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-//! Description of the data-structures for IA-32e paging mode.
-
-use core::fmt;
-
-/// Represent a virtual (linear) memory address
-#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
-pub struct VAddr(usize);
-
-impl VAddr {
- /// Convert to `usize`
- pub const fn as_usize(&self) -> usize {
- self.0
- }
-
- /// Convert from `usize`
- pub const fn from_usize(v: usize) -> Self {
- VAddr(v)
- }
-
- pub const fn as_u64(&self) -> u64 {
- self.0 as u64
- }
-
-}
-
-impl fmt::Binary for VAddr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.0.fmt(f)
- }
-}
-
-impl fmt::Display for VAddr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.0.fmt(f)
- }
-}
-
-impl fmt::LowerHex for VAddr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.0.fmt(f)
- }
-}
-
-impl fmt::Octal for VAddr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.0.fmt(f)
- }
-}
-
-impl fmt::UpperHex for VAddr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.0.fmt(f)
- }
-}