Hi Gerd,
This library is used in the PEI stage, same as the Hook Library, LoongArch QEMU is runs on flash in PEI stage, MdeModule version does not support to get the SerialRegisterBase via registers or HOB or FDT, I thought if we adjust the MdeModule version is a big project, so I copied the MdeModule version, and added a way to get SerialRegisterBase via FDT.On Mon, Mar 11, 2024 at 05:39:08PM +0800, Chao Li wrote:Add a early serial port output library into LoongArchVirt that named EarlyFdtSerialPortLib16550, this library is referenced from MdeModulePkg.Why create your own copy? What are the differences to MdeModulePkg/Library/BaseSerialPortLib16550?
take care, Gerd