Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / arch / x86 / includes / sys / boot / multiboot.S.inc
1 #define __ASM__ 
2
3 #include "multiboot.h"
4
5 .section .multiboot
6 __mb_start:
7     .4byte MULTIBOOT_MAGIC
8
9 #ifdef CONFIG_X86_BL_MB
10     #define MB_FLAGS    (MULTIBOOT_MEMORY_INFO | MULTIBOOT_PAGE_ALIGN)
11     .4byte MB_FLAGS
12     .4byte -(MULTIBOOT_MAGIC + MB_FLAGS)
13
14 #elif  CONFIG_X86_BL_MB2
15     #define HDR_LEN     (__mb_end - __mb_start)
16     
17     .4byte   0
18     .4byte   HDR_LEN
19     .4byte   -(MULTIBOOT_MAGIC + HDR_LEN)
20
21     .align  MULTIBOOT_TAG_ALIGN
22     __mbir_tag_start:
23     .2byte  MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST
24     .2byte  0
25     .4byte   __mbir_tag_end - __mbir_tag_start
26     .4byte   MULTIBOOT_TAG_TYPE_CMDLINE
27     .4byte   MULTIBOOT_TAG_TYPE_MMAP
28     .4byte   MULTIBOOT_TAG_TYPE_BASIC_MEMINFO
29     .4byte   MULTIBOOT_TAG_TYPE_MODULE
30     __mbir_tag_end:
31
32     .align  MULTIBOOT_TAG_ALIGN
33     .2byte  MULTIBOOT_HEADER_TAG_END
34     .2byte  0
35     .4byte   8
36
37 #endif
38
39 __mb_end: