aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/x86/boot.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/x86/boot.txt')
-rw-r--r--Documentation/x86/boot.txt69
1 files changed, 65 insertions, 4 deletions
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e0203662f9e9..cf8dfc70a118 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,11 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format
50Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical 50Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical
51 pointer to single linked list of struct setup_data. 51 pointer to single linked list of struct setup_data.
52 52
53Protocol 2.10: (Kernel 2.6.31) A protocol for relaxed alignment
54 beyond the kernel_alignment added, new init_size and
55 pref_address fields.
56
57
53**** MEMORY LAYOUT 58**** MEMORY LAYOUT
54 59
55The traditional memory map for the kernel loader, used for Image or 60The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset Proto Name Meaning
173022C/4 2.03+ ramdisk_max Highest legal initrd address 178022C/4 2.03+ ramdisk_max Highest legal initrd address
1740230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 1790230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
1750234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not 1800234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
1760235/1 N/A pad2 Unused 1810235/1 2.10+ min_alignment Minimum alignment, as a power of two
1770236/2 N/A pad3 Unused 1820236/2 N/A pad3 Unused
1780238/4 2.06+ cmdline_size Maximum size of the kernel command line 1830238/4 2.06+ cmdline_size Maximum size of the kernel command line
179023C/4 2.07+ hardware_subarch Hardware subarchitecture 184023C/4 2.07+ hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset Proto Name Meaning
182024C/4 2.08+ payload_length Length of kernel payload 187024C/4 2.08+ payload_length Length of kernel payload
1830250/8 2.09+ setup_data 64-bit physical pointer to linked list 1880250/8 2.09+ setup_data 64-bit physical pointer to linked list
184 of struct setup_data 189 of struct setup_data
1900258/8 2.10+ pref_address Preferred loading address
1910260/4 2.10+ init_size Linear memory required during initialization
185 192
186(1) For backwards compatibility, if the setup_sects field contains 0, the 193(1) For backwards compatibility, if the setup_sects field contains 0, the
187 real value is 4. 194 real value is 4.
@@ -482,11 +489,19 @@ Protocol: 2.03+
482 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) 489 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
483 490
484Field name: kernel_alignment 491Field name: kernel_alignment
485Type: read (reloc) 492Type: read/modify (reloc)
486Offset/size: 0x230/4 493Offset/size: 0x230/4
487Protocol: 2.05+ 494Protocol: 2.05+ (read), 2.10+ (modify)
495
496 Alignment unit required by the kernel (if relocatable_kernel is
497 true.) A relocatable kernel that is loaded at an alignment
498 incompatible with the value in this field will be realigned during
499 kernel initialization.
488 500
489 Alignment unit required by the kernel (if relocatable_kernel is true.) 501 Starting with protocol version 2.10, this reflects the kernel
502 alignment preferred for optimal performance; it is possible for the
503 loader to modify this field to permit a lesser alignment. See the
504 min_alignment and pref_address field below.
490 505
491Field name: relocatable_kernel 506Field name: relocatable_kernel
492Type: read (reloc) 507Type: read (reloc)
@@ -498,6 +513,22 @@ Protocol: 2.05+
498 After loading, the boot loader must set the code32_start field to 513 After loading, the boot loader must set the code32_start field to
499 point to the loaded code, or to a boot loader hook. 514 point to the loaded code, or to a boot loader hook.
500 515
516Field name: min_alignment
517Type: read (reloc)
518Offset/size: 0x235/1
519Protocol: 2.10+
520
521 This field, if nonzero, indicates as a power of two the minimum
522 alignment required, as opposed to preferred, by the kernel to boot.
523 If a boot loader makes use of this field, it should update the
524 kernel_alignment field with the alignment unit desired; typically:
525
526 kernel_alignment = 1 << min_alignment
527
528 There may be a considerable performance cost with an excessively
529 misaligned kernel. Therefore, a loader should typically try each
530 power-of-two alignment from kernel_alignment down to this alignment.
531
501Field name: cmdline_size 532Field name: cmdline_size
502Type: read 533Type: read
503Offset/size: 0x238/4 534Offset/size: 0x238/4
@@ -582,6 +613,36 @@ Protocol: 2.09+
582 sure to consider the case where the linked list already contains 613 sure to consider the case where the linked list already contains
583 entries. 614 entries.
584 615
616Field name: pref_address
617Type: read (reloc)
618Offset/size: 0x258/8
619Protocol: 2.10+
620
621 This field, if nonzero, represents a preferred load address for the
622 kernel. A relocating bootloader should attempt to load at this
623 address if possible.
624
625 A non-relocatable kernel will unconditionally move itself and to run
626 at this address.
627
628Field name: init_size
629Type: read
630Offset/size: 0x25c/4
631
632 This field indicates the amount of linear contiguous memory starting
633 at the kernel runtime start address that the kernel needs before it
634 is capable of examining its memory map. This is not the same thing
635 as the total amount of memory the kernel needs to boot, but it can
636 be used by a relocating boot loader to help select a safe load
637 address for the kernel.
638
639 The kernel runtime start address is determined by the following algorithm:
640
641 if (relocatable_kernel)
642 runtime_start = align_up(load_address, kernel_alignment)
643 else
644 runtime_start = pref_address
645
585 646
586**** THE IMAGE CHECKSUM 647**** THE IMAGE CHECKSUM
587 648