/**\r
The user Entry Point for module ConSplitter. The user code starts with this function.\r
\r
+ Installs driver module protocols and. Creates virtual device handles for ConIn,\r
+ ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,\r
+ Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. \r
+ Installs Graphics Output protocol and/or UGA Draw protocol if needed.\r
+\r
@param[in] ImageHandle The firmware allocated handle for the EFI image.\r
@param[in] SystemTable A pointer to the EFI System Table.\r
\r
**/\r
EFI_STATUS\r
EFIAPI\r
-InitializeConSplitter(\r
+ConSplitterDriverEntry(\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
ASSERT_EFI_ERROR (Status);\r
\r
\r
- //\r
- // Call the original Entry Point\r
- //\r
- Status = ConSplitterDriverEntry (ImageHandle, SystemTable);\r
-\r
- return Status;\r
-}\r
-\r
-\r
-\r
-/**\r
- Intialize a virtual console device to act as an agrigator of physical console\r
- devices.\r
-\r
- @param ImageHandle (Standard EFI Image entry -\r
- EFI_IMAGE_ENTRY_POINT)\r
- @param SystemTable (Standard EFI Image entry -\r
- EFI_IMAGE_ENTRY_POINT)\r
- EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ConSplitterDriverEntry (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
ASSERT (FeaturePcdGet (PcdConOutGopSupport) ||\r
FeaturePcdGet (PcdConOutUgaSupport));\r
//\r
);\r
\r
return EFI_SUCCESS;\r
+\r
}\r
\r
\r
/**\r
- Construct the ConSplitter.\r
+ Construct console input devices' private data.\r
\r
@param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
structure.\r
\r
@retval EFI_OUT_OF_RESOURCES Out of resources.\r
+ @retval other Out of resources.\r
\r
**/\r
EFI_STATUS\r
return Status;\r
}\r
\r
+/**\r
+ Construct console output devices' private data.\r
+\r
+ @param ConOutPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
+ structure.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextOutConstructor (\r
TEXT_OUT_SPLITTER_PRIVATE_DATA *ConOutPrivate\r
\r
\r
/**\r
- Generic Supported Check\r
+ Test to see if the specified protocol could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller Handle.\r
- @param Guid Guid.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param Guid The specified protocol guid.\r
\r
- @retval EFI_UNSUPPORTED unsupported.\r
- @retval EFI_SUCCESS operation is OK.\r
+ @retval EFI_SUCCESS The specified protocol is supported on this device.\r
+ @retval other The specified protocol is not supported on this device.\r
\r
**/\r
EFI_STATUS\r
return EFI_SUCCESS;\r
}\r
\r
-\r
/**\r
- Console In Supported Check\r
+ Test to see if Console In Device could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
\r
**/\r
EFI_STATUS\r
);\r
}\r
\r
-\r
/**\r
- Standard Error Supported Check\r
+ Test to see if Simple Pointer protocol could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Absolute Pointer Supported Check\r
+ Test to see if Absolute Pointer protocol could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Console Out Supported Check\r
+ Test to see if Console Out Device could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
\r
**/\r
EFI_STATUS\r
);\r
}\r
\r
-\r
/**\r
- Standard Error Supported Check\r
+ Test to see if Standard Error Device could be supported on the ControllerHandle. \r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a SimpleTextIn handle.\r
-\r
- (Standard DriverBinding Protocol Start() function)\r
-\r
- @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+ Start ConSplitter on devcie handle by opening Console Device Guid on device handle \r
+ and the console virtual handle. And Get the console interface on controller handle.\r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device.\r
+ @param ConSplitterVirtualHandle Console virtual Handle.\r
+ @param DeviceGuid The specified Console Device, such as ConInDev,\r
+ ConOutDev.\r
+ @param InterfaceGuid The specified protocol to be opened.\r
+ @param Interface Protocol interface returned.\r
+\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other Failed to open the specified Console Device Guid\r
+ or specified protocol.\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
ConSplitterStart (\r
IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
IN EFI_HANDLE ControllerHandle,\r
IN EFI_HANDLE ConSplitterVirtualHandle,\r
IN EFI_GUID *DeviceGuid,\r
IN EFI_GUID *InterfaceGuid,\r
- IN VOID **Interface\r
+ OUT VOID **Interface\r
)\r
{\r
EFI_STATUS Status;\r
VOID *Instance;\r
\r
//\r
- // Check to see whether the handle has the ConsoleInDevice GUID on it\r
+ // Check to see whether the ControllerHandle has the InterfaceGuid on it.\r
//\r
Status = gBS->OpenProtocol (\r
ControllerHandle,\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a SimpleTextIn handle.\r
-\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ Start Console In Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_STATUS\r
- @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+ @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.\r
+ @retval other Console In Consplitter does not support this device.\r
\r
**/\r
EFI_STATUS\r
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
- EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
+ EFI_STATUS Status;\r
+ EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
+ EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
\r
//\r
// Start ConSplitter on ControllerHandle, and create the virtual\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a SimpleTextIn handle.\r
+ Start Simple Pointer Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
-\r
- @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+ @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.\r
+ @retval other Simple Pointer Consplitter does not support this device.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a ConIn handle.\r
-\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ Start Absolute Pointer Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_ERROR if a AbsolutePointer protocol is not started.\r
+ @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.\r
+ @retval other Absolute Pointer Consplitter does not support this device.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a SimpleTextIn handle.\r
+ Start Console Out Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
-\r
- @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+ @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.\r
+ @retval other Console Out Consplitter does not support this device.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Start ConSplitter on ControllerHandle, and create the virtual\r
- agrogated console device on first call Start for a SimpleTextIn handle.\r
-\r
- @param This Pointer to protocol.\r
- @param ControllerHandle Controller handle.\r
- @param RemainingDevicePath Remaining device path.\r
+ Start Standard Error Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
\r
- @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+ @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.\r
+ @retval other Standard Error Consplitter does not support this device.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
-\r
- (Standard DriverBinding Protocol Stop() function)\r
-\r
- @return None\r
+ Stop ConSplitter on device handle by opening Console Device Guid on device handle \r
+ and the console virtual handle.\r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device.\r
+ @param ConSplitterVirtualHandle Console virtual Handle.\r
+ @param DeviceGuid The specified Console Device, such as ConInDev,\r
+ ConOutDev.\r
+ @param InterfaceGuid The specified protocol to be opened.\r
+ @param Interface Protocol interface returned.\r
+\r
+ @retval EFI_SUCCESS Stop ConSplitter on ControllerHandle successfully.\r
+ @retval other Failed to Stop ConSplitter on ControllerHandle.\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
ConSplitterStop (\r
IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
IN EFI_HANDLE ControllerHandle,\r
\r
\r
/**\r
+ Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.\r
\r
- (Standard DriverBinding Protocol Stop() function)\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @return None\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing\r
+ Simple Pointer protocol.\r
\r
- (Standard DriverBinding Protocol Stop() function)\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @return None\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing\r
+ Absolute Pointer protocol.\r
\r
- (Standard DriverBinding Protocol Stop() function)\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @return None\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.\r
\r
- (Standard DriverBinding Protocol Stop() function)\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @return None\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.\r
\r
- (Standard DriverBinding Protocol Stop() function)\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @retval EFI_SUCCESS Complete successfully.\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
\r
**/\r
EFI_STATUS\r
data\r
\r
@retval EFI_SUCCESS Buffer size has grown\r
- @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size\r
- @return None\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Add Text Input Device in Consplitter Text Input list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param TextIn Simple Text Input protocol pointer.\r
\r
- @return EFI_SUCCESS\r
- @return EFI_OUT_OF_RESOURCES\r
+ @retval EFI_SUCCESS Text Input Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Remove Simple Text Device in Consplitter Absolute Pointer list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param TextIn Simple Text protocol pointer.\r
\r
- @return EFI_SUCCESS\r
- @return EFI_NOT_FOUND\r
+ @retval EFI_SUCCESS Simple Text Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Text Device found.\r
\r
**/\r
EFI_STATUS\r
return EFI_NOT_FOUND;\r
}\r
\r
+/**\r
+ Add Text Input Ex Device in Consplitter Text Input Ex list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextInEx Simple Text Ex Input protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Text Input Ex Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInExAddDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Remove Simple Text Ex Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextInEx Simple Text Ex protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Simple Text Ex Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Text Ex Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInExDeleteDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
\r
\r
/**\r
+ Add Simple Pointer Device in Consplitter Simple Pointer list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param SimplePointer Simple Pointer protocol pointer.\r
\r
- @return EFI_OUT_OF_RESOURCES\r
- @return EFI_SUCCESS\r
+ @retval EFI_SUCCESS Simple Pointer Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Remove Simple Pointer Device in Consplitter Absolute Pointer list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param SimplePointer Simple Pointer protocol pointer.\r
\r
- @return None\r
+ @retval EFI_SUCCESS Simple Pointer Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Pointer Device found.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Add Absolute Pointer Device in Consplitter Absolute Pointer list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param AbsolutePointer Absolute Pointer protocol pointer.\r
\r
- @return EFI_OUT_OF_RESOURCES\r
- @return EFI_SUCCESS\r
+ @retval EFI_SUCCESS Absolute Pointer Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Remove Absolute Pointer Device in Consplitter Absolute Pointer list.\r
\r
+ @param Private Text In Splitter pointer.\r
+ @param AbsolutePointer Absolute Pointer protocol pointer.\r
\r
- @return None\r
+ @retval EFI_SUCCESS Absolute Pointer Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Absolute Pointer Device found.\r
\r
**/\r
EFI_STATUS\r
return EFI_NOT_FOUND;\r
}\r
\r
-\r
-/**\r
-\r
-\r
- @return None\r
-\r
-**/\r
EFI_STATUS\r
ConSplitterGrowMapTable (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r
\r
\r
/**\r
+ Add the device's output mode to console splitter's mode list.\r
\r
-\r
- @return None\r
+ @param Private Text Out Splitter pointer\r
+ @param TextOut Simple Text Output protocol pointer.\r
+ \r
+ @retval EFI_SUCCESS Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Add the device's output mode to console splitter's mode list.\r
\r
- @param Private Private data structure.\r
- @param TextOut Text Out Protocol.\r
-\r
- @return None\r
+ @param Private Text Out Splitter pointer\r
+ @param TextOut Simple Text Output protocol pointer.\r
+ \r
+ @reture None\r
\r
**/\r
VOID\r
\r
\r
/**\r
+ Sync output device between ConOut and StdErr output.\r
\r
-\r
- @return EFI_SUCCESS\r
- @return EFI_OUT_OF_RESOURCES\r
+ @retval EFI_SUCCESS Sync implemented successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Add GOP or UGA output mode into Consplitter Text Out list.\r
\r
+ @param Private Text Out Splitter pointer.\r
+ @param GraphicsOutput Graphics Output protocol pointer.\r
+ @param UgaDraw UGA Draw protocol pointer.\r
\r
- @return None\r
+ @retval EFI_SUCCESS Output mode added successfully.\r
+ @retval other Failed to add output mode.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
\r
-\r
/**\r
+ Add Text Output Device in Consplitter Text Output list.\r
\r
+ @param Private Text Out Splitter pointer.\r
+ @param TextOut Simple Text Output protocol pointer.\r
+ @param GraphicsOutput Graphics Output protocol pointer.\r
+ @param UgaDraw UGA Draw protocol pointer.\r
\r
- @return None\r
+ @retval EFI_SUCCESS Text Output Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
+ Remove Text Out Device in Consplitter Text Out list.\r
\r
+ @param Private Text Out Splitter pointer.\r
+ @param TextOut Simple Text Output Pointer protocol pointer.\r
\r
- @return None\r
+ @retval EFI_SUCCESS Text Out Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Text Out Device found.\r
\r
**/\r
EFI_STATUS\r
password will cause the check to reset. As long a mConIn.PasswordEnabled is\r
TRUE the StdIn splitter will not report any input.\r
\r
- (Standard EFI_EVENT_NOTIFY)\r
+ @param Event The Event this notify function registered to.\r
+ @param Context Pointer to the context data registerd to the\r
+ Event.\r
\r
@return None\r
\r
be used to test for existance of a keystroke via WaitForEvent () call.\r
If the ConIn is password locked make it look like no keystroke is availible\r
\r
- @param This Protocol instance pointer. State -\r
+ @param This A pointer to protocol instance.\r
+ @param State A pointer to state information on the pointer device\r
\r
- @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_SUCCESS The keystroke information was returned in State.\r
@retval EFI_NOT_READY There was no keystroke data availiable.\r
@retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
to hardware errors.\r
//\r
// Function Prototypes\r
//\r
+\r
+/**\r
+ The user Entry Point for module ConSplitter. The user code starts with this function.\r
+\r
+ Installs driver module protocols and. Creates virtual device handles for ConIn,\r
+ ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,\r
+ Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. \r
+ Installs Graphics Output protocol and/or UGA Draw protocol if needed.\r
+\r
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
+ @param[in] SystemTable A pointer to the EFI System Table.\r
+\r
+ @retval EFI_SUCCESS The entry point is executed successfully.\r
+ @retval other Some error occurs when executing this entry point.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterDriverEntry (\r
)\r
;\r
\r
+/**\r
+ Construct console output devices' private data.\r
+\r
+ @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
+ structure.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextOutConstructor (\r
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r
)\r
;\r
\r
+/**\r
+ Start Console In Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.\r
+ @retval other Console In Consplitter does not support this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterConInDriverBindingStart (\r
)\r
;\r
\r
+/**\r
+ Start Simple Pointer Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.\r
+ @retval other Simple Pointer Consplitter does not support this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterSimplePointerDriverBindingStart (\r
)\r
;\r
\r
+/**\r
+ Start Console Out Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.\r
+ @retval other Console Out Consplitter does not support this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterConOutDriverBindingStart (\r
)\r
;\r
\r
+/**\r
+ Start Standard Error Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.\r
+ @retval other Standard Error Consplitter does not support this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterStdErrDriverBindingStart (\r
)\r
;\r
\r
+/**\r
+ Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterConInDriverBindingStop (\r
)\r
;\r
\r
+/**\r
+ Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing\r
+ Simple Pointer protocol.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterSimplePointerDriverBindingStop (\r
)\r
;\r
\r
+/**\r
+ Stop Console Out ConSplitter on ControllerHandle by closing Console Out Devcice GUID.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterConOutDriverBindingStop (\r
)\r
;\r
\r
+/**\r
+ Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterStdErrDriverBindingStop (\r
)\r
;\r
\r
-//\r
-// Driver binding functions\r
-//\r
\r
+/**\r
+ Test to see if Absolute Pointer protocol could be supported on the ControllerHandle. \r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to test.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS This driver supports this device\r
+ @retval other This driver does not support this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterAbsolutePointerDriverBindingSupported (\r
)\r
;\r
\r
+/**\r
+ Start Absolute Pointer Consplitter on device handle. \r
+ \r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to bind driver to.\r
+ @param RemainingDevicePath Optional parameter use to pick a specific child\r
+ device to start.\r
+\r
+ @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.\r
+ @retval other Absolute Pointer Consplitter does not support this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterAbsolutePointerDriverBindingStart (\r
)\r
;\r
\r
+/**\r
+ Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing\r
+ Absolute Pointer protocol.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterAbsolutePointerDriverBindingStop (\r
)\r
;\r
\r
+/**\r
+ Add Absolute Pointer Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param AbsolutePointer Absolute Pointer protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Absolute Pointer Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterAbsolutePointerAddDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Remove Absolute Pointer Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param AbsolutePointer Absolute Pointer protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Absolute Pointer Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Absolute Pointer Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterAbsolutePointerDeleteDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ This event agregates all the events of the pointer devices in the splitter.\r
+ If the ConIn is password locked then return.\r
+ If any events of physical pointer devices are signaled, signal the pointer\r
+ splitter event. This will cause the calling code to call\r
+ ConSplitterAbsolutePointerGetState ().\r
+\r
+ @param Event The Event assoicated with callback.\r
+ @param Context Context registered when Event was created.\r
+\r
+ @return None\r
+\r
+**/\r
VOID\r
EFIAPI\r
ConSplitterAbsolutePointerWaitForInput (\r
OUT CHAR16 **ControllerName\r
);\r
\r
+/**\r
+ Retrieves a Unicode string that is the user readable name of the controller\r
+ that is being managed by an EFI Driver.\r
+\r
+ @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL\r
+ instance.\r
+ @param ControllerHandle The handle of a controller that the driver\r
+ specified by This is managing. This handle\r
+ specifies the controller whose name is to be\r
+ returned.\r
+ @param ChildHandle The handle of the child controller to retrieve the\r
+ name of. This is an optional parameter that may\r
+ be NULL. It will be NULL for device drivers. It\r
+ will also be NULL for a bus drivers that wish to\r
+ retrieve the name of the bus controller. It will\r
+ not be NULL for a bus driver that wishes to\r
+ retrieve the name of a child controller.\r
+ @param Language A pointer to RFC3066 language identifier. This is\r
+ the language of the controller name that that the\r
+ caller is requesting, and it must match one of the\r
+ languages specified in SupportedLanguages. The\r
+ number of languages supported by a driver is up to\r
+ the driver writer.\r
+ @param ControllerName A pointer to the Unicode string to return. This\r
+ Unicode string is the name of the controller\r
+ specified by ControllerHandle and ChildHandle in\r
+ the language specified by Language from the point\r
+ of view of the driver specified by This.\r
+\r
+ @retval EFI_SUCCESS The Unicode string for the user readable name in\r
+ the language specified by Language for the driver\r
+ specified by This was returned in DriverName.\r
+ @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+ @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+ EFI_HANDLE.\r
+ @retval EFI_INVALID_PARAMETER Language is NULL.\r
+ @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+ @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
+ managing the controller specified by\r
+ ControllerHandle and ChildHandle.\r
+ @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
+ language specified by Language.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterAbsolutePointerComponentNameGetControllerName (\r
//\r
// TextIn Constructor/Destructor functions\r
//\r
+\r
+/**\r
+ Add Text Input Device in Consplitter Text Input list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextIn Simple Text Input protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Text Input Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInAddDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Remove Simple Text Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextIn Simple Text protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Simple Text Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Text Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInDeleteDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
//\r
// SimplePointer Constuctor/Destructor functions\r
//\r
+\r
+/**\r
+ Add Simple Pointer Device in Consplitter Simple Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param SimplePointer Simple Pointer protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Simple Pointer Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterSimplePointerAddDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Remove Simple Pointer Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param SimplePointer Simple Pointer protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Simple Pointer Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Pointer Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterSimplePointerDeleteDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
//\r
// TextOut Constuctor/Destructor functions\r
//\r
+\r
+/**\r
+ Add Text Output Device in Consplitter Text Output list.\r
+\r
+ @param Private Text Out Splitter pointer.\r
+ @param TextOut Simple Text Output protocol pointer.\r
+ @param GraphicsOutput Graphics Output protocol pointer.\r
+ @param UgaDraw UGA Draw protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Text Output Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextOutAddDevice (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Remove Text Out Device in Consplitter Text Out list.\r
+\r
+ @param Private Text Out Splitter pointer.\r
+ @param TextOut Simple Text Output Pointer protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Text Out Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Text Out Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextOutDeleteDevice (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
//\r
// TextIn I/O Functions\r
//\r
+\r
+/**\r
+ Reset the input device and optionaly run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
+ not be reset.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextInReset (\r
)\r
;\r
\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can\r
+ be used to test for existance of a keystroke via WaitForEvent () call.\r
+ If the ConIn is password locked make it look like no keystroke is availible\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Key Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_NOT_READY There was no keystroke data availiable.\r
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
+ to hardware errors.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextInReadKeyStroke (\r
OUT EFI_INPUT_KEY *Key\r
)\r
;\r
+\r
+/**\r
+ Add Text Input Ex Device in Consplitter Text Input Ex list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextInEx Simple Text Ex Input protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Text Input Ex Device added successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInExAddDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Remove Simple Text Ex Device in Consplitter Absolute Pointer list.\r
+\r
+ @param Private Text In Splitter pointer.\r
+ @param TextInEx Simple Text Ex protocol pointer.\r
+\r
+ @retval EFI_SUCCESS Simple Text Ex Device removed successfully.\r
+ @retval EFI_NOT_FOUND No Simple Text Ex Device found.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterTextInExDeleteDevice (\r
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
IN EFI_HANDLE NotificationHandle\r
)\r
;\r
+\r
+/**\r
+ This event agregates all the events of the ConIn devices in the spliter.\r
+ If the ConIn is password locked then return.\r
+ If any events of physical ConIn devices are signaled, signal the ConIn\r
+ spliter event. This will cause the calling code to call\r
+ ConSplitterTextInReadKeyStroke ().\r
+\r
+ @param Event The Event assoicated with callback.\r
+ @param Context Context registered when Event was created.\r
+\r
+ @return None\r
+\r
+**/\r
VOID\r
EFIAPI\r
ConSplitterTextInWaitForKey (\r
IN VOID *Context\r
)\r
;\r
+/**\r
+ Return TRUE if StdIn is locked. The ConIn device on the virtual handle is\r
+ the only device locked.\r
+\r
+ NONE\r
+\r
+ @retval TRUE StdIn locked\r
+ @retval FALSE StdIn working normally\r
\r
+**/\r
BOOLEAN\r
ConSpliterConssoleControlStdInLocked (\r
VOID\r
)\r
;\r
+/**\r
+ This timer event will fire when StdIn is locked. It will check the key\r
+ sequence on StdIn to see if it matches the password. Any error in the\r
+ password will cause the check to reset. As long a mConIn.PasswordEnabled is\r
+ TRUE the StdIn splitter will not report any input.\r
+\r
+ @param Event The Event this notify function registered to.\r
+ @param Context Pointer to the context data registerd to the\r
+ Event.\r
\r
+ @return None\r
+\r
+**/\r
VOID\r
EFIAPI\r
ConSpliterConsoleControlLockStdInEvent (\r
)\r
;\r
\r
+/**\r
+ If Password is NULL unlock the password state variable and set the event\r
+ timer. If the Password is too big return an error. If the Password is valid\r
+ Copy the Password and enable state variable and then arm the periodic timer\r
+\r
+\r
+ @retval EFI_SUCCESS Lock the StdIn device\r
+ @retval EFI_INVALID_PARAMETER Password is NULL\r
+ @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterConsoleControlLockStdIn (\r
)\r
;\r
\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can\r
+ be used to test for existance of a keystroke via WaitForEvent () call.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Key Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_NOT_READY There was no keystroke data availiable.\r
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
+ to hardware errors.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextInPrivateReadKeyStroke (\r
)\r
;\r
\r
+/**\r
+ Reset the input device and optionaly run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
+ not be reset.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterSimplePointerReset (\r
)\r
;\r
\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can\r
+ be used to test for existance of a keystroke via WaitForEvent () call.\r
+ If the ConIn is password locked make it look like no keystroke is availible\r
+\r
+ @param This A pointer to protocol instance.\r
+ @param State A pointer to state information on the pointer device\r
+\r
+ @retval EFI_SUCCESS The keystroke information was returned in State.\r
+ @retval EFI_NOT_READY There was no keystroke data availiable.\r
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
+ to hardware errors.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterSimplePointerGetState (\r
//\r
// TextOut I/O Functions\r
//\r
-VOID\r
-ConSplitterSynchronizeModeData (\r
- TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r
- )\r
-;\r
\r
+/**\r
+ Reset the text output device hardware and optionaly run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform more exhaustive verfication\r
+ operation of the device during reset.\r
+\r
+ @retval EFI_SUCCESS The text output device was reset.\r
+ @retval EFI_DEVICE_ERROR The text output device is not functioning\r
+ correctly and could not be reset.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutReset (\r
)\r
;\r
\r
+/**\r
+ Write a Unicode string to the output device.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param String The NULL-terminated Unicode string to be\r
+ displayed on the output device(s). All output\r
+ devices must also support the Unicode drawing\r
+ defined in this file.\r
+\r
+ @retval EFI_SUCCESS The string was output to the device.\r
+ @retval EFI_DEVICE_ERROR The device reported an error while attempting to\r
+ output the text.\r
+ @retval EFI_UNSUPPORTED The output device's mode is not currently in a\r
+ defined text mode.\r
+ @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the\r
+ characters in the Unicode string could not be\r
+ rendered and were skipped.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutOutputString (\r
)\r
;\r
\r
+/**\r
+ Verifies that all characters in a Unicode string can be output to the\r
+ target device.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param String The NULL-terminated Unicode string to be\r
+ examined for the output device(s).\r
+\r
+ @retval EFI_SUCCESS The device(s) are capable of rendering the\r
+ output string.\r
+ @retval EFI_UNSUPPORTED Some of the characters in the Unicode string\r
+ cannot be rendered by one or more of the output\r
+ devices mapped by the EFI handle.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutTestString (\r
)\r
;\r
\r
+/**\r
+ Returns information for an available text mode that the output device(s)\r
+ supports.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ModeNumber The mode number to return information on.\r
+ @param Rows Returns the geometry of the text output device\r
+ for the requested ModeNumber.\r
+\r
+ @retval EFI_SUCCESS The requested mode information was returned.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The mode number was not valid.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutQueryMode (\r
)\r
;\r
\r
+/**\r
+ Sets the output device(s) to a specified mode.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ModeNumber The mode number to set.\r
+\r
+ @retval EFI_SUCCESS The requested text mode was set.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The mode number was not valid.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutSetMode (\r
)\r
;\r
\r
+/**\r
+ Sets the background and foreground colors for the OutputString () and\r
+ ClearScreen () functions.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Attribute The attribute to set. Bits 0..3 are the\r
+ foreground color, and bits 4..6 are the\r
+ background color. All other bits are undefined\r
+ and must be zero. The valid Attributes are\r
+ defined in this file.\r
+\r
+ @retval EFI_SUCCESS The attribute was set.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The attribute requested is not defined.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutSetAttribute (\r
)\r
;\r
\r
+/**\r
+ Clears the output device(s) display to the currently selected background\r
+ color.\r
+\r
+ @param This Protocol instance pointer.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutClearScreen (\r
)\r
;\r
\r
+/**\r
+ Sets the current coordinates of the cursor position\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Row the position to set the cursor to. Must be\r
+ greater than or equal to zero and less than the\r
+ number of columns and rows by QueryMode ().\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode,\r
+ or the cursor position is invalid for the\r
+ current mode.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutSetCursorPosition (\r
)\r
;\r
\r
+\r
+/**\r
+ Makes the cursor visible or invisible\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Visible If TRUE, the cursor is set to be visible. If\r
+ FALSE, the cursor is set to be invisible.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request, or the device does not support\r
+ changing the cursor mode.\r
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSplitterTextOutEnableCursor (\r
)\r
;\r
\r
+/**\r
+ Take the passed in Buffer of size SizeOfCount and grow the buffer\r
+ by MAX (CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT, MaxGrow) * SizeOfCount\r
+ bytes. Copy the current data in Buffer to the new version of Buffer\r
+ and free the old version of buffer.\r
+\r
+ @param SizeOfCount Size of element in array\r
+ @param Count Current number of elements in array\r
+ @param Buffer Bigger version of passed in Buffer with all the\r
+ data\r
+\r
+ @retval EFI_SUCCESS Buffer size has grown\r
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
+\r
+**/\r
EFI_STATUS\r
ConSplitterGrowBuffer (\r
IN UINTN SizeOfCount,\r
)\r
;\r
\r
+/**\r
+ Return the current video mode information. Also returns info about existence\r
+ of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the\r
+ arguments are optional and only returned if a non NULL pointer is passed in.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Mode Are we in text of grahics mode.\r
+ @param GopExists TRUE if GOP Spliter has found a GOP/UGA device\r
+ @param StdInLocked TRUE if StdIn device is keyboard locked\r
+\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameters.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterConsoleControlGetMode (\r
)\r
;\r
\r
+/**\r
+ Set the current mode to either text or graphics. Graphics is\r
+ for Quiet Boot.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Mode Mode to set the\r
+\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
+ @retval EFI_UNSUPPORTED Operation unsupported.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterConsoleControlSetMode (\r
)\r
;\r
\r
+/**\r
+ Return the current video mode information.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ModeNumber The mode number to return information on.\r
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info\r
+ buffer.\r
+ @param Info Caller allocated buffer that returns information\r
+ about ModeNumber.\r
+\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the\r
+ video mode.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterGraphicsOutputQueryMode (\r
)\r
;\r
\r
+/**\r
+ Graphics output protocol interface to set video mode\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ModeNumber The mode number to be set.\r
+\r
+ @retval EFI_SUCCESS Graphics mode was changed.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterGraphicsOutputSetMode (\r
)\r
;\r
\r
+/**\r
+ The following table defines actions for BltOperations.\r
+\r
+ EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiBltVideoToBltBuffer - Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiBltBufferToVideo - Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiBltVideoToVideo - Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer.\r
+ This buffer has a size of\r
+ Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video\r
+ memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels. Delta\r
+ -\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
+ buffer.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterGraphicsOutputBlt (\r
)\r
;\r
\r
+/**\r
+ Return the current video mode information.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param HorizontalResolution Current video horizontal resolution in pixels\r
+ @param VerticalResolution Current video vertical resolution in pixels\r
+ @param ColorDepth Current video color depth in bits per pixel\r
+ @param RefreshRate Current video refresh rate in Hz.\r
+\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterUgaDrawGetMode (\r
)\r
;\r
\r
+/**\r
+ Return the current video mode information.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param HorizontalResolution Current video horizontal resolution in pixels\r
+ @param VerticalResolution Current video vertical resolution in pixels\r
+ @param ColorDepth Current video color depth in bits per pixel\r
+ @param RefreshRate Current video refresh rate in Hz.\r
+\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterUgaDrawSetMode (\r
)\r
;\r
\r
+/**\r
+ The following table defines actions for BltOperations.\r
+\r
+ EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiUgaVideoToBltBuffer - Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiUgaVideoToVideo - Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer.\r
+ This buffer has a size of\r
+ Width*Height*sizeof(EFI_UGA_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video\r
+ memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels. Delta\r
+ -\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
+ buffer.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
ConSpliterUgaDrawBlt (\r
)\r
;\r
\r
+/**\r
+ Write a Unicode string to the output device.\r
+\r
+ @param Private Pointer to the console output splitter's private\r
+ data. It indicates the calling context.\r
+ @param WString The NULL-terminated Unicode string to be\r
+ displayed on the output device(s). All output\r
+ devices must also support the Unicode drawing\r
+ defined in this file.\r
+\r
+ @retval EFI_SUCCESS The string was output to the device.\r
+ @retval EFI_DEVICE_ERROR The device reported an error while attempting to\r
+ output the text.\r
+ @retval EFI_UNSUPPORTED The output device's mode is not currently in a\r
+ defined text mode.\r
+ @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the\r
+ characters in the Unicode string could not be\r
+ rendered and were skipped.\r
+\r
+**/\r
EFI_STATUS\r
DevNullTextOutOutputString (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Sets the output device(s) to a specified mode.\r
+\r
+ @param Private Private data structure pointer.\r
+ @param ModeNumber The mode number to set.\r
+\r
+ @retval EFI_SUCCESS The requested text mode was set.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The mode number was not valid.\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+\r
+**/\r
EFI_STATUS\r
DevNullTextOutSetMode (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Clears the output device(s) display to the currently selected background\r
+ color.\r
+\r
+ @param Private Protocol instance pointer.\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
+\r
+**/\r
EFI_STATUS\r
DevNullTextOutClearScreen (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r
)\r
;\r
\r
+/**\r
+ Sets the current coordinates of the cursor position.\r
+\r
+ @param Private Protocol instance pointer.\r
+ @param Column \r
+ @param Row the position to set the cursor to. Must be\r
+ greater than or equal to zero and less than the\r
+ number of columns and rows by QueryMode ().\r
+\r
+ @retval EFI_SUCCESS The operation completed successfully.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
+ the request.\r
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or\r
+ the cursor position is invalid for the current\r
+ mode.\r
+\r
+**/\r
EFI_STATUS\r
DevNullTextOutSetCursorPosition (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
+ In this driver, the cursor cannot be hidden.\r
+\r
+ @param Private Indicates the calling context.\r
+ @param Visible If TRUE, the cursor is set to be visible, If\r
+ FALSE, the cursor is set to be invisible.\r
+\r
+ @retval EFI_SUCCESS The request is valid.\r
+\r
+**/\r
EFI_STATUS\r
DevNullTextOutEnableCursor (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
)\r
;\r
\r
+/**\r
+ Take the DevNull TextOut device and update the Simple Text Out on every\r
+ UGA device.\r
+\r
+ @param Private Indicates the calling context.\r
+\r
+ @retval EFI_SUCCESS The request is valid.\r
+ @retval other Return status of TextOut->OutputString ()\r
+\r
+**/\r
EFI_STATUS\r
DevNullSyncStdOut (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r