X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FConsole%2FGraphicsConsoleDxe%2FGraphicsConsole.h;h=342fff8f2146ef01ae9898d0f3cddf564bb83898;hp=1b7ad6cff4817fed3651400e2b0188e247eb7a24;hb=7601dbe7c5ed94c859600649fc316918bb3572b3;hpb=24248368f7e06914e864ea20e38db8d9a9d3d1f7 diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h index 1b7ad6cff4..342fff8f21 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _GRAPHICS_CONSOLE_H_ #define _GRAPHICS_CONSOLE_H_ -#include +#include #include #include #include @@ -38,6 +38,53 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName; extern EFI_COMPONENT_NAME2_PROTOCOL gGraphicsConsoleComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding; +extern EFI_NARROW_GLYPH gUsStdNarrowGlyphData[]; + + +// +// User can define valid graphic resolution here +// e.g. 640x480, 800x600, 1024x768... +// +#define CURRENT_HORIZONTAL_RESOLUTION 800 +#define CURRENT_VERTICAL_RESOLUTION 600 + +typedef union { + EFI_NARROW_GLYPH NarrowGlyph; + EFI_WIDE_GLYPH WideGlyph; +} GLYPH_UNION; + +// +// Device Structure +// +#define GRAPHICS_CONSOLE_DEV_SIGNATURE SIGNATURE_32 ('g', 's', 't', 'o') + +typedef struct { + UINTN Columns; + UINTN Rows; + INTN DeltaX; + INTN DeltaY; + UINT32 GopWidth; + UINT32 GopHeight; + UINT32 GopModeNumber; +} GRAPHICS_CONSOLE_MODE_DATA; + +#define GRAPHICS_MAX_MODE 4 + +typedef struct { + UINTN Signature; + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; + EFI_UGA_DRAW_PROTOCOL *UgaDraw; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput; + EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode; + GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE]; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer; + EFI_HII_HANDLE HiiHandle; +} GRAPHICS_CONSOLE_DEV; + +#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \ + CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE) + // // EFI Component Name Functions @@ -169,84 +216,35 @@ GraphicsConsoleComponentNameGetControllerName ( ); -// -// User can define valid graphic resolution here -// e.g. 640x480, 800x600, 1024x768... -// -#define CURRENT_HORIZONTAL_RESOLUTION 800 -#define CURRENT_VERTICAL_RESOLUTION 600 - -typedef union { - EFI_NARROW_GLYPH NarrowGlyph; - EFI_WIDE_GLYPH WideGlyph; -} GLYPH_UNION; - -extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[]; -extern EFI_WIDE_GLYPH UsStdWideGlyphData[]; - -// -// Device Structure -// -#define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o') - -typedef struct { - UINTN Columns; - UINTN Rows; - INTN DeltaX; - INTN DeltaY; - UINT32 GopWidth; - UINT32 GopHeight; - UINT32 GopModeNumber; -} GRAPHICS_CONSOLE_MODE_DATA; - -#define GRAPHICS_MAX_MODE 4 - -typedef struct { - UINTN Signature; - EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput; - EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode; - GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE]; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer; - EFI_HII_HANDLE HiiHandle; -} GRAPHICS_CONSOLE_DEV; - -#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \ - CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE) - -// -// Global Variables -// -extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding; /** Returns available Unicode glyphs narrow fonts(8*19 pixels) size. - @return Narrow foun size. + @return Narrow font size. **/ -UINTN +UINT32 ReturnNarrowFontSize ( VOID ); /** + 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. If ExtendedVerification is FALSE, only set display mode to mode 0. - @param This Indicates the calling context. + @param This Protocol instance pointer. @param ExtendedVerification Indicates that the driver may perform a more exhaustive verification operation of the device during reset. - @return EFI_SUCCESS - @return The reset operation succeeds. - @return EFI_DEVICE_ERROR - @return The Graphics Console is not functioning correctly + @retval EFI_SUCCESS The text output device was reset. + @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and + could not be reset. **/ EFI_STATUS @@ -440,19 +438,19 @@ GraphicsConsoleConOutEnableCursor ( ); /** - Test to see if Graphics Console could be supported on the ControllerHandle. + Test to see if Graphics Console could be supported on the Controller. Graphics Console could be supported if Graphics Output Protocol or UGA Draw - Protocol exists on the ControllerHandle. (UGA Draw Protocol could be shipped + Protocol exists on the Controller. (UGA Draw Protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.) @param This Protocol instance pointer. - @param ControllerHandle Handle of device to test. + @param Controller Handle of device to test. @param RemainingDevicePath Optional parameter use to pick a specific child device to start. - @retval EFI_SUCCESS This driver supports this device - @retval other This driver does not support this device + @retval EFI_SUCCESS This driver supports this device. + @retval other This driver does not support this device. **/ EFI_STATUS @@ -463,18 +461,19 @@ GraphicsConsoleControllerDriverSupported ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath ); + /** - Start this driver on ControllerHandle by opening Graphics Output protocol or - UGA Draw protocol, and installing Simple Text Out protocol on ControllerHandle. - (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.) + 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 ControllerHandle Handle of device to bind driver to + @param Controller Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child device to start. - @retval EFI_SUCCESS This driver is added to ControllerHandle - @retval other This driver does not support this device + @retval EFI_SUCCESS This driver is added to Controller. + @retval other This driver does not support this device. **/ EFI_STATUS @@ -486,20 +485,20 @@ GraphicsConsoleControllerDriverStart ( ); /** - Stop this driver on ControllerHandle by removing Simple Text Out protocol - and closing the Graphics Output Protocol or UGA Draw protocol on ControllerHandle. - (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.) + 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 ControllerHandle Handle of device to stop driver on + @param Controller Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. @param ChildHandleBuffer List of Child Handles to Stop. - @retval EFI_SUCCESS This driver is removed ControllerHandle. + @retval EFI_SUCCESS This driver is removed Controller. @retval EFI_NOT_STARTED Simple Text Out protocol could not be found the - ControllerHandle. + Controller. @retval other This driver was not removed from this device. **/ @@ -525,8 +524,7 @@ GraphicsConsoleControllerDriverStop ( EFI_STATUS EfiLocateHiiProtocol ( VOID - ) -; + ); #endif