/* Platform hook to retrieve the 16550 UART base address from the GUID Hob that caches the UART base address from early boot stage and store it in PcdSerialRegisterBase. */
RETURN_STATUS EFIAPI PlatformHookSerialPortInitialize(VOID)
/* Platform hook to retrieve the 16550 UART base address from the GUID Hob that caches the UART base address from early boot stage and store it in PcdSerialRegisterBase. */
RETURN_STATUS EFIAPI PlatformHookSerialPortInitialize(VOID)
{
  VOID    *Hob;
  UINT64  *UartBase;
  if (PcdGet64 (PcdSerialRegisterBase) != 0) {
    return RETURN_SUCCESS;
  }
  Hob = GetFirstGuidHob (&gEarly16550UartBaseAddressGuid);
  if ((Hob == NULL) || (GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (*UartBase))) {
    return RETURN_NOT_FOUND;
  }
  UartBase = GET_GUID_HOB_DATA (Hob);
  if ((UINTN)*UartBase == 0) {
    return RETURN_NOT_FOUND;
  }
  return (RETURN_STATUS)PcdSet64S (PcdSerialRegisterBase, (UINTN)*UartBase);
}