aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/i386
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2005-09-06 18:17:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:29 -0400
commitf8eeaaf4180334a8e5c3582fe62a5f8176a8c124 (patch)
treef2db782c1a67c1d632942d43b68bd2c5c7c3981d /Documentation/i386
parent5e1efe4931bf7d95b2f3d48ca0b79ea0e8341cc2 (diff)
[PATCH] Make the bzImage format self-terminating
Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Frank Sorenson <frank@tuxrocks.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/i386')
-rw-r--r--Documentation/i386/boot.txt35
1 files changed, 22 insertions, 13 deletions
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
index 1c48f0eba6fb..10312bebe55d 100644
--- a/Documentation/i386/boot.txt
+++ b/Documentation/i386/boot.txt
@@ -2,7 +2,7 @@
2 ---------------------------- 2 ----------------------------
3 3
4 H. Peter Anvin <hpa@zytor.com> 4 H. Peter Anvin <hpa@zytor.com>
5 Last update 2002-01-01 5 Last update 2005-09-02
6 6
7On the i386 platform, the Linux kernel uses a rather complicated boot 7On the i386 platform, the Linux kernel uses a rather complicated boot
8convention. This has evolved partially due to historical aspects, as 8convention. This has evolved partially due to historical aspects, as
@@ -34,6 +34,8 @@ Protocol 2.02: (Kernel 2.4.0-test3-pre3) New command line protocol.
34Protocol 2.03: (Kernel 2.4.18-pre1) Explicitly makes the highest possible 34Protocol 2.03: (Kernel 2.4.18-pre1) Explicitly makes the highest possible
35 initrd address available to the bootloader. 35 initrd address available to the bootloader.
36 36
37Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes.
38
37 39
38**** MEMORY LAYOUT 40**** MEMORY LAYOUT
39 41
@@ -103,10 +105,9 @@ The header looks like:
103Offset Proto Name Meaning 105Offset Proto Name Meaning
104/Size 106/Size
105 107
10601F1/1 ALL setup_sects The size of the setup in sectors 10801F1/1 ALL(1 setup_sects The size of the setup in sectors
10701F2/2 ALL root_flags If set, the root is mounted readonly 10901F2/2 ALL root_flags If set, the root is mounted readonly
10801F4/2 ALL syssize DO NOT USE - for bootsect.S use only 11001F4/4 2.04+(2 syssize The size of the 32-bit code in 16-byte paras
10901F6/2 ALL swap_dev DO NOT USE - obsolete
11001F8/2 ALL ram_size DO NOT USE - for bootsect.S use only 11101F8/2 ALL ram_size DO NOT USE - for bootsect.S use only
11101FA/2 ALL vid_mode Video mode control 11201FA/2 ALL vid_mode Video mode control
11201FC/2 ALL root_dev Default root device number 11301FC/2 ALL root_dev Default root device number
@@ -129,8 +130,12 @@ Offset Proto Name Meaning
1290228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line 1300228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
130022C/4 2.03+ initrd_addr_max Highest legal initrd address 131022C/4 2.03+ initrd_addr_max Highest legal initrd address
131 132
132For backwards compatibility, if the setup_sects field contains 0, the 133(1) For backwards compatibility, if the setup_sects field contains 0, the
133real value is 4. 134 real value is 4.
135
136(2) For boot protocol prior to 2.04, the upper two bytes of the syssize
137 field are unusable, which means the size of a bzImage kernel
138 cannot be determined.
134 139
135If the "HdrS" (0x53726448) magic number is not found at offset 0x202, 140If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
136the boot protocol version is "old". Loading an old kernel, the 141the boot protocol version is "old". Loading an old kernel, the
@@ -230,12 +235,16 @@ loader to communicate with the kernel. Some of its options are also
230relevant to the boot loader itself, see "special command line options" 235relevant to the boot loader itself, see "special command line options"
231below. 236below.
232 237
233The kernel command line is a null-terminated string up to 255 238The kernel command line is a null-terminated string currently up to
234characters long, plus the final null. 239255 characters long, plus the final null. A string that is too long
240will be automatically truncated by the kernel, a boot loader may allow
241a longer command line to be passed to permit future kernels to extend
242this limit.
235 243
236If the boot protocol version is 2.02 or later, the address of the 244If the boot protocol version is 2.02 or later, the address of the
237kernel command line is given by the header field cmd_line_ptr (see 245kernel command line is given by the header field cmd_line_ptr (see
238above.) 246above.) This address can be anywhere between the end of the setup
247heap and 0xA0000.
239 248
240If the protocol version is *not* 2.02 or higher, the kernel 249If the protocol version is *not* 2.02 or higher, the kernel
241command line is entered using the following protocol: 250command line is entered using the following protocol:
@@ -255,7 +264,7 @@ command line is entered using the following protocol:
255**** SAMPLE BOOT CONFIGURATION 264**** SAMPLE BOOT CONFIGURATION
256 265
257As a sample configuration, assume the following layout of the real 266As a sample configuration, assume the following layout of the real
258mode segment: 267mode segment (this is a typical, and recommended layout):
259 268
260 0x0000-0x7FFF Real mode kernel 269 0x0000-0x7FFF Real mode kernel
261 0x8000-0x8FFF Stack and heap 270 0x8000-0x8FFF Stack and heap
@@ -312,9 +321,9 @@ Such a boot loader should enter the following fields in the header:
312 321
313**** LOADING THE REST OF THE KERNEL 322**** LOADING THE REST OF THE KERNEL
314 323
315The non-real-mode kernel starts at offset (setup_sects+1)*512 in the 324The 32-bit (non-real-mode) kernel starts at offset (setup_sects+1)*512
316kernel file (again, if setup_sects == 0 the real value is 4.) It 325in the kernel file (again, if setup_sects == 0 the real value is 4.)
317should be loaded at address 0x10000 for Image/zImage kernels and 326It should be loaded at address 0x10000 for Image/zImage kernels and
3180x100000 for bzImage kernels. 3270x100000 for bzImage kernels.
319 328
320The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01 329The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01