summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/ConSplitterDxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConSplitterDxe')
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c92
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c1708
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h267
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c600
4 files changed, 1236 insertions, 1431 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
index 72f7827..e9c3f5d 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for ConSplitter driver.
-Copyright (c) 2006, 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
@@ -492,6 +492,51 @@ ConSplitterSimplePointerComponentNameGetControllerName (
);
}
+
+/**
+ Retrieves a Unicode string that is the user readable name of the controller
+ that is being managed by an EFI Driver.
+
+ @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
+ instance.
+ @param ControllerHandle The handle of a controller that the driver
+ specified by This is managing. This handle
+ specifies the controller whose name is to be
+ returned.
+ @param ChildHandle The handle of the child controller to retrieve the
+ name of. This is an optional parameter that may
+ be NULL. It will be NULL for device drivers. It
+ will also be NULL for a bus drivers that wish to
+ retrieve the name of the bus controller. It will
+ not be NULL for a bus driver that wishes to
+ retrieve the name of a child controller.
+ @param Language A pointer to RFC3066 language identifier. This is
+ the language of the controller name that that the
+ caller is requesting, and it must match one of the
+ languages specified in SupportedLanguages. The
+ number of languages supported by a driver is up to
+ the driver writer.
+ @param ControllerName A pointer to the Unicode string to return. This
+ Unicode string is the name of the controller
+ specified by ControllerHandle and ChildHandle in
+ the language specified by Language from the point
+ of view of the driver specified by This.
+
+ @retval EFI_SUCCESS The Unicode string for the user readable name in
+ the language specified by Language for the driver
+ specified by This was returned in DriverName.
+ @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
+ @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
+ EFI_HANDLE.
+ @retval EFI_INVALID_PARAMETER Language is NULL.
+ @retval EFI_INVALID_PARAMETER ControllerName is NULL.
+ @retval EFI_UNSUPPORTED The driver specified by This is not currently
+ managing the controller specified by
+ ControllerHandle and ChildHandle.
+ @retval EFI_UNSUPPORTED The driver specified by This does not support the
+ language specified by Language.
+
+**/
EFI_STATUS
EFIAPI
ConSplitterAbsolutePointerComponentNameGetControllerName (
@@ -501,51 +546,6 @@ ConSplitterAbsolutePointerComponentNameGetControllerName (
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
-/*++
-
- Routine Description:
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by an EFI Driver.
-
- Arguments:
- This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
- ControllerHandle - The handle of a controller that the driver specified by
- This is managing. This handle specifies the controller
- whose name is to be returned.
- ChildHandle - The handle of the child controller to retrieve the name
- of. This is an optional parameter that may be NULL. It
- will be NULL for device drivers. It will also be NULL
- for a bus drivers that wish to retrieve the name of the
- bus controller. It will not be NULL for a bus driver
- that wishes to retrieve the name of a child controller.
- Language - A pointer to RFC3066 language identifier.
- This is the language of the controller name
- that that the caller is requesting, and it must match one
- of the languages specified in SupportedLanguages. The
- number of languages supported by a driver is up to the
- driver writer.
- ControllerName - A pointer to the Unicode string to return. This Unicode
- string is the name of the controller specified by
- ControllerHandle and ChildHandle in the language
- specified by Language from the point of view of the
- driver specified by This.
-
- Returns:
- EFI_SUCCESS - The Unicode string for the user readable name in the
- language specified by Language for the driver
- specified by This was returned in DriverName.
- EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
- EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
- EFI_INVALID_PARAMETER - Language is NULL.
- EFI_INVALID_PARAMETER - ControllerName is NULL.
- EFI_UNSUPPORTED - The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
- EFI_UNSUPPORTED - The driver specified by This does not support the
- language specified by Language.
-
---*/
{
EFI_STATUS Status;
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;
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
index 757aed8..6f409e1 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
@@ -1,7 +1,7 @@
-/**@file
+/** @file
Private data structures for the Console Splitter driver
-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
@@ -76,7 +76,7 @@ extern EFI_GUID gSimpleTextInExNotifyGuid;
#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
#define MAX_STD_IN_PASSWORD 80
-#define VarConOutMode L"ConOutMode"
+#define VARCONOUTMODE L"ConOutMode"
typedef struct {
UINTN Column;
@@ -259,6 +259,15 @@ ConSplitterDriverEntry (
)
;
+/**
+ Construct the ConSplitter.
+
+ @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
+ structure.
+
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
+
+**/
EFI_STATUS
ConSplitterTextInConstructor (
TEXT_IN_SPLITTER_PRIVATE_DATA *Private
@@ -274,6 +283,17 @@ ConSplitterTextOutConstructor (
//
// Driver Binding Functions
//
+
+/**
+ 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 (
@@ -283,6 +303,16 @@ ConSplitterConInDriverBindingSupported (
)
;
+/**
+ 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 (
@@ -292,6 +322,16 @@ ConSplitterSimplePointerDriverBindingSupported (
)
;
+/**
+ 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 (
@@ -301,6 +341,16 @@ ConSplitterConOutDriverBindingSupported (
)
;
+/**
+ 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 (
@@ -436,51 +486,48 @@ ConSplitterAbsolutePointerDeleteDevice (
// Absolute Pointer protocol interfaces
//
+
+/**
+ 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.
+/**
+ Retrieves the current state of a pointer device.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not be reset.
+ @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.
---*/
;
VOID
@@ -954,82 +1001,95 @@ ConSplitterTextInExDeleteDevice (
// Simple Text Input Ex protocol function prototypes
//
+
+/**
+ 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.
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
+ @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.
+/**
+ Set certain state for the input device.
- 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.
+ @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.
---*/
-;
+/**
+ 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 (
@@ -1038,48 +1098,28 @@ 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.
+/**
+ Remove a registered notification function from a particular keystroke.
- 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.
+ @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.
-
---*/
;
VOID
EFIAPI
@@ -1135,6 +1175,19 @@ ConSplitterSimplePointerGetState (
)
;
+/**
+ 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 ().
+
+ @param Event The Event assoicated with callback.
+ @param Context Context registered when Event was created.
+
+ @return None
+
+**/
VOID
EFIAPI
ConSplitterSimplePointerWaitForInput (
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
index 28de49c..497adfd 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
@@ -13,14 +13,30 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
**/
#include "ConSplitter.h"
-static CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
+STATIC CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
+
+
+/**
+ Return the current video mode information. Also returns info about existence
+ of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
+ arguments are optional and only returned if a non NULL pointer is passed in.
+
+ @param This Protocol instance pointer.
+ @param Mode Are we in text of grahics mode.
+ @param GopExists TRUE if GOP Spliter has found a GOP/UGA device
+ @param StdInLocked TRUE if StdIn device is keyboard locked
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_INVALID_PARAMETER Invalid parameters.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterConsoleControlGetMode (
@@ -29,24 +45,6 @@ ConSpliterConsoleControlGetMode (
OUT BOOLEAN *GopExists,
OUT BOOLEAN *StdInLocked
)
-/*++
-
- Routine Description:
- Return the current video mode information. Also returns info about existence
- of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
- arguments are optional and only returned if a non NULL pointer is passed in.
-
- Arguments:
- This - Protocol instance pointer.
- Mode - Are we in text of grahics mode.
- GopExists - TRUE if GOP Spliter has found a GOP/UGA device
- StdInLocked - TRUE if StdIn device is keyboard locked
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_INVALID_PARAMETER - Invalid parameters.
-
---*/
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
@@ -76,28 +74,25 @@ ConSpliterConsoleControlGetMode (
return EFI_SUCCESS;
}
+
+/**
+ Set the current mode to either text or graphics. Graphics is
+ for Quiet Boot.
+
+ @param This Protocol instance pointer.
+ @param Mode Mode to set the
+
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_INVALID_PARAMETER Invalid parameter.
+ @retval EFI_UNSUPPORTED Operation unsupported.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterConsoleControlSetMode (
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
)
-/*++
-
- Routine Description:
- Set the current mode to either text or graphics. Graphics is
- for Quiet Boot.
-
- Arguments:
- This - Protocol instance pointer.
- Mode - Mode to set the
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_INVALID_PARAMETER - Invalid parameter.
- EFI_UNSUPPORTED - Operation unsupported.
-
---*/
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
@@ -154,6 +149,25 @@ ConSpliterConsoleControlSetMode (
return EFI_SUCCESS;
}
+
+/**
+ Return the current video mode information.
+
+ @param This Protocol instance pointer.
+ @param ModeNumber The mode number to return information on.
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info
+ buffer.
+ @param Info Caller allocated buffer that returns information
+ about ModeNumber.
+
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
+ video mode.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterGraphicsOutputQueryMode (
@@ -162,25 +176,6 @@ ConSpliterGraphicsOutputQueryMode (
OUT UINTN *SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
)
-/*++
-
- Routine Description:
- Return the current video mode information.
-
- Arguments:
- This - Protocol instance pointer.
- ModeNumber - The mode number to return information on.
- Info - Caller allocated buffer that returns information about ModeNumber.
- SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_BUFFER_TOO_SMALL - The Info buffer was too small.
- EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
- EFI_INVALID_PARAMETER - One of the input args was NULL.
-
---*/
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -210,28 +205,25 @@ ConSpliterGraphicsOutputQueryMode (
return EFI_SUCCESS;
}
+
+/**
+ Graphics output protocol interface to set video mode
+
+ @param This Protocol instance pointer.
+ @param ModeNumber The mode number to be set.
+
+ @retval EFI_SUCCESS Graphics mode was changed.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete
+ the request.
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterGraphicsOutputSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber
)
-/*++
-
-Routine Description:
-
- Graphics output protocol interface to set video mode
-
- Arguments:
- This - Protocol instance pointer.
- ModeNumber - The mode number to be set.
-
- Returns:
- EFI_SUCCESS - Graphics mode was changed.
- EFI_DEVICE_ERROR - The device had an error and could not complete the request.
- EFI_UNSUPPORTED - ModeNumber is not supported by this device.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -338,7 +330,6 @@ Routine Description:
return ReturnStatus;
}
-STATIC
EFI_STATUS
DevNullGraphicsOutputBlt (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
@@ -393,7 +384,7 @@ DevNullGraphicsOutputBlt (
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
ScreenPtr = &Private->GraphicsOutputBlt[SourceY * HorizontalResolution + SourceX];
- while (Height) {
+ while (Height > 0) {
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltPtr + Delta);
ScreenPtr += HorizontalResolution;
@@ -456,6 +447,53 @@ DevNullGraphicsOutputBlt (
return EFI_SUCCESS;
}
+
+/**
+ The following table defines actions for BltOperations.
+
+ EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiBltVideoToBltBuffer - Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiBltBufferToVideo - Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiBltVideoToVideo - Copy from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
+ to the video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ @param This Protocol instance pointer.
+ @param BltBuffer Buffer containing data to blit into video buffer.
+ This buffer has a size of
+ Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
+ @param BltOperation Operation to perform on BlitBuffer and video
+ memory
+ @param SourceX X coordinate of source for the BltBuffer.
+ @param SourceY Y coordinate of source for the BltBuffer.
+ @param DestinationX X coordinate of destination for the BltBuffer.
+ @param DestinationY Y coordinate of destination for the BltBuffer.
+ @param Width Width of rectangle in BltBuffer in pixels.
+ @param Height Hight of rectangle in BltBuffer in pixels. Delta
+ -
+
+ @retval EFI_SUCCESS The Blt operation completed.
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
+ buffer.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterGraphicsOutputBlt (
@@ -470,53 +508,6 @@ ConSpliterGraphicsOutputBlt (
IN UINTN Height,
IN UINTN Delta OPTIONAL
)
-/*++
-
- Routine Description:
- The following table defines actions for BltOperations:
- EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
- EfiBltVideoToBltBuffer - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
- EfiBltBufferToVideo - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
- EfiBltVideoToVideo - Copy from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
- to the video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
-
- Arguments:
- This - Protocol instance pointer.
- BltBuffer - Buffer containing data to blit into video buffer. This
- buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
- BltOperation - Operation to perform on BlitBuffer and video memory
- SourceX - X coordinate of source for the BltBuffer.
- SourceY - Y coordinate of source for the BltBuffer.
- DestinationX - X coordinate of destination for the BltBuffer.
- DestinationY - Y coordinate of destination for the BltBuffer.
- Width - Width of rectangle in BltBuffer in pixels.
- Height - Hight of rectangle in BltBuffer in pixels.
- Delta -
-
- Returns:
- EFI_SUCCESS - The Blt operation completed.
- EFI_INVALID_PARAMETER - BltOperation is not valid.
- EFI_DEVICE_ERROR - A hardware error occured writting to the video
- buffer.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -640,6 +631,21 @@ DevNullGopSync (
}
}
+
+/**
+ Return the current video mode information.
+
+ @param This Protocol instance pointer.
+ @param HorizontalResolution Current video horizontal resolution in pixels
+ @param VerticalResolution Current video vertical resolution in pixels
+ @param ColorDepth Current video color depth in bits per pixel
+ @param RefreshRate Current video refresh rate in Hz.
+
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterUgaDrawGetMode (
@@ -649,28 +655,13 @@ ConSpliterUgaDrawGetMode (
OUT UINT32 *ColorDepth,
OUT UINT32 *RefreshRate
)
-/*++
-
- Routine Description:
- Return the current video mode information.
-
- Arguments:
- This - Protocol instance pointer.
- HorizontalResolution - Current video horizontal resolution in pixels
- VerticalResolution - Current video vertical resolution in pixels
- ColorDepth - Current video color depth in bits per pixel
- RefreshRate - Current video refresh rate in Hz.
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
- EFI_INVALID_PARAMETER - One of the input args was NULL.
-
---*/
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
- if (!(HorizontalResolution && VerticalResolution && RefreshRate && ColorDepth)) {
+ if ((HorizontalResolution == NULL) ||
+ (VerticalResolution == NULL) ||
+ (RefreshRate == NULL) ||
+ (ColorDepth == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
@@ -686,6 +677,21 @@ ConSpliterUgaDrawGetMode (
return EFI_SUCCESS;
}
+
+/**
+ Return the current video mode information.
+
+ @param This Protocol instance pointer.
+ @param HorizontalResolution Current video horizontal resolution in pixels
+ @param VerticalResolution Current video vertical resolution in pixels
+ @param ColorDepth Current video color depth in bits per pixel
+ @param RefreshRate Current video refresh rate in Hz.
+
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterUgaDrawSetMode (
@@ -695,24 +701,6 @@ ConSpliterUgaDrawSetMode (
IN UINT32 ColorDepth,
IN UINT32 RefreshRate
)
-/*++
-
- Routine Description:
- Return the current video mode information.
-
- Arguments:
- This - Protocol instance pointer.
- HorizontalResolution - Current video horizontal resolution in pixels
- VerticalResolution - Current video vertical resolution in pixels
- ColorDepth - Current video color depth in bits per pixel
- RefreshRate - Current video refresh rate in Hz.
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
- EFI_OUT_OF_RESOURCES - Out of resources.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -865,7 +853,7 @@ DevNullUgaBlt (
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_UGA_PIXEL));
ScreenPtr = &Private->UgaBlt[SourceY * HorizontalResolution + SourceX];
- while (Height) {
+ while (Height > 0) {
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_UGA_PIXEL));
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltPtr + Delta);
ScreenPtr += HorizontalResolution;
@@ -928,6 +916,53 @@ DevNullUgaBlt (
return EFI_SUCCESS;
}
+
+/**
+ The following table defines actions for BltOperations.
+
+ EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiUgaVideoToBltBuffer - Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiUgaVideoToVideo - Copy from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
+ to the video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ @param This Protocol instance pointer.
+ @param BltBuffer Buffer containing data to blit into video buffer.
+ This buffer has a size of
+ Width*Height*sizeof(EFI_UGA_PIXEL)
+ @param BltOperation Operation to perform on BlitBuffer and video
+ memory
+ @param SourceX X coordinate of source for the BltBuffer.
+ @param SourceY Y coordinate of source for the BltBuffer.
+ @param DestinationX X coordinate of destination for the BltBuffer.
+ @param DestinationY Y coordinate of destination for the BltBuffer.
+ @param Width Width of rectangle in BltBuffer in pixels.
+ @param Height Hight of rectangle in BltBuffer in pixels. Delta
+ -
+
+ @retval EFI_SUCCESS The Blt operation completed.
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
+ buffer.
+
+**/
EFI_STATUS
EFIAPI
ConSpliterUgaDrawBlt (
@@ -942,53 +977,6 @@ ConSpliterUgaDrawBlt (
IN UINTN Height,
IN UINTN Delta OPTIONAL
)
-/*++
-
- Routine Description:
- The following table defines actions for BltOperations:
- EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
- EfiUgaVideoToBltBuffer - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
- EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
- EfiUgaVideoToVideo - Copy from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
- to the video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
-
- Arguments:
- This - Protocol instance pointer.
- BltBuffer - Buffer containing data to blit into video buffer. This
- buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
- BltOperation - Operation to perform on BlitBuffer and video memory
- SourceX - X coordinate of source for the BltBuffer.
- SourceY - Y coordinate of source for the BltBuffer.
- DestinationX - X coordinate of destination for the BltBuffer.
- DestinationY - Y coordinate of destination for the BltBuffer.
- Width - Width of rectangle in BltBuffer in pixels.
- Height - Hight of rectangle in BltBuffer in pixels.
- Delta -
-
- Returns:
- EFI_SUCCESS - The Blt operation completed.
- EFI_INVALID_PARAMETER - BltOperation is not valid.
- EFI_DEVICE_ERROR - A hardware error occured writting to the video
- buffer.
-
---*/
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
@@ -1109,34 +1097,32 @@ DevNullUgaSync (
}
}
+
+/**
+ Write a Unicode string to the output device.
+
+ @param Private Pointer to the console output splitter's private
+ data. It indicates the calling context.
+ @param WString 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
DevNullTextOutOutputString (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN CHAR16 *WString
)
-/*++
-
- Routine Description:
- Write a Unicode string to the output device.
-
- Arguments:
- Private - Pointer to the console output splitter's private data. It
- indicates the calling context.
- WString - 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.
-
---*/
{
UINTN SizeScreen;
UINTN SizeAttribute;
@@ -1165,7 +1151,7 @@ DevNullTextOutOutputString (
CurrentWidth = 1;
}
- while (*WString) {
+ while (*WString != L'\0') {
if (*WString == CHAR_BACKSPACE) {
//
@@ -1193,7 +1179,7 @@ DevNullTextOutOutputString (
//
InsertChar = CHAR_BACKSPACE;
PStr = WString + 1;
- while (*PStr) {
+ while (*PStr != L'\0') {
TempChar = *PStr;
*PStr = InsertChar;
InsertChar = TempChar;
@@ -1329,28 +1315,25 @@ DevNullTextOutOutputString (
return EFI_SUCCESS;
}
+
+/**
+ Sets the output device(s) to a specified mode.
+
+ @param Private Private data structure 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.
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
+
+**/
EFI_STATUS
DevNullTextOutSetMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN UINTN ModeNumber
)
-/*++
-
- Routine Description:
- Sets the output device(s) to a specified mode.
-
- Arguments:
- Private - Private data structure 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_OUT_OF_RESOURCES - Out of resources.
-
---*/
{
UINTN Size;
INT32 CurrentMode;
@@ -1408,26 +1391,23 @@ DevNullTextOutSetMode (
return EFI_SUCCESS;
}
-EFI_STATUS
-DevNullTextOutClearScreen (
- IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
- )
-/*++
- Routine Description:
- Clears the output device(s) display to the currently selected background
- color.
+/**
+ Clears the output device(s) display to the currently selected background
+ color.
- Arguments:
- Private - Protocol instance pointer.
+ @param Private 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.
+ @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
+DevNullTextOutClearScreen (
+ IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
+ )
{
UINTN Row;
UINTN Column;
@@ -1460,31 +1440,30 @@ DevNullTextOutClearScreen (
return DevNullTextOutEnableCursor (Private, TRUE);
}
+
+/**
+ Sets the current coordinates of the cursor position.
+
+ @param Private Protocol instance pointer.
+ @param Column
+ @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
DevNullTextOutSetCursorPosition (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN UINTN Column,
IN UINTN Row
)
-/*++
-
- Routine Description:
- Sets the current coordinates of the cursor position
-
- Arguments:
- Private - 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.
-
---*/
{
//
// No need to do extra check here as whether (Column, Row) is valid has
@@ -1497,53 +1476,44 @@ DevNullTextOutSetCursorPosition (
return EFI_SUCCESS;
}
+
+/**
+ Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
+ In this driver, the cursor cannot be hidden.
+
+ @param Private Indicates the calling context.
+ @param Visible If TRUE, the cursor is set to be visible, If
+ FALSE, the cursor is set to be invisible.
+
+ @retval EFI_SUCCESS The request is valid.
+
+**/
EFI_STATUS
DevNullTextOutEnableCursor (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN BOOLEAN Visible
)
-/*++
- Routine Description:
-
- Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
- In this driver, the cursor cannot be hidden.
-
- Arguments:
-
- Private - Indicates the calling context.
-
- Visible - If TRUE, the cursor is set to be visible, If FALSE, the cursor
- is set to be invisible.
-
- Returns:
-
- EFI_SUCCESS - The request is valid.
-
-
---*/
{
Private->TextOutMode.CursorVisible = Visible;
return EFI_SUCCESS;
}
+
+/**
+ Take the DevNull TextOut device and update the Simple Text Out on every
+ UGA device.
+
+ @param Private Indicates the calling context.
+
+ @retval EFI_SUCCESS The request is valid.
+ @retval other Return status of TextOut->OutputString ()
+
+**/
EFI_STATUS
DevNullSyncStdOut (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
)
-/*++
- Routine Description:
- Take the DevNull TextOut device and update the Simple Text Out on every
- UGA device.
-
- Arguments:
- Private - Indicates the calling context.
-
- Returns:
- EFI_SUCCESS - The request is valid.
- other - Return status of TextOut->OutputString ()
-
---*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -1607,7 +1577,7 @@ DevNullSyncStdOut (
Column = 0;
while (Column < MaxColumn) {
- if (Screen[Column]) {
+ if (Screen[Column] > 0) {
CurrentAttribute = Attributes[Column];
CurrentColumn = Column;
ScreenStart = &Screen[Column];
@@ -1625,7 +1595,7 @@ DevNullSyncStdOut (
*BufferTail = *Str;
BufferTail++;
- if (Attributes[Column] & EFI_WIDE_ATTRIBUTE) {
+ if ((Attributes[Column] & EFI_WIDE_ATTRIBUTE) != 0) {
Str++;
Column++;
}