SimpleOS

LXR

Navigation



Site hébergé par : enix

The LXR Cross Referencer for SOS

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Article:1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 6.5 ] [ 7 ] [ 7.5 ] [ 8 ] [ 9 ] [ 9.5 ]

Diff markup

Differences between /bootstrap/multiboot.h (Article 4) and /bootstrap/multiboot.h (Article 2)


001 #ifndef __MULTIBOOT_H__                           001 #ifndef __MULTIBOOT_H__
002 #define __MULTIBOOT_H__                           002 #define __MULTIBOOT_H__
003                                                   003 
004 /* multiboot.h - the header for Multiboot */      004 /* multiboot.h - the header for Multiboot */
005 /* Copyright (C) 1999  Free Software Foundatio    005 /* Copyright (C) 1999  Free Software Foundation, Inc.
006                                                   006    
007    This program is free software; you can redi    007    This program is free software; you can redistribute it and/or modify
008    it under the terms of the GNU General Publi    008    it under the terms of the GNU General Public License as published by
009    the Free Software Foundation; either versio    009    the Free Software Foundation; either version 2 of the License, or
010    (at your option) any later version.            010    (at your option) any later version.
011                                                   011    
012    This program is distributed in the hope tha    012    This program is distributed in the hope that it will be useful,
013    but WITHOUT ANY WARRANTY; without even the     013    but WITHOUT ANY WARRANTY; without even the implied warranty of
014    MERCHANTABILITY or FITNESS FOR A PARTICULAR    014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015    GNU General Public License for more details    015    GNU General Public License for more details.
016                                                   016    
017    You should have received a copy of the GNU     017    You should have received a copy of the GNU General Public License
018    along with this program; if not, write to t    018    along with this program; if not, write to the Free Software
019    Foundation, Inc., 675 Mass Ave, Cambridge,     019    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
020                                                   020 
021 /* Macros.  */                                    021 /* Macros.  */
022                                                   022 
023 /* The magic number for the Multiboot header.     023 /* The magic number for the Multiboot header.  */
024 #define MULTIBOOT_HEADER_MAGIC          0x1BAD    024 #define MULTIBOOT_HEADER_MAGIC          0x1BADB002
025                                                   025 
026 /* The flags for the Multiboot header.  */        026 /* The flags for the Multiboot header.  */
027 #define MULTIBOOT_HEADER_FLAGS          0x0001    027 #define MULTIBOOT_HEADER_FLAGS          0x00010003
028                                                   028 
029 /* The magic number passed by a Multiboot-comp    029 /* The magic number passed by a Multiboot-compliant boot loader.  */
030 #define MULTIBOOT_BOOTLOADER_MAGIC      0x2BAD    030 #define MULTIBOOT_BOOTLOADER_MAGIC      0x2BADB002
031                                                   031 
032 /* The size of our stack (16KB).  */              032 /* The size of our stack (16KB).  */
033 #define MULTIBOOT_STACK_SIZE            0x4000    033 #define MULTIBOOT_STACK_SIZE            0x4000
034                                                   034 
035 #define MULTIBOOT_CMDLINE 4                       035 #define MULTIBOOT_CMDLINE 4
036 #define MULTIBOOT_MODS 8                          036 #define MULTIBOOT_MODS 8
037                                                   037 
038 /* C symbol format. HAVE_ASM_USCORE is defined    038 /* C symbol format. HAVE_ASM_USCORE is defined by configure.  */
039 #ifdef HAVE_ASM_USCORE                            039 #ifdef HAVE_ASM_USCORE
040 # define EXT_C(sym)                     _ ## s    040 # define EXT_C(sym)                     _ ## sym
041 #else                                             041 #else
042 # define EXT_C(sym)                     sym       042 # define EXT_C(sym)                     sym
043 #endif                                            043 #endif
044                                                   044 
045 #ifndef ASM                                       045 #ifndef ASM
046 /* Do not include here in boot.S.  */             046 /* Do not include here in boot.S.  */
047                                                   047 
048                                                   048 
049                                                   049 
050 /* Types.  */                                     050 /* Types.  */
051                                                   051 
052 /* The Multiboot header.  */                      052 /* The Multiboot header.  */
053 typedef struct multiboot_header                   053 typedef struct multiboot_header
054 {                                                 054 {
055   unsigned long magic;                            055   unsigned long magic;
056   unsigned long flags;                            056   unsigned long flags;
057   unsigned long checksum;                         057   unsigned long checksum;
058   unsigned long header_addr;                      058   unsigned long header_addr;
059   unsigned long load_addr;                        059   unsigned long load_addr;
060   unsigned long load_end_addr;                    060   unsigned long load_end_addr;
061   unsigned long bss_end_addr;                     061   unsigned long bss_end_addr;
062   unsigned long entry_addr;                       062   unsigned long entry_addr;
063 } multiboot_header_t;                             063 } multiboot_header_t;
064                                                   064 
065 /* The symbol table for a.out.  */                065 /* The symbol table for a.out.  */
066 typedef struct aout_symbol_table                  066 typedef struct aout_symbol_table
067 {                                                 067 {
068   unsigned long tabsize;                          068   unsigned long tabsize;
069   unsigned long strsize;                          069   unsigned long strsize;
070   unsigned long addr;                             070   unsigned long addr;
071   unsigned long reserved;                         071   unsigned long reserved;
072 } aout_symbol_table_t;                            072 } aout_symbol_table_t;
073                                                   073 
074 /* The section header table for ELF.  */          074 /* The section header table for ELF.  */
075 typedef struct elf_section_header_table           075 typedef struct elf_section_header_table
076 {                                                 076 {
077   unsigned long num;                              077   unsigned long num;
078   unsigned long size;                             078   unsigned long size;
079   unsigned long addr;                             079   unsigned long addr;
080   unsigned long shndx;                            080   unsigned long shndx;
081 } elf_section_header_table_t;                     081 } elf_section_header_table_t;
082                                                   082 
083 /* The Multiboot information.  */                 083 /* The Multiboot information.  */
084 typedef struct multiboot_info                     084 typedef struct multiboot_info
085 {                                                 085 {
086   unsigned long flags;                            086   unsigned long flags;
087   unsigned long mem_lower;                        087   unsigned long mem_lower;
088   unsigned long mem_upper;                        088   unsigned long mem_upper;
089   unsigned long boot_device;                      089   unsigned long boot_device;
090   unsigned long cmdline;                          090   unsigned long cmdline;
091   unsigned long mods_count;                       091   unsigned long mods_count;
092   unsigned long mods_addr;                        092   unsigned long mods_addr;
093   union                                           093   union
094   {                                               094   {
095     aout_symbol_table_t aout_sym;                 095     aout_symbol_table_t aout_sym;
096     elf_section_header_table_t elf_sec;           096     elf_section_header_table_t elf_sec;
097   } u;                                            097   } u;
098   unsigned long mmap_length;                      098   unsigned long mmap_length;
099   unsigned long mmap_addr;                        099   unsigned long mmap_addr;
100   unsigned long drives_length;                    100   unsigned long drives_length;
101   unsigned long drives_addr;                      101   unsigned long drives_addr;
102 } multiboot_info_t;                               102 } multiboot_info_t;
103                                                   103 
104 /* The module structure.  */                      104 /* The module structure.  */
105 typedef struct module                             105 typedef struct module
106 {                                                 106 {
107   unsigned long mod_start;                        107   unsigned long mod_start;
108   unsigned long mod_end;                          108   unsigned long mod_end;
109   unsigned long string;                           109   unsigned long string;
110   unsigned long reserved;                         110   unsigned long reserved;
111 } module_t;                                       111 } module_t;
112                                                   112 
113 /* The memory map. Be careful that the offset     113 /* The memory map. Be careful that the offset 0 is base_addr_low
114    but no size.  */                               114    but no size.  */
115 typedef struct memory_map                         115 typedef struct memory_map
116 {                                                 116 {
117   unsigned long size;                             117   unsigned long size;
118   unsigned long base_addr_low;                    118   unsigned long base_addr_low;
119   unsigned long base_addr_high;                   119   unsigned long base_addr_high;
120   unsigned long length_low;                       120   unsigned long length_low;
121   unsigned long length_high;                      121   unsigned long length_high;
122   unsigned long type;                             122   unsigned long type;
123 } memory_map_t;                                   123 } memory_map_t;
124                                                   124 
125 void dump_multiboot_info(multiboot_info_t *mbi    125 void dump_multiboot_info(multiboot_info_t *mbi);
126                                                   126 
127 #endif /* ! ASM */                                127 #endif /* ! ASM */
128                                                   128 
129 #endif /* __MULTIBOOT_H__ */                      129 #endif /* __MULTIBOOT_H__ */
                                                      

source navigation ] diff markup ] identifier search ] general search ]