git.cappig.dev / apheleiaOS.git master

da54886991faf1a7846260f76e3a3f3c9fb01385 master
cappig <[email protected]> ยท 4 months ago
Boot and framebuffer fixes, add rootfs staging

* Fix a bunch of real-mode addressing bugs in the BIOS bootloader
  (segment setup, INT 10h/13h calls, VBE init, A20 enable) and
  MBR stage 1 (INT 13h extension check, DMA boundary, DAP align)
* Stage rootfs into a contiguous memory region at boot, pass to
  kernel via boot_info_t. Kernel registers it as ram0 block device.
* UEFI bootloader: fix page table mapping for loader runtime
  memory and high-address framebuffers, stage rootfs from ESP,
  fix kernel jump asm
* Fix NX bit detection, e820 OOB access, 32-bit PDPT flag
  propagation, and a few other memory management bugs
* Window manager: pitch-aware framebuffer writes, EINTR retry.
  Default video mode changed to text.
24 files changed, 852 insertions, 300 deletions
kernel/arch/paging.h +27 -1
kernel/arch/x86/arch.c +128 -0
kernel/arch/x86/asm.h +1 -0
kernel/arch/x86/boot.h +3 -1
kernel/arch/x86/boot/bios/disk.c +64 -5
kernel/arch/x86/boot/bios/disk.h +1 -0
kernel/arch/x86/boot/bios/entry.asm +6 -4
kernel/arch/x86/boot/bios/main.c +17 -0
kernel/arch/x86/boot/bios/paging64.c +22 -4
kernel/arch/x86/boot/bios/vesa.c +69 -29
kernel/arch/x86/boot/mbr/mbr.asm +12 -2
kernel/arch/x86/boot/uefi/build.mk +2 -0
kernel/arch/x86/boot/uefi/main.c +197 -13
kernel/arch/x86/boot/uefi/util.c +1 -4
kernel/arch/x86/build/mbr.sh +6 -9
kernel/arch/x86/e820.c +8 -3
kernel/arch/x86/mm/virtual32.c +4 -4
kernel/disk_image.sh +69 -79
kernel/image.sh +28 -36
kernel/iso_image.sh +67 -87
kernel/lib/boot.h +1 -1
kernel/sys/disk.c +29 -14
user/wm/main.c +16 -0
user/wm/wm_loop.c +74 -4