}
}
- os::print("RAM:\n");
- os::paging::page_allocator.print_all();
-
{
os::isr_info isr_info[32];
for (size_t i = 0; i < sizeof(isr_info) / sizeof(isr_info[0]); i++) {
// Unmap low RAM, and free corresponding page.
PML4T.contents[0].P = false;
os::paging::page_allocator.deallocate({.ptr = os::phys_ptr<os::paging::page>(get_base_address(PML4T.contents[0]).get_phys_addr()), .size = 1});
- os::paging::page_allocator.print_all();
// Load test-module elf file:
const os::elf::header elf_header = *os::phys_ptr<os::elf::header>(test_module.start_address.get_phys_addr());
asm volatile("invlpg (%0)" ::"r" (0x1000) : "memory");
- os::paging::on_all_pages(PML4T, [](os::paging::page* virt, os::phys_ptr<os::paging::page> phys, std::size_t size) {
- if (std::uint64_t(virt) >= 0xFFFF'8000'0000'0000) {
- return;
- }
- os::print("{}->{} ({})\n", std::uint64_t(virt), std::uint64_t(phys.get_phys_addr()), size);
- });
-
os::print("Loading ring 3 interrupts stack.\n");
os::set_ring0_stack(TSS, std::uint64_t(&interrupt_stack_top));
os::print("Loading TSS.\n");