summaryrefslogtreecommitdiff
path: root/kernel/multiboot.h
blob: bb31a2e96c6500078cfc60c996c149df5cbadcfd (plain)
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
//# https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Boot-information-format
#ifndef MULTIBOOT_H
#define MULTIBOOT_H


#include <stdbool.h>
#include <stdint.h>


typedef struct multiboot_information_struct
{
    uint32_t flags;
    uint32_t mem_lower;
    uint32_t mem_upper;
    uint32_t boot_device;
    uint32_t cmdline;
    uint32_t mods_count;
    uint32_t mods_addr;
    uint32_t mods_syms[4];
    uint32_t mmap_length;
    uint32_t mmap_addr;
    uint32_t drives_length;
    uint32_t drives_addr;
    uint32_t config_table;
    uint32_t boot_loader_name;
    uint32_t amp_table;
    uint32_t vbe_control_info;
    uint32_t vbe_mode_info;
    uint16_t vbe_mode;
    uint16_t vbe_interface_seg;
    uint16_t vbe_interface_off;
    uint16_t vbe_interface_len;


}multiboot_information;

typedef struct multiboot_mmap_struct
{
    uint32_t size;
    uint64_t base_addr;
    uint64_t length;
    uint32_t type;

}multiboot_mmap;

typedef struct multiboot_mod_struct
{
    uint32_t mod_start;
    uint32_t mod_end;
    uint32_t string;
    uint32_t reserved;

}multiboot_mod;


multiboot_information* get_multiboot(uint32_t eax, uint32_t ebx);

#endif