Hi Ard and Gerd, Thanks, Chao On 2024/3/15 17:54, Chao Li wrote: > > Hi Ard, > > On 2024/3/15 17:51, Ard Biesheuvel wrote: >> On Fri, 15 Mar 2024 at 10:49, Chao Li wrote: >>> Hi Gerd, >>> >>> >>> Thanks, >>> Chao >>> On 2024/3/15 17:33, Gerd Hoffmann wrote: >>> >>> 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? >>> >>> 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. >>> >> Then maybe use a HOB instead? > Ha, I forgot this way, let's me try. I remember, before committing the first version, I tried to usb the HOB in this library, but if the HOB library is referenced, the UefiDevicePathLibDevicePathProtocol.inf and UefiLib.inf will be cycle consumed, I rememberd the UefiDevicePathLibDevicePathProtocol.inf included a constructor that will cause the cycle comsumed. So, I think it is a better choice for this library to use register KCS1. >> > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116931): https://edk2.groups.io/g/devel/message/116931 Mute This Topic: https://groups.io/mt/104859892/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-