MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This is the main routine for initializing the Graphics Console support routines.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -245,8 +245,8 @@ InitializeGraphicsConsoleTextMode (
|
||||
UINTN ValidCount;
|
||||
UINTN ValidIndex;
|
||||
UINTN MaxColumns;
|
||||
UINTN MaxRows;
|
||||
|
||||
UINTN MaxRows;
|
||||
|
||||
if ((TextModeCount == NULL) || (TextModeData == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@ -287,7 +287,7 @@ InitializeGraphicsConsoleTextMode (
|
||||
//
|
||||
// Mode 0 and mode 1 is for 80x25, 80x50 according to UEFI spec.
|
||||
//
|
||||
ValidCount = 0;
|
||||
ValidCount = 0;
|
||||
|
||||
NewModeBuffer[ValidCount].Columns = 80;
|
||||
NewModeBuffer[ValidCount].Rows = 25;
|
||||
@ -295,20 +295,20 @@ InitializeGraphicsConsoleTextMode (
|
||||
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
||||
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
||||
NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (NewModeBuffer[ValidCount].Columns * EFI_GLYPH_WIDTH)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
ValidCount++;
|
||||
|
||||
if ((MaxColumns >= 80) && (MaxRows >= 50)) {
|
||||
NewModeBuffer[ValidCount].Columns = 80;
|
||||
NewModeBuffer[ValidCount].Rows = 50;
|
||||
NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
|
||||
}
|
||||
NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
|
||||
NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
|
||||
NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
|
||||
ValidCount++;
|
||||
|
||||
|
||||
//
|
||||
// Start from mode 2 to put the valid mode other than 80x25 and 80x50 in the output mode buffer.
|
||||
//
|
||||
@ -340,14 +340,14 @@ InitializeGraphicsConsoleTextMode (
|
||||
ValidCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DEBUG_CODE (
|
||||
for (Index = 0; Index < ValidCount; Index++) {
|
||||
DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Return valid mode count and mode information buffer.
|
||||
//
|
||||
@ -388,9 +388,9 @@ GraphicsConsoleControllerDriverStart (
|
||||
UINTN MaxMode;
|
||||
UINT32 ModeNumber;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
|
||||
UINTN SizeOfInfo;
|
||||
UINTN SizeOfInfo;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||
|
||||
|
||||
ModeNumber = 0;
|
||||
|
||||
//
|
||||
@ -442,9 +442,9 @@ GraphicsConsoleControllerDriverStart (
|
||||
if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) {
|
||||
//
|
||||
// Find the highest resolution which GOP supports.
|
||||
//
|
||||
//
|
||||
MaxMode = Private->GraphicsOutput->Mode->MaxMode;
|
||||
|
||||
|
||||
for (ModeIndex = 0; ModeIndex < MaxMode; ModeIndex++) {
|
||||
Status = Private->GraphicsOutput->QueryMode (
|
||||
Private->GraphicsOutput,
|
||||
@ -581,7 +581,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
Status = GraphicsConsoleConOutOutputString (&Private->SimpleTextOutput, (CHAR16 *)L"Graphics Console Started\n\r");
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Error;
|
||||
}
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
@ -915,7 +915,7 @@ GraphicsConsoleConOutOutputString (
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
//
|
||||
// Current mode
|
||||
@ -1305,7 +1305,7 @@ GraphicsConsoleConOutSetMode (
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
ModeData = &(Private->ModeData[ModeNumber]);
|
||||
|
||||
if (ModeData->Columns <= 0 && ModeData->Rows <= 0) {
|
||||
@ -1443,7 +1443,7 @@ GraphicsConsoleConOutSetMode (
|
||||
This->Mode->CursorColumn = 0;
|
||||
This->Mode->CursorRow = 0;
|
||||
|
||||
FlushCursor (This);
|
||||
FlushCursor (This);
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
@ -1527,7 +1527,7 @@ GraphicsConsoleConOutClearScreen (
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
|
||||
EFI_TPL OldTpl;
|
||||
|
||||
|
||||
if (This->Mode->Mode == -1) {
|
||||
//
|
||||
// If current mode is not valid, return error.
|
||||
@ -1876,11 +1876,11 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
/**
|
||||
Flush the cursor on the screen.
|
||||
|
||||
|
||||
If CursorVisible is FALSE, nothing to do and return directly.
|
||||
If CursorVisible is TRUE,
|
||||
If CursorVisible is TRUE,
|
||||
i) If the cursor shows on screen, it will be erased.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for GraphicsConsole driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -209,7 +209,7 @@ GraphicsConsoleComponentNameGetControllerName (
|
||||
|
||||
/**
|
||||
Reset the text output device hardware and optionally run diagnostics.
|
||||
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.Reset().
|
||||
If ExtendeVerification is TRUE, then perform dependent Graphics Console
|
||||
device reset, and set display mode to mode 0.
|
||||
@ -235,7 +235,7 @@ GraphicsConsoleConOutReset (
|
||||
/**
|
||||
Write a Unicode string to the output device.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
||||
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
||||
The Unicode string will be converted to Glyphs and will be
|
||||
sent to the Graphics Console.
|
||||
|
||||
@ -262,7 +262,7 @@ GraphicsConsoleConOutOutputString (
|
||||
);
|
||||
|
||||
/**
|
||||
Verifies that all characters in a Unicode string can be output to the
|
||||
Verifies that all characters in a Unicode string can be output to the
|
||||
target device.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.TestString().
|
||||
@ -316,7 +316,7 @@ GraphicsConsoleConOutQueryMode (
|
||||
|
||||
/**
|
||||
Sets the output device(s) to a specified mode.
|
||||
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.SetMode().
|
||||
Set the Graphics Console to a specified mode. In this driver, we only support mode 0.
|
||||
|
||||
@ -324,7 +324,7 @@ GraphicsConsoleConOutQueryMode (
|
||||
@param ModeNumber The text mode to set.
|
||||
|
||||
@retval EFI_SUCCESS The requested text mode is set.
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set because of
|
||||
@retval EFI_DEVICE_ERROR The requested text mode cannot be set because of
|
||||
Graphics Console device error.
|
||||
@retval EFI_UNSUPPORTED The text mode number is not valid.
|
||||
|
||||
@ -344,7 +344,7 @@ GraphicsConsoleConOutSetMode (
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Attribute The attribute to set. Bits 0..3 are the foreground
|
||||
color, and bits 4..6 are the background color.
|
||||
color, and bits 4..6 are the background color.
|
||||
All other bits are undefined and must be zero.
|
||||
|
||||
@retval EFI_SUCCESS The requested attribute is set.
|
||||
@ -360,7 +360,7 @@ GraphicsConsoleConOutSetAttribute (
|
||||
);
|
||||
|
||||
/**
|
||||
Clears the output device(s) display to the currently selected background
|
||||
Clears the output device(s) display to the currently selected background
|
||||
color.
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.ClearScreen().
|
||||
@ -451,10 +451,10 @@ GraphicsConsoleControllerDriverSupported (
|
||||
|
||||
|
||||
/**
|
||||
Start this driver on Controller by opening Graphics Output protocol or
|
||||
Start this driver on Controller by opening Graphics Output protocol or
|
||||
UGA Draw protocol, and installing Simple Text Out protocol on Controller.
|
||||
(UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
@ -473,10 +473,10 @@ GraphicsConsoleControllerDriverStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on Controller by removing Simple Text Out protocol
|
||||
Stop this driver on Controller by removing Simple Text Out protocol
|
||||
and closing the Graphics Output Protocol or UGA Draw protocol on Controller.
|
||||
(UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
|
||||
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Controller Handle of device to stop driver on
|
||||
@ -485,7 +485,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
||||
|
||||
@retval EFI_SUCCESS This driver is removed Controller.
|
||||
@retval EFI_NOT_STARTED Simple Text Out protocol could not be found the
|
||||
@retval EFI_NOT_STARTED Simple Text Out protocol could not be found the
|
||||
Controller.
|
||||
@retval other This driver was not removed from this device.
|
||||
|
||||
@ -503,9 +503,9 @@ GraphicsConsoleControllerDriverStop (
|
||||
/**
|
||||
Locate HII Database protocol and HII Font protocol.
|
||||
|
||||
@retval EFI_SUCCESS HII Database protocol and HII Font protocol
|
||||
@retval EFI_SUCCESS HII Database protocol and HII Font protocol
|
||||
are located successfully.
|
||||
@return other Failed to locate HII Database protocol or
|
||||
@return other Failed to locate HII Database protocol or
|
||||
HII Font protocol.
|
||||
|
||||
**/
|
||||
@ -554,11 +554,11 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
/**
|
||||
Flush the cursor on the screen.
|
||||
|
||||
|
||||
If CursorVisible is FALSE, nothing to do and return directly.
|
||||
If CursorVisible is TRUE,
|
||||
If CursorVisible is TRUE,
|
||||
i) If the cursor shows on screen, it will be erased.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
ii) If the cursor does not show on screen, it will be shown.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
@ -575,17 +575,17 @@ FlushCursor (
|
||||
for the Graphics Console device based on Graphics Output Protocol.
|
||||
|
||||
If yes, set the graphic device's current mode to this specific mode.
|
||||
|
||||
|
||||
@param GraphicsOutput Graphics Output Protocol instance pointer.
|
||||
@param HorizontalResolution User defined horizontal resolution
|
||||
@param VerticalResolution User defined vertical resolution.
|
||||
@param CurrentModeNumber Current specific mode to be check.
|
||||
|
||||
@retval EFI_SUCCESS The mode is supported.
|
||||
@retval EFI_UNSUPPORTED The specific mode is out of range of graphics
|
||||
@retval EFI_UNSUPPORTED The specific mode is out of range of graphics
|
||||
device supported.
|
||||
@retval other The specific mode does not support user defined
|
||||
resolution or failed to set the current mode to the
|
||||
@retval other The specific mode does not support user defined
|
||||
resolution or failed to set the current mode to the
|
||||
specific mode on graphics device.
|
||||
|
||||
**/
|
||||
|
@ -3,8 +3,8 @@
|
||||
#
|
||||
# This driver will install Simple Text Output protocol by consuming Graphices Output
|
||||
# protocol or UGA Draw protocol on graphic devices.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// GraphicsConsoleDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Graphics Console DXE Driver"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user