/* The constructor function to initialize the Serial Port library and register a callback for the ExitBootServices event. */
EFI_STATUS EFIAPI DxeRuntimeDebugLibSerialPortConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* The constructor function to initialize the Serial Port library and register a callback for the ExitBootServices event. */
EFI_STATUS EFIAPI DxeRuntimeDebugLibSerialPortConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
  EFI_STATUS  Status;
  Status = SerialPortInitialize ();
  if (EFI_ERROR (Status)) {
    return Status;
  }
  return SystemTable->BootServices->CreateEvent (
                                      EVT_SIGNAL_EXIT_BOOT_SERVICES,
                                      TPL_NOTIFY,
                                      ExitBootServicesEvent,
                                      NULL,
                                      &mEfiExitBootServicesEvent
                                      );
}