summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h
diff options
context:
space:
mode:
authorChao Liu <chao.liu.zevorn@gmail.com>2026-01-05 13:00:00 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-01-19 08:57:29 +0300
commitf2c63dca1bc5201903b75a8551afdf2c7ab2fc4d (patch)
treea9ce464ae8fa88e40005dcd402448e42a4cb5830 /MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h
parentb1707d99ae05b7e3f70b28fee830fbad131de5b5 (diff)
downloadedk2-f2c63dca1bc5201903b75a8551afdf2c7ab2fc4d.tar.xz
UefiCpuPkg/BaseRiscV64CpuTimerLib: Add constructor to initialize mTimeBase
Add a constructor function that calls GetPerformanceCounterProperties(NULL, NULL) to ensure mTimeBase is initialized during DXE phase, before virtual memory is enabled. This fixes crashes on RISC-V platforms without fw_cfg device support (e.g., QEMU rvsp-ref) where Runtime Services may call GetPerformanceCounterProperties() before mTimeBase has been initialized. When virtual memory is then enabled, the uninitialized mTimeBase value causes HOB access to fail with a page fault. Fixes: https://github.com/tianocore/edk2/issues/11747 Signed-off-by: Chao Liu <chao.liu.riscv@isrc.iscas.ac.cn> Reported-by: Xiaofan Tan <xiaofan@iscas.ac.cn> Suggested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h')
0 files changed, 0 insertions, 0 deletions