diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-03-29 18:12:10 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-29 18:12:21 +0400 |
commit | 6aeedba20e82150757f2dd5b896f0e09491a987c (patch) | |
tree | d33322d9a9bd8c1b3d16019820a3305c3692385b /Documentation/x86/boot.txt | |
parent | 4c43755506ececbe903585265aa8408e937620a1 (diff) | |
parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
download | linux-6aeedba20e82150757f2dd5b896f0e09491a987c.tar.xz |
Merge tag v3.9-rc1 into for-3.9/upstream-fixes
This is done so that I am able to apply fix for commit
0322bd3980b3 ("usb hid quirks for Masterkit MA901 usb radio") which
went into 3.9-rc1.
Diffstat (limited to 'Documentation/x86/boot.txt')
-rw-r--r-- | Documentation/x86/boot.txt | 38 |
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 must be __BOOT_DS; interrupt must be disabled; %esi must hold the base address of the struct boot_params; %ebp, %edi and %ebx must be zero. +**** 64-bit BOOT PROTOCOL + +For machine with 64bit cpus and 64bit kernel, we could use 64bit bootloader +and we need a 64-bit boot protocol. + +In 64-bit boot protocol, the first step in loading a Linux kernel +should be to setup the boot parameters (struct boot_params, +traditionally known as "zero page"). The memory for struct boot_params +could be allocated anywhere (even above 4G) and initialized to all zero. +Then, the setup header at offset 0x01f1 of kernel image on should be +loaded into struct boot_params and examined. The end of setup header +can be calculated as follows: + + 0x0202 + byte value at offset 0x0201 + +In addition to read/modify/write the setup header of the struct +boot_params as that of 16-bit boot protocol, the boot loader should +also fill the additional fields of the struct boot_params as described +in zero-page.txt. + +After setting up the struct boot_params, the boot loader can load +64-bit kernel in the same way as that of 16-bit boot protocol, but +kernel could be loaded above 4G. + +In 64-bit boot protocol, the kernel is started by jumping to the +64-bit kernel entry point, which is the start address of loaded +64-bit kernel plus 0x200. + +At entry, the CPU must be in 64-bit mode with paging enabled. +The range with setup_header.init_size from start address of loaded +kernel and zero page and command line buffer get ident mapping; +a GDT must be loaded with the descriptors for selectors +__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat +segment; __BOOT_CS must have execute/read permission, and __BOOT_DS +must have read/write permission; CS must be __BOOT_CS and DS, ES, SS +must be __BOOT_DS; interrupt must be disabled; %rsi must hold the base +address of the struct boot_params. + **** EFI HANDOVER PROTOCOL This protocol allows boot loaders to defer initialisation to the EFI |