summaryrefslogtreecommitdiff
path: root/kernel/include/arch/i686/mboot.h
blob: 2ebc9837fe10540f41b0aee3c0de18f00eda4df9 (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 <stdbool.h>
#include <stdint.h>
#include <arch/i686/mboot.h>
#include <arch/i686/memory.h>

#define CMDLINE_MAX 32

struct BootTag {
    uint8_t valid;
    uint32_t type;
    uint32_t size;
    union {
        char cmdline[CMDLINE_MAX + 1];
        struct MemoryMap *memory_map;
        struct RootSystemDescriptionPointer *rsdp;
    } data;
};

struct BootInfo {
    uint32_t total_size;
    uint32_t reserved;
    struct BootTag tags[21];
};

enum BootTagID {
    ID_CMDLINE = 0,
    ID_MEMORYMAP = 6,
    ID_RSDP = 14
};

extern void load_boot_info(void* boot_info);
extern bool get_boot_tag(enum BootTagID id, struct BootTag **tag);