Skip to content

Minimal bootloader #3

@fwsGonzo

Description

@fwsGonzo

A glaring flaw is the lack of a 512b minimal bootloader that ATA loads the kernel to its dest and then enters protected and jumps to _start. One reason to add one is the extra swag of having very very tiny kernels that still can do stuff.

Several problems:

  1. Theres not enough room to really inspect ELFs and validate stuff, GRUB will at least tell you if something is wrong even if its a big blob. So, either the bootloader just jumps to <some offset in the ELF that corresponds to the 64-bit program entry>, or we need to burn the _start location into the bootloader itself via a script.
  2. We no longer get memory maps from GRUB so we have to do without. CMOS chip will tell us about up to 64mb of memory, which is basically nothing today. It really is a problem.
  3. It will likely be brittle on real hardware - especially the ATA loader code. It also won't work on modern clouds like GCE which demands you boot using virtio-scsi.

In short, it may just not be worth it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions