blob: 09f728622dcbe0c680766a997185df8b376c0efe (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/**
* @file
*
* This Structures ars defined by the multiboot specification and you will
* get them from your bootloader.
*
* Ref
* ---
* 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 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;
uint64_t framebuffer_addr;
uint32_t framebuffer_pitch;
uint32_t framebuffer_width;
uint32_t framebuffer_height;
uint8_t framebuffer_bpp;
uint8_t framebuffer_type;
//color_info;
}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* multiboot_read(uint32_t eax, uint32_t ebx);
#endif
|