summaryrefslogtreecommitdiffstats
path: root/Documentation/x86/boot.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/x86/boot.txt')
-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 b443f1de0e5a..3840b6f28afb 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -1055,6 +1055,44 @@ must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1055must be __BOOT_DS; interrupt must be disabled; %esi must hold the base 1055must be __BOOT_DS; interrupt must be disabled; %esi must hold the base
1056address of the struct boot_params; %ebp, %edi and %ebx must be zero. 1056address of the struct boot_params; %ebp, %edi and %ebx must be zero.
1057 1057
1058**** 64-bit BOOT PROTOCOL
1059
1060For machine with 64bit cpus and 64bit kernel, we could use 64bit bootloader
1061and we need a 64-bit boot protocol.
1062
1063In 64-bit boot protocol, the first step in loading a Linux kernel
1064should be to setup the boot parameters (struct boot_params,
1065traditionally known as "zero page"). The memory for struct boot_params
1066could be allocated anywhere (even above 4G) and initialized to all zero.
1067Then, the setup header at offset 0x01f1 of kernel image on should be
1068loaded into struct boot_params and examined. The end of setup header
1069can be calculated as follows:
1070
1071 0x0202 + byte value at offset 0x0201
1072
1073In addition to read/modify/write the setup header of the struct
1074boot_params as that of 16-bit boot protocol, the boot loader should
1075also fill the additional fields of the struct boot_params as described
1076in zero-page.txt.
1077
1078After setting up the struct boot_params, the boot loader can load
107964-bit kernel in the same way as that of 16-bit boot protocol, but
1080kernel could be loaded above 4G.
1081
1082In 64-bit boot protocol, the kernel is started by jumping to the
108364-bit kernel entry point, which is the start address of loaded
108464-bit kernel plus 0x200.
1085
1086At entry, the CPU must be in 64-bit mode with paging enabled.
1087The range with setup_header.init_size from start address of loaded
1088kernel and zero page and command line buffer get ident mapping;
1089a GDT must be loaded with the descriptors for selectors
1090__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat
1091segment; __BOOT_CS must have execute/read permission, and __BOOT_DS
1092must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1093must be __BOOT_DS; interrupt must be disabled; %rsi must hold the base
1094address of the struct boot_params.
1095
1058**** EFI HANDOVER PROTOCOL 1096**** EFI HANDOVER PROTOCOL
1059 1097
1060This protocol allows boot loaders to defer initialisation to the EFI 1098This protocol allows boot loaders to defer initialisation to the EFI