-
Notifications
You must be signed in to change notification settings - Fork 0
/
mboot.h
52 lines (44 loc) · 829 Bytes
/
mboot.h
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
#ifndef MBOOT_H
#define MBOOT_H
#include "types.h"
struct aout_symbol_table {
u32 tabsize;
u32 strsize;
u32 addr;
u32 reserved;
};
struct elf_section_header_table {
u32 num;
u32 size;
u32 addr;
u32 shndx;
};
struct mboot_info {
u32 flags;
u32 mem_lower;
u32 mem_upper;
u32 boot_device;
u32 cmdline;
u32 mods_count;
u32 mods_addr;
union {
struct aout_symbol_table aout_sym;
struct elf_section_header_table elf_sec;
} u;
u32 mmap_length;
u32 mmap_addr;
};
struct mboot_mmap {
u32 size;
u32 base_addr_low;
u32 base_addr_high;
u32 length_low;
u32 length_high;
u32 type;
};
/* we need to know how much memory we have. */
extern size_t phys_mem;
/* provide the bios's map of memory */
extern struct mboot_mmap *bios_mmap;
void kinit_mboot(struct mboot_info *minfo, u32 magic);
#endif /* MBOOT_H */