summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.msa
diff options
context:
space:
mode:
authorDoug Cook <dcook@microsoft.com>2026-09-24 21:36:52 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-09-25 00:32:18 +0300
commit2f1971dd4d770c418f9aadb60b18c5645af3344c (patch)
tree884b21e5954e1c57dc3c2165bb53afb3454aefdb /MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.msa
parentf002c2859834cd7c5f40bb16e22b2a5f6b07e5be (diff)
downloadedk2-2f1971dd4d770c418f9aadb60b18c5645af3344c.tar.xz
OvmfPkg: Use ReadUnaligned64 for 64-bit FDT property cells
FDT property values are guaranteed to be 4-byte aligned. Several OvmfPkg modules read 64-bit "reg" cells by dereferencing a UINT64 pointer into the property data. That is undefined behavior, and it faults on AArch64 whenever the access is not naturally aligned and the MMU is off. This was observed on ArmVirtQemu-derived firmware as a data abort (ESR 0x96000021, DFSC alignment fault, FAR 0x4000025c) in QemuFwCfgInitialize(), which is in QemuFwCfgMmioPeiLib and runs from PEI before the MMU is enabled. Read these cells with ReadUnaligned64(), as QemuVirtMemInfoLib, FdtNorFlashQemuLib and VirtioMmioProbeLib already do. Covered: - QemuFwCfgLib (MMIO PEI and DXE): fw-cfg "reg" - RiscVVirt PlatformSecLib: "reg" of MMIO nodes - LoongArchVirt PlatformPei: RTC "reg" - GoldfishRealTimeClockLib: RTC "reg" - FdtPciHostBridgeLib, FdtPciPcdProducerLib: ECAM "reg" - VirtioFdtDxe: virtio-mmio "reg" Signed-off-by: Doug Cook <idigdoug@gmail.com>
Diffstat (limited to 'MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.msa')
0 files changed, 0 insertions, 0 deletions