1. Fixed bugs in DxeNetLib to meet consistence with network module DriverBinding protocol.
2. Sync bugs in console modules. 3. Sync bugs in PlatDriOverLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4571 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -489,8 +489,30 @@ TerminalDriverBindingStart (
|
||||
//
|
||||
// Simple Text Output Protocol
|
||||
//
|
||||
TerminalDevice->SimpleTextOutput.Reset = TerminalConOutReset;
|
||||
TerminalDevice->SimpleTextOutput.OutputString = TerminalConOutOutputString;
|
||||
TerminalDevice->SimpleTextOutput.TestString = TerminalConOutTestString;
|
||||
TerminalDevice->SimpleTextOutput.QueryMode = TerminalConOutQueryMode;
|
||||
TerminalDevice->SimpleTextOutput.SetMode = TerminalConOutSetMode;
|
||||
TerminalDevice->SimpleTextOutput.SetAttribute = TerminalConOutSetAttribute;
|
||||
TerminalDevice->SimpleTextOutput.ClearScreen = TerminalConOutClearScreen;
|
||||
TerminalDevice->SimpleTextOutput.SetCursorPosition = TerminalConOutSetCursorPosition;
|
||||
TerminalDevice->SimpleTextOutput.EnableCursor = TerminalConOutEnableCursor;
|
||||
TerminalDevice->SimpleTextOutput.Mode = &TerminalDevice->SimpleTextOutputMode;
|
||||
|
||||
TerminalDevice->SimpleTextOutputMode.MaxMode = 2;
|
||||
//
|
||||
// For terminal devices, cursor is always visible
|
||||
//
|
||||
TerminalDevice->SimpleTextOutputMode.CursorVisible = TRUE;
|
||||
Status = TerminalDevice->SimpleTextOutput.SetAttribute (
|
||||
&TerminalDevice->SimpleTextOutput,
|
||||
EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ReportError;
|
||||
}
|
||||
|
||||
Status = TerminalDevice->SimpleTextOutput.Reset (
|
||||
&TerminalDevice->SimpleTextOutput,
|
||||
FALSE
|
||||
|
@@ -143,6 +143,8 @@ typedef union {
|
||||
#define MODE0_COLUMN_COUNT 80
|
||||
#define MODE0_ROW_COUNT 25
|
||||
|
||||
#define MODE1_COLUMN_COUNT 100
|
||||
#define MODE1_ROW_COUNT 31
|
||||
#define BACKSPACE 8
|
||||
#define ESC 27
|
||||
#define CSI 0x9B
|
||||
|
@@ -226,11 +226,11 @@ TerminalConOutOutputString (
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// get current display mode
|
||||
// Terminal driver only support mode 0
|
||||
// Get current display mode
|
||||
//
|
||||
Mode = This->Mode;
|
||||
if (Mode->Mode != 0) {
|
||||
|
||||
if (Mode->Mode > 1) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@@ -464,15 +464,17 @@ TerminalConOutQueryMode (
|
||||
|
||||
--*/
|
||||
{
|
||||
if (This->Mode->MaxMode > 1) {
|
||||
if (This->Mode->MaxMode > 2) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (ModeNumber == 0) {
|
||||
|
||||
*Columns = MODE0_COLUMN_COUNT;
|
||||
*Rows = MODE0_ROW_COUNT;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
} else if (ModeNumber == 1) {
|
||||
*Columns = MODE1_COLUMN_COUNT;
|
||||
*Rows = MODE1_ROW_COUNT;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -521,11 +523,14 @@ TerminalConOutSetMode (
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
if (ModeNumber != 0) {
|
||||
if (ModeNumber > 1) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
This->Mode->Mode = 0;
|
||||
|
||||
//
|
||||
// Set the current mode
|
||||
//
|
||||
This->Mode->Mode = (INT32) ModeNumber;
|
||||
|
||||
This->ClearScreen (This);
|
||||
|
||||
@@ -537,7 +542,7 @@ TerminalConOutSetMode (
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
This->Mode->Mode = 0;
|
||||
This->Mode->Mode = (INT32) ModeNumber;
|
||||
|
||||
Status = This->ClearScreen (This);
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
Reference in New Issue
Block a user