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-20 04:46:27 +04:00
|
|
|
use page_table::PTEFlags;
|
2020-12-16 06:18:38 +04:00
|
|
|
use address::VPNRange;
|
|
|
|
pub use address::{PhysAddr, VirtAddr, PhysPageNum, VirtPageNum, StepByOne};
|
|
|
|
pub use frame_allocator::{FrameTracker, frame_alloc, frame_dealloc,};
|
2020-12-10 07:57:26 +04:00
|
|
|
pub use page_table::{
|
2020-12-20 04:46:27 +04:00
|
|
|
PageTable,
|
2020-12-10 07:57:26 +04:00
|
|
|
PageTableEntry,
|
|
|
|
translated_byte_buffer,
|
|
|
|
translated_str,
|
2021-02-26 08:06:55 +04:00
|
|
|
translated_ref,
|
2020-12-10 07:57:26 +04:00
|
|
|
translated_refmut,
|
2020-12-13 11:07:19 +04:00
|
|
|
UserBuffer,
|
|
|
|
UserBufferIterator,
|
2020-12-10 07:57:26 +04:00
|
|
|
};
|
2020-12-20 04:46:27 +04:00
|
|
|
pub use memory_set::{MemorySet, KERNEL_SPACE, MapPermission, kernel_token};
|
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();
|
2021-01-27 03:30:27 +04:00
|
|
|
KERNEL_SPACE.lock().activate();
|
2020-12-16 11:19:29 +04:00
|
|
|
}
|