~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to include/grub/powerpc/ieee1275/multiboot.h

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2006-01-05 15:20:40 UTC
  • mto: (17.3.1 squeeze) (1.9.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060105152040-b72i5pq1a82z22yi
Tags: upstream-1.92
ImportĀ upstreamĀ versionĀ 1.92

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* multiboot.h - multiboot header file. */
 
2
/*
 
3
 *  GRUB  --  GRand Unified Bootloader
 
4
 *  Copyright (C) 2003, 2004  Free Software Foundation, Inc.
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
19
 */
 
20
 
 
21
#ifndef GRUB_MULTIBOOT_MACHINE_HEADER
 
22
#define GRUB_MULTIBOOT_MACHINE_HEADER 1
 
23
 
 
24
/* How many bytes from the start of the file we search for the header.  */
 
25
#define GRUB_MB_SEARCH                 8192
 
26
 
 
27
/* The magic field should contain this.  */
 
28
#define GRUB_MB_MAGIC                  0x1BADB002
 
29
 
 
30
/* This should be in %eax.  */
 
31
#define GRUB_MB_MAGIC2                 0x2BADB002
 
32
 
 
33
/* The bits in the required part of flags field we don't support.  */
 
34
#define GRUB_MB_UNSUPPORTED            0x0000fffc
 
35
 
 
36
/* Alignment of multiboot modules.  */
 
37
#define GRUB_MB_MOD_ALIGN              0x00001000
 
38
 
 
39
/* 
 
40
 * Flags set in the 'flags' member of the multiboot header.
 
41
 */
 
42
 
 
43
/* Align all boot modules on i386 page (4KB) boundaries.  */
 
44
#define GRUB_MB_PAGE_ALIGN              0x00000001
 
45
 
 
46
/* Must pass memory information to OS.  */
 
47
#define GRUB_MB_MEMORY_INFO             0x00000002
 
48
 
 
49
/* Must pass video information to OS.  */
 
50
#define GRUB_MB_VIDEO_MODE              0x00000004
 
51
 
 
52
/* This flag indicates the use of the address fields in the header.  */
 
53
#define GRUB_MB_AOUT_KLUDGE             0x00010000
 
54
 
 
55
/*
 
56
 *  Flags to be set in the 'flags' member of the multiboot info structure.
 
57
 */
 
58
 
 
59
/* is there basic lower/upper memory information? */
 
60
#define GRUB_MB_INFO_MEMORY             0x00000001
 
61
/* is there a boot device set? */
 
62
#define GRUB_MB_INFO_BOOTDEV            0x00000002
 
63
/* is the command-line defined? */
 
64
#define GRUB_MB_INFO_CMDLINE            0x00000004
 
65
/* are there modules to do something with? */
 
66
#define GRUB_MB_INFO_MODS               0x00000008
 
67
 
 
68
/* These next two are mutually exclusive */
 
69
 
 
70
/* is there a symbol table loaded? */
 
71
#define GRUB_MB_INFO_AOUT_SYMS          0x00000010
 
72
/* is there an ELF section header table? */
 
73
#define GRUB_MB_INFO_ELF_SHDR           0x00000020
 
74
 
 
75
/* is there a full memory map? */
 
76
#define GRUB_MB_INFO_MEM_MAP            0x00000040
 
77
 
 
78
/* Is there drive info?  */
 
79
#define GRUB_MB_INFO_DRIVE_INFO         0x00000080
 
80
 
 
81
/* Is there a config table?  */
 
82
#define GRUB_MB_INFO_CONFIG_TABLE       0x00000100
 
83
 
 
84
/* Is there a boot loader name?  */
 
85
#define GRUB_MB_INFO_BOOT_LOADER_NAME   0x00000200
 
86
 
 
87
/* Is there a APM table?  */
 
88
#define GRUB_MB_INFO_APM_TABLE          0x00000400
 
89
 
 
90
/* Is there video information?  */
 
91
#define GRUB_MB_INFO_VIDEO_INFO         0x00000800
 
92
 
 
93
#ifndef ASM_FILE
 
94
 
 
95
#include <grub/types.h>
 
96
 
 
97
struct grub_multiboot_header
 
98
 
99
  /* Must be GRUB_MB_MAGIC - see above.  */
 
100
  grub_uint32_t magic;
 
101
 
 
102
  /* Feature flags.  */
 
103
  grub_uint32_t flags;
 
104
 
 
105
  /* The above fields plus this one must equal 0 mod 2^32. */
 
106
  grub_uint32_t checksum;
 
107
  
 
108
  /* These are only valid if GRUB_MB_AOUT_KLUDGE is set.  */
 
109
  grub_uint32_t header_addr;
 
110
  grub_uint32_t load_addr;
 
111
  grub_uint32_t load_end_addr;
 
112
  grub_uint32_t bss_end_addr;
 
113
  grub_uint32_t entry_addr;
 
114
 
 
115
  /* These are only valid if GRUB_MB_VIDEO_MODE is set.  */
 
116
  grub_uint32_t mode_type;
 
117
  grub_uint32_t width;
 
118
  grub_uint32_t height;
 
119
  grub_uint32_t depth;
 
120
};
 
121
 
 
122
struct grub_multiboot_info
 
123
{
 
124
  /* MultiBoot info version number */
 
125
  grub_uint32_t flags;
 
126
  
 
127
  /* Available memory from BIOS */
 
128
  grub_uint32_t mem_lower;
 
129
  grub_uint32_t mem_upper;
 
130
  
 
131
  /* "root" partition */
 
132
  grub_uint32_t boot_device;
 
133
  
 
134
  /* Kernel command line */
 
135
  grub_uint32_t cmdline;
 
136
  
 
137
  /* Boot-Module list */
 
138
  grub_uint32_t mods_count;
 
139
  grub_uint32_t mods_addr;
 
140
  
 
141
  grub_uint32_t syms[4];
 
142
  
 
143
  /* Memory Mapping buffer */
 
144
  grub_uint32_t mmap_length;
 
145
  grub_uint32_t mmap_addr;
 
146
  
 
147
  /* Drive Info buffer */
 
148
  grub_uint32_t drives_length;
 
149
  grub_uint32_t drives_addr;
 
150
  
 
151
  /* ROM configuration table */
 
152
  grub_uint32_t config_table;
 
153
  
 
154
  /* Boot Loader Name */
 
155
  grub_uint32_t boot_loader_name;
 
156
 
 
157
  /* APM table */
 
158
  grub_uint32_t apm_table;
 
159
 
 
160
  /* Video */
 
161
  grub_uint32_t vbe_control_info;
 
162
  grub_uint32_t vbe_mode_info;
 
163
  grub_uint16_t vbe_mode;
 
164
  grub_uint16_t vbe_interface_seg;
 
165
  grub_uint16_t vbe_interface_off;
 
166
  grub_uint16_t vbe_interface_len;
 
167
};
 
168
 
 
169
struct grub_mod_list
 
170
{
 
171
  /* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
 
172
  grub_uint32_t mod_start;
 
173
  grub_uint32_t mod_end;
 
174
  
 
175
  /* Module command line */
 
176
  grub_uint32_t cmdline;
 
177
  
 
178
  /* padding to take it to 16 bytes (must be zero) */
 
179
  grub_uint32_t pad;
 
180
};
 
181
 
 
182
#endif /* ! ASM_FILE */
 
183
 
 
184
#endif /* ! GRUB_MULTIBOOT_MACHINE_HEADER */