~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to include/grub/offsets.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  GRUB  --  GRand Unified Bootloader
 
3
 *  Copyright (C) 2002,2003,2007,2008  Free Software Foundation, Inc.
 
4
 *
 
5
 *  GRUB is free software: you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation, either version 3 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  GRUB is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef OFFSETS_HEADER
 
20
#define OFFSETS_HEADER  1
 
21
 
 
22
/* The offset of GRUB_TOTAL_MODULE_SIZE.  */
 
23
#define GRUB_KERNEL_I386_PC_TOTAL_MODULE_SIZE   0x8
 
24
 
 
25
/* The offset of GRUB_KERNEL_IMAGE_SIZE.  */
 
26
#define GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE   0xc
 
27
 
 
28
/* The offset of GRUB_COMPRESSED_SIZE.  */
 
29
#define GRUB_KERNEL_I386_PC_COMPRESSED_SIZE     0x10
 
30
 
 
31
/* The offset of GRUB_INSTALL_DOS_PART.  */
 
32
#define GRUB_KERNEL_I386_PC_INSTALL_DOS_PART    0x14
 
33
 
 
34
/* The offset of GRUB_INSTALL_BSD_PART.  */
 
35
#define GRUB_KERNEL_I386_PC_INSTALL_BSD_PART    0x18
 
36
 
 
37
/* Offset of reed_solomon_redundancy.  */
 
38
#define GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY     0x1c
 
39
 
 
40
/* The size of the first region which won't be compressed.  */
 
41
#define GRUB_KERNEL_I386_PC_RAW_SIZE            0xc90
 
42
 
 
43
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x6f8
 
44
 
 
45
/* The offset of GRUB_PREFIX.  */
 
46
#define GRUB_KERNEL_I386_PC_PREFIX              GRUB_KERNEL_I386_PC_RAW_SIZE
 
47
 
 
48
/* End of the data section. */
 
49
#define GRUB_KERNEL_I386_PC_PREFIX_END          (GRUB_KERNEL_I386_PC_PREFIX + 0x40)
 
50
 
 
51
/* The segment where the kernel is loaded.  */
 
52
#define GRUB_BOOT_I386_PC_KERNEL_SEG    0x800
 
53
 
 
54
#define GRUB_KERNEL_I386_PC_LINK_ADDR  0x8200
 
55
 
 
56
/* The upper memory area (starting at 640 kiB).  */
 
57
#define GRUB_MEMORY_I386_PC_UPPER               0xa0000
 
58
#define GRUB_MEMORY_I386_QEMU_UPPER             GRUB_MEMORY_I386_PC_UPPER
 
59
 
 
60
/* The offset of GRUB_CORE_ENTRY_ADDR.  */
 
61
#define GRUB_BOOT_I386_QEMU_CORE_ENTRY_ADDR     0x4
 
62
 
 
63
/* The offset of GRUB_CORE_ENTRY_ADDR.  */
 
64
#define GRUB_KERNEL_I386_QEMU_CORE_ENTRY_ADDR   0x8
 
65
 
 
66
/* The offset of GRUB_KERNEL_IMAGE_SIZE.  */
 
67
#define GRUB_KERNEL_I386_QEMU_KERNEL_IMAGE_SIZE 0xc
 
68
 
 
69
/* The offset of GRUB_PREFIX.  */
 
70
#define GRUB_KERNEL_I386_QEMU_PREFIX            0x10
 
71
 
 
72
/* End of the data section. */
 
73
#define GRUB_KERNEL_I386_QEMU_PREFIX_END                0x50
 
74
 
 
75
#define GRUB_KERNEL_I386_QEMU_LINK_ADDR         0x8200
 
76
 
 
77
/* The offset of GRUB_TOTAL_MODULE_SIZE.  */
 
78
#define GRUB_KERNEL_SPARC64_IEEE1275_TOTAL_MODULE_SIZE  0x8
 
79
 
 
80
/* The offset of GRUB_KERNEL_IMAGE_SIZE.  */
 
81
#define GRUB_KERNEL_SPARC64_IEEE1275_KERNEL_IMAGE_SIZE  0xc
 
82
 
 
83
/* The offset of GRUB_COMPRESSED_SIZE.  */
 
84
#define GRUB_KERNEL_SPARC64_IEEE1275_COMPRESSED_SIZE    0x10
 
85
 
 
86
/* The offset of GRUB_PREFIX.  */
 
87
#define GRUB_KERNEL_SPARC64_IEEE1275_PREFIX             0x14
 
88
 
 
89
/* End of the data section. */
 
90
#define GRUB_KERNEL_SPARC64_IEEE1275_PREFIX_END         0x114
 
91
 
 
92
#define GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE    12
 
93
 
 
94
#define GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS        0x4400
 
95
#define GRUB_KERNEL_SPARC64_IEEE1275_RAW_SIZE                   0
 
96
#define GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR 0x4400
 
97
 
 
98
#define GRUB_KERNEL_POWERPC_IEEE1275_PREFIX             0x4
 
99
#define GRUB_KERNEL_POWERPC_IEEE1275_PREFIX_END 0x44
 
100
#define GRUB_KERNEL_POWERPC_IEEE1275_LINK_ALIGN 4
 
101
#define GRUB_KERNEL_POWERPC_IEEE1275_LINK_ADDR 0x200000
 
