Mike Kelly, le sam. 26 sept. 2026 23:28:38 +0100, a ecrit:
> ---
>  i386/i386/multiboot2_hdr_asm.h | 33 +++++++++++++++++++++++++++++++++
>  i386/i386at/boothdr.S          |  3 +++
>  x86_64/boothdr.S               |  3 +++
>  3 files changed, 39 insertions(+)
>  create mode 100644 i386/i386/multiboot2_hdr_asm.h
> 
> diff --git a/i386/i386/multiboot2_hdr_asm.h b/i386/i386/multiboot2_hdr_asm.h
> new file mode 100644
> index 00000000..ee106cef
> --- /dev/null
> +++ b/i386/i386/multiboot2_hdr_asm.h

This is not a trivial header, so this needs a copyright statement.

> @@ -0,0 +1,33 @@
> +#include <mach/machine/multiboot2.h>
> +
> +/* The multiboot2 header must be 8 byte aligned */
> +     P2ALIGN(3)
> +multiboot2_hdr:
> +     .long   MULTIBOOT2_HEADER_MAGIC
> +     .long   MULTIBOOT2_ARCHITECTURE_I386
> +     .long   (multiboot2_hdr_end - multiboot2_hdr)
> +     .long   (0 \
> +             - MULTIBOOT2_HEADER_MAGIC \
> +             - MULTIBOOT2_ARCHITECTURE_I386 \
> +             - (multiboot2_hdr_end - multiboot2_hdr))
> +     /* These are the tags that we expect to receive in the
> +       information structure. Each tag also needs to be 8 byte
> +       aligned with padding if required. */
> +     .short MULTIBOOT2_HEADER_TAG_INFORMATION_REQUEST
> +     .short 0
> +     .long 32
> +     .long MULTIBOOT2_TAG_TYPE_MMAP
> +     .long MULTIBOOT2_TAG_TYPE_BASIC_MEMINFO
> +     .long MULTIBOOT2_TAG_TYPE_CMDLINE
> +     .long MULTIBOOT2_TAG_TYPE_MODULE
> +     .long MULTIBOOT2_TAG_TYPE_ELF_SECTIONS
> +     .long  0 /* alignment */
> +     /* Align modules on page boundaries */
> +     .short MULTIBOOT2_HEADER_TAG_MODULE_ALIGN
> +     .short 0
> +     .long  8
> +     /* There must always be an 'end' (empty) tag */
> +     .short MULTIBOOT2_HEADER_TAG_END
> +     .short 0
> +     .long  8
> +multiboot2_hdr_end:

Reply via email to