3 #include <linking/base_defs.ld.inc>
11 One may wondering why we set the address header part.
13 This is due to some weirdo's patch to QEMU that prohibit loading
14 ELF64 using -kernel option. The only way to get around is to
15 fool multiboot loader by pretend ourselves a non-elf kernel.
17 Although one may think this "trick" is some-how not portable,
18 the fact is actually the other-way around. It allow us to relax
19 the assumption that grub (or other multiboot compliances) made on
23 #ifdef CONFIG_X86_BL_MB
24 #define MB_FLAGS ( MULTIBOOT_MEMORY_INFO |\
25 MULTIBOOT_PAGE_ALIGN |\
26 MULTIBOOT_AOUT_KLUDGE )
28 .4byte -(MULTIBOOT_MAGIC + MB_FLAGS)
35 #elif CONFIG_X86_BL_MB2
36 #define HDR_LEN (__mb_end - __mb_start)
40 .4byte -(MULTIBOOT_MAGIC + HDR_LEN)
42 .align MULTIBOOT_TAG_ALIGN
44 .2byte MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST
46 .4byte __mbir_tag_end - __mbir_tag_start
47 .4byte MULTIBOOT_TAG_TYPE_CMDLINE
48 .4byte MULTIBOOT_TAG_TYPE_MMAP
49 .4byte MULTIBOOT_TAG_TYPE_BASIC_MEMINFO
50 .4byte MULTIBOOT_TAG_TYPE_MODULE
54 .2byte MULTIBOOT_HEADER_TAG_ADDRESS
56 .4byte __maddr_tag_end - __maddr_tag_start
64 .2byte MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS
66 .4byte __ment_tag_end - __ment_tag_start
70 .align MULTIBOOT_TAG_ALIGN
71 .2byte MULTIBOOT_HEADER_TAG_END