Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal bootloader #3

Open
fwsGonzo opened this issue Jun 29, 2019 · 0 comments
Open

Minimal bootloader #3

fwsGonzo opened this issue Jun 29, 2019 · 0 comments

Comments

@fwsGonzo
Copy link
Owner

fwsGonzo commented Jun 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant