POK(kernelpart)
/home/jaouen/pok_official/pok/trunk/kernel/include/arch/x86/multiboot.h
Go to the documentation of this file.
00001 /*
00002  *                               POK header
00003  * 
00004  * The following file is a part of the POK project. Any modification should
00005  * made according to the POK licence. You CANNOT use this file or a part of
00006  * this file is this part of a file for your own project
00007  *
00008  * For more information on the POK licence, please see our LICENCE FILE
00009  *
00010  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
00011  *
00012  *                                      Copyright (c) 2007-2009 POK team 
00013  *
00014  * Created by julien on Thu Jan 15 23:34:13 2009 
00015  */
00016 
00023 #ifndef __POK_MULTIBOOT_H__
00024 #define __POK_MULTIBOOT_H__
00025 
00026 #define MULTIBOOT_BOOTLOADER_MAGIC     0x2BADB002
00027 
00031 #define MULTIBOOT_HEADER_MAGIC          0x1BADB002
00032 
00036 #define MULTIBOOT_HEADER_FLAGS          0x00010003
00037 
00041 #define MULTIBOOT_BOOTLOADER_MAGIC      0x2BADB002
00042 
00046 #define MULTIBOOT_STACK_SIZE            0x4000
00047 
00048 #define MULTIBOOT_CMDLINE 4
00049 #define MULTIBOOT_MODS 8
00050 
00054 #ifdef HAVE_ASM_USCORE
00055 # define EXT_C(sym)                     _ ## sym
00056 #else
00057 # define EXT_C(sym)                     sym
00058 #endif
00059 
00060 #ifndef ASM
00061 /* Do not include here in boot.S.  */
00062 
00063 
00064 typedef struct
00065 {
00066    unsigned int                  magic;
00067    unsigned int                  flags;
00068    unsigned int                  checksum;
00069    unsigned int                  header_addr;
00070    unsigned int                  load_addr;
00071    unsigned int                  load_end_addr;
00072    unsigned int                  bss_end_addr;
00073    unsigned int                  entry_addr;
00074 } pok_multiboot_header_t;
00075 
00076 typedef struct
00077 {
00078    unsigned int                  tabsize;
00079    unsigned int                  strsize;
00080    unsigned int                  addr;
00081    unsigned int                  reserved;
00082 } pok_aout_symbol_table_t;
00083 
00084 typedef struct
00085 {
00086    unsigned int                  num;
00087    unsigned int                  size;
00088    unsigned int                  addr;
00089    unsigned int                  shndx;
00090 } pok_elf_section_header_table_t;
00091 
00092 typedef struct
00093 {
00094    unsigned int                  flags;
00095    unsigned int                  mem_lower;
00096    unsigned int                  mem_upper;
00097    unsigned int                  boot_device;
00098    unsigned int                  cmdline;
00099    unsigned int                  mods_count;
00100    unsigned int                  mods_addr;
00101 
00102    union
00103    {
00104       pok_aout_symbol_table_t         aout_sym;
00105       pok_elf_section_header_table_t  elf_sec;
00106    }                             u;
00107 
00108    unsigned int                  mmap_length;
00109    unsigned int                  mmap_addr;
00110 } pok_multiboot_info_t;
00111 
00112 typedef struct
00113 {
00114    unsigned int                  mod_start;
00115    unsigned int                  mod_end;
00116    unsigned int                  string;
00117    unsigned int                  reserved;
00118 } pok_module_t;
00119 
00120 typedef struct
00121 {
00122    unsigned int                  size;
00123    unsigned int                  base_addr_low;
00124    unsigned int                  base_addr_high;
00125    unsigned int                  length_low;
00126    unsigned int                  length_high;
00127    unsigned int                  type;
00128 } pok_memory_map_t;
00129 
00130 #endif
00131 
00132 #endif /* __POK_MULTIBOOT_H__ */