summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
diff options
context:
space:
mode:
authorDongyan Qian <qiandongyan@loongson.cn>2026-08-19 04:13:59 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-09-28 06:39:42 +0300
commita9a0a7dee0cf1552ae79a59d8c83a1dfd8d416f0 (patch)
tree73d1a050cf6e26f770b719117da14165486cb043 /MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
parent80d1e5f8474565ab198847325d951560d423d50b (diff)
downloadedk2-a9a0a7dee0cf1552ae79a59d8c83a1dfd8d416f0.tar.xz
OvmfPkg/LoongArchVirt: Clear per-CPU KS registers in SEC
The LoongArch KS registers are software scratch state. Firmware cannot rely on their values being zero after reset, so values written during a previous boot may be observed as stale data. The early serial library uses KS1 as a firmware-local UART base cache and treats a non-zero value as valid. Stale data in KS1 can therefore be mistaken for the UART MMIO base during the first SEC debug output. Clear KS0 through KS8 after disabling local interrupts and before reading the CPU ID. Every CPU entering the SEC module therefore clears its own scratch-register state before the BSP/AP split. The BSP serial path then discovers the UART base from the device tree and stores the valid value in KS1 for the remainder of the firmware boot. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Signed-off-by: Chao Li <lichao@loongson.cn>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf')
0 files changed, 0 insertions, 0 deletions