Linux-EFI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/8] Remove 64-bit GDT setup in efi_main + doc fixes
@ 2020-01-30 20:04 Arvind Sankar
  2020-01-30 20:04 ` [PATCH 1/8] efi/x86: Use C wrapper instead of inline assembly Arvind Sankar
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Arvind Sankar @ 2020-01-30 20:04 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Jonathan Corbet, Ard Biesheuvel
  Cc: linux-efi, x86, linux-doc

For the 64-bit kernel, we do not need to setup a GDT in efi_main, as the
next step in the boot, startup_64, will set one up.

This series factors out the GDT setup into a separate function and
restricts it to the 32-bit kernel. The memory allocation for the GDT is
also changed from allocating a full page via efi_alloc_low to the
required space (32 bytes) from alloc_pool boot service.

The final two patches are doc fixes to clarify that the 32-bit EFI
handover entry point also requires segments/GDT to be setup, and that
for 64-bit mode we don't have any special segment requirements (the
64-bit doc currently is just a copy of the 32-bit doc which isn't
right).

Arvind Sankar (8):
  efi/x86: Use C wrapper instead of inline assembly
  efi/x86: Allocate the GDT pointer on the stack
  efi/x86: Factor GDT setup code into a function
  efi/x86: Only setup the GDT for 32-bit kernel
  efi/x86: Allocate only the required 32 bytes for the GDT
  efi/x86: Change __KERNEL_{CS,DS} to __BOOT_{CS,DS}
  Documentation/x86/boot: Clarify segment requirements for EFI handover
  Documentation/x86/boot: Correct segment requirements for 64-bit boot

 Documentation/x86/boot.rst              |  15 +-
 arch/x86/boot/compressed/eboot.c        | 174 ++++++++++--------------
 arch/x86/boot/compressed/efi_thunk_64.S |   4 +-
 3 files changed, 85 insertions(+), 108 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, back to index

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 20:04 [PATCH 0/8] Remove 64-bit GDT setup in efi_main + doc fixes Arvind Sankar
2020-01-30 20:04 ` [PATCH 1/8] efi/x86: Use C wrapper instead of inline assembly Arvind Sankar
2020-01-30 20:04 ` [PATCH 2/8] efi/x86: Allocate the GDT pointer on the stack Arvind Sankar
2020-01-30 20:04 ` [PATCH 3/8] efi/x86: Factor GDT setup code into a function Arvind Sankar
2020-01-30 20:04 ` [PATCH 4/8] efi/x86: Only setup the GDT for 32-bit kernel Arvind Sankar
2020-01-30 20:04 ` [PATCH 5/8] efi/x86: Allocate only the required 32 bytes for the GDT Arvind Sankar
2020-01-30 20:04 ` [PATCH 6/8] efi/x86: Change __KERNEL_{CS,DS} to __BOOT_{CS,DS} Arvind Sankar
2020-01-30 20:04 ` [PATCH 7/8] Documentation/x86/boot: Clarify segment requirements for EFI handover Arvind Sankar
2020-01-31 19:24   ` Arvind Sankar
2020-01-30 20:04 ` [PATCH 8/8] Documentation/x86/boot: Correct segment requirements for 64-bit boot Arvind Sankar
2020-01-31  8:42 ` [PATCH 0/8] Remove 64-bit GDT setup in efi_main + doc fixes Ard Biesheuvel
2020-01-31  9:31   ` Ard Biesheuvel
2020-01-31 19:10     ` Arvind Sankar
2020-02-02 17:13 ` [PATCH v2 0/7] x86/efi,boot: GDT handling cleanup/fixes Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 1/7] x86/boot: Remove KEEP_SEGMENTS support Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 2/7] efi/x86: Don't depend on firmware GDT layout Arvind Sankar
2020-02-02 17:54     ` Ard Biesheuvel
2020-02-02 18:18       ` Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 3/7] x86/boot: Reload GDTR after copying to the end of the buffer Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 4/7] x86/boot: Clear direction and interrupt flags in startup_64 Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 5/7] efi/x86: Remove GDT setup from efi_main Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 6/7] x86/boot: GDT limit value should be size - 1 Arvind Sankar
2020-02-02 17:13   ` [PATCH v2 7/7] x86/boot: Micro-optimize GDT loading instructions Arvind Sankar
2020-02-02 18:01   ` [PATCH v2 0/7] x86/efi,boot: GDT handling cleanup/fixes Ard Biesheuvel

Linux-EFI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-efi/0 linux-efi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-efi linux-efi/ https://lore.kernel.org/linux-efi \
		linux-efi@vger.kernel.org
	public-inbox-index linux-efi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-efi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git