aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/x86
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-01-24 15:20:07 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-29 22:32:57 -0500
commit8ee2f2dfdbdfe1851fcc0191b2d4faa4c26a39fb (patch)
tree01032cfcd27238ac44a3447ca4d07c4685bdb359 /Documentation/x86
parentee92d815027a76ef92f3ec7b155b0c8aa345f239 (diff)
x86, boot: Update comments about entries for 64bit image
Now 64bit entry is fixed on 0x200, can not be changed anymore. Update the comments to reflect that. Also put info about it in boot.txt -v2: fix some grammar error Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-27-git-send-email-yinghai@kernel.org Cc: Rob Landley <rob@landley.net> Cc: Matt Fleming <matt.fleming@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'Documentation/x86')
-rw-r--r--Documentation/x86/boot.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 3edb4c2887a1..0e383169839a 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -1054,6 +1054,44 @@ must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1054must be __BOOT_DS; interrupt must be disabled; %esi must hold the base 1054must be __BOOT_DS; interrupt must be disabled; %esi must hold the base
1055address of the struct boot_params; %ebp, %edi and %ebx must be zero. 1055address of the struct boot_params; %ebp, %edi and %ebx must be zero.
1056 1056
1057**** 64-bit BOOT PROTOCOL
1058
1059For machine with 64bit cpus and 64bit kernel, we could use 64bit bootloader
1060and we need a 64-bit boot protocol.
1061
1062In 64-bit boot protocol, the first step in loading a Linux kernel
1063should be to setup the boot parameters (struct boot_params,
1064traditionally known as "zero page"). The memory for struct boot_params
1065could be allocated anywhere (even above 4G) and initialized to all zero.
1066Then, the setup header at offset 0x01f1 of kernel image on should be
1067loaded into struct boot_params and examined. The end of setup header
1068can be calculated as follows:
1069
1070 0x0202 + byte value at offset 0x0201
1071
1072In addition to read/modify/write the setup header of the struct
1073boot_params as that of 16-bit boot protocol, the boot loader should
1074also fill the additional fields of the struct boot_params as described
1075in zero-page.txt.
1076
1077After setting up the struct boot_params, the boot loader can load
107864-bit kernel in the same way as that of 16-bit boot protocol, but
1079kernel could be loaded above 4G.
1080
1081In 64-bit boot protocol, the kernel is started by jumping to the
108264-bit kernel entry point, which is the start address of loaded
108364-bit kernel plus 0x200.
1084
1085At entry, the CPU must be in 64-bit mode with paging enabled.
1086The range with setup_header.init_size from start address of loaded
1087kernel and zero page and command line buffer get ident mapping;
1088a GDT must be loaded with the descriptors for selectors
1089__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat
1090segment; __BOOT_CS must have execute/read permission, and __BOOT_DS
1091must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1092must be __BOOT_DS; interrupt must be disabled; %rsi must hold the base
1093address of the struct boot_params.
1094
1057**** EFI HANDOVER PROTOCOL 1095**** EFI HANDOVER PROTOCOL
1058 1096
1059This protocol allows boot loaders to defer initialisation to the EFI 1097This protocol allows boot loaders to defer initialisation to the EFI