Make multiboot.h usable from assembler, and remove duplicate defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39303 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,10 +6,15 @@
|
|||||||
#define _MULTIBOOT_H
|
#define _MULTIBOOT_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLER__ */
|
||||||
|
|
||||||
|
|
||||||
/* minimal part of the MultiBoot API */
|
/* minimal part of the MultiBoot API */
|
||||||
|
/* we use the official names */
|
||||||
|
|
||||||
/* magics */
|
/* magics */
|
||||||
#define MULTIBOOT_MAGIC 0x1badb002
|
#define MULTIBOOT_MAGIC 0x1badb002
|
||||||
@@ -28,6 +33,7 @@
|
|||||||
#define MULTIBOOT_INFO_MODS 0x00000008
|
#define MULTIBOOT_INFO_MODS 0x00000008
|
||||||
#define MULTIBOOT_INFO_MEM_MAP 0x00000040
|
#define MULTIBOOT_INFO_MEM_MAP 0x00000040
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
/* info struct passed to the loader */
|
/* info struct passed to the loader */
|
||||||
struct multiboot_info {
|
struct multiboot_info {
|
||||||
@@ -65,5 +71,6 @@ extern status_t parse_multiboot_commandline(struct stage2_args *args);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLER__ */
|
||||||
|
|
||||||
#endif /* _MULTIBOOT_H */
|
#endif /* _MULTIBOOT_H */
|
||||||
|
|||||||
@@ -14,19 +14,9 @@
|
|||||||
* the entry function of the embedded ELF part of the loader.
|
* the entry function of the embedded ELF part of the loader.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GLOBAL(x) .globl x ; x
|
#include "multiboot.h"
|
||||||
|
|
||||||
// GRUB-compatible MultiBoot info
|
#define GLOBAL(x) .globl x ; x
|
||||||
// we use the official names
|
|
||||||
#define MULTIBOOT_MAGIC 0x1badb002
|
|
||||||
#define MULTIBOOT_MAGIC2 0x2badb002
|
|
||||||
// header flags
|
|
||||||
#define MULTIBOOT_PAGE_ALIGN 0x00000001
|
|
||||||
#define MULTIBOOT_MEMORY_INFO 0x00000002
|
|
||||||
#define MULTIBOOT_VIDEO_MODE 0x00000004
|
|
||||||
#define MULTIBOOT_AOUT_KLUDGE 0x00010000
|
|
||||||
// info flags
|
|
||||||
#define MULTIBOOT_INFO_BOOTDEV 0x00000002
|
|
||||||
|
|
||||||
#define OUR_MB_FLAGS (MULTIBOOT_PAGE_ALIGN \
|
#define OUR_MB_FLAGS (MULTIBOOT_PAGE_ALIGN \
|
||||||
| MULTIBOOT_MEMORY_INFO \
|
| MULTIBOOT_MEMORY_INFO \
|
||||||
|
|||||||
Reference in New Issue
Block a user