Non-null, an invalid return address of 0 is pushed to the stack before jumping Rsp is set to the requested stack as per stivale2 header. If booted by EFI/UEFI, boot services are exited. Legacy PIC and IO APIC IRQs are all masked. If PMRs are requested, then, the NX bit will be enabled (NX bit in EFER). If the stivale2 header tag for 5-level paging is present, then, if available,ĥ-level paging is enabled (LA57 bit in cr4). PG is enabled ( cr0), PE is enabled ( cr0), PAE is enabled ( cr4), IF flag, VM flag, and direction flag are cleared on entry. With at least the following entries, starting at offset 0: The GDT register is loaded to point to a GDT, in bootloader-reserved memory, Relocate it as it sees fit, potentially performing KASLR (as specified by the config).Īt entry all segment registers are loaded as 64 bit code/data segments, limits andīases are ignored since this is 64-bit mode. If the kernel is a position independent executable, the bootloader is free to Is undefined as long as they provide the above memory mappings. The bootloader page tables are in bootloader-reclaimable memory, their specific layout Virtual address space, is going to be unmapped. If the "unmap NULL" header tag is specified, then page 0, or the first 4KiB of the ![]() PMRs are not available to lower half or anchored kernels. For relocatable kernels, slides will be appropriately taken intoĪccount. That describe the kernel's loaded ELF segments with appropriately set MMU permissions (No PMRs only)) will not be created, and in its place, only mappings If PMRs are requested, the bottom-most of the above mappings (the one marked as Where HHDM start is returned in the Higher Half Direct Map tag (see below).Īll the mappings are supervisor, read, write, execute (-rwx). ![]() The stivale2 anchor can appear anywhere in the executable, but must be aligned on aġ6-byte boundary. PMRs and higher half relocation will not be available for anchored kernels. Non-ELF format that support direct loading. Information needed to perform kernel loading and handoff.Īnchored kernels are useful for kernels in a.out, flat binary, or otherwise Which provides an anchor for the bootloader to latch onto in order to gather Anchored kernelsĪn anchored kernel is a non-ELF kernel, of unspecified executable or otherwise format, See the protected memory ranges section for more information on those. Higher half relocation and protected memory ranges (PMRs) will not be available. If the kernel loads itself in the lower half, the bootloader will not perform the If KASLR is enabled, a random slide, still maintaining the above alignment constraint, This slide will never have a value not aligned to at least the same alignment as the The kernel can load itself at or above 0xffffffff80000000 (as defined in the linker script)Īnd the bootloader will take care of everything else, no AT linker script directives needed.įor relocatable kernels, the bootloader may change the load addresses of the sectionsīy adding a slide if the specified location of a segment is not available for use. ![]() Stivale2 natively supports (only for 64-bit ELF kernels) and encourages higher half kernels. The anchor provides information about which CPU mode to use. The appropriate mode before loading the kernel. ![]() Stivale2 will recognise whether the ELF file is 32-bit or 64-bit and put the CPU into Other executable formats are not supported. stivale2hdr section (described below), orĪ non-ELF kernel providing a valid stivale2 anchor (see below). In order to have a stivale2 compliant kernel, one must have a kernel executable, X86_64 context (although 32-bit x86 is also supported). Provides the kernel with most of the features one may need in a modern The stivale2 boot protocol is an improved version of the stivale protocol which
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |