blob: 3be30549f1532c89afd16a5d9e81243f50d698e3 (
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
|
#pragma once
#include "memory.h"
#include <stdint.h>
#define CMDLINE_MAX 32
struct mboot_tag {
uint8_t valid; // if the tag at this location is set
uint32_t type;
uint32_t size;
union {
char cmdline[CMDLINE_MAX + 1];
struct memory_map *memory_map;
void *rootsdp;
} data;
};
enum mboot_tag_type {
MBOOT_CMDLINE = 0,
MBOOT_MEMORYMAP = 6,
MBOOT_SYMBOLS = 9,
MBOOT_XSDP = 14
};
struct mboot_info {
uint32_t total_size;
uint32_t reserved;
struct mboot_tag tags[22];
};
/**
* Loads the multi boot information
* @param mboot_info - the pointer passed from multiboot2
*/
struct mboot_info mboot_load_info(const void *mboot_info);
/**
* Gets a tag from multiboot
* @param type - the tag type
* @returns NULL - tag not loaded
* @returns tag - tag was loaded
*/
struct mboot_tag *mboot_get_tag(struct mboot_info *info, enum mboot_tag_type type);
|