Add paging setup [wip]

This commit is contained in:
Berkus Decker 2019-01-20 17:44:34 +02:00
parent 73d852f57c
commit 7630f5a558
1 changed files with 15 additions and 0 deletions

View File

@ -112,6 +112,21 @@ pub fn write_ttbr_tcr_mair(el: u8, base: u64, tcr: u64, attr: u64) {
}
}
fn setup_paging() {
// test if paging is enabled
// if so, loop here
// @todo
// Check mmu and dcache states, loop forever on some setting
write_ttbr_tcr_mair(
1,
read_translation_table_base(),
read_translation_control(),
read_mair(),
);
}
struct MemMapRegion {
virt: usize,
phys: usize,