1. Sync the tracker for supporting the ModeNumber larger than 2.

2. Fixed one bug in SetMode(), Cursor should not be enabled with mandatory.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4594 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2008-01-21 09:40:59 +00:00
parent 0ca3bcbc90
commit 7347d5d6e6
5 changed files with 73 additions and 25 deletions

View File

@@ -500,7 +500,7 @@ TerminalDriverBindingStart (
TerminalDevice->SimpleTextOutput.EnableCursor = TerminalConOutEnableCursor;
TerminalDevice->SimpleTextOutput.Mode = &TerminalDevice->SimpleTextOutputMode;
TerminalDevice->SimpleTextOutputMode.MaxMode = 2;
TerminalDevice->SimpleTextOutputMode.MaxMode = 3;
//
// For terminal devices, cursor is always visible
//

View File

@@ -143,8 +143,12 @@ typedef union {
#define MODE0_COLUMN_COUNT 80
#define MODE0_ROW_COUNT 25
#define MODE1_COLUMN_COUNT 100
#define MODE1_ROW_COUNT 31
#define MODE1_COLUMN_COUNT 80
#define MODE1_ROW_COUNT 50
#define MODE2_COLUMN_COUNT 100
#define MODE2_ROW_COUNT 31
#define BACKSPACE 8
#define ESC 27
#define CSI 0x9B

View File

@@ -230,7 +230,7 @@ TerminalConOutOutputString (
//
Mode = This->Mode;
if (Mode->Mode > 1) {
if (Mode->Mode > 2) {
return EFI_UNSUPPORTED;
}
@@ -431,11 +431,11 @@ TerminalConOutQueryMode (
/*++
Routine Description:
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode().
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.QueryMode().
It returns information for an available text mode
that the terminal supports.
In this driver, we only support text mode 80x25, which is
defined as mode 0.
In this driver, we support text mode 80x25 (mode 0),
80x50 (mode 1), 100x31 (mode 2).
Arguments:
@@ -464,7 +464,7 @@ TerminalConOutQueryMode (
--*/
{
if (This->Mode->MaxMode > 2) {
if (This->Mode->MaxMode > 3) {
return EFI_DEVICE_ERROR;
}
@@ -476,6 +476,10 @@ TerminalConOutQueryMode (
*Columns = MODE1_COLUMN_COUNT;
*Rows = MODE1_ROW_COUNT;
return EFI_SUCCESS;
} else if (ModeNumber == 2) {
*Columns = MODE2_COLUMN_COUNT;
*Rows = MODE2_ROW_COUNT;
return EFI_SUCCESS;
}
return EFI_UNSUPPORTED;
@@ -523,7 +527,7 @@ TerminalConOutSetMode (
//
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
if (ModeNumber > 1) {
if (ModeNumber > 2) {
return EFI_UNSUPPORTED;
}