aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 16:13:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 16:13:25 -0400
commit0a2fe19ccc4bc552a8083a595a3aa737b8bea727 (patch)
tree3bed37182f95fa3ac1673530457e994a89bd7e26 /Documentation/x86
parentc1b669b72a05aeae0882742dd40f30d51732ed15 (diff)
parent9ca8f72a9297f2052d806bd1111e176533aa69bd (diff)
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pul x86/efi changes from Ingo Molnar: "This tree adds an EFI bootloader handover protocol, which, once supported on the bootloader side, will make bootup faster and might result in simpler bootloaders. The other change activates the EFI wall clock time accessors on x86-64 as well, instead of the legacy RTC readout." * 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, efi: Handover Protocol x86-64/efi: Use EFI to deal with platform wall clock
Diffstat (limited to 'Documentation/x86')
-rw-r--r--Documentation/x86/boot.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 473b32fd544e..9efceff51bfb 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -54,6 +54,9 @@ Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment
54 beyond the kernel_alignment added, new init_size and 54 beyond the kernel_alignment added, new init_size and
55 pref_address fields. Added extended boot loader IDs. 55 pref_address fields. Added extended boot loader IDs.
56 56
57Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover
58 protocol entry point.
59
57**** MEMORY LAYOUT 60**** MEMORY LAYOUT
58 61
59The traditional memory map for the kernel loader, used for Image or 62The traditional memory map for the kernel loader, used for Image or
@@ -189,6 +192,7 @@ Offset Proto Name Meaning
189 of struct setup_data 192 of struct setup_data
1900258/8 2.10+ pref_address Preferred loading address 1930258/8 2.10+ pref_address Preferred loading address
1910260/4 2.10+ init_size Linear memory required during initialization 1940260/4 2.10+ init_size Linear memory required during initialization
1950264/4 2.11+ handover_offset Offset of handover entry point
192 196
193(1) For backwards compatibility, if the setup_sects field contains 0, the 197(1) For backwards compatibility, if the setup_sects field contains 0, the
194 real value is 4. 198 real value is 4.
@@ -693,6 +697,16 @@ Offset/size: 0x260/4
693 else 697 else
694 runtime_start = pref_address 698 runtime_start = pref_address
695 699
700Field name: handover_offset
701Type: read
702Offset/size: 0x264/4
703
704 This field is the offset from the beginning of the kernel image to
705 the EFI handover protocol entry point. Boot loaders using the EFI
706 handover protocol to boot the kernel should jump to this offset.
707
708 See EFI HANDOVER PROTOCOL below for more details.
709
696 710
697**** THE IMAGE CHECKSUM 711**** THE IMAGE CHECKSUM
698 712
@@ -1013,3 +1027,30 @@ segment; __BOOS_CS must have execute/read permission, and __BOOT_DS
1013must have read/write permission; CS must be __BOOT_CS and DS, ES, SS 1027must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1014must be __BOOT_DS; interrupt must be disabled; %esi must hold the base 1028must be __BOOT_DS; interrupt must be disabled; %esi must hold the base
1015address of the struct boot_params; %ebp, %edi and %ebx must be zero. 1029address of the struct boot_params; %ebp, %edi and %ebx must be zero.
1030
1031**** EFI HANDOVER PROTOCOL
1032
1033This protocol allows boot loaders to defer initialisation to the EFI
1034boot stub. The boot loader is required to load the kernel/initrd(s)
1035from the boot media and jump to the EFI handover protocol entry point
1036which is hdr->handover_offset bytes from the beginning of
1037startup_{32,64}.
1038
1039The function prototype for the handover entry point looks like this,
1040
1041 efi_main(void *handle, efi_system_table_t *table, struct boot_params *bp)
1042
1043'handle' is the EFI image handle passed to the boot loader by the EFI
1044firmware, 'table' is the EFI system table - these are the first two
1045arguments of the "handoff state" as described in section 2.3 of the
1046UEFI specification. 'bp' is the boot loader-allocated boot params.
1047
1048The boot loader *must* fill out the following fields in bp,
1049
1050 o hdr.code32_start
1051 o hdr.cmd_line_ptr
1052 o hdr.cmdline_size
1053 o hdr.ramdisk_image (if applicable)
1054 o hdr.ramdisk_size (if applicable)
1055
1056All other fields should be zero.