aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/i386/boot.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/i386/boot.txt')
-rw-r--r--Documentation/i386/boot.txt32
1 files changed, 22 insertions, 10 deletions
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
index 66fa67fec2a7..35985b34d5a6 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 2007-05-16 5 Last update 2007-05-23
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
@@ -202,6 +202,8 @@ All general purpose boot loaders should write the fields marked
202nonstandard address should fill in the fields marked (reloc); other 202nonstandard address should fill in the fields marked (reloc); other
203boot loaders can ignore those fields. 203boot loaders can ignore those fields.
204 204
205The byte order of all fields is littleendian (this is x86, after all.)
206
205Field name: setup_secs 207Field name: setup_secs
206Type: read 208Type: read
207Offset/size: 0x1f1/1 209Offset/size: 0x1f1/1
@@ -280,14 +282,16 @@ Type: read
280Offset/size: 0x206/2 282Offset/size: 0x206/2
281Protocol: 2.00+ 283Protocol: 2.00+
282 284
283 Contains the boot protocol version, e.g. 0x0204 for version 2.04. 285 Contains the boot protocol version, in (major << 8)+minor format,
286 e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version
287 10.17.
284 288
285Field name: readmode_swtch 289Field name: readmode_swtch
286Type: modify (optional) 290Type: modify (optional)
287Offset/size: 0x208/4 291Offset/size: 0x208/4
288Protocol: 2.00+ 292Protocol: 2.00+
289 293
290 Boot loader hook (see separate chapter.) 294 Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
291 295
292Field name: start_sys 296Field name: start_sys
293Type: read 297Type: read
@@ -304,10 +308,17 @@ Protocol: 2.00+
304 If set to a nonzero value, contains a pointer to a NUL-terminated 308 If set to a nonzero value, contains a pointer to a NUL-terminated
305 human-readable kernel version number string, less 0x200. This can 309 human-readable kernel version number string, less 0x200. This can
306 be used to display the kernel version to the user. This value 310 be used to display the kernel version to the user. This value
307 should be less than (0x200*setup_sects). For example, if this value 311 should be less than (0x200*setup_sects).
308 is set to 0x1c00, the kernel version number string can be found at 312
309 offset 0x1e00 in the kernel file. This is a valid value if and only 313 For example, if this value is set to 0x1c00, the kernel version
310 if the "setup_sects" field contains the value 14 or higher. 314 number string can be found at offset 0x1e00 in the kernel file.
315 This is a valid value if and only if the "setup_sects" field
316 contains the value 15 or higher, as:
317
318 0x1c00 < 15*0x200 (= 0x1e00) but
319 0x1c00 >= 14*0x200 (= 0x1c00)
320
321 0x1c00 >> 9 = 14, so the minimum value for setup_secs is 15.
311 322
312Field name: type_of_loader 323Field name: type_of_loader
313Type: write (obligatory) 324Type: write (obligatory)
@@ -377,7 +388,7 @@ Protocol: 2.00+
377 388
378 This field can be modified for two purposes: 389 This field can be modified for two purposes:
379 390
380 1. as a boot loader hook (see separate chapter.) 391 1. as a boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
381 392
382 2. if a bootloader which does not install a hook loads a 393 2. if a bootloader which does not install a hook loads a
383 relocatable kernel at a nonstandard address it will have to modify 394 relocatable kernel at a nonstandard address it will have to modify
@@ -715,7 +726,7 @@ switched off, especially if the loaded kernel has the floppy driver as
715a demand-loaded module! 726a demand-loaded module!
716 727
717 728
718**** ADVANCED BOOT TIME HOOKS 729**** ADVANCED BOOT LOADER HOOKS
719 730
720If the boot loader runs in a particularly hostile environment (such as 731If the boot loader runs in a particularly hostile environment (such as
721LOADLIN, which runs under DOS) it may be impossible to follow the 732LOADLIN, which runs under DOS) it may be impossible to follow the
@@ -740,4 +751,5 @@ IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
740 set them up to BOOT_DS (0x18) yourself. 751 set them up to BOOT_DS (0x18) yourself.
741 752
742 After completing your hook, you should jump to the address 753 After completing your hook, you should jump to the address
743 that was in this field before your boot loader overwrote it. 754 that was in this field before your boot loader overwrote it
755 (relocated, if appropriate.)