diff options
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c')
-rw-r--r-- | MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | 1708 |
1 files changed, 745 insertions, 963 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 88274b1..6e996c5 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -1,4 +1,4 @@ -/**@file
+/** @file
Console Splitter Driver. Any Handle that attatched
EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.
@@ -16,7 +16,7 @@ The virtual handle are added on driver entry and never removed.
Such design ensures sytem function well during none console device situation.
-Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -55,8 +55,8 @@ STATIC TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = { (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **) NULL,
0,
{
- (struct _LIST_ENTRY *) NULL,
- (struct _LIST_ENTRY *) NULL
+ (LIST_ENTRY *) NULL,
+ (LIST_ENTRY *) NULL
},
{
@@ -388,25 +388,24 @@ InitializeConSplitter( }
+
+/**
+ Intialize a virtual console device to act as an agrigator of physical console
+ devices.
+
+ @param ImageHandle (Standard EFI Image entry -
+ EFI_IMAGE_ENTRY_POINT)
+ @param SystemTable (Standard EFI Image entry -
+ EFI_IMAGE_ENTRY_POINT)
+ EFI_SUCCESS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterDriverEntry (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
-
-Routine Description:
- Intialize a virtual console device to act as an agrigator of physical console
- devices.
-
-Arguments:
- ImageHandle - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
- SystemTable - (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
-Returns:
- EFI_SUCCESS
-
---*/
{
EFI_STATUS Status;
@@ -538,24 +537,20 @@ Returns: return EFI_SUCCESS;
}
-EFI_STATUS
-ConSplitterTextInConstructor (
- TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate
- )
-/*++
-
-Routine Description:
+/**
Construct the ConSplitter.
-Arguments:
+ @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
+ structure.
- ConInPrivate - A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA structure.
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
-Returns:
- EFI_OUT_OF_RESOURCES - Out of resources.
-
---*/
+**/
+EFI_STATUS
+ConSplitterTextInConstructor (
+ TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate
+ )
{
EFI_STATUS Status;
@@ -763,29 +758,24 @@ ConSplitterTextOutConstructor ( return Status;
}
-STATIC
+
+/**
+ Generic Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller Handle.
+ @param Guid Guid.
+
+ @retval EFI_UNSUPPORTED unsupported.
+ @retval EFI_SUCCESS operation is OK.
+
+**/
EFI_STATUS
ConSplitterSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_GUID *Guid
)
-/*++
-
-Routine Description:
- Generic Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller Handle.
- Guid - Guid.
-
-Returns:
-
- EFI_UNSUPPORTED - unsupported.
- EFI_SUCCESS - operation is OK.
-
---*/
{
EFI_STATUS Status;
VOID *Instance;
@@ -830,6 +820,17 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+ Console In Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConInDriverBindingSupported (
@@ -837,21 +838,6 @@ ConSplitterConInDriverBindingSupported ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Console In Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
-
---*/
{
return ConSplitterSupported (
This,
@@ -860,6 +846,17 @@ Returns: );
}
+
+/**
+ Standard Error Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerDriverBindingSupported (
@@ -867,21 +864,6 @@ ConSplitterSimplePointerDriverBindingSupported ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Standard Error Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
-
---*/
{
return ConSplitterSupported (
This,
@@ -890,6 +872,17 @@ Returns: );
}
+
+/**
+ Absolute Pointer Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerDriverBindingSupported (
@@ -897,21 +890,6 @@ ConSplitterAbsolutePointerDriverBindingSupported ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Absolute Pointer Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
-
---*/
{
return ConSplitterSupported (
This,
@@ -920,6 +898,17 @@ Returns: );
}
+
+/**
+ Console Out Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConOutDriverBindingSupported (
@@ -927,21 +916,6 @@ ConSplitterConOutDriverBindingSupported ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Console Out Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
-
---*/
{
return ConSplitterSupported (
This,
@@ -950,6 +924,17 @@ Returns: );
}
+
+/**
+ Standard Error Supported Check
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+
+**/
EFI_STATUS
EFIAPI
ConSplitterStdErrDriverBindingSupported (
@@ -957,21 +942,6 @@ ConSplitterStdErrDriverBindingSupported ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Standard Error Supported Check
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
-
---*/
{
return ConSplitterSupported (
This,
@@ -980,7 +950,16 @@ Returns: );
}
-STATIC
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a SimpleTextIn handle.
+
+ (Standard DriverBinding Protocol Start() function)
+
+ @return EFI_ERROR if a SimpleTextIn protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterStart (
@@ -991,19 +970,6 @@ ConSplitterStart ( IN EFI_GUID *InterfaceGuid,
IN VOID **Interface
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a SimpleTextIn handle.
-
-Arguments:
- (Standard DriverBinding Protocol Start() function)
-
-Returns:
- EFI_ERROR if a SimpleTextIn protocol is not started.
-
---*/
{
EFI_STATUS Status;
VOID *Instance;
@@ -1045,6 +1011,19 @@ Returns: );
}
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a SimpleTextIn handle.
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_STATUS
+ @return EFI_ERROR if a SimpleTextIn protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConInDriverBindingStart (
@@ -1052,23 +1031,6 @@ ConSplitterConInDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a SimpleTextIn handle.
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_STATUS
- EFI_ERROR if a SimpleTextIn protocol is not started.
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
@@ -1112,6 +1074,18 @@ Returns: return Status;
}
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a SimpleTextIn handle.
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_ERROR if a SimpleTextIn protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerDriverBindingStart (
@@ -1119,22 +1093,6 @@ ConSplitterSimplePointerDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a SimpleTextIn handle.
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_ERROR if a SimpleTextIn protocol is not started.
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
@@ -1154,6 +1112,18 @@ Returns: return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer);
}
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a ConIn handle.
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_ERROR if a AbsolutePointer protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerDriverBindingStart (
@@ -1161,22 +1131,6 @@ ConSplitterAbsolutePointerDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a ConIn handle.
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
-
- EFI_ERROR if a AbsolutePointer protocol is not started.
-
---*/
{
EFI_STATUS Status;
EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer;
@@ -1197,6 +1151,18 @@ Returns: return ConSplitterAbsolutePointerAddDevice (&mConIn, AbsolutePointer);
}
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a SimpleTextIn handle.
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_ERROR if a SimpleTextIn protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConOutDriverBindingStart (
@@ -1204,21 +1170,6 @@ ConSplitterConOutDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a SimpleTextIn handle.
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
- EFI_ERROR if a SimpleTextIn protocol is not started.
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
@@ -1295,6 +1246,18 @@ Returns: return Status;
}
+
+/**
+ Start ConSplitter on ControllerHandle, and create the virtual
+ agrogated console device on first call Start for a SimpleTextIn handle.
+
+ @param This Pointer to protocol.
+ @param ControllerHandle Controller handle.
+ @param RemainingDevicePath Remaining device path.
+
+ @return EFI_ERROR if a SimpleTextIn protocol is not started.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterStdErrDriverBindingStart (
@@ -1302,21 +1265,6 @@ ConSplitterStdErrDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start ConSplitter on ControllerHandle, and create the virtual
- agrogated console device on first call Start for a SimpleTextIn handle.
-
-Arguments:
- This - Pointer to protocol.
- ControllerHandle - Controller handle.
- RemainingDevicePath - Remaining device path.
-
-Returns:
- EFI_ERROR if a SimpleTextIn protocol is not started.
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
@@ -1366,7 +1314,14 @@ Returns: return Status;
}
-STATIC
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return None
+
+**/
EFI_STATUS
EFIAPI
ConSplitterStop (
@@ -1377,18 +1332,6 @@ ConSplitterStop ( IN EFI_GUID *InterfaceGuid,
IN VOID **Interface
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
@@ -1422,6 +1365,14 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return None
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConInDriverBindingStop (
@@ -1430,18 +1381,6 @@ ConSplitterConInDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
@@ -1486,6 +1425,14 @@ Returns: return ConSplitterTextInDeleteDevice (&mConIn, TextIn);
}
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return None
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerDriverBindingStop (
@@ -1494,18 +1441,6 @@ ConSplitterSimplePointerDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
@@ -1531,6 +1466,14 @@ Returns: return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer);
}
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return None
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerDriverBindingStop (
@@ -1539,18 +1482,6 @@ ConSplitterAbsolutePointerDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer;
@@ -1576,6 +1507,14 @@ Returns: return ConSplitterAbsolutePointerDeleteDevice (&mConIn, AbsolutePointer);
}
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return None
+
+**/
EFI_STATUS
EFIAPI
ConSplitterConOutDriverBindingStop (
@@ -1584,18 +1523,6 @@ ConSplitterConOutDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
@@ -1622,6 +1549,14 @@ Returns: return ConSplitterTextOutDeleteDevice (&mConOut, TextOut);
}
+
+/**
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @retval EFI_SUCCESS Complete successfully.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterStdErrDriverBindingStop (
@@ -1630,18 +1565,6 @@ ConSplitterStdErrDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
-Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
-Returns:
-
- EFI_SUCCESS - Complete successfully.
-
---*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
@@ -1686,33 +1609,29 @@ Returns: return Status;
}
-EFI_STATUS
-ConSplitterGrowBuffer (
- IN UINTN SizeOfCount,
- IN UINTN *Count,
- IN OUT VOID **Buffer
- )
-/*++
-Routine Description:
+/**
Take the passed in Buffer of size SizeOfCount and grow the buffer
by MAX (CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT, MaxGrow) * SizeOfCount
bytes. Copy the current data in Buffer to the new version of Buffer
and free the old version of buffer.
+ @param SizeOfCount Size of element in array
+ @param Count Current number of elements in array
+ @param Buffer Bigger version of passed in Buffer with all the
+ data
-Arguments:
- SizeOfCount - Size of element in array
- Count - Current number of elements in array
- Buffer - Bigger version of passed in Buffer with all the data
-
-Returns:
- EFI_SUCCESS - Buffer size has grown
- EFI_OUT_OF_RESOURCES - Could not grow the buffer size
+ @retval EFI_SUCCESS Buffer size has grown
+ @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size
+ @return None
- None
-
---*/
+**/
+EFI_STATUS
+ConSplitterGrowBuffer (
+ IN UINTN SizeOfCount,
+ IN UINTN *Count,
+ IN OUT VOID **Buffer
+ )
{
UINTN NewSize;
UINTN OldSize;
@@ -1743,23 +1662,19 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+
+
+ @return EFI_SUCCESS
+ @return EFI_OUT_OF_RESOURCES
+
+**/
EFI_STATUS
ConSplitterTextInAddDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- EFI_SUCCESS
- EFI_OUT_OF_RESOURCES
-
---*/
{
EFI_STATUS Status;
@@ -1790,23 +1705,19 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+
+
+ @return EFI_SUCCESS
+ @return EFI_NOT_FOUND
+
+**/
EFI_STATUS
ConSplitterTextInDeleteDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- EFI_SUCCESS
- EFI_NOT_FOUND
-
---*/
{
UINTN Index;
//
@@ -1887,23 +1798,19 @@ ConSplitterTextInExDeleteDevice ( return EFI_NOT_FOUND;
}
+
+/**
+
+
+ @return EFI_OUT_OF_RESOURCES
+ @return EFI_SUCCESS
+
+**/
EFI_STATUS
ConSplitterSimplePointerAddDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- EFI_OUT_OF_RESOURCES
- EFI_SUCCESS
-
---*/
{
EFI_STATUS Status;
@@ -1928,22 +1835,18 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterSimplePointerDeleteDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
UINTN Index;
//
@@ -1964,23 +1867,19 @@ Returns: return EFI_NOT_FOUND;
}
+
+/**
+
+
+ @return EFI_OUT_OF_RESOURCES
+ @return EFI_SUCCESS
+
+**/
EFI_STATUS
ConSplitterAbsolutePointerAddDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- EFI_OUT_OF_RESOURCES
- EFI_SUCCESS
-
---*/
{
EFI_STATUS Status;
@@ -2005,22 +1904,18 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterAbsolutePointerDeleteDevice (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
UINTN Index;
//
@@ -2041,22 +1936,17 @@ Returns: return EFI_NOT_FOUND;
}
-STATIC
-EFI_STATUS
-ConSplitterGrowMapTable (
- IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-Arguments:
+/**
-Returns:
- None
+ @return None
---*/
+**/
+EFI_STATUS
+ConSplitterGrowMapTable (
+ IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
+ )
{
UINTN Size;
UINTN NewSize;
@@ -2118,23 +2008,18 @@ Returns: return EFI_SUCCESS;
}
-STATIC
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterAddOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
INT32 MaxMode;
@@ -2202,17 +2087,16 @@ Returns: mode 0 is 80x25, mode 1 is 80x50, this routine will not check the
intersection for mode 0 and mode 1.
- @parm TextOutModeMap Current text out mode map, begin with the mode 80x25
- @parm NewlyAddedMap New text out mode map, begin with the mode 80x25
- @parm MapStepSize Mode step size for one console device
- @parm NewMapStepSize Mode step size for one console device
- @parm MaxMode Current max text mode
- @parm CurrentMode Current text mode
+ @param TextOutModeMap Current text out mode map, begin with the mode 80x25
+ @param NewlyAddedMap New text out mode map, begin with the mode 80x25
+ @param MapStepSize Mode step size for one console device
+ @param NewMapStepSize Mode step size for one console device
+ @param MaxMode Current max text mode
+ @param CurrentMode Current text mode
@retval None
**/
-STATIC
VOID
ConSplitterGetIntersection (
IN INT32 *TextOutModeMap,
@@ -2272,24 +2156,20 @@ ConSplitterGetIntersection ( return ;
}
-STATIC
+
+/**
+
+ @param Private Private data structure.
+ @param TextOut Text Out Protocol.
+
+ @return None
+
+**/
VOID
ConSplitterSyncOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
)
-/*++
-
-Routine Description:
-
-Arguments:
- Private - Private data structure.
- TextOut - Text Out Protocol.
-Returns:
-
- None
-
---*/
{
INT32 CurrentMaxMode;
INT32 Mode;
@@ -2359,23 +2239,18 @@ Returns: return ;
}
-STATIC
-EFI_STATUS
-ConSplitterGetIntersectionBetweenConOutAndStrErr (
- VOID
- )
-/*++
-
-Routine Description:
-Arguments:
+/**
-Returns:
- EFI_SUCCESS
- EFI_OUT_OF_RESOURCES
+ @return EFI_SUCCESS
+ @return EFI_OUT_OF_RESOURCES
---*/
+**/
+EFI_STATUS
+ConSplitterGetIntersectionBetweenConOutAndStrErr (
+ VOID
+ )
{
UINTN ConOutNumOfConsoles;
UINTN StdErrNumOfConsoles;
@@ -2525,24 +2400,19 @@ Returns: return EFI_SUCCESS;
}
-STATIC
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterAddGraphicsOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
UINTN Index;
@@ -2781,27 +2651,21 @@ Done: return Status;
}
-VOID
-ConsplitterSetConsoleOutMode (
- IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
+/**
This routine will get the current console mode information (column, row)
from ConsoleOutMode variable and set it; if the variable does not exist,
set to user defined console mode.
-Arguments:
-
None
-Returns:
+ @return None
- None
-
---*/
+**/
+VOID
+ConsplitterSetConsoleOutMode (
+ IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
+ )
{
UINTN Col;
UINTN Row;
@@ -2824,7 +2688,7 @@ Returns: ASSERT(ModeInfo != NULL);
Status = gRT->GetVariable (
- VarConOutMode,
+ VARCONOUTMODE,
&gEfiGenericPlatformVariableGuid,
NULL,
&ModeInfoSize,
@@ -2839,7 +2703,7 @@ Returns: ModeInfo->Column = 80;
ModeInfo->Row = 25;
Status = gRT->SetVariable (
- VarConOutMode,
+ VARCONOUTMODE,
&gEfiGenericPlatformVariableGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
sizeof (CONSOLE_OUT_MODE),
@@ -2875,7 +2739,7 @@ Returns: // Update ConOutMode variable
//
Status = gRT->SetVariable (
- VarConOutMode,
+ VARCONOUTMODE,
&gEfiGenericPlatformVariableGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
sizeof (CONSOLE_OUT_MODE),
@@ -2887,6 +2751,13 @@ Returns: }
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterTextOutAddDevice (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
@@ -2894,17 +2765,6 @@ ConSplitterTextOutAddDevice ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
EFI_STATUS Status;
UINTN CurrentNumOfConsoles;
@@ -3051,22 +2911,18 @@ Returns: return Status;
}
+
+/**
+
+
+ @return None
+
+**/
EFI_STATUS
ConSplitterTextOutDeleteDevice (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
{
INT32 Index;
UINTN CurrentNumOfConsoles;
@@ -3154,27 +3010,24 @@ Returns: //
// ConSplitter TextIn member functions
//
+
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The device was reset.
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInReset (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -3201,29 +3054,26 @@ ConSplitterTextInReset ( return ReturnStatus;
}
+
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ @param This Protocol instance pointer.
+ @param Key Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
+ to hardware errors.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInPrivateReadKeyStroke (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
-
- Arguments:
- This - Protocol instance pointer.
- Key - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keydtroke information was not returned due to
- hardware errors.
-
---*/
{
EFI_STATUS Status;
UINTN Index;
@@ -3251,49 +3101,43 @@ ConSplitterTextInPrivateReadKeyStroke ( return EFI_NOT_READY;
}
-BOOLEAN
-ConSpliterConssoleControlStdInLocked (
- VOID
- )
-/*++
-Routine Description:
+/**
Return TRUE if StdIn is locked. The ConIn device on the virtual handle is
the only device locked.
-Arguments:
NONE
-Returns:
- TRUE - StdIn locked
- FALSE - StdIn working normally
+ @retval TRUE StdIn locked
+ @retval FALSE StdIn working normally
---*/
+**/
+BOOLEAN
+ConSpliterConssoleControlStdInLocked (
+ VOID
+ )
{
return mConIn.PasswordEnabled;
}
-VOID
-EFIAPI
-ConSpliterConsoleControlLockStdInEvent (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-Routine Description:
+/**
This timer event will fire when StdIn is locked. It will check the key
sequence on StdIn to see if it matches the password. Any error in the
password will cause the check to reset. As long a mConIn.PasswordEnabled is
TRUE the StdIn splitter will not report any input.
-Arguments:
(Standard EFI_EVENT_NOTIFY)
-Returns:
- None
+ @return None
---*/
+**/
+VOID
+EFIAPI
+ConSpliterConsoleControlLockStdInEvent (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
{
EFI_STATUS Status;
EFI_INPUT_KEY Key;
@@ -3357,27 +3201,24 @@ Returns: } while (!EFI_ERROR (Status));
}
-EFI_STATUS
-EFIAPI
-ConSpliterConsoleControlLockStdIn (
- IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
- IN CHAR16 *Password
- )
-/*++
-Routine Description:
+/**
If Password is NULL unlock the password state variable and set the event
timer. If the Password is too big return an error. If the Password is valid
Copy the Password and enable state variable and then arm the periodic timer
-Arguments:
-Returns:
- EFI_SUCCESS - Lock the StdIn device
- EFI_INVALID_PARAMETER - Password is NULL
- EFI_OUT_OF_RESOURCES - Buffer allocation to store the password fails
+ @retval EFI_SUCCESS Lock the StdIn device
+ @retval EFI_INVALID_PARAMETER Password is NULL
+ @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails
---*/
+**/
+EFI_STATUS
+EFIAPI
+ConSpliterConsoleControlLockStdIn (
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
+ IN CHAR16 *Password
+ )
{
if (Password == NULL) {
return EFI_INVALID_PARAMETER;
@@ -3400,30 +3241,27 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+ If the ConIn is password locked make it look like no keystroke is availible
+
+ @param This Protocol instance pointer.
+ @param Key Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
+ to hardware errors.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInReadKeyStroke (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
- If the ConIn is password locked make it look like no keystroke is availible
-
- Arguments:
- This - Protocol instance pointer.
- Key - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keydtroke information was not returned due to
- hardware errors.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@@ -3440,29 +3278,26 @@ ConSplitterTextInReadKeyStroke ( return ConSplitterTextInPrivateReadKeyStroke (Private, Key);
}
-VOID
-EFIAPI
-ConSplitterTextInWaitForKey (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-Routine Description:
+/**
This event agregates all the events of the ConIn devices in the spliter.
If the ConIn is password locked then return.
If any events of physical ConIn devices are signaled, signal the ConIn
spliter event. This will cause the calling code to call
ConSplitterTextInReadKeyStroke ().
-Arguments:
- Event - The Event assoicated with callback.
- Context - Context registered when Event was created.
+ @param Event The Event assoicated with callback.
+ @param Context Context registered when Event was created.
-Returns:
- None
+ @return None
---*/
+**/
+VOID
+EFIAPI
+ConSplitterTextInWaitForKey (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
{
EFI_STATUS Status;
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@@ -3496,28 +3331,25 @@ Returns: }
-STATIC
+
+/**
+
+ @param RegsiteredData A pointer to a buffer that is filled in with the
+ keystroke state data for the key that was
+ registered.
+ @param InputData A pointer to a buffer that is filled in with the
+ keystroke state data for the key that was
+ pressed.
+
+ @retval TRUE Key be pressed matches a registered key.
+ @retval FLASE Match failed.
+
+**/
BOOLEAN
IsKeyRegistered (
IN EFI_KEY_DATA *RegsiteredData,
IN EFI_KEY_DATA *InputData
)
-/*++
-
-Routine Description:
-
-Arguments:
-
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was registered.
- InputData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
-
-Returns:
- TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
-
---*/
{
ASSERT (RegsiteredData != NULL && InputData != NULL);
@@ -3546,27 +3378,24 @@ Returns: // Simple Text Input Ex protocol functions
//
+
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The device was reset.
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInResetEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -3594,31 +3423,29 @@ ConSplitterTextInResetEx ( }
+
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ @param This Protocol instance pointer.
+ @param KeyData A pointer to a buffer that is filled in with the
+ keystroke state data for the key that was
+ pressed.
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due
+ to hardware errors.
+ @retval EFI_INVALID_PARAMETER KeyData is NULL.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInReadKeyStrokeEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
OUT EFI_KEY_DATA *KeyData
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
-
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
@@ -3662,30 +3489,28 @@ ConSplitterTextInReadKeyStrokeEx ( return EFI_NOT_READY;
}
+
+/**
+ Set certain state for the input device.
+
+ @param This Protocol instance pointer.
+ @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
+
+ @retval EFI_SUCCESS The device state was set successfully.
+ @retval EFI_DEVICE_ERROR The device is not functioning correctly and
+ could not have the setting adjusted.
+ @retval EFI_UNSUPPORTED The device does not have the ability to set its
+ state.
+ @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInSetState (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
)
-/*++
-
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not have the setting adjusted.
- EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
@@ -3715,6 +3540,26 @@ ConSplitterTextInSetState ( }
+
+/**
+ Register a notification function for a particular keystroke for the input device.
+
+ @param This Protocol instance pointer.
+ @param KeyData A pointer to a buffer that is filled in with the
+ keystroke information data for the key that was
+ pressed.
+ @param KeyNotificationFunction Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ @param NotifyHandle Points to the unique handle assigned to the
+ registered notification.
+
+ @retval EFI_SUCCESS The notification function was registered
+ successfully.
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
+ structures.
+ @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInRegisterKeyNotify (
@@ -3723,25 +3568,6 @@ ConSplitterTextInRegisterKeyNotify ( IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
)
-/*++
-
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
-
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
@@ -3836,27 +3662,26 @@ ConSplitterTextInRegisterKeyNotify ( }
+
+/**
+ Remove a registered notification function from a particular keystroke.
+
+ @param This Protocol instance pointer.
+ @param NotificationHandle The handle of the notification function being
+ unregistered.
+
+ @retval EFI_SUCCESS The notification function was unregistered
+ successfully.
+ @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
+ @retval EFI_NOT_FOUND Can not find the matching entry in database.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextInUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
)
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
@@ -3920,27 +3745,24 @@ ConSplitterTextInUnregisterKeyNotify ( }
+
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The device was reset.
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerReset (
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -3970,30 +3792,25 @@ ConSplitterSimplePointerReset ( return ReturnStatus;
}
-STATIC
+
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ @param This Protocol instance pointer. State -
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
+ to hardware errors.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerPrivateGetState (
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
IN OUT EFI_SIMPLE_POINTER_STATE *State
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
-
- Arguments:
- This - Protocol instance pointer.
- State -
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keydtroke information was not returned due to
- hardware errors.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -4050,30 +3867,26 @@ ConSplitterSimplePointerPrivateGetState ( return ReturnStatus;
}
+
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+ If the ConIn is password locked make it look like no keystroke is availible
+
+ @param This Protocol instance pointer. State -
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
+ to hardware errors.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterSimplePointerGetState (
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
IN OUT EFI_SIMPLE_POINTER_STATE *State
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
- If the ConIn is password locked make it look like no keystroke is availible
-
- Arguments:
- This - Protocol instance pointer.
- State -
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keydtroke information was not returned due to
- hardware errors.
-
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@@ -4090,29 +3903,26 @@ ConSplitterSimplePointerGetState ( return ConSplitterSimplePointerPrivateGetState (Private, State);
}
-VOID
-EFIAPI
-ConSplitterSimplePointerWaitForInput (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-Routine Description:
+/**
This event agregates all the events of the ConIn devices in the spliter.
If the ConIn is password locked then return.
If any events of physical ConIn devices are signaled, signal the ConIn
spliter event. This will cause the calling code to call
ConSplitterTextInReadKeyStroke ().
-Arguments:
- Event - The Event assoicated with callback.
- Context - Context registered when Event was created.
+ @param Event The Event assoicated with callback.
+ @param Context Context registered when Event was created.
-Returns:
- None
+ @return None
---*/
+**/
+VOID
+EFIAPI
+ConSplitterSimplePointerWaitForInput (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
{
EFI_STATUS Status;
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@@ -4149,27 +3959,24 @@ Returns: // Absolute Pointer Protocol functions
//
+
+/**
+ Resets the pointer device hardware.
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS The device was reset.
+ @retval EFI_DEVICE_ERROR The device is not functioning correctly and
+ could not be reset.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerReset (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Resets the pointer device hardware.
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -4199,28 +4006,28 @@ ConSplitterAbsolutePointerReset ( return ReturnStatus;
}
+
+/**
+ Retrieves the current state of a pointer device.
+
+ @param This Protocol instance pointer.
+ @param State A pointer to the state information on the
+ pointer device.
+
+ @retval EFI_SUCCESS The state of the pointer device was returned in
+ State..
+ @retval EFI_NOT_READY The state of the pointer device has not changed
+ since the last call to GetState().
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to
+ retrieve the pointer device's current state.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerGetState (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
)
-/*++
-
- Routine Description:
- Retrieves the current state of a pointer device.
-
- Arguments:
- This - Protocol instance pointer.
- State - A pointer to the state information on the pointer device.
-
- Returns:
- EFI_SUCCESS - The state of the pointer device was returned in State..
- EFI_NOT_READY - The state of the pointer device has not changed since the last call to
- GetState().
- EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
- device's current state.
---*/
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
EFI_STATUS Status;
@@ -4281,29 +4088,26 @@ ConSplitterAbsolutePointerGetState ( return ReturnStatus;
}
-VOID
-EFIAPI
-ConSplitterAbsolutePointerWaitForInput (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-Routine Description:
+/**
This event agregates all the events of the pointer devices in the splitter.
If the ConIn is password locked then return.
If any events of physical pointer devices are signaled, signal the pointer
splitter event. This will cause the calling code to call
ConSplitterAbsolutePointerGetState ().
-Arguments:
- Event - The Event assoicated with callback.
- Context - Context registered when Event was created.
+ @param Event The Event assoicated with callback.
+ @param Context Context registered when Event was created.
-Returns:
- None
+ @return None
---*/
+**/
+VOID
+EFIAPI
+ConSplitterAbsolutePointerWaitForInput (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
{
EFI_STATUS Status;
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@@ -4337,28 +4141,25 @@ Returns: }
}
+
+/**
+ Reset the text output device hardware and optionaly run diagnostics
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Driver may perform more exhaustive verfication
+ operation of the device during reset.
+
+ @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
EFIAPI
ConSplitterTextOutReset (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the text output device hardware and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform more exhaustive verfication
- operation of the device during reset.
-
- Returns:
- EFI_SUCCESS - The text output device was reset.
- EFI_DEVICE_ERROR - The text output device is not functioning correctly and
- could not be reset.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4394,34 +4195,32 @@ ConSplitterTextOutReset ( return ReturnStatus;
}
+
+/**
+ Write a Unicode string to the output device.
+
+ @param This Protocol instance pointer.
+ @param String The NULL-terminated Unicode string to be
+ displayed on the output device(s). All output
+ devices must also support the Unicode drawing
+ defined in this file.
+
+ @retval EFI_SUCCESS The string was output to the device.
+ @retval EFI_DEVICE_ERROR The device reported an error while attempting to
+ output the text.
+ @retval EFI_UNSUPPORTED The output device's mode is not currently in a
+ defined text mode.
+ @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
+ characters in the Unicode string could not be
+ rendered and were skipped.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutOutputString (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN CHAR16 *WString
)
-/*++
-
- Routine Description:
- Write a Unicode string to the output device.
-
- Arguments:
- This - Protocol instance pointer.
- String - The NULL-terminated Unicode string to be displayed on the output
- device(s). All output devices must also support the Unicode
- drawing defined in this file.
-
- Returns:
- EFI_SUCCESS - The string was output to the device.
- EFI_DEVICE_ERROR - The device reported an error while attempting to output
- the text.
- EFI_UNSUPPORTED - The output device's mode is not currently in a
- defined text mode.
- EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
- characters in the Unicode string could not be
- rendered and were skipped.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4435,7 +4234,7 @@ ConSplitterTextOutOutputString ( Private = TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
BackSpaceCount = 0;
- for (TargetString = WString; *TargetString; TargetString++) {
+ for (TargetString = WString; *TargetString != L'\0'; TargetString++) {
if (*TargetString == CHAR_BACKSPACE) {
BackSpaceCount++;
}
@@ -4469,37 +4268,35 @@ ConSplitterTextOutOutputString ( }
}
- if (BackSpaceCount) {
+ if (BackSpaceCount > 0) {
FreePool (TargetString);
}
return ReturnStatus;
}
+
+/**
+ Verifies that all characters in a Unicode string can be output to the
+ target device.
+
+ @param This Protocol instance pointer.
+ @param String The NULL-terminated Unicode string to be
+ examined for the output device(s).
+
+ @retval EFI_SUCCESS The device(s) are capable of rendering the
+ output string.
+ @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
+ cannot be rendered by one or more of the output
+ devices mapped by the EFI handle.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutTestString (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN CHAR16 *WString
)
-/*++
-
- Routine Description:
- Verifies that all characters in a Unicode string can be output to the
- target device.
-
- Arguments:
- This - Protocol instance pointer.
- String - The NULL-terminated Unicode string to be examined for the output
- device(s).
-
- Returns:
- EFI_SUCCESS - The device(s) are capable of rendering the output string.
- EFI_UNSUPPORTED - Some of the characters in the Unicode string cannot be
- rendered by one or more of the output devices mapped
- by the EFI handle.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4530,6 +4327,22 @@ ConSplitterTextOutTestString ( return ReturnStatus;
}
+
+/**
+ Returns information for an available text mode that the output device(s)
+ supports.
+
+ @param This Protocol instance pointer.
+ @param ModeNumber The mode number to return information on.
+ @param Rows Returns the geometry of the text output device
+ for the requested ModeNumber.
+
+ @retval EFI_SUCCESS The requested mode information was returned.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED The mode number was not valid.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutQueryMode (
@@ -4538,25 +4351,6 @@ ConSplitterTextOutQueryMode ( OUT UINTN *Columns,
OUT UINTN *Rows
)
-/*++
-
- Routine Description:
- Returns information for an available text mode that the output device(s)
- supports.
-
- Arguments:
- This - Protocol instance pointer.
- ModeNumber - The mode number to return information on.
- Columns, Rows - Returns the geometry of the text output device for the
- requested ModeNumber.
-
- Returns:
- EFI_SUCCESS - The requested mode information was returned.
- EFI_DEVICE_ERROR - The device had an error and could not
- complete the request.
- EFI_UNSUPPORTED - The mode number was not valid.
-
---*/
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN CurrentMode;
@@ -4597,28 +4391,25 @@ ConSplitterTextOutQueryMode ( return EFI_SUCCESS;
}
+
+/**
+ Sets the output device(s) to a specified mode.
+
+ @param This Protocol instance pointer.
+ @param ModeNumber The mode number to set.
+
+ @retval EFI_SUCCESS The requested text mode was set.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED The mode number was not valid.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutSetMode (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN UINTN ModeNumber
)
-/*++
-
- Routine Description:
- Sets the output device(s) to a specified mode.
-
- Arguments:
- This - Protocol instance pointer.
- ModeNumber - The mode number to set.
-
- Returns:
- EFI_SUCCESS - The requested text mode was set.
- EFI_DEVICE_ERROR - The device had an error and
- could not complete the request.
- EFI_UNSUPPORTED - The mode number was not valid.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4680,31 +4471,30 @@ ConSplitterTextOutSetMode ( return ReturnStatus;
}
+
+/**
+ Sets the background and foreground colors for the OutputString () and
+ ClearScreen () functions.
+
+ @param This Protocol instance pointer.
+ @param Attribute The attribute to set. Bits 0..3 are the
+ foreground color, and bits 4..6 are the
+ background color. All other bits are undefined
+ and must be zero. The valid Attributes are
+ defined in this file.
+
+ @retval EFI_SUCCESS The attribute was set.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED The attribute requested is not defined.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutSetAttribute (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN UINTN Attribute
)
-/*++
-
- Routine Description:
- Sets the background and foreground colors for the OutputString () and
- ClearScreen () functions.
-
- Arguments:
- This - Protocol instance pointer.
- Attribute - The attribute to set. Bits 0..3 are the foreground color, and
- bits 4..6 are the background color. All other bits are undefined
- and must be zero. The valid Attributes are defined in this file.
-
- Returns:
- EFI_SUCCESS - The attribute was set.
- EFI_DEVICE_ERROR - The device had an error and
- could not complete the request.
- EFI_UNSUPPORTED - The attribute requested is not defined.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4741,27 +4531,24 @@ ConSplitterTextOutSetAttribute ( return ReturnStatus;
}
+
+/**
+ Clears the output device(s) display to the currently selected background
+ color.
+
+ @param This Protocol instance pointer.
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutClearScreen (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
)
-/*++
-
- Routine Description:
- Clears the output device(s) display to the currently selected background
- color.
-
- Arguments:
- This - Protocol instance pointer.
-
- Returns:
- EFI_SUCCESS - The operation completed successfully.
- EFI_DEVICE_ERROR - The device had an error and
- could not complete the request.
- EFI_UNSUPPORTED - The output device is not in a valid text mode.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4791,6 +4578,23 @@ ConSplitterTextOutClearScreen ( return ReturnStatus;
}
+
+/**
+ Sets the current coordinates of the cursor position
+
+ @param This Protocol instance pointer.
+ @param Row the position to set the cursor to. Must be
+ greater than or equal to zero and less than the
+ number of columns and rows by QueryMode ().
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
+ or the cursor position is invalid for the
+ current mode.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutSetCursorPosition (
@@ -4798,25 +4602,6 @@ ConSplitterTextOutSetCursorPosition ( IN UINTN Column,
IN UINTN Row
)
-/*++
-
- Routine Description:
- Sets the current coordinates of the cursor position
-
- Arguments:
- This - Protocol instance pointer.
- Column, Row - the position to set the cursor to. Must be greater than or
- equal to zero and less than the number of columns and rows
- by QueryMode ().
-
- Returns:
- EFI_SUCCESS - The operation completed successfully.
- EFI_DEVICE_ERROR - The device had an error and
- could not complete the request.
- EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
- cursor position is invalid for the current mode.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -4870,30 +4655,27 @@ ConSplitterTextOutSetCursorPosition ( return ReturnStatus;
}
+
+/**
+ Makes the cursor visible or invisible
+
+ @param This Protocol instance pointer.
+ @param Visible If TRUE, the cursor is set to be visible. If
+ FALSE, the cursor is set to be invisible.
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request, or the device does not support
+ changing the cursor mode.
+ @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterTextOutEnableCursor (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN BOOLEAN Visible
)
-/*++
-
- Routine Description:
- Makes the cursor visible or invisible
-
- Arguments:
- This - Protocol instance pointer.
- Visible - If TRUE, the cursor is set to be visible. If FALSE, the cursor is
- set to be invisible.
-
- Returns:
- EFI_SUCCESS - The operation completed successfully.
- EFI_DEVICE_ERROR - The device had an error and could not complete the
- request, or the device does not support changing
- the cursor mode.
- EFI_UNSUPPORTED - The output device is not in a valid text mode.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|