#include "BootMaint.h"\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Function creates a device path data structure that identically matches the\r
+ device path passed in.\r
\r
- @param DevPath EDES_TODO: Add parameter description\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param DevPath A pointer to a device path data structure.\r
+\r
+ @return The new copy of DevPath is created to identically match the input.\r
+ @retval NULL Otherwise, NULL is returned.\r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
);\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Update Com Ports attributes from DevicePath\r
\r
- @param DevicePath EDES_TODO: Add parameter description\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param DevicePath DevicePath that contains Com ports\r
+\r
+ @retval EFI_SUCCESS The update is successful.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Update the multi-instance device path of Terminal Device based on\r
+ the global TerminalMenu. If ChangeTernimal is TRUE, the terminal \r
+ device path in the Terminal Device in TerminalMenu is also updated.\r
\r
- @param DevicePath EDES_TODO: Add parameter description\r
- @param ChangeTerminal EDES_TODO: Add parameter description\r
+ @param DevicePath The multi-instance device path.\r
+ @param ChangeTerminal TRUE, then device path in the Terminal Device \r
+ in TerminalMenu is also updated; FALSE, no update.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @return EFI_SUCCESS The function completes successfully.\r
\r
**/\r
EFI_STATUS\r
ChangeTerminalDevicePath (\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
- BOOLEAN ChangeTerminal\r
+ IN BOOLEAN ChangeTerminal\r
)\r
{\r
EFI_DEVICE_PATH_PROTOCOL *Node;\r
}\r
\r
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Com);\r
- if (NULL == NewMenuEntry) {\r
- return EFI_NOT_FOUND;\r
- }\r
\r
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Update the device path that describing a terminal device\r
+ based on the new BaudRate, Data Bits, parity and Stop Bits\r
+ set.\r
\r
- @param DevicePath EDES_TODO: Add parameter description\r
+ @param DevicePath\r
\r
- @return EDES_TODO: Add description for return value\r
+ @return VOID\r
\r
**/\r
VOID\r
ChangeVariableDevicePath (\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
EFI_DEVICE_PATH_PROTOCOL *Node;\r
Retrieve ACPI UID of UART from device path\r
\r
\r
- @param Handle EDES_TODO: Add parameter description\r
- @param AcpiUid EDES_TODO: Add parameter description\r
+ @param Handle The handle for the UART device.\r
+ @param AcpiUid The ACPI UID on output.\r
\r
@retval TRUE Find valid UID from device path\r
@retval FALSE Can't find\r
@param Handles EFI_SERIAL_IO_PROTOCOL handle buffer\r
@param NoHandles EFI_SERIAL_IO_PROTOCOL handle count\r
\r
- EDES_TODO: Incomplete Descriptions None\r
+ @retval VOID\r
\r
**/\r
VOID\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Test whether DevicePath is a valid Terminal\r
\r
- @param DevicePath EDES_TODO: Add parameter description\r
- @param Termi EDES_TODO: Add parameter description\r
- @param Com EDES_TODO: Add parameter description\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param DevicePath DevicePath to be checked\r
+ @param Termi If DevicePath is valid Terminal, terminal type is returned.\r
+ @param Com If DevicePath is valid Terminal, Com Port type is returned.\r
+\r
+ @retval TRUE If DevicePath point to a Terminal.\r
+ @retval FALSE If DevicePath does not point to a Terminal.\r
\r
**/\r
BOOLEAN\r
Vendor.Header.SubType = MSG_VENDOR_DP;\r
\r
for (Index2 = 0; Index2 < 4; Index2++) {\r
- CopyMem (&Vendor.Guid, &Guid[Index2], sizeof (EFI_GUID));\r
+ CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));\r
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));\r
NewDevicePath = AppendDevicePathNode (\r
NewTerminalContext->DevicePath,\r
\r
@param DevicePath DevicePath that contains Com ports\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS The update is successful.\r
\r
**/\r
EFI_STATUS\r
\r
@param DevPath A pointer to a device path data structure.\r
\r
- EDES_TODO: Incomplete Descriptions The new copy of DevPath is created to identically match the input.\r
- EDES_TODO: Incomplete Descriptions Otherwise, NULL is returned.\r
+ @return The new copy of DevPath is created to identically match the input.\r
+ @retval NULL Otherwise, NULL is returned.\r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
//\r
NewDevPath = NULL;\r
if (Size != 0) {\r
- NewDevPath = EfiAllocateZeroPool (Size);\r
+ NewDevPath = AllocateZeroPool (Size);\r
ASSERT (NewDevPath != NULL);\r
}\r
\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Build up Console Menu based on types passed in. The type can\r
+ be BM_CONSOLE_IN_CONTEXT_SELECT, BM_CONSOLE_OUT_CONTEXT_SELECT\r
+ and BM_CONSOLE_ERR_CONTEXT_SELECT.\r
\r
- @param ConsoleMenuType EDES_TODO: Add parameter description\r
+ @param ConsoleMenuType Can be BM_CONSOLE_IN_CONTEXT_SELECT, BM_CONSOLE_OUT_CONTEXT_SELECT\r
+ and BM_CONSOLE_ERR_CONTEXT_SELECT.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_UNSUPPORTED The type passed in is not in the 3 types defined.\r
+ @retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev", \r
+ "ConInDev" or "ConErrDev" doesn't exists.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough resource to complete the operations.\r
+ @retval EFI_SUCCESS Function completes successfully.\r
\r
**/\r
EFI_STATUS\r
AllCount = EfiDevicePathInstanceCount (AllDevicePath);\r
ConsoleMenu->MenuNumber = 0;\r
//\r
- // Following is menu building up for Console Out Devices\r
+ // Following is menu building up for Console Devices selected.\r
//\r
MultiDevicePath = AllDevicePath;\r
Index2 = 0;\r
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ @param VOID\r
\r
- EDES_TODO: Incomplete Descriptions EFI_SUCCESS\r
- EDES_TODO: Incomplete Descriptions Others\r
+ @retval EFI_SUCCESS The function always complete successfully.\r
\r
**/\r
EFI_STATUS\r
\r
@param VOID EDES_TODO: Add parameter description\r
\r
- EDES_TODO: Incomplete Descriptions EFI_SUCCESS\r
- EDES_TODO: Incomplete Descriptions Others\r
-\r
+ @retval EFI_SUCCESS The function always complete successfully.\r
**/\r
EFI_STATUS\r
FreeAllConsoles (\r
\r
\r
@param DevicePath DevicePath to be checked\r
- @param Termi If is terminal, give its type\r
- @param Com If is Com Port, give its type\r
+ @param Termi If DevicePath is valid Terminal, terminal type is returned.\r
+ @param Com If DevicePath is valid Terminal, Com Port type is returned.\r
\r
- @retval TRUE If DevicePath point to a Terminal\r
- FALSE\r
+ @retval TRUE If DevicePath point to a Terminal.\r
+ @retval FALSE If DevicePath does not point to a Terminal.\r
\r
**/\r
BOOLEAN\r
//\r
CopyMem (&TempGuid, &Vendor->Guid, sizeof (EFI_GUID));\r
\r
- if (CompareGuid (&TempGuid, &Guid[0])) {\r
+ if (CompareGuid (&TempGuid, &TerminalTypeGuid[0])) {\r
*Termi = PC_ANSI;\r
IsTerminal = TRUE;\r
} else {\r
- if (CompareGuid (&TempGuid, &Guid[1])) {\r
+ if (CompareGuid (&TempGuid, &TerminalTypeGuid[1])) {\r
*Termi = VT_100;\r
IsTerminal = TRUE;\r
} else {\r
- if (CompareGuid (&TempGuid, &Guid[2])) {\r
+ if (CompareGuid (&TempGuid, &TerminalTypeGuid[2])) {\r
*Termi = VT_100_PLUS;\r
IsTerminal = TRUE;\r
} else {\r
- if (CompareGuid (&TempGuid, &Guid[3])) {\r
+ if (CompareGuid (&TempGuid, &TerminalTypeGuid[3])) {\r
*Termi = VT_UTF8;\r
IsTerminal = TRUE;\r
} else {\r
Get mode number according to column and row\r
\r
\r
- @param CallbackData BMM_CALLBACK_DATA\r
+ @param CallbackData The BMM context data.\r
\r
- EDES_TODO: Incomplete Descriptions None.\r
+ @return VOID\r
\r
**/\r
VOID\r