Map the kernel mapping page in during startup

This commit is contained in:
pjht 2023-03-27 14:14:49 -05:00
parent ab032e6324
commit 0368408636
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
2 changed files with 3 additions and 0 deletions

View File

@ -40,4 +40,6 @@ SECTIONS
*(COMMON)
*(.bss)
}
kernel_map_page = 0xFEF000;
}

View File

@ -50,6 +50,7 @@ io_map_loop:
move.l d1, (a1)+ | Write the entry to the mapping page and advance the entry pointer
addi.l #0x1000, d1 | Advance the entry to the next physical page
dbra d0, io_map_loop | Loop back if there are more pages to map
move.l #(kernel_map + 0x3), (kernel_map + 0x3ef * 4) | Map 0xFEF000 to the physical page containing the kernel mapping
map_done:
move.l #kernel_map, d0 | Load the pointer to the mapping page into d0
ori.l #0x1, d0 | Set the map page present flag