/** @file\r
- Boot Maintainence Main File\r
+ The functions for Boot Maintainence Main menu.\r
\r
Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
/**\r
Create string tokens for a menu from its help strings and display strings\r
\r
+ @param CallbackData The BMM context data.\r
+ @param HiiHandle Hii Handle of the package to be updated.\r
+ @param MenuOption The Menu whose string tokens need to be created\r
\r
- @param CallbackData The BMM context data.\r
- @param HiiHandle Hii Handle of the package to be updated.\r
- @param MenuOption The Menu whose string tokens need to be created\r
-\r
- @retval EFI_SUCCESS string tokens created successfully\r
+ @retval EFI_SUCCESS String tokens created successfully\r
@retval others contain some errors\r
-\r
**/\r
EFI_STATUS\r
CreateMenuStringToken (\r
BMM_CALLBACK_DATA *Private;\r
\r
if (Request == NULL) {\r
- return EFI_NOT_FOUND;\r
+ return EFI_INVALID_PARAMETER;\r
}\r
\r
Private = BMM_CALLBACK_DATA_FROM_THIS (This);\r
This function processes the results of changes in configuration.\r
\r
\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_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r
- @retval EFI_DEVICE_ERROR The variable could not be saved.\r
- @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.\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_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r
+ @retval EFI_DEVICE_ERROR The variable could not be saved.\r
+ @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.\r
+ @retval EFI_INVALID_PARAMETER The parameter of Value or ActionRequest is invalid.\r
**/\r
EFI_STATUS\r
EFIAPI\r
BootMaintCallback (\r
- IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
- IN EFI_BROWSER_ACTION Action,\r
- IN EFI_QUESTION_ID QuestionId,\r
- IN UINT8 Type,\r
- IN EFI_IFR_TYPE_VALUE *Value,\r
- OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
+ IN EFI_BROWSER_ACTION Action,\r
+ IN EFI_QUESTION_ID QuestionId,\r
+ IN UINT8 Type,\r
+ IN EFI_IFR_TYPE_VALUE *Value,\r
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
)\r
{\r
BMM_CALLBACK_DATA *Private;\r
/**\r
Fetch a usable string node from the string depository and return the string token.\r
\r
- @param CallbackData The BMM context data.\r
- @param StringDepository The string repository.\r
+ @param CallbackData The BMM context data.\r
+ @param StringDepository The string repository.\r
\r
@retval EFI_STRING_ID String token.\r
\r
/**\r
Start boot maintenance manager\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS If BMM is invoked successfully.\r
@return Other value if BMM return unsuccessfully.\r
\r
Deletete the Boot Option from EFI Variable. The Boot Order Arrray\r
is also updated.\r
\r
- @param OptionNumber EDES_TODO: Add parameter description\r
+ @param OptionNumber The number of Boot option want to be deleted.\r
@param BootOrder The Boot Order array.\r
@param BootOrderSize The size of the Boot Order Array.\r
\r
\r
UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", OptionNumber);\r
Status = EfiLibDeleteVariable (BootOption, &gEfiGlobalVariableGuid);\r
+ \r
//\r
// adjust boot order array\r
//\r
\r
#define VAR_CON_OUT_MODE L"ConOutMode"\r
\r
-//\r
-// Guid of a NV Variable which store the information about the\r
-// FD/HD/CD/NET/BEV order\r
-//\r
+///\r
+/// Guid of a NV Variable which store the information about the\r
+/// FD/HD/CD/NET/BEV order\r
+///\r
#define EFI_LEGACY_DEV_ORDER_VARIABLE_GUID \\r
{ \\r
0xa56074db, 0x65fe, 0x45f7, {0xbd, 0x21, 0x2d, 0x2b, 0xdd, 0x8e, 0x96, 0x52} \\r
#pragma pack(1)\r
typedef struct {\r
BBS_TYPE BbsType;\r
- //\r
- // Length = sizeof (UINT16) + SIZEOF (Data)\r
- //\r
+ ///\r
+ /// Length = sizeof (UINT16) + SIZEOF (Data)\r
+ ///\r
UINT16 Length;\r
UINT16 *Data;\r
} BM_LEGACY_DEV_ORDER_CONTEXT;\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
\r
@param FreeMenu Menu to be freed\r
\r
- \r
-\r
**/\r
VOID\r
BOpt_FreeMenu (\r
Caller is responsible to free the returned string.\r
\r
**/\r
-CHAR16 *\r
+CHAR16*\r
BOpt_AppendFileName (\r
IN CHAR16 *Str1,\r
IN CHAR16 *Str2\r
/**\r
Build a list containing all serial devices.\r
\r
-\r
@retval EFI_SUCCESS The function complete successfully.\r
@retval EFI_UNSUPPORTED No serial ports present.\r
\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
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
/**\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
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- @param DevicePath\r
-\r
- \r
+ @param DevicePath The devicepath protocol instance wanted to be updated.\r
\r
**/\r
VOID\r
IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
IN BOOLEAN ChangeTerminal\r
);\r
+\r
//\r
// Variable operation by menu selection\r
//\r
the "BootOrder" list. It also append this Boot Opotion to the end\r
of BootOptionMenu.\r
\r
- @param CallbackData The BMM context data.\r
- @param NvRamMap The file explorer formset internal state.\r
+ @param CallbackData The BMM context data.\r
+ @param NvRamMap The file explorer formset internal state.\r
\r
- @retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
- @retval EFI_SUCCESS If function completes successfully.\r
+ @retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
+ @retval EFI_SUCCESS If function completes successfully.\r
\r
**/\r
EFI_STATUS\r
After deleting this boot option, call Var_ChangeBootOrder to\r
make sure BootOrder is in valid state.\r
\r
-\r
- EDES_TODO: Add parameter description\r
-\r
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to \r
BM_LOAD_CONTEXT marked for deletion is deleted\r
@return Others If failed to update the "BootOrder" variable after deletion. \r
not reflected by BootOrder. Then a function rebuild BootOrder from\r
scratch by content from BootOptionMenu is needed.\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS The boot order is updated successfully.\r
- @return EFI_STATUS other than EFI_SUCCESS if failed to\r
- Set the "BootOrder" EFI Variable.\r
+ @return other than EFI_SUCCESS if failed to change the "BootOrder" EFI Variable.\r
\r
**/\r
EFI_STATUS\r
@param HiiHandle The HII handle associated with the BMM formset.\r
@param DescriptionData The description of this driver option.\r
@param OptionalData The optional load option.\r
- @param ForceReconnect EDES_TODO: Add parameter description\r
+ @param ForceReconnect If to force reconnect.\r
\r
@retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
@retval EFI_SUCCESS If function completes successfully.\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
+ @return other than EFI_SUCCESS if failed to set the "DriverOrder" EFI Variable.\r
\r
**/\r
EFI_STATUS\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
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
**/\r
EFI_STATUS\r
Var_UpdateConsoleInpOption (\r
);\r
\r
/**\r
- This function delete and build multi-instance device path ConOut\r
- console device.\r
-\r
-\r
- \r
+ This function delete and build multi-instance device path ConOut console device.\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
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
**/\r
EFI_STATUS\r
Var_UpdateConsoleOutOption (\r
);\r
\r
/**\r
- This function delete and build multi-instance device path ErrOut\r
- console device.\r
-\r
-\r
- \r
+ This function delete and build multi-instance device path ErrOut console device.\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
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
**/\r
EFI_STATUS\r
Var_UpdateErrorOutOption (\r
);\r
\r
/**\r
- Update the device path of "ConOut", "ConIn" and "ErrOut" \r
- based on the new BaudRate, Data Bits, parity and Stop Bits\r
- set.\r
-\r
- \r
-\r
- \r
+ Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits, \r
+ parity and stop Bits set.\r
\r
**/\r
VOID\r
);\r
\r
/**\r
- This function update the "BootNext" EFI Variable. If there is \r
- no "BootNex" specified in BMM, this EFI Variable is deleted.\r
- It also update the BMM context data specified the "BootNext"\r
- vaule.\r
+ This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, \r
+ this EFI Variable is deleted.\r
+ It also update the BMM context data specified the "BootNext" value.\r
\r
@param CallbackData The BMM context data.\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
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- This function update the "BootOrder" EFI Variable based on\r
- BMM Formset's NV map. It then refresh BootOptionMenu\r
- with the new "BootOrder" list.\r
+ This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh \r
+ BootOptionMenu with the new "BootOrder" list.\r
\r
- @param CallbackData The BMM context data.\r
+ @param CallbackData The BMM context data.\r
\r
- @retval EFI_SUCCESS The function complete successfully.\r
- @retval EFI_SUCCESS Not enough memory to complete the function.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.\r
+ @return not The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
\r
**/\r
EFI_STATUS\r
\r
@param CallbackData The BMM context data.\r
\r
- @retval EFI_SUCCESS The function complete successfully.\r
- @retval EFI_SUCCESS Not enough memory to complete the function.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.\r
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
\r
**/\r
EFI_STATUS\r
@param CallbackData The context data for BMM.\r
\r
@return EFI_SUCCESS The function completed successfully.\r
- @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can be found.\r
+ @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can not be found.\r
\r
**/\r
EFI_STATUS\r
/**\r
Refresh the global UpdateData structure.\r
\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
RefreshUpdateData (\r
opcode deletion.\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
CleanUpPage (\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
UpdateBootDelPage (\r
Create a lit of driver option from global DriverMenu.\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
\r
/**\r
- Prepare the page to allow user to add description for \r
- a Driver Option.\r
+ Prepare the page to allow user to add description for a Driver Option.\r
\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdateDriverAddHandleDescPage (\r
);\r
\r
/**\r
- Dispatch the correct update page function to call based on\r
- the UpdatePageId.\r
+ Dispatch the correct update page function to call based on the UpdatePageId.\r
\r
@param UpdatePageId The form ID.\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdatePageBody (\r
);\r
\r
/**\r
- Create the dynamic page to allow user to set\r
- the "BootNext" vaule.\r
+ Create the dynamic page to allow user to set the "BootNext" vaule.\r
\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdateBootNextPage (\r
);\r
\r
/**\r
- Create the dynamic page to allow user to set\r
- the "TimeOut" vaule.\r
+ Create the dynamic page to allow user to set the "TimeOut" vaule.\r
\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdateTimeOutPage (\r
);\r
\r
/**\r
- Create the dynamic page which allows user to \r
- set the property such as Baud Rate, Data Bits,\r
+ Create the dynamic page which allows user to set the property such as Baud Rate, Data Bits,\r
Parity, Stop Bits, Terminal Type.\r
\r
@param CallbackData The BMM context data.\r
-\r
- \r
-\r
**/\r
VOID\r
UpdateTerminalPage (\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
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 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
UpdateSetLegacyDeviceOrderPage (\r
\r
\r
/**\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
-\r
+ @param DeviceHandle A handle for a device\r
@return A valid file handle or NULL is returned\r
-\r
**/\r
EFI_FILE_HANDLE\r
EfiLibOpenRoot (\r
);\r
\r
/**\r
-\r
Function gets the file system information from an open file descriptor,\r
and stores it in a buffer allocated from pool.\r
\r
-\r
@param FHand The file handle.\r
\r
@return A pointer to a buffer with file information.\r
- @retval NULL is returned if failed to get Vaolume Label Info.\r
-\r
+ NULL is returned if failed to get Vaolume Label Info.\r
**/\r
EFI_FILE_SYSTEM_VOLUME_LABEL *\r
EfiLibFileSystemVolumeLabelInfo (\r
@return A pointer to a buffer with file information or NULL is returned\r
\r
**/\r
-EFI_FILE_INFO *\r
+EFI_FILE_INFO *\r
EfiLibFileInfo (\r
IN EFI_FILE_HANDLE FHand\r
);\r
@return A new allocated Unicode string that represents the device path.\r
\r
**/\r
-CHAR16 *\r
+CHAR16 *\r
DevicePathToStr (\r
EFI_DEVICE_PATH_PROTOCOL *DevPath\r
);\r
\r
/**\r
-\r
- Find the first instance of this Protocol\r
- in the system and return it's interface.\r
-\r
+ Find the first instance of this Protocol in the system and return it's interface.\r
\r
@param ProtocolGuid Provides the protocol to search for\r
@param Interface On return, a pointer to the first interface\r
/**\r
Adjusts the size of a previously allocated buffer.\r
\r
+ @param OldPool A pointer to the buffer whose size is being adjusted.\r
+ @param OldSize The size of the current buffer.\r
+ @param NewSize The size of the new buffer.\r
\r
- @param OldPool - A pointer to the buffer whose size is being adjusted.\r
- @param OldSize - The size of the current buffer.\r
- @param NewSize - The size of the new buffer.\r
-\r
- @return The newly allocated buffer.\r
- @retval NULL Allocation failed.\r
+ @return The newly allocated buffer. if NULL, allocation failed.\r
\r
**/\r
-VOID *\r
+VOID*\r
EfiReallocatePool (\r
IN VOID *OldPool,\r
IN UINTN OldSize,\r
\r
@param Name String part of EFI variable name\r
@param VendorGuid GUID part of EFI variable name\r
- @param VarSize Returns the size of the EFI variable that was read\r
+ @param VarSize 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 responsible freeing the buffer.\r
@retval NULL Variable was not read\r
\r
**/\r
-VOID *\r
+VOID *\r
BdsLibGetVariableAndSize (\r
IN CHAR16 *Name,\r
IN EFI_GUID *VendorGuid,\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
+ @param VarName A Null-terminated Unicode string that is\r
+ the name of the vendor's variable.\r
\r
- @param VarGuid - A unique identifier for the vendor.\r
+ @param VarGuid A unique identifier for the vendor.\r
\r
@retval EFI_SUCCESS The variable was found and removed\r
@retval EFI_UNSUPPORTED The variable store was inaccessible\r
@retval NULL If failed to get the String from Data Hub.\r
\r
**/\r
-UINT16 *\r
+UINT16 *\r
EfiLibStrFromDatahub (\r
IN EFI_DEVICE_PATH_PROTOCOL *DevPath\r
);\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
+VOID *\r
GetLegacyBootOptionVar (\r
IN UINTN DeviceType,\r
OUT UINTN *OptionIndex,\r
/**\r
Start boot maintenance manager\r
\r
-\r
- \r
-\r
@retval EFI_SUCCESS If BMM is invoked successfully.\r
@return Other value if BMM return unsuccessfully.\r
\r
Fetch a usable string node from the string depository and return the string token.\r
\r
\r
- @param CallbackData EDES_TODO: Add parameter description\r
- @param StringDepository - Pointer of the string depository.\r
+ @param CallbackData The BMM context data.\r
+ @param StringDepository Pointer of the string depository.\r
\r
- @retval EFI_STRING_ID String token.\r
+ @retval EFI_STRING_ID String token.\r
\r
**/\r
EFI_STRING_ID\r
/**\r
Function handling request to apply changes for BMM pages.\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
\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
+ @retval EFI_SUCCESS Change successfully applied.\r
+ @retval Other Error occurs while trying to apply changes.\r
\r
**/\r
EFI_STATUS\r