-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiboot.h
61 lines (54 loc) · 1.36 KB
/
multiboot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// multiboot.h -- Declares the multiboot info structure.
// Made for JamesM's tutorials <www.jamesmolloy.co.uk>
#ifndef MULTIBOOT_H
#define MULTIBOOT_H
#include "common.h"
#define MULTIBOOT_FLAG_MEM 0x001
#define MULTIBOOT_FLAG_DEVICE 0x002
#define MULTIBOOT_FLAG_CMDLINE 0x004
#define MULTIBOOT_FLAG_MODS 0x008
#define MULTIBOOT_FLAG_AOUT 0x010
#define MULTIBOOT_FLAG_ELF 0x020
#define MULTIBOOT_FLAG_MMAP 0x040
#define MULTIBOOT_FLAG_CONFIG 0x080
#define MULTIBOOT_FLAG_LOADER 0x100
#define MULTIBOOT_FLAG_APM 0x200
#define MULTIBOOT_FLAG_VBE 0x400
struct multiboot
{
u32int flags;
u32int mem_lower;
u32int mem_upper;
u32int boot_device;
u32int cmdline;
u32int mods_count;
u32int mods_addr;
u32int num;
u32int size;
u32int addr;
u32int shndx;
u32int mmap_length;
u32int mmap_addr;
u32int drives_length;
u32int drives_addr;
u32int config_table;
u32int boot_loader_name;
u32int apm_table;
u32int vbe_control_info;
u32int vbe_mode_info;
u32int vbe_mode;
u32int vbe_interface_seg;
u32int vbe_interface_off;
u32int vbe_interface_len;
} __attribute__((packed));
typedef struct multiboot_header multiboot_header_t;
typedef struct
{
u32int size;
u32int base_addr_low;
u32int base_addr_high;
u32int length_low;
u32int length_high;
u32int type;
} __attribute__((packed)) mmap_entry_t;
#endif