code scrub for ConSplitter module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5598 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-08-01 07:38:26 +00:00
parent 0e0c422d4c
commit 4b5c4fba59
4 changed files with 188 additions and 108 deletions

View File

@ -274,6 +274,9 @@ ConSplitterTestControllerHandles (
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
//
// Tests whether a controller handle is being managed by a specific driver.
//
Status = EfiTestManagedDevice ( Status = EfiTestManagedDevice (
ControllerHandle, ControllerHandle,
DriverBindingHandle, DriverBindingHandle,
@ -283,6 +286,9 @@ ConSplitterTestControllerHandles (
return Status; return Status;
} }
//
// Tests whether a child handle is a child device of the controller.
//
Status = EfiTestChildHandle ( Status = EfiTestChildHandle (
ControllerHandle, ControllerHandle,
ChildHandle, ChildHandle,

View File

@ -30,7 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "ConSplitter.h" #include "ConSplitter.h"
// //
// Global Variables // Template for Text In Splitter
// //
STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = { STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE, TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE,
@ -117,19 +117,28 @@ STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
FALSE FALSE
}; };
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL gUgaDrawProtocolTemplate = { //
// Template for Uga Draw Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {
ConSpliterUgaDrawGetMode, ConSpliterUgaDrawGetMode,
ConSpliterUgaDrawSetMode, ConSpliterUgaDrawSetMode,
ConSpliterUgaDrawBlt ConSpliterUgaDrawBlt
}; };
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL gGraphicsOutputProtocolTemplate = { //
// Template for Graphics Output Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate = {
ConSpliterGraphicsOutputQueryMode, ConSpliterGraphicsOutputQueryMode,
ConSpliterGraphicsOutputSetMode, ConSpliterGraphicsOutputSetMode,
ConSpliterGraphicsOutputBlt, ConSpliterGraphicsOutputBlt,
NULL NULL
}; };
//
// Template for Text Out Splitter
//
STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = { STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE, TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE,
(EFI_HANDLE) NULL, (EFI_HANDLE) NULL,
@ -194,6 +203,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
(INT32 *) NULL (INT32 *) NULL
}; };
//
// Template for Standard Error Text Out Splitter
//
STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = { STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE, TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE,
(EFI_HANDLE) NULL, (EFI_HANDLE) NULL,
@ -258,6 +270,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
(INT32 *) NULL (INT32 *) NULL
}; };
//
// Driver binding instance for Console Input Device
//
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding = {
ConSplitterConInDriverBindingSupported, ConSplitterConInDriverBindingSupported,
ConSplitterConInDriverBindingStart, ConSplitterConInDriverBindingStart,
@ -267,6 +282,9 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding = {
NULL NULL
}; };
//
// Driver binding instance for Simple Pointer protocol
//
EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding = {
ConSplitterSimplePointerDriverBindingSupported, ConSplitterSimplePointerDriverBindingSupported,
ConSplitterSimplePointerDriverBindingStart, ConSplitterSimplePointerDriverBindingStart,
@ -288,6 +306,9 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding =
NULL NULL
}; };
//
// Driver binding instance for Console Out device
//
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding = {
ConSplitterConOutDriverBindingSupported, ConSplitterConOutDriverBindingSupported,
ConSplitterConOutDriverBindingStart, ConSplitterConOutDriverBindingStart,
@ -297,6 +318,9 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding = {
NULL NULL
}; };
//
// Driver binding instance for Standard Error device
//
EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding = {
ConSplitterStdErrDriverBindingSupported, ConSplitterStdErrDriverBindingSupported,
ConSplitterStdErrDriverBindingStart, ConSplitterStdErrDriverBindingStart,
@ -521,7 +545,8 @@ ConSplitterDriverEntry(
structure. structure.
@retval EFI_OUT_OF_RESOURCES Out of resources. @retval EFI_OUT_OF_RESOURCES Out of resources.
@retval other Out of resources. @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
@retval other Failed to construct private data.
**/ **/
EFI_STATUS EFI_STATUS
@ -638,6 +663,7 @@ ConSplitterTextInConstructor (
structure. structure.
@retval EFI_OUT_OF_RESOURCES Out of resources. @retval EFI_OUT_OF_RESOURCES Out of resources.
@retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
**/ **/
EFI_STATUS EFI_STATUS
@ -652,11 +678,11 @@ ConSplitterTextOutConstructor (
// Copy protocols template // Copy protocols template
// //
if (FeaturePcdGet (PcdConOutUgaSupport)) { if (FeaturePcdGet (PcdConOutUgaSupport)) {
CopyMem (&ConOutPrivate->UgaDraw, &gUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL)); CopyMem (&ConOutPrivate->UgaDraw, &mUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));
} }
if (FeaturePcdGet (PcdConOutGopSupport)) { if (FeaturePcdGet (PcdConOutGopSupport)) {
CopyMem (&ConOutPrivate->GraphicsOutput, &gGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL)); CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
} }
// //
@ -735,13 +761,13 @@ ConSplitterTextOutConstructor (
ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1; ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1;
// //
// Initial current mode to unknow state, and then set to mode 0 // Initial current mode to unknown state, and then set to mode 0
// //
ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff; ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;
ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0); ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);
} }
return Status; return EFI_SUCCESS;
} }
@ -814,8 +840,8 @@ ConSplitterSupported (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -841,8 +867,8 @@ ConSplitterConInDriverBindingSupported (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -869,8 +895,8 @@ ConSplitterSimplePointerDriverBindingSupported (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -897,8 +923,8 @@ ConSplitterAbsolutePointerDriverBindingSupported (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -924,8 +950,8 @@ ConSplitterConOutDriverBindingSupported (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -956,7 +982,7 @@ ConSplitterStdErrDriverBindingSupported (
@param InterfaceGuid The specified protocol to be opened. @param InterfaceGuid The specified protocol to be opened.
@param Interface Protocol interface returned. @param Interface Protocol interface returned.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other Failed to open the specified Console Device Guid @retval other Failed to open the specified Console Device Guid
or specified protocol. or specified protocol.
@ -1052,6 +1078,9 @@ ConSplitterConInDriverBindingStart (
return Status; return Status;
} }
//
// Add this device into Text In devices list.
//
Status = ConSplitterTextInAddDevice (&mConIn, TextIn); Status = ConSplitterTextInAddDevice (&mConIn, TextIn);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
@ -1069,6 +1098,9 @@ ConSplitterConInDriverBindingStart (
return Status; return Status;
} }
//
// Add this device into Text In Ex devices list.
//
Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx); Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);
return Status; return Status;
@ -1098,6 +1130,10 @@ ConSplitterSimplePointerDriverBindingStart (
EFI_STATUS Status; EFI_STATUS Status;
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer; EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
//
// Start ConSplitter on ControllerHandle, and create the virtual
// agrogated console device on first call Start for a SimplePointer handle.
//
Status = ConSplitterStart ( Status = ConSplitterStart (
This, This,
ControllerHandle, ControllerHandle,
@ -1110,6 +1146,9 @@ ConSplitterSimplePointerDriverBindingStart (
return Status; return Status;
} }
//
// Add this devcie into Simple Pointer devices list.
//
return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer); return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer);
} }
@ -1137,6 +1176,10 @@ ConSplitterAbsolutePointerDriverBindingStart (
EFI_STATUS Status; EFI_STATUS Status;
EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer; EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer;
//
// Start ConSplitter on ControllerHandle, and create the virtual
// agrogated console device on first call Start for a AbsolutePointer handle.
//
Status = ConSplitterStart ( Status = ConSplitterStart (
This, This,
ControllerHandle, ControllerHandle,
@ -1150,6 +1193,9 @@ ConSplitterAbsolutePointerDriverBindingStart (
return Status; return Status;
} }
//
// Add this devcie into Absolute Pointer devices list.
//
return ConSplitterAbsolutePointerAddDevice (&mConIn, AbsolutePointer); return ConSplitterAbsolutePointerAddDevice (&mConIn, AbsolutePointer);
} }
@ -1179,6 +1225,10 @@ ConSplitterConOutDriverBindingStart (
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_UGA_DRAW_PROTOCOL *UgaDraw;
//
// Start ConSplitter on ControllerHandle, and create the virtual
// agrogated console device on first call Start for a ConsoleOut handle.
//
Status = ConSplitterStart ( Status = ConSplitterStart (
This, This,
ControllerHandle, ControllerHandle,
@ -1207,7 +1257,7 @@ ConSplitterConOutDriverBindingStart (
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) { if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
// //
// Open UGA_DRAW protocol // Open UGA DRAW protocol
// //
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
ControllerHandle, ControllerHandle,
@ -1273,6 +1323,10 @@ ConSplitterStdErrDriverBindingStart (
EFI_STATUS Status; EFI_STATUS Status;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
//
// Start ConSplitter on ControllerHandle, and create the virtual
// agrogated console device on first call Start for a StandardError handle.
//
Status = ConSplitterStart ( Status = ConSplitterStart (
This, This,
ControllerHandle, ControllerHandle,
@ -1320,7 +1374,7 @@ ConSplitterStdErrDriverBindingStart (
/** /**
Stop ConSplitter on device handle by opening Console Device Guid on device handle Stop ConSplitter on device handle by closing Console Device Guid on device handle
and the console virtual handle. and the console virtual handle.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -1367,6 +1421,7 @@ ConSplitterStop (
This->DriverBindingHandle, This->DriverBindingHandle,
ConSplitterVirtualHandle ConSplitterVirtualHandle
); );
gBS->CloseProtocol ( gBS->CloseProtocol (
ControllerHandle, ControllerHandle,
DeviceGuid, DeviceGuid,
@ -1420,12 +1475,18 @@ ConSplitterConInDriverBindingStop (
return Status; return Status;
} }
//
// Remove device from Text Input Ex devices list.
//
Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx); Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
//
// Close Simple Text In protocol on controller handle and virtual handle.
//
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -1437,9 +1498,10 @@ ConSplitterConInDriverBindingStop (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
// //
// Delete this console input device's data structures. // Remove device from Text Input devices list.
// //
return ConSplitterTextInDeleteDevice (&mConIn, TextIn); return ConSplitterTextInDeleteDevice (&mConIn, TextIn);
} }
@ -1474,6 +1536,9 @@ ConSplitterSimplePointerDriverBindingStop (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// Close Simple Pointer protocol on controller handle and virtual handle.
//
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -1485,8 +1550,9 @@ ConSplitterSimplePointerDriverBindingStop (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
// //
// Delete this console input device's data structures. // Remove this device from Simple Pointer device list.
// //
return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer); return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer);
} }
@ -1522,6 +1588,9 @@ ConSplitterAbsolutePointerDriverBindingStop (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// Close Absolute Pointer protocol on controller handle and virtual handle.
//
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -1533,8 +1602,9 @@ ConSplitterAbsolutePointerDriverBindingStop (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
// //
// Delete this console input device's data structures. // Remove this device from Absolute Pointer device list.
// //
return ConSplitterAbsolutePointerDeleteDevice (&mConIn, AbsolutePointer); return ConSplitterAbsolutePointerDeleteDevice (&mConIn, AbsolutePointer);
} }
@ -1569,6 +1639,9 @@ ConSplitterConOutDriverBindingStop (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// Close Absolute Pointer protocol on controller handle and virtual handle.
//
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -1582,7 +1655,7 @@ ConSplitterConOutDriverBindingStop (
} }
// //
// Delete this console output device's data structures. // Remove this device from Text Out device list.
// //
return ConSplitterTextOutDeleteDevice (&mConOut, TextOut); return ConSplitterTextOutDeleteDevice (&mConOut, TextOut);
} }
@ -1617,6 +1690,9 @@ ConSplitterStdErrDriverBindingStop (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// Close Standard Error Device on controller handle and virtual handle.
//
Status = ConSplitterStop ( Status = ConSplitterStop (
This, This,
ControllerHandle, ControllerHandle,
@ -3111,9 +3187,7 @@ ConSplitterTextOutDeleteDevice (
return Status; return Status;
} }
//
// ConSplitter TextIn member functions
//
/** /**
Reset the input device and optionaly run diagnostics Reset the input device and optionaly run diagnostics
@ -3280,7 +3354,7 @@ ConSpliterConsoleControlLockStdInEvent (
BackSpaceString[0] = CHAR_BACKSPACE; BackSpaceString[0] = CHAR_BACKSPACE;
BackSpaceString[1] = 0; BackSpaceString[1] = 0;
SpaceString[0] = ' '; SpaceString[0] = L' ';
SpaceString[1] = 0; SpaceString[1] = 0;
ConSplitterTextOutOutputString (&mConOut.TextOut, BackSpaceString); ConSplitterTextOutOutputString (&mConOut.TextOut, BackSpaceString);
@ -3441,6 +3515,7 @@ ConSplitterTextInWaitForKey (
/** /**
Test if the key has been registered on input device.
@param RegsiteredData A pointer to a buffer that is filled in with the @param RegsiteredData A pointer to a buffer that is filled in with the
keystroke state data for the key that was keystroke state data for the key that was
@ -3482,10 +3557,6 @@ IsKeyRegistered (
} }
//
// Simple Text Input Ex protocol functions
//
/** /**
Reset the input device and optionaly run diagnostics Reset the input device and optionaly run diagnostics
@ -4065,11 +4136,6 @@ ConSplitterSimplePointerWaitForInput (
} }
} }
//
// Absolute Pointer Protocol functions
//
/** /**
Resets the pointer device hardware. Resets the pointer device hardware.

View File

@ -183,40 +183,40 @@ typedef struct {
} TEXT_OUT_AND_GOP_DATA; } TEXT_OUT_AND_GOP_DATA;
typedef struct { typedef struct {
UINT64 Signature; UINT64 Signature;
EFI_HANDLE VirtualHandle; EFI_HANDLE VirtualHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode; EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
EFI_UGA_DRAW_PROTOCOL UgaDraw; EFI_UGA_DRAW_PROTOCOL UgaDraw;
UINT32 UgaHorizontalResolution; UINT32 UgaHorizontalResolution;
UINT32 UgaVerticalResolution; UINT32 UgaVerticalResolution;
UINT32 UgaColorDepth; UINT32 UgaColorDepth;
UINT32 UgaRefreshRate; UINT32 UgaRefreshRate;
EFI_UGA_PIXEL *UgaBlt; EFI_UGA_PIXEL *UgaBlt;
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput; EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt; EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;
UINTN CurrentNumberOfGraphicsOutput; UINTN CurrentNumberOfGraphicsOutput;
UINTN CurrentNumberOfUgaDraw; UINTN CurrentNumberOfUgaDraw;
BOOLEAN HardwareNeedsStarting; BOOLEAN HardwareNeedsStarting;
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl; EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
UINTN CurrentNumberOfConsoles; UINTN CurrentNumberOfConsoles;
TEXT_OUT_AND_GOP_DATA *TextOutList; TEXT_OUT_AND_GOP_DATA *TextOutList;
UINTN TextOutListCount; UINTN TextOutListCount;
TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData; TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
UINTN TextOutQueryDataCount; UINTN TextOutQueryDataCount;
INT32 *TextOutModeMap; INT32 *TextOutModeMap;
EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode; EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
UINTN DevNullColumns; UINTN DevNullColumns;
UINTN DevNullRows; UINTN DevNullRows;
CHAR16 *DevNullScreen; CHAR16 *DevNullScreen;
INT32 *DevNullAttributes; INT32 *DevNullAttributes;
} TEXT_OUT_SPLITTER_PRIVATE_DATA; } TEXT_OUT_SPLITTER_PRIVATE_DATA;
@ -276,12 +276,14 @@ ConSplitterDriverEntry (
; ;
/** /**
Construct the ConSplitter. Construct console input devices' private data.
@param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
structure. structure.
@retval EFI_OUT_OF_RESOURCES Out of resources. @retval EFI_OUT_OF_RESOURCES Out of resources.
@retval EFI_SUCCESS Console Input Devcie's private data has been constructed.
@retval other Failed to construct private data.
**/ **/
EFI_STATUS EFI_STATUS
@ -293,10 +295,11 @@ ConSplitterTextInConstructor (
/** /**
Construct console output devices' private data. Construct console output devices' private data.
@param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA @param ConOutPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
structure. structure.
@retval EFI_OUT_OF_RESOURCES Out of resources. @retval EFI_OUT_OF_RESOURCES Out of resources.
@retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
**/ **/
EFI_STATUS EFI_STATUS
@ -310,13 +313,15 @@ ConSplitterTextOutConstructor (
// //
/** /**
Console In Supported Check Test to see if Console In Device could be supported on the ControllerHandle.
@param This Pointer to protocol. @param This Protocol instance pointer.
@param ControllerHandle Controller handle. @param ControllerHandle Handle of device to test.
@param RemainingDevicePath Remaining device path. @param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@return EFI_STATUS @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -329,13 +334,15 @@ ConSplitterConInDriverBindingSupported (
; ;
/** /**
Standard Error Supported Check Test to see if Simple Pointer protocol could be supported on the ControllerHandle.
@param This Pointer to protocol. @param This Protocol instance pointer.
@param ControllerHandle Controller handle. @param ControllerHandle Handle of device to test.
@param RemainingDevicePath Remaining device path. @param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@return EFI_STATUS @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -348,13 +355,15 @@ ConSplitterSimplePointerDriverBindingSupported (
; ;
/** /**
Console Out Supported Check Test to see if Console Out Device could be supported on the ControllerHandle.
@param This Pointer to protocol. @param This Protocol instance pointer.
@param ControllerHandle Controller handle. @param ControllerHandle Handle of device to test.
@param RemainingDevicePath Remaining device path. @param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@return EFI_STATUS @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -367,13 +376,15 @@ ConSplitterConOutDriverBindingSupported (
; ;
/** /**
Standard Error Supported Check Test to see if Standard Error Device could be supported on the ControllerHandle.
@param This Pointer to protocol. @param This Protocol instance pointer.
@param ControllerHandle Controller handle. @param ControllerHandle Handle of device to test.
@param RemainingDevicePath Remaining device path. @param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@return EFI_STATUS @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -571,8 +582,8 @@ ConSplitterStdErrDriverBindingStop (
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@retval EFI_SUCCESS This driver supports this device @retval EFI_SUCCESS This driver supports this device.
@retval other This driver does not support this device @retval other This driver does not support this device.
**/ **/
EFI_STATUS EFI_STATUS
@ -1944,7 +1955,7 @@ ConSpliterGraphicsOutputQueryMode (
; ;
/** /**
Graphics output protocol interface to set video mode Graphics output protocol interface to set video mode.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ModeNumber The mode number to be set. @param ModeNumber The mode number to be set.

View File

@ -30,7 +30,7 @@ STATIC CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param Mode Are we in text of grahics mode. @param Mode Are we in text of grahics mode.
@param GopExists TRUE if GOP Spliter has found a GOP/UGA device @param GopExists TRUE if Console Spliter has found a GOP or UGA device
@param StdInLocked TRUE if StdIn device is keyboard locked @param StdInLocked TRUE if StdIn device is keyboard locked
@retval EFI_SUCCESS Mode information returned. @retval EFI_SUCCESS Mode information returned.
@ -42,7 +42,7 @@ EFIAPI
ConSpliterConsoleControlGetMode ( ConSpliterConsoleControlGetMode (
IN EFI_CONSOLE_CONTROL_PROTOCOL *This, IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode, OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
OUT BOOLEAN *GopExists, OUT BOOLEAN *GopUgaExists,
OUT BOOLEAN *StdInLocked OUT BOOLEAN *StdInLocked
) )
{ {
@ -57,11 +57,11 @@ ConSpliterConsoleControlGetMode (
*Mode = Private->ConsoleOutputMode; *Mode = Private->ConsoleOutputMode;
if (GopExists != NULL) { if (GopUgaExists != NULL) {
*GopExists = FALSE; *GopUgaExists = FALSE;
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) { for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
if ((Private->TextOutList[Index].GraphicsOutput != NULL) || (Private->TextOutList[Index].UgaDraw != NULL)) { if ((Private->TextOutList[Index].GraphicsOutput != NULL) || (Private->TextOutList[Index].UgaDraw != NULL)) {
*GopExists = TRUE; *GopUgaExists = TRUE;
break; break;
} }
} }
@ -207,7 +207,7 @@ ConSpliterGraphicsOutputQueryMode (
/** /**
Graphics output protocol interface to set video mode Graphics output protocol interface to set video mode.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ModeNumber The mode number to be set. @param ModeNumber The mode number to be set.
@ -247,9 +247,6 @@ ConSpliterGraphicsOutputSetMode (
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This); Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
//
// GopDevNullSetMode ()
//
ReturnStatus = EFI_SUCCESS; ReturnStatus = EFI_SUCCESS;
// //
@ -1349,7 +1346,7 @@ DevNullTextOutOutputString (
Attribute = NullAttributes + SizeAttribute; Attribute = NullAttributes + SizeAttribute;
for (Index = 0; Index < MaxColumn; Index++, Screen++, Attribute++) { for (Index = 0; Index < MaxColumn; Index++, Screen++, Attribute++) {
*Screen = ' '; *Screen = L' ';
*Attribute = Mode->Attribute; *Attribute = Mode->Attribute;
} }
} else { } else {
@ -1545,7 +1542,7 @@ DevNullTextOutClearScreen (
for (Row = 0; Row < Private->DevNullRows; Row++) { for (Row = 0; Row < Private->DevNullRows; Row++) {
for (Column = 0; Column < Private->DevNullColumns; Column++, Screen++, Attributes++) { for (Column = 0; Column < Private->DevNullColumns; Column++, Screen++, Attributes++) {
*Screen = ' '; *Screen = L' ';
*Attributes = CurrentAttribute; *Attributes = CurrentAttribute;
} }
// //