audk/ArmVirtPkg
Ard Biesheuvel a4a2258a1f ArmVirtPkg/NorFlashQemuLib: disable NOR flash DT nodes upon discovery
Our UEFI guest firmware takes ownership of the emulated NOR flash in
order to support the variable runtime services, and it does not expect
the OS to interfere with the underlying storage directly. So disable
the NOR flash DT nodes as we discover them, in a way similar to how we
disable the PL031 RTC in the device tree when we attach our RTC runtime
driver to it.

Note that this also hides the NOR flash bank that carries the UEFI
executable code, but this is not intended to be updatable from inside
the guest anyway, and if it was, we should use capsule update to do so.
Also, the first -pflash argument that defines the backing for this flash
bank is often issued with the 'readonly' modifier, in order to prevent
any changes whatsoever to be made to the executable firmware image by
the guest.

This issue has become relevant due to the following Linux changes,
which enable the flash driver stack for default build configurations
targetting arm64 and 32-bit ARM.

ce693fc2a877
("arm64: defconfig: Enable flash device drivers for QorIQ boards", 2020-03-16).

5f068190cc10
("ARM: multi_v7_defconfig: Enable support for CFI NOR FLASH", 2019-04-03)

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-06-24 16:05:53 +00:00
..
FdtClientDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
HighMemDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
Include ArmVirtPkg: remove unused files 2020-06-12 22:17:46 +00:00
Library ArmVirtPkg/NorFlashQemuLib: disable NOR flash DT nodes upon discovery 2020-06-24 16:05:53 +00:00
PlatformCI ArmVirtPkg: Add Platform CI and configuration for Core CI 2020-04-28 18:07:59 +00:00
PlatformHasAcpiDtDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
PrePi ArmVirtPkg: remove unused files 2020-06-12 22:17:46 +00:00
VirtioFdtDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
XenAcpiPlatformDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
XenPlatformHasAcpiDtDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
XenioFdtDxe ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
ArmVirt.dsc.inc ArmVirtPkg: add the 'initrd' dynamic shell command 2020-03-04 09:26:45 +00:00
ArmVirtPkg.ci.yaml ArmVirtPkg: Add Platform CI and configuration for Core CI 2020-04-28 18:07:59 +00:00
ArmVirtPkg.dec ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DT 2020-03-04 08:48:09 +00:00
ArmVirtQemu.dsc ArmVirtPkg: control PXEv4 / PXEv6 boot support from the QEMU command line 2020-04-28 22:37:35 +00:00
ArmVirtQemu.fdf ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI phase 2020-03-04 08:48:09 +00:00
ArmVirtQemuFvMain.fdf.inc ArmVirtPkg: Include NVMe support in ArmVirtQemu* 2020-04-09 17:42:15 +00:00
ArmVirtQemuKernel.dsc ArmVirtPkg/PrePi: use standard PeCoff routines for self-relocation 2020-06-12 22:17:46 +00:00
ArmVirtQemuKernel.fdf ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtRules.fdf.inc ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtXen.dsc ArmVirtPkg/PrePi: use standard PeCoff routines for self-relocation 2020-06-12 22:17:46 +00:00
ArmVirtXen.fdf ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
VarStore.fdf.inc ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00