Closed Kfeavel closed 3 years ago
This would also be a huge step toward resolving #211.
Please see PR #289
Resolved by #289, but leaving open until @the-grue finishes refactoring the assembly into C.
Resolved by #289, but leaving open until @the-grue finishes refactoring the assembly into C.
Going to close since this issue is resolved and converting assembly to C is its own, separate goal.
Panix has an issue that prevents progress from being made when it comes to the memory management refactors. There exists a "chicken / egg" problem in the kernel where the boot-loader information needs to be mapped into memory for the kernel to be able to access it, but in order to map memory properly (in the refactored design), the memory manager needs information about the memory layout from the boot-loader, which creates a circular dependency.
The offending code is located at
kernel/boot/Handoff.cpp:L83
for the Stivale2 parserand like wise at
kernel/boot/Handoff.cpp:L166
for the Multiboot2 parser.These two functions should not be required to map in the boot-loader information, especially considering
kernel/arch/i386/boot/boot.s:L67
has to setup and enable paging in order to boot the kernel, considering it is a high-half kernel.An ideal solution is as follows: Remove as much paging code out of
boot.s
(either by converting as much ofboot.s
to C as possible or creating basic C paging functions that can be accessed byboot.s
) and mapping in the bootloader information at the same time the kernel is mapped into higher-half memory.