\r
#include "Terminal.h"\r
\r
-/**\r
- Free notify functions list.\r
-\r
- @param ListHead The list head\r
-\r
- @retval EFI_SUCCESS Free the notify list successfully.\r
- @retval EFI_INVALID_PARAMETER ListHead is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-TerminalFreeNotifyList (\r
- IN OUT LIST_ENTRY *ListHead\r
- );\r
-\r
//\r
// Globals\r
//\r
};\r
\r
\r
-TERMINAL_DEV gTerminalDevTemplate = {\r
+TERMINAL_DEV mTerminalDevTemplate = {\r
TERMINAL_DEV_SIGNATURE,\r
NULL,\r
0,\r
\r
\r
/**\r
- Test to see if this driver supports ControllerHandle. \r
+ Free notify functions list.\r
+\r
+ @param ListHead The list head\r
+\r
+ @retval EFI_SUCCESS Free the notify list successfully.\r
+ @retval EFI_INVALID_PARAMETER ListHead is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+TerminalFreeNotifyList (\r
+ IN OUT LIST_ENTRY *ListHead\r
+ );\r
+\r
+/**\r
+ Test to see if this driver supports Controller. \r
\r
@param This Protocol instance pointer.\r
- @param ControllerHandle Handle of device to test\r
+ @param Controller Handle of device to test\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
device to start.\r
\r
- @retval EFI_SUCCESS This driver supports this device\r
- @retval EFI_ALREADY_STARTED This driver is already running on this device\r
- @retval other This driver does not support this device\r
+ @retval EFI_SUCCESS This driver supports this device.\r
+ @retval EFI_ALREADY_STARTED This driver is already running on this device.\r
+ @retval other This driver does not support this device.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
/**\r
- Start this driver on ControllerHandle by opening a Serial IO protocol,\r
+ Start this driver on Controller by opening a Serial IO protocol,\r
reading Device Path, and creating a child handle with a Simple Text In,\r
Simple Text In Ex and Simple Text Out protocol, and device path protocol.\r
And store Console Device Environment Variables.\r
\r
@param This Protocol instance pointer.\r
- @param ControllerHandle Handle of device to bind driver to\r
+ @param Controller Handle of device to bind driver to\r
@param RemainingDevicePath Optional parameter use to pick a specific child\r
device to start.\r
\r
- @retval EFI_SUCCESS This driver is added to ControllerHandle\r
- @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r
- @retval other This driver does not support this device\r
+ @retval EFI_SUCCESS This driver is added to Controller.\r
+ @retval EFI_ALREADY_STARTED This driver is already running on Controller.\r
+ @retval other This driver does not support this device.\r
\r
**/\r
EFI_STATUS\r
ASSERT (TerminalType <= VTUTF8TYPE);\r
\r
CopyMem (&DefaultNode->Guid, gTerminalType[TerminalType], sizeof (EFI_GUID));\r
- RemainingDevicePath = (EFI_DEVICE_PATH_PROTOCOL*)DefaultNode;\r
+ RemainingDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DefaultNode;\r
} else {\r
//\r
// Use the RemainingDevicePath to determine the terminal type\r
//\r
// Initialize the Terminal Dev\r
//\r
- TerminalDevice = AllocateCopyPool (sizeof (TERMINAL_DEV), &gTerminalDevTemplate);\r
+ TerminalDevice = AllocateCopyPool (sizeof (TERMINAL_DEV), &mTerminalDevTemplate);\r
if (TerminalDevice == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Error;\r
}\r
\r
/**\r
- Stop this driver on ControllerHandle by closing Simple Text In, Simple Text\r
+ Stop this driver on Controller by closing Simple Text In, Simple Text\r
In Ex, Simple Text Out protocol, and removing parent device path from\r
Console Device Environment Variables. \r
\r
@param This Protocol instance pointer.\r
- @param ControllerHandle Handle of device to stop driver on\r
+ @param Controller Handle of device to stop driver on\r
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
children is zero stop the entire bus driver.\r
@param ChildHandleBuffer List of Child Handles to Stop.\r
\r
- @retval EFI_SUCCESS This driver is removed ControllerHandle.\r
+ @retval EFI_SUCCESS This driver is removed Controller.\r
@retval other This driver could not be removed from this device.\r
\r
**/\r
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE\r
);\r
RemoveEntryList (ListHead->ForwardLink);\r
- gBS->FreePool (NotifyNode);\r
+ FreePool (NotifyNode);\r
}\r
\r
return EFI_SUCCESS;\r
@param VariableSize Returns the size of the EFI variable that was read\r
\r
@return Dynamically allocated memory that contains a copy of the EFI variable.\r
- @return Caller is repsoncible freeing the buffer.\r
- @retval NULL Variable was not read\r
+ Caller is repsoncible freeing the buffer. If variable was not read, \r
+ NULL regturned.\r
\r
**/\r
VOID *\r
Node.Header.SubType = MSG_VENDOR_DP;\r
\r
//\r
- // generate terminal device path node according to terminal type.\r
+ // Generate terminal device path node according to terminal type.\r
//\r
switch (TerminalType) {\r
\r
case PCANSITYPE:\r
- CopyMem (\r
- &Node.Guid,\r
- &gEfiPcAnsiGuid,\r
- sizeof (EFI_GUID)\r
- );\r
+ CopyGuid (&Node.Guid, &gEfiPcAnsiGuid);\r
break;\r
\r
case VT100TYPE:\r
- CopyMem (\r
- &Node.Guid,\r
- &gEfiVT100Guid,\r
- sizeof (EFI_GUID)\r
- );\r
+ CopyGuid (&Node.Guid, &gEfiVT100Guid);\r
break;\r
\r
case VT100PLUSTYPE:\r
- CopyMem (\r
- &Node.Guid,\r
- &gEfiVT100PlusGuid,\r
- sizeof (EFI_GUID)\r
- );\r
+ CopyGuid (&Node.Guid, &gEfiVT100PlusGuid);\r
break;\r
\r
case VTUTF8TYPE:\r
- CopyMem (\r
- &Node.Guid,\r
- &gEfiVTUTF8Guid,\r
- sizeof (EFI_GUID)\r
- );\r
+ CopyGuid (&Node.Guid, &gEfiVTUTF8Guid);\r
break;\r
\r
default:\r
return EFI_UNSUPPORTED;\r
- break;\r
}\r
\r
+ //\r
+ // Get VENDOR_DEVCIE_PATH size and put into Node.Header\r
+ //\r
SetDevicePathNodeLength (\r
&Node.Header,\r
sizeof (VENDOR_DEVICE_PATH)\r
);\r
+\r
//\r
- // append the terminal node onto parent device path\r
+ // Append the terminal node onto parent device path\r
// to generate a complete terminal device path.\r
//\r
*TerminalDevicePath = AppendDevicePathNode (\r
/**\r
The user Entry Point for module Terminal. The user code starts with this function.\r
\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
- @param[in] SystemTable A pointer to the EFI System Table.\r
+ @param ImageHandle The firmware allocated handle for the EFI image.\r
+ @param SystemTable A pointer to the EFI System Table.\r
\r
@retval EFI_SUCCESS The entry point is executed successfully.\r
@retval other Some error occurs when executing this entry point.\r