Hi Gerd,
These two libraries is not only copy code, the way of obtain the serial base address is different from ARM, and the early serial port output also different from ARM, so these two libraries are LoongArch specific.
On Mon, Nov 06, 2023 at 11:29:45AM +0800, Chao Li wrote:Add two libraries named Fdt16550SerialPortHookLib and EarlyFdtSerialPortLib16550, requested by LoongArch virtual machine.Moving libs from ArmVirtPkg to OvmfPkg (so non-arm archs can use the libs too) is perfectly fine. I think this should be done here instead of copying the code. I suspect the same applies to some of the following patches in this series (looked at the subject lines only so far though). take care, Gerd