Ensure that memory::init is only called once

This commit is contained in:
Philipp Oppermann
2016-04-11 22:17:58 +02:00
parent cea73b3ab9
commit fbc1c60164
3 changed files with 5 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ mod paging;
pub const PAGE_SIZE: usize = 4096;
pub fn init(boot_info: &BootInformation) {
assert_has_not_been_called!("memory::init must be called only once");
let memory_map_tag = boot_info.memory_map_tag().expect(
"Memory map tag required");
let elf_sections_tag = boot_info.elf_sections_tag().expect(