POK(kernelpart)
multiboot.h
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
23 #ifndef __POK_MULTIBOOT_H__
24 #define __POK_MULTIBOOT_H__
25 
26 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
27 
31 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
32 
36 #define MULTIBOOT_HEADER_FLAGS 0x00010003
37 
41 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
42 
46 #define MULTIBOOT_STACK_SIZE 0x4000
47 
48 #define MULTIBOOT_CMDLINE 4
49 #define MULTIBOOT_MODS 8
50 
54 #ifdef HAVE_ASM_USCORE
55 # define EXT_C(sym) _ ## sym
56 #else
57 # define EXT_C(sym) sym
58 #endif
59 
60 #ifndef ASM
61 /* Do not include here in boot.S. */
62 
63 
64 typedef struct
65 {
66  unsigned int magic;
67  unsigned int flags;
68  unsigned int checksum;
69  unsigned int header_addr;
70  unsigned int load_addr;
71  unsigned int load_end_addr;
72  unsigned int bss_end_addr;
73  unsigned int entry_addr;
75 
76 typedef struct
77 {
78  unsigned int tabsize;
79  unsigned int strsize;
80  unsigned int addr;
81  unsigned int reserved;
83 
84 typedef struct
85 {
86  unsigned int num;
87  unsigned int size;
88  unsigned int addr;
89  unsigned int shndx;
91 
92 typedef struct
93 {
94  unsigned int flags;
95  unsigned int mem_lower;
96  unsigned int mem_upper;
97  unsigned int boot_device;
98  unsigned int cmdline;
99  unsigned int mods_count;
100  unsigned int mods_addr;
101 
102  union
103  {
106  } u;
107 
108  unsigned int mmap_length;
109  unsigned int mmap_addr;
111 
112 typedef struct
113 {
114  unsigned int mod_start;
115  unsigned int mod_end;
116  unsigned int string;
117  unsigned int reserved;
118 } pok_module_t;
119 
120 typedef struct
121 {
122  unsigned int size;
123  unsigned int base_addr_low;
124  unsigned int base_addr_high;
125  unsigned int length_low;
126  unsigned int length_high;
127  unsigned int type;
129 
130 #endif
131 
132 #endif /* __POK_MULTIBOOT_H__ */