/* This function is the main entry of the UI entry. The function will present the main menu of the system UI. */
VOID EFIAPI UiEntry(IN BOOLEAN ConnectAllHappened)
/* This function is the main entry of the UI entry. The function will present the main menu of the system UI. */
VOID EFIAPI UiEntry(IN BOOLEAN ConnectAllHappened)
{
  EFI_STATUS              Status;
  EFI_BOOT_LOGO_PROTOCOL  *BootLogo;
  REPORT_STATUS_CODE (
    EFI_PROGRESS_CODE,
    (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP)
    );
  if (!ConnectAllHappened) {
    EfiBootManagerConnectAll ();
  }
  EfiBootManagerRefreshAllBootOption ();
  Status = gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (VOID **)&BootLogo);
  if (!EFI_ERROR (Status) && (BootLogo != NULL)) {
    BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0);
  }
  InitializeFrontPage ();
  CallFrontPage ();
  FreeFrontPage ();
  if (mLanguageString != NULL) {
    FreePool (mLanguageString);
    mLanguageString = NULL;
  }
  SetupResetReminder ();
}