summaryrefslogtreecommitdiffstats
path: root/include/boot.h
blob: c4aa541a5967450991b1b1ca7ce805915f5f367f (plain) (blame)
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
#ifndef JOVE_BOOT_H
#define JOVE_BOOT_H 1

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

struct MemoryMapEntry {
    uintptr_t base;
    size_t length;
    bool usable;
};

#define MEMORY_MAP_MAX_ENTRIES 128
struct MemoryMap {
    size_t count;
    struct MemoryMapEntry entries[MEMORY_MAP_MAX_ENTRIES];
};

#define BOOT_MODULE_MAX_ENTRIES 4
struct BootModule {
    char *path;
    char *cmdline;
    size_t size;
    uintptr_t addr;
};

#define KERNEL_INITIAL_STACK_WIDTH (0x1000 * 4)
extern void *boot_kernel_initial_stack_base;
extern uintptr_t boot_kernel_physical_address;
extern const char *boot_kernel_cmdline;

extern struct MemoryMap boot_memorymap;

extern struct BootModule boot_modules[BOOT_MODULE_MAX_ENTRIES];
extern size_t boot_module_count;

#endif