AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
boot.h
Go to the documentation of this file.
1#ifndef _BOOT_H
2#define _BOOT_H
3
4#include <core/system.h>
5#include <sys/elf.h>
6
7/*
8 * What the boot loader passed the kernel, in the same form whatever the
9 * boot loader (Multiboot on the PC, a devicetree on aarch64): the memory
10 * map, the modules, the command line, and the kernel's symbols if they
11 * were passed.
12 */
13
14/* A module the boot loader loaded: the RAM disk. */
15typedef struct {
16 uintptr_t paddr; /* its physical address; arch_phys_map() maps it */
17 size_t size;
18 char *cmdline;
19} module_t;
20
21/* What a region of the memory map is. */
26
27/* A region of the memory map, [start, end). */
33
34/* Everything the boot loader passed. */
35struct boot {
36 char *cmdline;
37 uintptr_t total_mem; /* how much memory there is, in KiB */
38
43
44 /* the kernel's ELF section headers, if the boot loader passed them,
45 * and its symbol table and string table among them */
48
50 size_t symnum; /* how many symbols */
51
53};
54
55#endif
struct elf32_shdr elf_shdr_t
Definition elf.h:223
mmap_type
Definition boot.h:22
@ MMAP_USABLE
Definition boot.h:23
@ MMAP_RESERVED
Definition boot.h:24
__SIZE_TYPE__ uintptr_t
Definition stddef.h:12
unsigned int uint32_t
Definition stddef.h:22
Definition boot.h:35
int mmap_count
Definition boot.h:40
char * cmdline
Definition boot.h:36
module_t * modules
Definition boot.h:41
elf_shdr_t * symtab
Definition boot.h:49
uint32_t shdr_num
Definition boot.h:47
size_t symnum
Definition boot.h:50
uintptr_t total_mem
Definition boot.h:37
elf_shdr_t * strtab
Definition boot.h:52
elf_shdr_t * shdr
Definition boot.h:46
mmap_t * mmap
Definition boot.h:42
int modules_count
Definition boot.h:39
Definition boot.h:28
uintptr_t end
Definition boot.h:31
enum mmap_type type
Definition boot.h:29
uintptr_t start
Definition boot.h:30
size_t size
Definition boot.h:17
char * cmdline
Definition boot.h:18
uintptr_t paddr
Definition boot.h:16