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_CS
has execute/read permission, and__BOOT_DS
has read/write permission. CS
is__BOOT_CS
andDS
,ES
,SS
is__BOOT_DS
.- Interrupt is disabled.
%ebp
,%edi
and%ebx
is zero.%esi
holds 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_CS
has execute/read permission, and__BOOT_DS
has read/write permission. CS
is__BOOT_CS
andDS
,ES
,SS
is__BOOT_DS
.- Interrupt is disabled.
%rsi
holds the base physical address(0x7C00
) of the struct boot_params.