efi/libstub: Add generic support for parsing mem_encrypt=
authorArd Biesheuvel <ardb@kernel.org>
Tue, 27 Feb 2024 15:19:13 +0000 (16:19 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 4 Mar 2024 17:12:24 +0000 (18:12 +0100)
commit7205f06e847422b66c1506eee01b9998ffc75d76
treecf973ac29a1cf70027c311a9b66641f6c26e6222
parent828263957611c210da00c1820db73fac217135b6
efi/libstub: Add generic support for parsing mem_encrypt=

Parse the mem_encrypt= command line parameter from the EFI stub if
CONFIG_ARCH_HAS_MEM_ENCRYPT=y, so that it can be passed to the early
boot code by the arch code in the stub.

This avoids the need for the core kernel to do any string parsing very
early in the boot.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20240227151907.387873-16-ardb+git@google.com
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/efistub.h