2020-12-02 06:32:26 +04:00
|
|
|
mod heap_allocator;
|
2020-12-03 06:40:30 +04:00
|
|
|
mod address;
|
|
|
|
mod frame_allocator;
|
2020-12-04 13:23:35 +04:00
|
|
|
mod page_table;
|
|
|
|
mod memory_set;
|
2020-12-02 06:32:26 +04:00
|
|
|
|
2020-12-04 13:23:35 +04:00
|
|
|
use page_table::{PageTable, PTEFlags};
|
2020-12-06 09:56:13 +04:00
|
|
|
use address::{VPNRange, StepByOne};
|
2020-12-03 06:40:30 +04:00
|
|
|
pub use address::{PhysAddr, VirtAddr, PhysPageNum, VirtPageNum};
|
|
|
|
pub use frame_allocator::{FrameTracker, frame_alloc};
|
2020-12-04 13:23:35 +04:00
|
|
|
pub use page_table::{PageTableEntry};
|
2020-12-06 09:56:13 +04:00
|
|
|
pub use memory_set::{MemorySet, KERNEL_SPACE, MapPermission};
|
2020-12-04 13:23:35 +04:00
|
|
|
pub use memory_set::remap_test;
|
2020-12-03 06:40:30 +04:00
|
|
|
|
|
|
|
pub fn init() {
|
|
|
|
heap_allocator::init_heap();
|
|
|
|
frame_allocator::init_frame_allocator();
|
2020-12-04 13:23:35 +04:00
|
|
|
KERNEL_SPACE.clone().lock().activate();
|
2020-12-03 06:40:30 +04:00
|
|
|
}
|