summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/multiboot.h
blob: 1d6718fd7bb4b08cb46e9ee23dd83c8f3404cfd0 (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
#pragma once
#include <stdint.h>

#ifndef __CHECKER__
_Static_assert(sizeof(void*) == 4,
		"this code assumes that pointers have 4 bytes");
#endif

struct multiboot_mod {
	void *start;
	void *end;
	const char *str;
	uint32_t _reserved;
} __attribute__((packed));

struct multiboot_info {
	uint32_t flag_mem         : 1;
	uint32_t flag_boot_device : 1;
	uint32_t flag_cmdline     : 1;
	uint32_t flag_mods        : 1;
	uint32_t _flag_other      : 28; // unimplemented
	
	uint32_t mem_lower;
	uint32_t mem_upper;

	uint32_t boot_device;

	const char *cmdline;

	uint32_t mods_count;
	struct multiboot_mod *mods;

	// [...]
} __attribute__((packed));