KRaBs supports only the minimal
x86 Linux boot protocol.
Before attempting to use KRaBs for loading and booting your OS, take action as
needed to meet the following requirements:
- At entry, the CPU is in 32-bit protected mode with paging disabled.
- A GDT is loaded with the descriptors for selectors
__BOOT_CS(0x10)and__BOOT_DS(0x18). Both descriptors is 4G flat segment.__BOOT_CShas execute/read permission, and__BOOT_DShas read/write permission. CSis__BOOT_CSandDS,ES,SSis__BOOT_DS.- Interrupt is disabled.
%ebp,%ediand%ebxis zero.%esiholds the base physical address(0x7C00) of the struct boot_params.
- At entry, the CPU is in 64-bit mode with paging enabled.
- A GDT is loaded with the descriptors for selectors
__BOOT_CS(0x10)and__BOOT_DS(0x18). Both descriptors is 4G flat segment.__BOOT_CShas execute/read permission, and__BOOT_DShas read/write permission. CSis__BOOT_CSandDS,ES,SSis__BOOT_DS.- Interrupt is disabled.
%rsiholds the base physical address(0x7C00) of the struct boot_params.