Bootloader FAQ: Difference between revisions

→‎What should my bootloader support?: Make slightly less biased by saying they could be features. Also include a remark on the impossibility of a long mode higher-half kernel without paging
[unchecked revision][unchecked revision]
(→‎BIOS or UEFI?: Link to the section on the UEFI page)
(→‎What should my bootloader support?: Make slightly less biased by saying they could be features. Also include a remark on the impossibility of a long mode higher-half kernel without paging)
Line 57:
== What should my bootloader support? ==
 
Apart from loading the kernel, the bootloader also has to prepare the environment appropriately before handing off control to the kernel. This includescould include:
* Detecting CPU/BIOS features. You need to make sure that the CPU or the BIOS supports any features that you use (e.g. INT 0x13 extensions).
* [[Detecting Memory (x86)|Getting the memory map]]. Where will you even load the kernel if you don't know what memory areas actually are memory?
* Enabling [[A20|A20]] and [[Protected Mode|protected mode]] with [[Paging|paging]] (or [[Long Mode|long mode]] if running on a [[x86-64|x86_64]]). GRUB doesn't enable paging or long mode, but that doesn't mean other bootloaders shouldn't do betterit either. Not enabling paging or long mode in the bootloader means that you need to decide a priori in which physical memory area the kernel will reside, which may lead to two potential consequences:
** There might not be actually any memory at that address;
** It makes it a bit harder, if not impossible, and more messy to do a [[Higher Half Kernel|higher half kernel]].
 
When you are more advanced, you may also want/need to do these things in the bootloader:
Anonymous user