FreeNOS
IntelBoot.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __LIBARCH_INTEL_BOOT_H
19 #define __LIBARCH_INTEL_BOOT_H
20 
33 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
34 
36 #define MULTIBOOT_HEADER_FLAGS 0x00000003
37 
39 #define MULTIBOOT_HEADER_SIZE 52
40 
42 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
43 
50 /* Do not include in assembler source. */
51 #ifndef __ASSEMBLER__
52 
53 #include <Types.h>
54 
69 typedef struct AoutSymbolTable
70 {
75 }
77 
81 typedef struct ElfSectionHeaderTable
82 {
87 }
89 
93 typedef struct MultibootInfo
94 {
102 
103  union
104  {
107  };
110 }
112 
116 typedef struct MultibootModule
117 {
122 }
124 
130 typedef struct MultibootMemoryMap
131 {
138 }
140 
143 
147 extern C void bootEntry16();
148 
152 extern C void bootEntry32();
153 
163 extern C void multibootEntry();
164 
168 extern C void multibootToCoreInfo(MultibootInfo *info);
169 
176 #endif /* !__ASSEMBLER__ */
177 #endif /* __LIBARCH_INTEL_BOOT_H */
MultibootInfo::flags
u32 flags
Definition: IntelBoot.h:95
MultibootInfo::memLower
u32 memLower
Definition: IntelBoot.h:96
MultibootInfo::bootDevice
u32 bootDevice
Definition: IntelBoot.h:98
AoutSymbolTable::address
u32 address
Definition: IntelBoot.h:73
AoutSymbolTable
The symbol table for a.out.
Definition: IntelBoot.h:69
Types.h
AoutSymbolTable::tabSize
u32 tabSize
Definition: IntelBoot.h:71
MultibootInfo::modsCount
u32 modsCount
Definition: IntelBoot.h:100
AoutSymbolTable::strSize
u32 strSize
Definition: IntelBoot.h:72
MultibootInfo::mmapAddress
u32 mmapAddress
Definition: IntelBoot.h:109
MultibootInfo
struct MultibootInfo MultibootInfo
The Multiboot information.
MultibootInfo::modsAddress
u32 modsAddress
Definition: IntelBoot.h:101
MultibootMemoryMap::baseAddressHigh
u32 baseAddressHigh
Definition: IntelBoot.h:134
MultibootModule::modStart
u32 modStart
Definition: IntelBoot.h:118
ElfSectionHeaderTable
The section header table for ELF.
Definition: IntelBoot.h:81
multibootInfo
MultibootInfo multibootInfo
Fill in by the early boot process.
ElfSectionHeaderTable::size
u32 size
Definition: IntelBoot.h:84
MultibootInfo::aout
AoutSymbolTable aout
Definition: IntelBoot.h:105
AoutSymbolTable
struct AoutSymbolTable AoutSymbolTable
The symbol table for a.out.
C
#define C
Used to define external C functions.
Definition: Macros.h:134
MultibootMemoryMap::baseAddressLow
u32 baseAddressLow
Definition: IntelBoot.h:133
MultibootInfo
The Multiboot information.
Definition: IntelBoot.h:93
bootEntry32
C void bootEntry32()
Entry point in 32-bit protected mode.
ElfSectionHeaderTable::address
u32 address
Definition: IntelBoot.h:85
MultibootInfo::elf
ElfSectionHeaderTable elf
Definition: IntelBoot.h:106
multibootEntry
C void multibootEntry()
Entry point from GRUB multiboot.
u32
unsigned int u32
Unsigned 32-bit number.
Definition: Types.h:53
MultibootInfo::cmdline
u32 cmdline
Definition: IntelBoot.h:99
MultibootModule::modEnd
u32 modEnd
Definition: IntelBoot.h:119
MultibootModule
struct MultibootModule MultibootModule
The module class.
MultibootMemoryMap::size
u32 size
Definition: IntelBoot.h:132
MultibootInfo::mmapLength
u32 mmapLength
Definition: IntelBoot.h:108
MultibootMemoryMap
struct MultibootMemoryMap MultibootMemoryMap
The MultiBoot memory map.
bootEntry16
C void bootEntry16()
Entry point in 16-bit real mode.
multibootToCoreInfo
C void multibootToCoreInfo(MultibootInfo *info)
Convert multiboot info to a CoreInfo struct.
Definition: IntelBoot.cpp:25
ElfSectionHeaderTable
struct ElfSectionHeaderTable ElfSectionHeaderTable
The section header table for ELF.
ElfSectionHeaderTable::num
u32 num
Definition: IntelBoot.h:83
MultibootMemoryMap::lengthLow
u32 lengthLow
Definition: IntelBoot.h:135
MultibootModule::reserved
u32 reserved
Definition: IntelBoot.h:121
AoutSymbolTable::reserved
u32 reserved
Definition: IntelBoot.h:74
MultibootModule
The module class.
Definition: IntelBoot.h:116
MultibootMemoryMap
The MultiBoot memory map.
Definition: IntelBoot.h:130
MultibootMemoryMap::type
u32 type
Definition: IntelBoot.h:137
MultibootMemoryMap::lengthHigh
u32 lengthHigh
Definition: IntelBoot.h:136
MultibootModule::string
u32 string
Definition: IntelBoot.h:120
MultibootInfo::memUpper
u32 memUpper
Definition: IntelBoot.h:97
ElfSectionHeaderTable::shndx
u32 shndx
Definition: IntelBoot.h:86