Next: Boot information format, Previous: OS image format, Up: Specification [Contents][Index]
When the boot loader invokes the operating system, the machine must have the following state:
Must contain the magic value ‘0x36d76289’; the presence of this value indicates to the operating system that it was loaded by a Multiboot2-compliant boot loader (e.g. as opposed to another type of boot loader that the operating system can also be loaded from).
Must contain the 32-bit physical address of the Multiboot2 information structure provided by the boot loader (see Boot information format).
All other processor registers and flag bits are undefined. This includes, in particular:
The OS image must create its own stack as soon as it needs one.
When the boot loader invokes the 32-bit operating system, the machine must have the following state:
Must contain the magic value ‘0x36d76289’; the presence of this value indicates to the operating system that it was loaded by a Multiboot2-compliant boot loader (e.g. as opposed to another type of boot loader that the operating system can also be loaded from).
Must contain the 32-bit physical address of the Multiboot2 information structure provided by the boot loader (see Boot information format).
Must be a 32-bit read/execute code segment with an offset of ‘0’ and a limit of ‘0xFFFFFFFF’. The exact value is undefined.
Must be a 32-bit read/write data segment with an offset of ‘0’ and a limit of ‘0xFFFFFFFF’. The exact values are all undefined.
Must be enabled.
Bit 31 (PG) must be cleared. Bit 0 (PE) must be set. Other bits are all undefined.
Bit 17 (VM) must be cleared. Bit 9 (IF) must be cleared. Other bits are all undefined.
All other processor registers and flag bits are undefined. This includes, in particular:
The OS image must create its own stack as soon as it needs one.
Even though the segment registers are set up as described above, the ‘GDTR’ may be invalid, so the OS image must not load any segment registers (even just reloading the same values!) until it sets up its own ‘GDT’.
The OS image must leave interrupts disabled until it sets up its own
IDT
.
On EFI system boot services must be terminated.
When the boot loader invokes the 32-bit operating system on EFI i386 platform and EFI boot services tag together with EFI i386 entry address tag are present in the image Multiboot2 header, the machine must have the following state:
Must contain the magic value ‘0x36d76289’; the presence of this value indicates to the operating system that it was loaded by a Multiboot2-compliant boot loader (e.g. as opposed to another type of boot loader that the operating system can also be loaded from).
Must contain the 32-bit physical address of the Multiboot2 information structure provided by the boot loader (see Boot information format).
All other processor registers, flag bits and state are set accordingly to Unified Extensible Firmware Interface Specification, Version 2.6, section 2.3.2, IA-32 Platforms, boot services.
When the boot loader invokes the 64-bit operating system on EFI amd64 platform and EFI boot services tag together with EFI amd64 entry address tag are present in the image Multiboot2 header, the machine must have the following state:
Must contain the magic value ‘0x36d76289’; the presence of this value indicates to the operating system that it was loaded by a Multiboot2-compliant boot loader (e.g. as opposed to another type of boot loader that the operating system can also be loaded from).
Must contain the 64-bit physical address (paging mode is enabled and any memory space defined by the UEFI memory map is identity mapped, hence, virtual address equals physical address; Unified Extensible Firmware Interface Specification, Version 2.6, section 2.3.4, x64 Platforms, boot services) of the Multiboot2 information structure provided by the boot loader (see Boot information format).
All other processor registers, flag bits and state are set accordingly to Unified Extensible Firmware Interface Specification, Version 2.6, section 2.3.4, x64 Platforms, boot services.
The bootloader must not load any part of the kernel, the modules, the Multiboot2 information structure, etc. higher than 4 GiB - 1. This requirement is put in force because most of currently specified tags supports 32-bit addresses only. Additionally, some kernels, even if they run on EFI 64-bit platform, still execute some parts of its initialization code in 32-bit mode.
Note: If at some point there is a need for full 64-bit mode support in Multiboot2 protocol then it should be designed very carefully. Especially it should be taken into account that 32-bit and 64-bit mode code should coexist in an image without any issue. The image should have a chance to inform the bootloader that it supports full 64-bit mode. If it is the case then the bootloader should provide 64-bit tags if it is desired and possible. Otherwise 32-bit tags should be used.
Next: Boot information format, Previous: OS image format, Up: Specification [Contents][Index]