Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: a9a0a7dee0cf1552ae79a59d8c83a1dfd8d416f0
https://github.com/tianocore/edk2/commit/a9a0a7dee0cf1552ae79a59d8c83a1dfd8d416f0
Author: Dongyan Qian <[email protected]>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
M
OvmfPkg/LoongArchVirt/Library/EarlyFdtSerialPortLib16550/EarlyFdtSerialPortLib16550.c
M OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S
Log Message:
-----------
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 <[email protected]>
Signed-off-by: Chao Li <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits