mirror of https://github.com/acidanthera/audk.git
Remove PCD usage for console driver, PcdConOutRow and PcdConOutColumn are current text mode during boot, not console device capability.
Signed-off-by: li-elvin Reviewed-by: hhtian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12803 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4a18b92c5f
commit
9381365cf1
|
@ -49,9 +49,8 @@ GRAPHICS_CONSOLE_MODE_DATA mGraphicsConsoleModeData[] = {
|
||||||
{100, 31},
|
{100, 31},
|
||||||
//
|
//
|
||||||
// New modes can be added here.
|
// New modes can be added here.
|
||||||
// The last 2 entries are specific for PcdConOutRow x PcdConOutColumn and full screen mode.
|
// The last entry is specific for full screen mode.
|
||||||
//
|
//
|
||||||
{0, 0},
|
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -252,12 +251,7 @@ InitializeGraphicsConsoleTextMode (
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Add PcdConOutColumn and PcdConOutRow to the last second entry.
|
|
||||||
//
|
|
||||||
Count = sizeof (mGraphicsConsoleModeData) / sizeof (GRAPHICS_CONSOLE_MODE_DATA);
|
Count = sizeof (mGraphicsConsoleModeData) / sizeof (GRAPHICS_CONSOLE_MODE_DATA);
|
||||||
mGraphicsConsoleModeData[Count - 2].Columns = (UINTN) PcdGet32 (PcdConOutColumn);
|
|
||||||
mGraphicsConsoleModeData[Count - 2].Rows = (UINTN) PcdGet32 (PcdConOutRow);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Compute the maximum number of text Rows and Columns that this current graphics mode can support.
|
// Compute the maximum number of text Rows and Columns that this current graphics mode can support.
|
||||||
|
@ -266,6 +260,11 @@ InitializeGraphicsConsoleTextMode (
|
||||||
MaxColumns = HorizontalResolution / EFI_GLYPH_WIDTH;
|
MaxColumns = HorizontalResolution / EFI_GLYPH_WIDTH;
|
||||||
MaxRows = VerticalResolution / EFI_GLYPH_HEIGHT;
|
MaxRows = VerticalResolution / EFI_GLYPH_HEIGHT;
|
||||||
|
|
||||||
|
//
|
||||||
|
// According to UEFI spec, all output devices support at least 80x25 text mode.
|
||||||
|
//
|
||||||
|
ASSERT ((MaxColumns >= 80) && (MaxRows >= 25));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add full screen mode to the last entry.
|
// Add full screen mode to the last entry.
|
||||||
//
|
//
|
||||||
|
@ -290,19 +289,8 @@ InitializeGraphicsConsoleTextMode (
|
||||||
//
|
//
|
||||||
ValidCount = 0;
|
ValidCount = 0;
|
||||||
|
|
||||||
if ((MaxColumns >= 80) && (MaxRows >= 25)) {
|
|
||||||
//
|
|
||||||
// 80x25 can be supported.
|
|
||||||
//
|
|
||||||
NewModeBuffer[ValidCount].Columns = 80;
|
NewModeBuffer[ValidCount].Columns = 80;
|
||||||
NewModeBuffer[ValidCount].Rows = 25;
|
NewModeBuffer[ValidCount].Rows = 25;
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// 80x25 cannot be supported, set PCD defined mode.
|
|
||||||
//
|
|
||||||
NewModeBuffer[ValidCount].Columns = (UINTN) PcdGet32 (PcdConOutColumn);
|
|
||||||
NewModeBuffer[ValidCount].Rows = (UINTN) PcdGet32 (PcdConOutRow);
|
|
||||||
}
|
|
||||||
NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
|
NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
|
||||||
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
||||||
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
||||||
|
|
|
@ -65,8 +65,6 @@
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
|
||||||
|
|
||||||
|
|
|
@ -99,9 +99,7 @@ TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] = {
|
||||||
{100, 31},
|
{100, 31},
|
||||||
//
|
//
|
||||||
// New modes can be added here.
|
// New modes can be added here.
|
||||||
// The last entry is specific for PcdConOutRow x PcdConOutColumn.
|
|
||||||
//
|
//
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -438,12 +436,7 @@ InitializeTerminalConsoleTextMode (
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Assign the last entry as PcdConOutColumn and PcdConOutRow defined.
|
|
||||||
//
|
|
||||||
Count = sizeof (mTerminalConsoleModeData) / sizeof (TERMINAL_CONSOLE_MODE_DATA);
|
Count = sizeof (mTerminalConsoleModeData) / sizeof (TERMINAL_CONSOLE_MODE_DATA);
|
||||||
mTerminalConsoleModeData[Count - 1].Columns = (UINTN) PcdGet32 (PcdConOutColumn);
|
|
||||||
mTerminalConsoleModeData[Count - 1].Rows = (UINTN) PcdGet32 (PcdConOutRow);;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get defined mode buffer pointer.
|
// Get defined mode buffer pointer.
|
||||||
|
|
|
@ -75,8 +75,6 @@
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType
|
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
|
|
||||||
|
|
||||||
# [Event]
|
# [Event]
|
||||||
# ##
|
# ##
|
||||||
|
|
Loading…
Reference in New Issue