These 3 virtual handles would be installed on gST.\r
\r
Each virtual handle, that supports the Console I/O protocol, will be produced\r
- in the driver entry point. The virtual handle are added on driver entry and \r
- never removed. Such design ensures sytem function well during none console \r
+ in the driver entry point. The virtual handle are added on driver entry and\r
+ never removed. Such design ensures sytem function well during none console\r
device situation.\r
\r
Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
\r
Installs driver module protocols and. Creates virtual device handles for ConIn,\r
ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,\r
- Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. \r
+ Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.\r
Installs Graphics Output protocol and/or UGA Draw protocol if needed.\r
\r
@param[in] ImageHandle The firmware allocated handle for the EFI image.\r
if (!EFI_ERROR (Status)) {\r
if (!FeaturePcdGet (PcdConOutGopSupport)) {\r
//\r
- // If Graphics Outpurt protocol not supported, UGA Draw protocol is installed \r
+ // If Graphics Outpurt protocol not supported, UGA Draw protocol is installed\r
// on the virtual handle.\r
//\r
Status = gBS->InstallMultipleProtocolInterfaces (\r
EFI_STATUS Status;\r
\r
//\r
- // Allocate buffer for Simple Text Input device \r
+ // Allocate buffer for Simple Text Input device\r
//\r
Status = ConSplitterGrowBuffer (\r
sizeof (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *),\r
);\r
ASSERT_EFI_ERROR (Status);\r
//\r
- // Create Event to wait for a key \r
+ // Create Event to wait for a key\r
//\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_WAIT,\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // Allocate buffer for Simple Text Input Ex device \r
+ // Allocate buffer for Simple Text Input Ex device\r
//\r
Status = ConSplitterGrowBuffer (\r
sizeof (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *),\r
\r
ConInPrivate->AbsolutePointer.Mode = &ConInPrivate->AbsolutePointerMode;\r
//\r
- // Allocate buffer for Absolute Pointer device \r
+ // Allocate buffer for Absolute Pointer device\r
//\r
Status = ConSplitterGrowBuffer (\r
sizeof (EFI_ABSOLUTE_POINTER_PROTOCOL *),\r
\r
ConInPrivate->SimplePointer.Mode = &ConInPrivate->SimplePointerMode;\r
//\r
- // Allocate buffer for Simple Pointer device \r
+ // Allocate buffer for Simple Pointer device\r
//\r
Status = ConSplitterGrowBuffer (\r
sizeof (EFI_SIMPLE_POINTER_PROTOCOL *),\r
//\r
ConOutPrivate->TextOutMode.Mode = 0xFF;\r
//\r
- // Allocate buffer for Console Out device \r
+ // Allocate buffer for Console Out device\r
//\r
Status = ConSplitterGrowBuffer (\r
sizeof (TEXT_OUT_AND_GOP_DATA),\r
\r
\r
/**\r
- Test to see if the specified protocol could be supported on the specified device. \r
+ Test to see if the specified protocol could be supported on the specified device.\r
\r
@param This Driver Binding protocol pointer.\r
@param ControllerHandle Handle of device to test.\r
//\r
if (ControllerHandle == mConIn.VirtualHandle ||\r
ControllerHandle == mConOut.VirtualHandle ||\r
- ControllerHandle == mStdErr.VirtualHandle \r
+ ControllerHandle == mStdErr.VirtualHandle\r
) {\r
return EFI_UNSUPPORTED;\r
}\r
}\r
\r
/**\r
- Test to see if Console In Device could be supported on the Controller. \r
+ Test to see if Console In Device could be supported on the Controller.\r
\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to test.\r
}\r
\r
/**\r
- Test to see if Simple Pointer protocol could be supported on the Controller. \r
+ Test to see if Simple Pointer protocol could be supported on the Controller.\r
\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to test.\r
}\r
\r
/**\r
- Test to see if Absolute Pointer protocol could be supported on the Controller. \r
+ Test to see if Absolute Pointer protocol could be supported on the Controller.\r
\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to test.\r
\r
\r
/**\r
- Test to see if Console Out Device could be supported on the Controller. \r
+ Test to see if Console Out Device could be supported on the Controller.\r
\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to test.\r
}\r
\r
/**\r
- Test to see if Standard Error Device could be supported on the Controller. \r
+ Test to see if Standard Error Device could be supported on the Controller.\r
\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to test.\r
\r
\r
/**\r
- Start ConSplitter on devcie handle by opening Console Device Guid on device handle \r
+ Start ConSplitter on devcie handle by opening Console Device Guid on device handle\r
and the console virtual handle. And Get the console interface on controller handle.\r
- \r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device.\r
@param ConSplitterVirtualHandle Console virtual Handle.\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
//\r
// Create virtual handle and open DeviceGuid on the virtul handle.\r
//\r
\r
\r
/**\r
- Start Console In Consplitter on device handle. \r
- \r
+ Start Console In Consplitter on device handle.\r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to.\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
\r
\r
/**\r
- Start Simple Pointer Consplitter on device handle. \r
- \r
+ Start Simple Pointer Consplitter on device handle.\r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to.\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
\r
\r
/**\r
- Start Absolute Pointer Consplitter on device handle. \r
- \r
+ Start Absolute Pointer Consplitter on device handle.\r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to.\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
\r
\r
/**\r
- Start Console Out Consplitter on device handle. \r
- \r
+ Start Console Out Consplitter on device handle.\r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to.\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
return Status;\r
}\r
ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
- \r
+\r
mConOut.UgaHorizontalResolution = Info->HorizontalResolution;\r
mConOut.UgaVerticalResolution = Info->VerticalResolution;\r
- mConOut.UgaColorDepth = 32; \r
+ mConOut.UgaColorDepth = 32;\r
mConOut.UgaRefreshRate = 60;\r
\r
FreePool (Info);\r
\r
\r
/**\r
- Start Standard Error Consplitter on device handle. \r
- \r
+ Start Standard Error Consplitter on device handle.\r
+\r
@param This Driver Binding protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to.\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
\r
\r
/**\r
- Stop ConSplitter on device handle by closing Console Device Guid on device handle \r
+ Stop ConSplitter on device handle by closing Console Device Guid on device handle\r
and the console virtual handle.\r
- \r
+\r
@param This Protocol instance pointer.\r
@param ControllerHandle Handle of device.\r
@param ConSplitterVirtualHandle Console virtual Handle.\r
//\r
// If Simple Text Input Ex protocol exists,\r
// remove device from Text Input Ex devices list.\r
- // \r
+ //\r
Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
\r
//\r
// Remove device from Text Input devices list.\r
- // \r
+ //\r
return ConSplitterTextInDeleteDevice (&mConIn, TextIn);\r
}\r
\r
//\r
*Count += CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT;\r
Ptr = ReallocatePool (\r
- SizeOfCount * ((*Count) - CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT), \r
+ SizeOfCount * ((*Count) - CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT),\r
SizeOfCount * (*Count),\r
*Buffer\r
);\r
\r
@param Private Text Out Splitter pointer\r
@param TextOut Simple Text Output protocol pointer.\r
- \r
+\r
@retval EFI_SUCCESS Device added successfully.\r
@retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
\r
\r
@param Private Text Out Splitter pointer.\r
@param TextOut Simple Text Output protocol pointer.\r
- \r
+\r
**/\r
VOID\r
ConSplitterSyncOutputMode (\r
if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&\r
(Info->VerticalResolution == Mode->VerticalResolution)) {\r
//\r
- // If GOP device supports one mode in current mode buffer, \r
+ // If GOP device supports one mode in current mode buffer,\r
// it will be added into matched mode buffer\r
//\r
Match = TRUE;\r
\r
if (Match) {\r
AlreadyExist = FALSE;\r
- \r
+\r
//\r
// Check if GOP mode has been in the mode buffer, ModeBuffer = MatchedMode at begin.\r
//\r
if (FeaturePcdGet (PcdConOutUgaSupport)) {\r
UgaHorizontalResolution = 800;\r
UgaVerticalResolution = 600;\r
- UgaColorDepth = 32; \r
+ UgaColorDepth = 32;\r
UgaRefreshRate = 60;\r
\r
Status = EFI_DEVICE_ERROR;\r
UgaVerticalResolution = Info->VerticalResolution;\r
\r
FreePool (Info);\r
- \r
+\r
} else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
Status = UgaDraw->GetMode (\r
UgaDraw,\r
&UgaRefreshRate\r
);\r
}\r
- \r
+\r
//\r
// Set UGA Draw mode,\r
// if GetMode is failed, set to 800x600 mode\r
\r
\r
/**\r
- If Password is NULL or the Password is too big, then return an error. If the \r
+ If Password is NULL or the Password is too big, then return an error. If the\r
Password is valid, then store the password, lock StdIn and arm the periodic timer.\r
\r
@param This Console Control protocol pointer.\r
TargetString = WString;\r
} else {\r
TargetString = AllocatePool (sizeof (CHAR16) * (StrLen (WString) + BackSpaceCount + 1));\r
+ ASSERT (TargetString != NULL);\r
+\r
StrCpy (TargetString, WString);\r
}\r
//\r