/* Get mode number according to column and row */
VOID GetConsoleOutMode(IN BMM_CALLBACK_DATA *CallbackData)
/* Get mode number according to column and row */
VOID GetConsoleOutMode(IN BMM_CALLBACK_DATA *CallbackData)
{
  UINTN                            Col;
  UINTN                            Row;
  UINTN                            CurrentCol;
  UINTN                            CurrentRow;
  UINTN                            Mode;
  UINTN                            MaxMode;
  EFI_STATUS                       Status;
  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *ConOut;
  ConOut  = gST->ConOut;
  MaxMode = (UINTN)(ConOut->Mode->MaxMode);
  CurrentCol = PcdGet32 (PcdSetupConOutColumn);
  CurrentRow = PcdGet32 (PcdSetupConOutRow);
  for (Mode = 0; Mode < MaxMode; Mode++) {
    Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
    if (!EFI_ERROR (Status)) {
      if ((CurrentCol == Col) && (CurrentRow == Row)) {
        CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16)Mode;
        break;
      }
    }
  }
}