Move `address` to `memory` mod.

master
WangRunji 7 years ago
parent 03d4adfcfe
commit bacc97ee94

@ -1,7 +1,8 @@
pub use self::area_frame_allocator::AreaFrameAllocator; pub use self::area_frame_allocator::AreaFrameAllocator;
pub use self::paging::remap_the_kernel; pub use self::paging::remap_the_kernel;
pub use self::stack_allocator::Stack; pub use self::stack_allocator::Stack;
use self::paging::{PhysicalAddress, FromToVirtualAddress}; pub use self::address::*;
use multiboot2::BootInformation; use multiboot2::BootInformation;
use consts::KERNEL_OFFSET; use consts::KERNEL_OFFSET;
@ -9,6 +10,7 @@ mod area_frame_allocator;
pub mod heap_allocator; pub mod heap_allocator;
mod paging; mod paging;
mod stack_allocator; mod stack_allocator;
mod address;
pub const PAGE_SIZE: usize = 4096; pub const PAGE_SIZE: usize = 4096;

@ -1,7 +1,7 @@
use super::{VirtualAddress, PhysicalAddress, Page, ENTRY_COUNT, FromToVirtualAddress}; use super::{Page, ENTRY_COUNT};
use super::entry::*; use super::entry::*;
use super::table::{self, Table, Level4, Level1}; use super::table::{self, Table, Level4, Level1};
use memory::{PAGE_SIZE, Frame, FrameAllocator}; use memory::*;
use core::ptr::Unique; use core::ptr::Unique;
pub struct Mapper { pub struct Mapper {

@ -1,19 +1,15 @@
pub use self::entry::*; pub use self::entry::*;
pub use self::mapper::Mapper; pub use self::mapper::Mapper;
use core::ops::{Deref, DerefMut, Add}; use core::ops::{Deref, DerefMut, Add};
use core::ptr::Unique; use super::*;
use memory::{PAGE_SIZE, Frame, FrameAllocator};
use multiboot2::BootInformation; use multiboot2::BootInformation;
use self::table::{Table, Level4};
use self::temporary_page::TemporaryPage; use self::temporary_page::TemporaryPage;
pub use self::address::*;
use consts::KERNEL_OFFSET; use consts::KERNEL_OFFSET;
mod entry; mod entry;
mod table; mod table;
mod temporary_page; mod temporary_page;
mod mapper; mod mapper;
mod address;
const ENTRY_COUNT: usize = 512; const ENTRY_COUNT: usize = 512;

@ -1,6 +1,6 @@
use super::{Page, ActivePageTable, VirtualAddress}; use super::{Page, ActivePageTable};
use super::table::{Table, Level1}; use super::table::{Table, Level1};
use memory::{Frame, FrameAllocator}; use memory::{Frame, FrameAllocator, VirtualAddress};
pub struct TemporaryPage { pub struct TemporaryPage {
page: Page, page: Page,

Loading…
Cancel
Save