audk/ArmVirtPkg/Library
Ard Biesheuvel ec54ce1f1a ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX
The early ID map used by ArmVirtQemu uses ASID scoped non-global
mappings, as this allows us to switch to the permanent ID map seamlessly
without the need for explicit TLB maintenance.

However, this triggers a known erratum on ThunderX, which does not
tolerate non-global mappings that are executable at EL1, as this appears
to result in I-cache corruption. (Linux disables the KPTI based Meltdown
mitigation on ThunderX for the same reason)

So work around this, by detecting the CPU implementor and part number,
and proceeding without the early ID map if a ThunderX CPU is detected.

Note that this requires the C code to be built with strict alignment
again, as we may end up executing it with the MMU and caches off.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: dann frazier <dann.frazier@canonical.com>
2023-01-10 17:37:39 +00:00
..
ArmPlatformLibQemu ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX 2023-01-10 17:37:39 +00:00
ArmVirtDxeHobLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtGicArchLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtMemoryInitPeiLib ArmVirtPkg/QemuVirtMemInfoLib: use HOB not PCD to record the memory size 2022-10-26 17:28:39 +00:00
ArmVirtPL031FdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPciHostBridgeUtilityLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPsciResetSystemLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPsciResetSystemPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtTimerFdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CloudHvVirtMemInfoLib CloudHv/arm: add PeiMemInfoLib 2022-09-06 16:55:33 +00:00
Fdt16550SerialPortHookLib ArmVirtPkg: Remove duplicated words 2022-09-05 13:52:51 +00:00
FdtPL011SerialPortLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolPlatformPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolRtcFdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolVirtMemInfoLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
NorFlashKvmtoolLib ArmVirtPkg/ArmVirtKvmTool: Migrate to OVMF's VirtNorFlashDxe 2022-10-27 16:52:01 +00:00
NorFlashQemuLib ArmVirtPkg/ArmVirtQemu: migrate to OVMF's VirtNorFlashDxe 2022-10-27 16:52:01 +00:00
PlatformBootManagerLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuVirtMemInfoLib ArmVirtPkg/QemuVirtMemInfoLib: use HOB not PCD to record the memory size 2022-10-26 17:28:39 +00:00
XenArmGenericTimerVirtCounterLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenVirtMemInfoLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00