Commit c2dea5cd authored by Changbin Du's avatar Changbin Du Committed by Jonathan Corbet
Browse files

Documentation: x86: convert entry_64.txt to reST



This converts the plain text documentation to reStructuredText format and
add it to Sphinx TOC tree. No essential content change.

Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent ac2b4687
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

==============
Kernel Entries
==============

This file documents some of the kernel entries in
This file documents some of the kernel entries in
arch/x86/entry/entry_64.S.  A lot of this explanation is adapted from
arch/x86/entry/entry_64.S.  A lot of this explanation is adapted from
an email from Ingo Molnar:
an email from Ingo Molnar:
@@ -59,7 +65,7 @@ Now, there's a secondary complication: there's a cheap way to test
which mode the CPU is in and an expensive way.
which mode the CPU is in and an expensive way.


The cheap way is to pick this info off the entry frame on the kernel
The cheap way is to pick this info off the entry frame on the kernel
stack, from the CS of the ptregs area of the kernel stack:
stack, from the CS of the ptregs area of the kernel stack::


	xorl %ebx,%ebx
	xorl %ebx,%ebx
	testl $3,CS+8(%rsp)
	testl $3,CS+8(%rsp)
@@ -67,7 +73,7 @@ stack, from the CS of the ptregs area of the kernel stack:
	SWAPGS
	SWAPGS


The expensive (paranoid) way is to read back the MSR_GS_BASE value
The expensive (paranoid) way is to read back the MSR_GS_BASE value
(which is what SWAPGS modifies):
(which is what SWAPGS modifies)::


	movl $1,%ebx
	movl $1,%ebx
	movl $MSR_GS_BASE,%ecx
	movl $MSR_GS_BASE,%ecx
+1 −0
Original line number Original line Diff line number Diff line
@@ -12,3 +12,4 @@ x86-specific Documentation
   topology
   topology
   exception-tables
   exception-tables
   kernel-stacks
   kernel-stacks
   entry_64