#include "Hotkey.h"\r
#include "HwErrRecSupport.h"\r
\r
-//\r
-// BDS arch protocol instance initial value.\r
-//\r
-// Note: Current BDS not directly get the BootMode, DefaultBoot,\r
-// TimeoutDefault, MemoryTestLevel value from the BDS arch protocol.\r
-// Please refer to the library useage of BdsLibGetBootMode, BdsLibGetTimeout \r
-// and PlatformBdsDiagnostics in BdsPlatform.c\r
-//\r
+///\r
+/// BDS arch protocol instance initial value.\r
+///\r
+/// Note: Current BDS not directly get the BootMode, DefaultBoot,\r
+/// TimeoutDefault, MemoryTestLevel value from the BDS arch protocol.\r
+/// Please refer to the library useage of BdsLibGetBootMode, BdsLibGetTimeout \r
+/// and PlatformBdsDiagnostics in BdsPlatform.c\r
+///\r
EFI_BDS_ARCH_PROTOCOL_INSTANCE gBdsInstanceTemplate = {\r
EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE,\r
NULL,\r
\r
\r
@param AStr Pointer to input Ascii string.\r
- @param Size The number of characters to translate.\r
+ @param Size The number of characters to translate.\r
@param UStr Pointer to output Unicode string buffer.\r
\r
- @return None\r
-\r
**/\r
VOID\r
AsciiToUnicodeSize (\r
UStr[Idx] = 0;\r
}\r
\r
-/**\r
-\r
- change a Unicode string t ASCII string\r
-\r
-\r
- @param UStr Unicode string\r
- Lenght - most possible length of AStr\r
- @param Length The length of UStr.\r
- @param AStr ASCII string to pass out\r
-\r
- @return Actual length\r
-\r
-**/\r
-UINTN\r
-UnicodeToAscii (\r
- IN CHAR16 *UStr,\r
- IN UINTN Length,\r
- OUT CHAR8 *AStr\r
- )\r
-{\r
- UINTN Index;\r
-\r
- //\r
- // just buffer copy, not character copy\r
- //\r
- for (Index = 0; Index < Length; Index++) {\r
- *AStr++ = (CHAR8) *UStr++;\r
- }\r
-\r
- return Index;\r
-}\r
-\r
/**\r
Build Legacy Device Name String according.\r
\r
@param BufSize The buffer size.\r
@param BootString The output string.\r
\r
- @return VOID No output.\r
-\r
**/\r
VOID\r
BdsBuildLegacyDevNameString (\r
- IN BBS_TABLE *CurBBSEntry,\r
- IN UINTN Index,\r
- IN UINTN BufSize,\r
- OUT CHAR16 *BootString\r
+ IN BBS_TABLE *CurBBSEntry,\r
+ IN UINTN Index,\r
+ IN UINTN BufSize,\r
+ OUT CHAR16 *BootString\r
)\r
{\r
CHAR16 *Fmt;\r
BOOLEAN IndexNotFound;\r
BBS_BBS_DEVICE_PATH *NewBbsDevPathNode;\r
\r
- if (NULL == (*BootOrderList)) {\r
+ if ((*BootOrderList) == NULL) {\r
CurrentBootOptionNo = 0;\r
} else {\r
for (ArrayIndex = 0; ArrayIndex < (UINTN) (*BootOrderListSize / sizeof (UINT16)); ArrayIndex++) {\r
//\r
// Create new BBS device path node with description string\r
//\r
- UnicodeToAscii (BootDesc, StrSize (BootDesc), HelpString);\r
+ UnicodeStrToAsciiStr ((CONST CHAR16*)&BootDesc, (CHAR8*)&HelpString);\r
+\r
StringLen = AsciiStrLen (HelpString);\r
NewBbsDevPathNode = AllocateZeroPool (sizeof (BBS_BBS_DEVICE_PATH) + StringLen);\r
if (NewBbsDevPathNode == NULL) {\r
/**\r
Delete all the invalid legacy boot options.\r
\r
- \r
-\r
@retval EFI_SUCCESS All invalide legacy boot options are deleted.\r
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.\r
@retval EFI_NOT_FOUND Fail to retrive variable of boot order.\r
SafeFreePool (BootOrder);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
-\r
+ \r
+ //\r
+ // Skip Non-Legacy boot options\r
+ // \r
if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) {\r
SafeFreePool (BootOptionVar);\r
Index++;\r
);\r
}\r
\r
+ //\r
+ // Adjust the number of boot options.\r
+ //\r
if (BootOrderSize != 0) {\r
Status = gRT->SetVariable (\r
L"BootOrder",\r
return Found;\r
}\r
\r
+ //\r
+ // Loop all boot option from variable\r
+ //\r
for (BootOrderIndex = 0; BootOrderIndex < BootOptionNum; BootOrderIndex++) {\r
Index = (UINTN) BootOrder[BootOrderIndex];\r
UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", Index);\r
continue;\r
}\r
\r
+ //\r
+ // Skip Non-legacy boot option\r
+ //\r
if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, BbsIndex)) {\r
SafeFreePool (BootOptionVar);\r
continue;\r
\r
DevPath = NULL;\r
\r
+ //\r
+ // Create device path node.\r
+ //\r
BbsDevPathNode.Header.Type = BBS_DEVICE_PATH;\r
BbsDevPathNode.Header.SubType = BBS_BBS_DP;\r
SetDevicePathNodeLength (&BbsDevPathNode.Header, sizeof (BBS_BBS_DEVICE_PATH));\r
\r
Add the legacy boot options from BBS table if they do not exist.\r
\r
- \r
-\r
@retval EFI_SUCCESS The boot options are added successfully \r
or they are already in boot options.\r
\r
Ptr = NULL;\r
Status = EFI_SUCCESS;\r
\r
+ //\r
+ // Count all boot devices\r
+ //\r
for (Index = 0; Index < BbsCount; Index++) {\r
if (BbsTable[Index].BootPriority == BBS_IGNORE_ENTRY) {\r
continue;\r
TotalSize += (HeaderSize + sizeof (UINT16) * NETCount);\r
TotalSize += (HeaderSize + sizeof (UINT16) * BEVCount);\r
\r
+ //\r
+ // Create buffer to hold all boot device order\r
+ //\r
DevOrder = AllocateZeroPool (TotalSize);\r
if (NULL == DevOrder) {\r
return EFI_OUT_OF_RESOURCES;\r
Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_BEV_DEVICE, BbsCount, (UINT16 *) Ptr);\r
}\r
\r
+ //\r
+ // Save device order for legacy boot device to variable.\r
+ //\r
Status = gRT->SetVariable (\r
VAR_LEGACY_DEV_ORDER,\r
&EfiLegacyDevOrderGuid,\r
@param Entry The boot option is to be checked for refresh BBS table.\r
\r
@retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.\r
-\r
+ @return status of BdsSetBootPriority4SameTypeDev()\r
**/\r
EFI_STATUS\r
BdsRefreshBbsTableForBoot (\r
\r
Add the legacy boot options from BBS table if they do not exist.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The boot options are added successfully or they are already in boot options.\r
@retval others An error occurred when creating legacy boot options.\r
\r
);\r
\r
/**\r
-\r
Set the boot priority for BBS entries based on boot option entry and boot order.\r
\r
@param Entry The boot option is to be checked for refresh BBS table.\r
\r
@retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.\r
-\r
+ @return status of BdsSetBootPriority4SameTypeDev()\r
**/\r
EFI_STATUS\r
BdsRefreshBbsTableForBoot (\r
\r
Function opens and returns a file handle to the root directory of a volume.\r
\r
-\r
- @param DeviceHandle - A handle for a device\r
+ @param DeviceHandle A handle for a device\r
\r
@return A valid file handle or NULL is returned\r
\r
EFI interfaces.\r
\r
\r
- @param Status - Current status\r
- @param Buffer - Current allocated buffer, or NULL\r
- @param BufferSize - Current buffer size needed\r
+ @param Status Current status\r
+ @param Buffer Current allocated buffer, or NULL\r
+ @param BufferSize Current buffer size needed\r
\r
@retval TRUE if the buffer was reallocated and the caller\r
should try the API again.\r
/**\r
Function deletes the variable specified by VarName and VarGuid.\r
\r
-\r
@param VarName A Null-terminated Unicode string that is\r
- the name of the vendor's variable.\r
+ the name of the vendor's variable.\r
\r
@param VarGuid A unique identifier for the vendor.\r
\r
};\r
\r
\r
-EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;\r
-EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID;\r
-EFI_GUID mFileExplorerGuid = FILE_EXPLORE_FORMSET_GUID;\r
+EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;\r
+EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID;\r
+EFI_GUID mFileExplorerGuid = FILE_EXPLORE_FORMSET_GUID;\r
\r
-CHAR16 mBootMaintStorageName[] = L"BmData";\r
-CHAR16 mFileExplorerStorageName[] = L"FeData";\r
+CHAR16 mBootMaintStorageName[] = L"BmData";\r
+CHAR16 mFileExplorerStorageName[] = L"FeData";\r
\r
/**\r
Init all memu.\r
or more named elements from the target driver.\r
\r
\r
- @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
- @param Request - A null-terminated Unicode string in <ConfigRequest> format.\r
- @param Progress - On return, points to a character in the Request string.\r
+ @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+ @param Request A null-terminated Unicode string in <ConfigRequest> format.\r
+ @param Progress On return, points to a character in the Request string.\r
Points to the string's null terminator if request was successful.\r
Points to the most recent '&' before the first failing name/value\r
pair (or the beginning of the string if the failure is in the\r
first name/value pair) if the request was not successful.\r
- @param Results - A null-terminated Unicode string in <ConfigAltResp> format which\r
+ @param Results A null-terminated Unicode string in <ConfigAltResp> format which\r
has all values filled in for the names in the Request string.\r
String to be allocated by the called function.\r
\r
/**\r
Function handling request to apply changes for BMM pages.\r
\r
-\r
- @param Private - Pointer to callback data buffer.\r
- @param CurrentFakeNVMap - Pointer to buffer holding data of various values used by BMM\r
- @param FormId - ID of the form which has sent the request to apply change.\r
+ @param Private Pointer to callback data buffer.\r
+ @param CurrentFakeNVMap Pointer to buffer holding data of various values used by BMM\r
+ @param FormId ID of the form which has sent the request to apply change.\r
\r
@retval EFI_SUCCESS Change successfully applied.\r
@retval Other Error occurs while trying to apply changes.\r
Discard all changes done to the BMM pages such as Boot Order change,\r
Driver order change.\r
\r
- @param Private The BMM context data.\r
- @param CurrentFakeNVMap The current Fack NV Map.\r
-\r
- \r
+ @param Private The BMM context data.\r
+ @param CurrentFakeNVMap The current Fack NV Map.\r
\r
**/\r
VOID\r
\r
#define STRING_DEPOSITORY_NUMBER 8\r
\r
-//\r
-// #pragma pack(1)\r
-//\r
-// Serial Ports attributes, first one is the value for\r
-// return from callback function, stringtoken is used to\r
-// display the value properly\r
-//\r
+///\r
+/// Serial Ports attributes, first one is the value for\r
+/// return from callback function, stringtoken is used to\r
+/// display the value properly\r
+///\r
typedef struct {\r
UINTN Value;\r
UINT16 StringToken;\r
All valid handles in the system except those consume SimpleFs, LoadFile\r
are stored in DriverMenu for future use.\r
\r
- \r
-\r
@retval EFI_SUCCESS The function complets successfully.\r
@return Other value if failed to build the DriverMenu.\r
\r
\r
Get the Option Number that has not been allocated for use.\r
\r
- \r
-\r
@return The available Option Number.\r
\r
**/\r
\r
Get the Option Number that is not in use.\r
\r
- \r
-\r
@return The unused Option Number.\r
\r
**/\r
IN EFI_FILE_HANDLE FHand\r
);\r
\r
-/**\r
-\r
- change a Unicode string t ASCII string\r
-\r
-\r
- @param UStr Unicode string\r
- Lenght - most possible length of AStr\r
- @param Length The length of UStr.\r
- @param AStr ASCII string to pass out\r
-\r
- @return Actual length\r
-\r
-**/\r
-UINTN\r
-UnicodeToAscii (\r
- IN CHAR16 *UStr,\r
- IN UINTN Length,\r
- OUT CHAR8 *AStr\r
- );\r
-\r
/**\r
This function converts an input device structure to a Unicode string.\r
\r
/**\r
Intialize all the string depositories.\r
\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
InitializeStringDepository (\r
\r
/**\r
Reclaim string depositories by moving the current node pointer to list head..\r
-\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
ReclaimStringDepository (\r
/**\r
Release resource for all the string depositories.\r
\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
CleanUpStringDepository (\r
@param Private The BMM context data.\r
@param CurrentFakeNVMap The current Fack NV Map.\r
\r
- \r
-\r
**/\r
VOID\r
DiscardChangeHandler (\r
@param Private The BMM context data.\r
@param NewPageId The original page ID.\r
\r
- \r
-\r
**/\r
VOID\r
UpdatePageId (\r
/**\r
Function returns the value of the specified variable.\r
\r
-\r
@param Name A Null-terminated Unicode string that is\r
the name of the vendor's variable.\r
@param VendorGuid A unique identifier for the vendor.\r
\r
@param MenuType The Menu type to be created.\r
\r
-\r
@retval NULL If failed to create the menu.\r
@return The menu.\r
\r
BM_MENU_ENTRY *MenuEntry;\r
UINTN ContextSize;\r
\r
+ //\r
+ // Get context size according to menu type\r
+ //\r
switch (MenuType) {\r
case BM_LOAD_CONTEXT_SELECT:\r
ContextSize = sizeof (BM_LOAD_CONTEXT);\r
default:\r
ContextSize = 0;\r
break;\r
-\r
}\r
\r
- if (0 == ContextSize) {\r
+ if (ContextSize == 0) {\r
return NULL;\r
}\r
\r
+ //\r
+ // Create new menu entry\r
+ //\r
MenuEntry = AllocateZeroPool (sizeof (BM_MENU_ENTRY));\r
if (NULL == MenuEntry) {\r
return MenuEntry;\r
MenuEntry->VariableContext = AllocateZeroPool (ContextSize);\r
if (NULL == MenuEntry->VariableContext) {\r
SafeFreePool (MenuEntry);\r
- MenuEntry = NULL;\r
- return MenuEntry;\r
+ return NULL;\r
}\r
\r
MenuEntry->Signature = BM_MENU_ENTRY_SIGNATURE;\r
\r
@param MenuEntry A pointer to BM_MENU_ENTRY.\r
\r
- @retval VOID\r
-\r
**/\r
VOID\r
BOpt_DestroyMenuEntry (\r
Free resources allocated in Allocate Rountine.\r
\r
@param FreeMenu Menu to be freed\r
-\r
- \r
-\r
**/\r
VOID\r
BOpt_FreeMenu (\r
/**\r
Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
\r
- \r
-\r
@retval EFI_SUCCESS The function complete successfully.\r
@retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.\r
\r
/**\r
Free out resouce allocated from Legacy Boot Options.\r
\r
- \r
-\r
- .\r
-\r
**/\r
VOID\r
BOpt_FreeLegacyOptions (\r
All valid handles in the system except those consume SimpleFs, LoadFile\r
are stored in DriverMenu for future use.\r
\r
- \r
-\r
@retval EFI_SUCCESS The function complets successfully.\r
@return Other value if failed to build the DriverMenu.\r
\r
\r
Get the Option Number that has not been allocated for use.\r
\r
- \r
-\r
@return The available Option Number.\r
\r
**/\r
\r
Get the Option Number that is not in use.\r
\r
- \r
-\r
@return The unused Option Number.\r
\r
**/\r
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- @param DevicePath\r
-\r
- \r
+ @param DevicePath terminal device's path\r
\r
**/\r
VOID\r
\r
Node = NextDevicePathNode (Node);\r
}\r
-\r
- return ;\r
}\r
\r
/**\r
Retrieve ACPI UID of UART from device path\r
\r
-\r
@param Handle The handle for the UART device.\r
@param AcpiUid The ACPI UID on output.\r
\r
/**\r
Sort Uart handles array with Acpi->UID from low to high.\r
\r
-\r
@param Handles EFI_SERIAL_IO_PROTOCOL handle buffer\r
@param NoHandles EFI_SERIAL_IO_PROTOCOL handle count\r
-\r
- @retval VOID\r
-\r
**/\r
VOID\r
SortedUartHandle (\r
@param DevicePath DevicePath that contains Com ports\r
\r
@retval EFI_SUCCESS The update is successful.\r
-\r
+ @retval EFI_NOT_FOUND Can not find specific menu entry\r
**/\r
EFI_STATUS\r
UpdateComAttributeFromVariable (\r
/**\r
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The function always complete successfully.\r
\r
**/\r
/**\r
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
-\r
- EDES_TODO: Add parameter description\r
-\r
@retval EFI_SUCCESS The function always complete successfully.\r
**/\r
EFI_STATUS\r
/**\r
Get mode number according to column and row\r
\r
-\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
GetConsoleOutMode (\r
STRING_DEPOSITORY *DriverOptionHelpStrDepository;\r
STRING_DEPOSITORY *TerminalStrDepository;\r
\r
-//\r
-// Terminal type string token storage\r
-//\r
+///\r
+/// Terminal type string token storage\r
+///\r
UINT16 TerminalType[] = {\r
STRING_TOKEN(STR_COM_TYPE_0),\r
STRING_TOKEN(STR_COM_TYPE_1),\r
STRING_TOKEN(STR_COM_TYPE_3),\r
};\r
\r
-//\r
-// File system selection menu\r
-//\r
+///\r
+/// File system selection menu\r
+///\r
BM_MENU_OPTION FsOptionMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Console Input Device Selection Menu\r
-//\r
+///\r
+/// Console Input Device Selection Menu\r
+///\r
BM_MENU_OPTION ConsoleInpMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Console Output Device Selection Menu\r
-//\r
+///\r
+/// Console Output Device Selection Menu\r
+///\r
BM_MENU_OPTION ConsoleOutMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Error Output Device Selection Menu\r
-//\r
+///\r
+/// Error Output Device Selection Menu\r
+///\r
BM_MENU_OPTION ConsoleErrMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Boot Option from variable Menu\r
-//\r
+///\r
+/// Boot Option from variable Menu\r
+///\r
BM_MENU_OPTION BootOptionMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Driver Option from variable menu\r
-//\r
+///\r
+/// Driver Option from variable menu\r
+///\r
BM_MENU_OPTION DriverOptionMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Legacy FD Info from LegacyBios.GetBbsInfo()\r
-//\r
+///\r
+/// Legacy FD Info from LegacyBios.GetBbsInfo()\r
+///\r
BM_MENU_OPTION LegacyFDMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Legacy HD Info from LegacyBios.GetBbsInfo()\r
-//\r
+///\r
+/// Legacy HD Info from LegacyBios.GetBbsInfo()\r
+///\r
BM_MENU_OPTION LegacyHDMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Legacy CD Info from LegacyBios.GetBbsInfo()\r
-//\r
+///\r
+/// Legacy CD Info from LegacyBios.GetBbsInfo()\r
+///\r
BM_MENU_OPTION LegacyCDMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Legacy NET Info from LegacyBios.GetBbsInfo()\r
-//\r
+///\r
+/// Legacy NET Info from LegacyBios.GetBbsInfo()\r
+///\r
BM_MENU_OPTION LegacyNETMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Legacy NET Info from LegacyBios.GetBbsInfo()\r
-//\r
+///\r
+/// Legacy NET Info from LegacyBios.GetBbsInfo()\r
+///\r
BM_MENU_OPTION LegacyBEVMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Files and sub-directories in current directory menu\r
-//\r
+///\r
+/// Files and sub-directories in current directory menu\r
+///\r
BM_MENU_OPTION DirectoryMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Handles in current system selection menu\r
-//\r
+///\r
+/// Handles in current system selection menu\r
+///\r
BM_MENU_OPTION DriverMenu = {\r
BM_MENU_OPTION_SIGNATURE,\r
NULL,\r
0\r
};\r
\r
-//\r
-// Value and string token correspondency for BaudRate\r
-//\r
+///\r
+/// Value and string token correspondency for BaudRate\r
+///\r
COM_ATTR BaudRateList[19] = {\r
{\r
115200,\r
}\r
};\r
\r
-//\r
-// Value and string token correspondency for DataBits\r
-//\r
+///\r
+/// Value and string token correspondency for DataBits\r
+///\r
COM_ATTR DataBitsList[4] = {\r
{\r
5,\r
}\r
};\r
\r
-//\r
-// Value and string token correspondency for Parity\r
-//\r
+///\r
+/// Value and string token correspondency for Parity\r
+///\r
COM_ATTR ParityList[5] = {\r
{\r
NoParity,\r
}\r
};\r
\r
-//\r
-// Value and string token correspondency for Baudreate\r
-//\r
+///\r
+/// Value and string token correspondency for Baudreate\r
+///\r
COM_ATTR StopBitsList[3] = {\r
{\r
OneStopBit,\r
}\r
};\r
\r
-//\r
-// Guid for messaging path, used in Serial port setting.\r
-//\r
+///\r
+/// Guid for messaging path, used in Serial port setting.\r
+///\r
EFI_GUID TerminalTypeGuid[4] = {\r
DEVICE_PATH_MESSAGING_PC_ANSI,\r
DEVICE_PATH_MESSAGING_VT_100,\r
/**\r
Update the File Explore page.\r
\r
-\r
@param CallbackData The BMM context data.\r
@param MenuOption Pointer to menu options to display.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateFileExplorePage (\r
#define VARSTORE_ID_BOOT_MAINT 0x1000\r
#define VARSTORE_ID_FILE_EXPLORER 0x1001\r
\r
-//\r
-// This is the structure that will be used to store the\r
-// question's current value. Use it at initialize time to\r
-// set default value for each question. When using at run\r
-// time, this map is returned by the callback function,\r
-// so dynamically changing the question's value will be\r
-// possible through this mechanism\r
-//\r
+///\r
+/// This is the structure that will be used to store the\r
+/// question's current value. Use it at initialize time to\r
+/// set default value for each question. When using at run\r
+/// time, this map is returned by the callback function,\r
+/// so dynamically changing the question's value will be\r
+/// possible through this mechanism\r
+///\r
typedef struct {\r
//\r
// Three questions displayed at the main page\r
#define KEY_VALUE_SAVE_AND_EXIT_DRIVER 0x1002\r
#define KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER 0x1003\r
\r
-//\r
-// This is the data structure used by File Explorer formset\r
-//\r
+///\r
+/// This is the data structure used by File Explorer formset\r
+///\r
typedef struct {\r
UINT16 DescriptionData[75];\r
UINT16 OptionalData[127];\r
/**\r
Refresh the global UpdateData structure.\r
\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
RefreshUpdateData (\r
/**\r
Add a "Go back to main page" tag in front of the form when there are no\r
"Apply changes" and "Discard changes" tags in the end of the form.\r
- \r
-\r
+ \r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdatePageStart (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdatePageEnd (\r
opcode deletion.\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
CleanUpPage (\r
by TerminaMenu. This list will be inserted to form FORM_CON_COM_SETUP_ID.\r
\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdateConCOMPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateBootDelPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateDrvAddHandlePage (\r
Create a lit of driver option from global DriverOptionMenu. It\r
allow user to delete the driver option.\r
\r
-\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateDrvDelPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateDriverAddHandleDescPage (\r
@param ConsoleMenu The console menu list.\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateConsolePage (\r
@param OptionMenu The new list.\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateOrderPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateBootNextPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateTimeOutPage (\r
/**\r
Refresh the text mode page\r
\r
-\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateConModePage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateTerminalPage (\r
@param UpdatePageId The form ID.\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdatePageBody (\r
@param OptionIndex Returns the index number (#### in Boot####).\r
@param OptionSize Return the size of the Boot### variable.\r
\r
- \r
-\r
**/\r
VOID *\r
GetLegacyBootOptionVar (\r
@param UpdatePageId The form ID. It also spefies the legacy device type.\r
@param CallbackData The BMM context data.\r
\r
- \r
\r
**/\r
VOID\r
@param Private The BMM context data.\r
@param NewPageId The original page ID.\r
\r
- \r
-\r
**/\r
VOID\r
UpdatePageId (\r
After deleting this Driver option, call Var_ChangeDriverOrder to\r
make sure DriverOrder is in valid state.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS Load Option is successfully updated.\r
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
Variable.\r
rebuild DriverOrder from scratch by content from DriverOptionMenu is\r
needed.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The driver order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
Set the "DriverOrder" EFI Variable.\r
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
Var_UpdateAllConsoleOption (\r
This function delete and build multi-instance device path ConIn\r
console device.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
for detail return information.\r
This function delete and build multi-instance device path ConOut\r
console device.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
for detail return information.\r
This function delete and build multi-instance device path ErrOut\r
console device.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
for detail return information.\r
StrSize (LegacyDeviceContext->Description)\r
);\r
\r
- UnicodeToAscii (DescString, StrSize (DescString), DescAsciiString);\r
+ UnicodeStrToAsciiStr((CONST CHAR16*)&DescString, (CHAR8 *)&DescAsciiString);\r
\r
NewOptionSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (DescString) +\r
sizeof (BBS_BBS_DEVICE_PATH);\r
Registers HII packages for the Boot Manger to HII Database.\r
It also registers the browser call back function.\r
\r
-\r
- @return EDES_TODO: Add description for return value\r
+ @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r
\r
**/\r
EFI_STATUS\r
Registers HII packages for the Boot Manger to HII Database.\r
It also registers the browser call back function.\r
\r
-\r
- @return EDES_TODO: Add description for return value\r
-\r
+ @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r
**/\r
EFI_STATUS\r
InitializeBootManager (\r
@param CpuIo A instance of EFI_CPU_IO_PROTOCOL. \r
@param Base The base address flash region to be locked.\r
\r
- @return VOID No return.\r
-\r
**/\r
VOID\r
BdsLockFv (\r
need to do this if an earlier update went awry and we need to\r
clear the capsule variable so on the next reset PEI does not see it and\r
think there is a capsule available.\r
+ @retval EFI_SUCCESS There is no error when processing capsule\r
\r
**/\r
EFI_STATUS\r
\r
This function registers HII packages to HII database.\r
\r
-\r
@retval EFI_SUCCESS This function complete successfully.\r
@return Other value if failed to register HII packages.\r
\r
This function create the dynamic content for device manager. It includes\r
section header for all class of devices, one-of opcode to set VBIOS.\r
\r
-\r
-\r
@retval EFI_SUCCESS Operation is successful.\r
@retval Other values if failed to clean up the dynamic content from HII\r
database.\r
typedef struct {\r
UINTN Signature;\r
\r
- //\r
- // HII relative handles\r
- //\r
+ ///\r
+ /// HII relative handles\r
+ ///\r
EFI_HII_HANDLE HiiHandle;\r
EFI_HANDLE DriverHandle;\r
\r
- //\r
- // Produced protocols\r
- //\r
+ ///\r
+ /// Produced protocols\r
+ ///\r
EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
\r
- //\r
- // Configuration data\r
- //\r
+ ///\r
+ /// Configuration data\r
+ ///\r
UINT8 VideoBios;\r
} DEVICE_MANAGER_CALLBACK_DATA;\r
\r
} DEVICE_MANAGER_MENU_ITEM;\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ This function is invoked if user selected a iteractive opcode from Device Manager's\r
+ Formset. The decision by user is saved to gCallbackKey for later processing. If\r
+ user set VBIOS, the new value is saved to EFI variable.\r
\r
- @param This EDES_TODO: Add parameter description\r
- @param Action EDES_TODO: Add parameter description\r
- @param QuestionId EDES_TODO: Add parameter description\r
- @param Type EDES_TODO: Add parameter description\r
- @param Value EDES_TODO: Add parameter description\r
- @param ActionRequest EDES_TODO: Add parameter description\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+ @param Action Specifies the type of action taken by the browser.\r
+ @param QuestionId A unique value which is sent to the original exporting driver\r
+ so that it can identify the type of data to expect.\r
+ @param Type The type of value for the question.\r
+ @param Value A pointer to the data being sent to the original exporting driver.\r
+ @param ActionRequest On return, points to the action requested by the callback function.\r
+\r
+ @retval EFI_SUCCESS The callback successfully handled the action.\r
+ @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
\r
**/\r
EFI_STATUS\r
;\r
\r
/**\r
- EDES_TODO: Add function description.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ This function registers HII packages to HII database.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS This function complete successfully.\r
+ @return Other value if failed to register HII packages.\r
\r
**/\r
EFI_STATUS\r
;\r
\r
/**\r
- EDES_TODO: Add function description.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ Call the browser and display the device manager to allow user\r
+ to configure the platform.\r
\r
- @return EDES_TODO: Add description for return value\r
+ This function create the dynamic content for device manager. It includes\r
+ section header for all class of devices, one-of opcode to set VBIOS.\r
+ \r
+ @retval EFI_SUCCESS Operation is successful.\r
+ @retval Other values if failed to clean up the dynamic content from HII\r
+ database.\r
\r
**/\r
EFI_STATUS\r
/**\r
Call the browser and display the front page\r
\r
-\r
- @param VOID No input.\r
-\r
@return Status code that will be returned by\r
EFI_FORM_BROWSER2_PROTOCOL.SendForm ().\r
\r
@param MemorySize - The size of the memory to process\r
@param String - The string that is created\r
\r
- @return VOID.\r
-\r
**/\r
VOID\r
ConvertMemorySizeToString (\r
@param ConnectAllHappened - The indicater to check if the connect all have\r
already happended.\r
\r
- @return VOID.\r
-\r
**/\r
VOID\r
PlatformBdsEnterFrontPage (\r
\r
Delete Key#### for the given Key Option number.\r
\r
-\r
@param KeyOptionNumber Key option number for Key####\r
\r
@retval EFI_SUCCESS Unregister hotkey successfully.\r
\r
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.\r
\r
-\r
- @param VOID\r
-\r
@retval EFI_SUCCESS Hotkey services successfully initialized.\r
-\r
+ @retval EFI_NOT_FOUND Can not find the "KeyOrder" variable\r
**/\r
EFI_STATUS\r
InitializeHotkeyService (\r
non-zero value - Indicates that the platform implements Hardware Error\r
Record Persistence.\r
\r
- @return VOID\r
-\r
**/\r
VOID\r
InitializeHwErrRecSupport (\r
non-zero value - Indicates that the platform implements Hardware Error\r
Record Persistence.\r
\r
- @return VOID\r
-\r
**/\r
VOID\r
InitializeHwErrRecSupport (\r
};\r
\r
typedef struct {\r
- //\r
- // This 4-bytes total array length is required by HiiLibPreparePackageList()\r
- //\r
+ ///\r
+ /// This 4-bytes total array length is required by HiiLibPreparePackageList()\r
+ ///\r
UINT32 Length;\r
\r
//\r
Determine the current language that will be used\r
based on language related EFI Variables.\r
\r
-\r
@param LangCodesSettingRequired - If required to set LangCode variable\r
\r
**/\r
Determine the current language that will be used\r
based on language related EFI Variables.\r
\r
-\r
@param LangCodesSettingRequired If required to set LangCode variable\r
\r
**/\r
/**\r
Initialize HII global accessor for string support\r
\r
-\r
- @param VOID\r
-\r
@retval EFI_SUCCESS String support initialize success.\r
\r
**/\r
/**\r
Initialize HII global accessor for string support\r
\r
-\r
- @param VOID\r
-\r
@retval EFI_SUCCESS String support initialize success.\r
\r
**/\r
/**\r
Call the browser and display the front page\r
\r
-\r
- @param VOID No input.\r
-\r
@return Status code that will be returned by\r
EFI_FORM_BROWSER2_PROTOCOL.SendForm ().\r
\r