102
 
 
103
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ADDR         0x80200000
 
104
 
 
105
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ALIGN  32
 
106
 
 
107
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE          0x8
 
108
#define GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE        0xc
 
109
 
 
110
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE     0x08
 
111
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX                0x0c
 
112
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END            0x54
 
113
 
 
114
/* The offset of GRUB_PREFIX.  */
 
115
#define GRUB_KERNEL_I386_EFI_PREFIX             0x8
 
116
 
 
117
/* End of the data section. */
 
118
#define GRUB_KERNEL_I386_EFI_PREFIX_END         0x50
 
119
 
 
120
/* The offset of GRUB_PREFIX.  */
 
121
#define GRUB_KERNEL_X86_64_EFI_PREFIX           0x8
 
122
 
 
123
/* End of the data section. */
 
124
#define GRUB_KERNEL_X86_64_EFI_PREFIX_END               0x50
 
125
 
 
126
#define GRUB_KERNEL_I386_COREBOOT_PREFIX        0x2
 
127
#define GRUB_KERNEL_I386_COREBOOT_PREFIX_END    0x42
 
128
#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR     0x8200
 
129
 
 
130
#define GRUB_KERNEL_I386_MULTIBOOT_PREFIX       GRUB_KERNEL_I386_COREBOOT_PREFIX
 
131
#define GRUB_KERNEL_I386_MULTIBOOT_PREFIX_END   GRUB_KERNEL_I386_COREBOOT_PREFIX_END
 
132
 
 
133
#define GRUB_KERNEL_I386_IEEE1275_PREFIX        0x2
 
134
#define GRUB_KERNEL_I386_IEEE1275_PREFIX_END    0x42
 
135
#define GRUB_KERNEL_I386_IEEE1275_LINK_ADDR     0x10000
 
136
 
 
137
#define GRUB_KERNEL_I386_IEEE1275_MOD_ALIGN     0x1000
 
138
#define GRUB_KERNEL_I386_COREBOOT_MOD_ALIGN     0x1
 
139
#define GRUB_KERNEL_I386_MULTIBOOT_MOD_ALIGN    GRUB_KERNEL_I386_COREBOOT_MOD_ALIGN
 
140
 
 
141
/* Non-zero value is only needed for PowerMacs.  */
 
142
#define GRUB_KERNEL_I386_IEEE1275_MOD_GAP 0x0
 
143
#define GRUB_KERNEL_I386_COREBOOT_MOD_GAP 0x0
 
144
 
 
145
#define GRUB_KERNEL_POWERPC_IEEE1275_MOD_ALIGN 0x1000
 
146
 
 
147
#define GRUB_KERNEL_MIPS_YEELOONG_MOD_ALIGN 0x1
 
148
 
 
149
/* Minimal gap between _end and the start of the modules.  It's a hack
 
150
   for PowerMac to prevent "CLAIM failed" error.  The real fix is to
 
151
   rewrite grub-mkimage to generate valid ELF files.  */
 
152
#define GRUB_KERNEL_POWERPC_IEEE1275_MOD_GAP 0x8000
 
153
 
 
154
#ifdef GRUB_MACHINE
 
155
#define GRUB_OFFSETS_CONCAT_(a,b,c) a ## b ## c
 
156
#define GRUB_OFFSETS_CONCAT(a,b,c) GRUB_OFFSETS_CONCAT_(a,b,c)
 
157
#define GRUB_KERNEL_MACHINE_MOD_ALIGN GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _MOD_ALIGN)
 
158
#define GRUB_KERNEL_MACHINE_MOD_GAP GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _MOD_GAP)
 
159
#define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _TOTAL_MODULE_SIZE)
 
160
#define GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _KERNEL_IMAGE_SIZE)
 
161
#define GRUB_KERNEL_MACHINE_COMPRESSED_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _COMPRESSED_SIZE)
 
162
#define GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _UNCOMPRESSED_SIZE)
 
163
 
 
164
#define GRUB_KERNEL_MACHINE_PREFIX GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _PREFIX)
 
165
#define GRUB_KERNEL_MACHINE_PREFIX_END GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _PREFIX_END)
 
166
#define GRUB_BOOT_MACHINE_KERNEL_SEG GRUB_OFFSETS_CONCAT (GRUB_BOOT_, GRUB_MACHINE, _KERNEL_SEG)
 
167
#define GRUB_MEMORY_MACHINE_UPPER GRUB_OFFSETS_CONCAT (GRUB_MEMORY_, GRUB_MACHINE, _UPPER)
 
168
#define GRUB_KERNEL_MACHINE_RAW_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _RAW_SIZE)
 
169
#define GRUB_KERNEL_MACHINE_INSTALL_BSD_PART GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _INSTALL_BSD_PART)
 
170
#define GRUB_KERNEL_MACHINE_INSTALL_DOS_PART GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _INSTALL_DOS_PART)
 
171
#endif
 
172
 
 
173
#ifndef ASM_FILE
 
174
struct grub_pc_bios_boot_blocklist
 
175
{
 
176
  grub_uint64_t start;
 
177
  grub_uint16_t len;
 
178
  grub_uint16_t segment;
 
179
} __attribute__ ((packed));
 
180
#endif
 
181
 
 
182
#endif