Hi Gerd,
The LoongArch QEMU PEI stage runs on flash and does not allow set PCD operations(memory have not enabled), so the address can only be transferred through a SAVE register.On Mon, Mar 11, 2024 at 05:39:02PM +0800, Chao Li wrote:Add a serial port hook library in LoongArchVirt named Fdt16550SerialProtHookLib, this library is referenced from ArmVirtPkg. LoongArch QEMU virtual machine uses register of LOONGARCH_CSR_KS1 to transfer serial port base addres from the PEI phase to the DXE phase.Why use LOONGARCH_CSR_KS1? Can't you simply set PcdSerialRegisterBase?
take care, Gerd