x86/boot: Search for RSDP in the EFI tables
authorChao Fan <fanc.fnst@cn.fujitsu.com>
Wed, 23 Jan 2019 11:08:46 +0000 (19:08 +0800)
committerBorislav Petkov <bp@suse.de>
Fri, 1 Feb 2019 10:52:54 +0000 (11:52 +0100)
commit33f0df8d843deb9ec24116dcd79a40ca0ea8e8a9
tree6812a0ab0304e00994dceb1891e5888e9ed7e5e2
parent3c98e71b42a7d0c14639ccb565ea315f3c887f92
x86/boot: Search for RSDP in the EFI tables

The immovable memory ranges information in the SRAT table is necessary
to fix the issue of KASLR not paying attention to movable memory regions
when selecting the offset. Therefore, SRAT needs to be parsed.

Depending on the boot: KEXEC/EFI/BIOS, the methods to compute RSDP are
different. When booting from EFI, the EFI table points to the RSDP. So
iterate over the EFI system tables in order to find the RSDP.

 [ bp:
   - Heavily massage commit message
   - Trim comments
   - Move the CONFIG_ACPI ifdeffery into the Makefile.
 ]

Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: bhe@redhat.com
Cc: caoj.fnst@cn.fujitsu.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: indou.takao@jp.fujitsu.com
Cc: Ingo Molnar <mingo@redhat.com>
Cc: kasong@redhat.com
Cc: Kees Cook <keescook@chromium.org>
Cc: msys.mizuma@gmail.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190123110850.12433-4-fanc.fnst@cn.fujitsu.com
arch/x86/boot/compressed/acpi.c