Thread (11 messages) 11 messages, 5 authors, 2019-02-09

Re: [PATCH] acpi: bgrt: parse BGRT to obtain BMP address before it gets clobbered

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2019-01-29 15:09:34
Also in: linux-acpi, linux-efi

On Tue, Jan 29, 2019 at 3:36 PM Ard Biesheuvel
[off-list ref] wrote:
On Tue, 22 Jan 2019 at 16:06, Ard Biesheuvel [off-list ref] wrote:
quoted
The bitmap left in the framebuffer by the firmware is described by an
ACPI table called "BGRT", which describes the size, pixel format and
the address of a BMP image in memory. While the BGRT ACPI table is
guaranteed to reside in a "ACPI reclaim" memory region, which is
never touched by Linux. The BMP image, however, typically resides
in EFI Boot Services Memory, which may have been overwritten by the
time the BGRT discovery routine runs.

So instead, drop the handling from the ACPI init code, and call the
BGRT parsing code immediately after going over the EFI configuration
table array, at which time no memory has been touched yet except for
the .data/.bss regions covered by the static kernel image.

Unfortunately, this involves a non-trivial amount of ACPI entry
point and root table parsing, but we cannot rely on the normal
ACPI infrastructure yet this early in the boot.

Also note that we cannot take the 'acpi_disabled' global variable
into account, since it may not have assumed the correct value yet
(on arm64, the default value is '1' which is overridden to '0' if
no DT description has been made available by the firmware)

Cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Ard Biesheuvel <redacted>
---
 arch/arm64/kernel/acpi.c        |  2 -
 arch/x86/kernel/acpi/boot.c     |  2 -
 drivers/acpi/bgrt.c             |  6 --
 drivers/firmware/efi/efi-bgrt.c | 80 ++++++++++++++++++--
 drivers/firmware/efi/efi.c      | 13 ++++
 include/linux/efi-bgrt.h        |  4 +-
 6 files changed, 89 insertions(+), 18 deletions(-)
Rafael, Len,

Do you mind if i take this via the EFI tree (after addressing
Lorenzo's comments)
Not at all, please take it.

Thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help