Hi,
Can you deduplicate this code by moving the functions into a common, or "base" file, and DXE's constructor and event into a separate file? As I see it, it should be alright to reuse DXE's functions for other phases, the `mBaseSerialPortLibHobAtRuntime` variable will never be changed in this case.

Regards,
Benjamin