Open phil-opp opened 1 year ago
We could load the file in long mode, extract the frame buffer configuration, drop down to real mode, do the VBE calls, and switch back to long mode.
Good idea! I never tried going back to real mode from long mode though, so I'm not sure if it will work.
Right now the BIOS implementation does not consider the framebuffer configuration of the kernel. Instead, it just defaults to a hardcoded resolution.
To fix this, we would need to parse the kernel ELF file already in the real mode stages, which could be challenging because of the memory limits in real mode. Alternatively, we could copy the framebuffer settings to a small text file and place this file alongside the kernel executable on the FAT partition.