lkml.org 
[lkml]   [2020]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH] Documentation/x86/boot.rst: minor languge improvement
Date
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
for 64-bit protocol, setup data still needs to be mapped, as there is
operation on it in extract_kernel(), like:

sanitize_boot_params(boot_params);

initrd doesn't need to be mapped, which is also what KASLR does in its
mem_avoid_init().

Documentation/x86/boot.rst | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst
index 7fafc7ac00d7..392c6e147e70 100644
--- a/Documentation/x86/boot.rst
+++ b/Documentation/x86/boot.rst
@@ -1353,12 +1353,12 @@ In 32-bit boot protocol, the kernel is started by jumping to the
32/64-bit kernel.

At entry, the CPU must be in 32-bit protected mode with paging
-disabled; 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; %esi must hold the base
-address of the struct boot_params; %ebp, %edi and %ebx must be zero.
+disabled and a GDT must be loaded with the descriptors for selectors
+__BOOT_CS(0x10) and __BOOT_DS(0x18): both descriptors must be 4G flat
+segment with __BOOT_CS having execute/read permission and __BOOT_DS
+having read/write permission. CS must be __BOOT_CS and DS, ES, SS
+must be __BOOT_DS. Interrupt must be disabled and %esi must hold the
+base address of the struct boot_params. %ebp, %edi and %ebx must be zero.

64-bit Boot Protocol
====================
@@ -1379,7 +1379,7 @@ can be calculated as follows::
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.
+in zero-page.rst.

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
@@ -1389,15 +1389,14 @@ 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.
+At entry, the CPU must be in 64-bit mode. The range with
+setup_header.init_size from start address of loaded kernel, the zero page,
+and the command line buffer get identity-mapped, and a GDT must be loaded
+with the descriptors for selectors __BOOT_CS(0x10) and __BOOT_DS(0x18):
+both descriptors must be 4G flat segment with __BOOT_CS having execute/read
+permission and __BOOT_DS having read/write permission. CS must be __BOOT_CS
+and DS, ES, SS must be __BOOT_DS. Interrupt must be disabled and %rsi must
+hold the base address of the struct boot_params.

EFI Handover Protocol (deprecated)
==================================
--
2.21.0


\
 
 \ /
  Last update: 2020-09-22 09:25    [W:0.026 / U:6.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site