MentOS  0.8.0
The Mentoring Operating System
boot.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "multiboot.h"
9 
11 typedef struct boot_info_t {
13  unsigned int magic;
14 
15  /*
16  * Bootloader physical range
17  * it can be overwritten to do other things
18  * */
19 
21  unsigned int bootloader_phy_start;
23  unsigned int bootloader_phy_end;
24 
25  /*
26  * Kernel virtual and physical range
27  * must not be overwritten
28  * it's assumed to be contiguous, so section holes are just wasted space
29  * */
30 
32  unsigned int kernel_phy_start;
34  unsigned int kernel_phy_end;
35 
37  unsigned int kernel_start;
39  unsigned int kernel_end;
40 
42  unsigned int kernel_size;
43 
45  unsigned int module_end;
46 
47  /*
48  * Range of addressable lowmemory, is memory that is available
49  * (not used by the kernel executable nor by the bootloader)
50  * and can be accessed by the kernel at any time
51  * */
52 
54  unsigned int lowmem_phy_start;
56  unsigned int lowmem_phy_end;
57 
59  unsigned int lowmem_start;
61  unsigned int lowmem_end;
62 
64  unsigned int stack_end;
65 
66  /*
67  * Range of non-addressable highmemory, is memory that can be
68  * accessed by the kernel only if previously mapped
69  * */
70 
72  unsigned int highmem_phy_start;
74  unsigned int highmem_phy_end;
75 
78 
80  unsigned int stack_base;
struct boot_info_t boot_info_t
Mentos structure to communicate bootloader info to the kernel.
Data structures used for multiboot.
Mentos structure to communicate bootloader info to the kernel.
Definition: boot.h:11
unsigned int stack_end
stack end (comes after lowmem_end, and is the end of the low mapped memory)
Definition: boot.h:64
unsigned int kernel_phy_start
kernel physical code start
Definition: boot.h:32
multiboot_info_t * multiboot_header
multiboot info
Definition: boot.h:77
unsigned int kernel_start
kernel code start
Definition: boot.h:37
unsigned int lowmem_phy_start
lowmem physical addressable start
Definition: boot.h:54
unsigned int module_end
Address after the modules.
Definition: boot.h:45
unsigned int kernel_phy_end
kernel physical code end
Definition: boot.h:34
unsigned int lowmem_end
lowmem addressable end
Definition: boot.h:61
unsigned int kernel_end
kernel code end
Definition: boot.h:39
unsigned int stack_base
stack suggested start address (also set by the bootloader)
Definition: boot.h:80
unsigned int bootloader_phy_end
bootloader code end
Definition: boot.h:23
unsigned int highmem_phy_start
highmem addressable start
Definition: boot.h:72
unsigned int highmem_phy_end
highmem addressable end
Definition: boot.h:74
unsigned int bootloader_phy_start
bootloader code start
Definition: boot.h:21
unsigned int lowmem_start
lowmem addressable start
Definition: boot.h:59
unsigned int kernel_size
kernel size.
Definition: boot.h:42
unsigned int lowmem_phy_end
lowmem physical addressable end
Definition: boot.h:56
unsigned int magic
Boot magic number.
Definition: boot.h:13
Multiboot information structure.
Definition: multiboot.h:130