Update the function headers to Doxygen format.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5410 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-07-04 08:04:10 +00:00
parent 9359e53fcb
commit b30312ba29
28 changed files with 2652 additions and 1416 deletions

View File

@@ -23,32 +23,27 @@ EFI_DEVICE_PATH_PROTOCOL EndDevicePath[] = {
0
};
/**
Translate the first n characters of an Ascii string to
Unicode characters. The count n is indicated by parameter
Size. If Size is greater than the length of string, then
the entire string is translated.
@param a Pointer to input Ascii string.
@param Size The number of characters to translate.
@param u Pointer to output Unicode string buffer.
@return None
**/
VOID
AsciiToUnicodeSize (
IN UINT8 *a,
IN UINTN Size,
OUT UINT16 *u
)
/*++
Routine Description:
Translate the first n characters of an Ascii string to
Unicode characters. The count n is indicated by parameter
Size. If Size is greater than the length of string, then
the entire string is translated.
Arguments:
a - Pointer to input Ascii string.
Size - The number of characters to translate.
u - Pointer to output Unicode string buffer.
Returns:
None
--*/
{
UINTN i;
@@ -64,28 +59,25 @@ AsciiToUnicodeSize (
u[i] = 0;
}
/**
change a Unicode string t ASCII string
@param UStr Unicode string
Lenght - most possible length of AStr
@param Length The length of UStr.
@param AStr ASCII string to pass out
@return Actual length
**/
UINTN
UnicodeToAscii (
IN CHAR16 *UStr,
IN UINTN Length,
OUT CHAR8 *AStr
)
/*++
Routine Description:
change a Unicode string t ASCII string
Arguments:
UStr - Unicode string
Lenght - most possible length of AStr
AStr - ASCII string to pass out
Returns:
Actuall length
--*/
{
UINTN Index;
@@ -99,6 +91,17 @@ Returns:
return Index;
}
/**
EDES_TODO: Add function description
@param CurBBSEntry EDES_TODO: Add parameter description
@param Index EDES_TODO: Add parameter description
@param BufSize EDES_TODO: Add parameter description
@param BootString EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
BdsBuildLegacyDevNameString (
IN BBS_TABLE *CurBBSEntry,
@@ -205,6 +208,27 @@ BdsBuildLegacyDevNameString (
}
}
/**
Create a legacy boot option for the specified entry of
BBS table, save it as variable, and append it to the boot
order list.
@param CurrentBbsEntry Pointer to current BBS table.
@param CurrentBbsDevPath Pointer to the Device Path Protocol instance of BBS
@param Index Index of the specified entry in BBS table.
@param BootOrderList On input, the original boot order list.
On output, the new boot order list attached with the
created node.
@param BootOrderListSize On input, the original size of boot order list.
- On output, the size of new boot order list.
@retval EFI_SUCCESS Boot Option successfully created.
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.
@retval Other Error occurs while setting variable.
**/
EFI_STATUS
BdsCreateLegacyBootOption (
IN BBS_TABLE *CurrentBbsEntry,
@@ -213,32 +237,6 @@ BdsCreateLegacyBootOption (
IN OUT UINT16 **BootOrderList,
IN OUT UINTN *BootOrderListSize
)
/*++
Routine Description:
Create a legacy boot option for the specified entry of
BBS table, save it as variable, and append it to the boot
order list.
Arguments:
CurrentBbsEntry - Pointer to current BBS table.
CurrentBbsDevPath - Pointer to the Device Path Protocol instance of BBS
Index - Index of the specified entry in BBS table.
BootOrderList - On input, the original boot order list.
On output, the new boot order list attached with the
created node.
BootOrderListSize - On input, the original size of boot order list.
- On output, the size of new boot order list.
Returns:
EFI_SUCCESS - Boot Option successfully created.
EFI_OUT_OF_RESOURCES - Fail to allocate necessary memory.
Other - Error occurs while setting variable.
--*/
{
EFI_STATUS Status;
UINT16 CurrentBootOptionNo;
@@ -394,6 +392,16 @@ BdsCreateLegacyBootOption (
return Status;
}
/**
EDES_TODO: Add function description
@param BootOptionVar EDES_TODO: Add parameter description
@param BbsEntry EDES_TODO: Add parameter description
@param BbsIndex EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
BOOLEAN
BdsIsLegacyBootOption (
IN UINT8 *BootOptionVar,
@@ -426,6 +434,16 @@ BdsIsLegacyBootOption (
return Ret;
}
/**
EDES_TODO: Add function description
@param OptionNumber EDES_TODO: Add parameter description
@param BootOrder EDES_TODO: Add parameter description
@param BootOrderSize EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsDeleteBootOption (
IN UINTN OptionNumber,
@@ -467,29 +485,24 @@ BdsDeleteBootOption (
}
/**
Delete all the invalid legacy boot options.
@param VOID EDES_TODO: Add parameter description
@retval EFI_SUCCESS All invalide legacy boot options are deleted.
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.
@retval EFI_NOT_FOUND Fail to retrive variable of boot order.
@retval Other Error occurs while setting variable or locating
protocol.
**/
EFI_STATUS
BdsDeleteAllInvalidLegacyBootOptions (
VOID
)
/*++
Routine Description:
Delete all the invalid legacy boot options.
Arguments:
None.
Returns:
EFI_SUCCESS - All invalide legacy boot options are deleted.
EFI_OUT_OF_RESOURCES - Fail to allocate necessary memory.
EFI_NOT_FOUND - Fail to retrive variable of boot order.
Other - Error occurs while setting variable or locating
protocol.
--*/
{
UINT16 *BootOrder;
UINT8 *BootOptionVar;
@@ -610,6 +623,19 @@ BdsDeleteAllInvalidLegacyBootOptions (
return Status;
}
/**
EDES_TODO: Add function description
@param BootOrder EDES_TODO: Add parameter description
@param BootOptionNum EDES_TODO: Add parameter description
@param DevType EDES_TODO: Add parameter description
@param Attribute EDES_TODO: Add parameter description
@param BbsIndex EDES_TODO: Add parameter description
@param OptionNumber EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
BOOLEAN
BdsFindLegacyBootOptionByDevType (
IN UINT16 *BootOrder,
@@ -667,6 +693,17 @@ BdsFindLegacyBootOptionByDevType (
return Found;
}
/**
EDES_TODO: Add function description
@param BbsItem EDES_TODO: Add parameter description
@param Index EDES_TODO: Add parameter description
@param BootOrderList EDES_TODO: Add parameter description
@param BootOrderListSize EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsCreateOneLegacyBootOption (
IN BBS_TABLE *BbsItem,
@@ -709,26 +746,21 @@ BdsCreateOneLegacyBootOption (
return Status;
}
/**
Add the legacy boot options from BBS table if they do not exist.
@param VOID EDES_TODO: Add parameter description
@retval EFI_SUCCESS The boot options are added successfully or they are already in boot options.
@retval others An error occurred when creating legacy boot options.
**/
EFI_STATUS
BdsAddNonExistingLegacyBootOptions (
VOID
)
/*++
Routine Description:
Add the legacy boot options from BBS table if they do not exist.
Arguments:
None.
Returns:
EFI_SUCCESS - The boot options are added successfully or they are already in boot options.
others - An error occurred when creating legacy boot options.
--*/
{
UINT16 *BootOrder;
UINTN BootOrderSize;
@@ -825,6 +857,17 @@ Returns:
return Status;
}
/**
EDES_TODO: Add function description
@param BbsTable EDES_TODO: Add parameter description
@param BbsType EDES_TODO: Add parameter description
@param BbsCount EDES_TODO: Add parameter description
@param Buf EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
UINT16 *
BdsFillDevOrderBuf (
IN BBS_TABLE *BbsTable,
@@ -851,6 +894,15 @@ BdsFillDevOrderBuf (
return Buf;
}
/**
EDES_TODO: Add function description
@param BbsTable EDES_TODO: Add parameter description
@param BbsCount EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsCreateDevOrder (
IN BBS_TABLE *BbsTable,
@@ -976,21 +1028,18 @@ BdsCreateDevOrder (
return Status;
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsUpdateLegacyDevOrder (
VOID
)
/*++
Format of LegacyDevOrder variable:
|-----------------------------------------------------------------------------------------------------------------
| BBS_FLOPPY | Length | Index0 | Index1 | ... | BBS_HARDDISK | Length | Index0 | Index1 | ... | BBS_CDROM | Length | Index0 | ...
|-----------------------------------------------------------------------------------------------------------------
Length is a 16 bit integer, it indicates how many Indexes follows, including the size of itself.
Index# is a 16 bit integer, the low byte of it stands for the index in BBS table
the high byte of it only have two value 0 and 0xFF, 0xFF means this device has been
disabled by user.
--*/
{
UINT8 *DevOrder;
UINT8 *NewDevOrder;
@@ -1418,18 +1467,22 @@ Index# is a 16 bit integer, the low byte of it stands for the index in BBS table
return Status;
}
/**
EDES_TODO: Add function description
@param DeviceType EDES_TODO: Add parameter description
@param LocalBbsTable EDES_TODO: Add parameter description
@param Priority EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsSetBootPriority4SameTypeDev (
IN UINT16 DeviceType,
IN OUT BBS_TABLE *LocalBbsTable,
IN OUT UINT16 *Priority
)
/*++
DeviceType - BBS_FLOPPY, BBS_HARDDISK, BBS_CDROM and so on
LocalBbsTable - BBS table instance
Priority - As input arg, it is the start point of boot priority, as output arg, it is the start point of boot
priority can be used next time.
--*/
{
UINT8 *DevOrder;
@@ -1484,6 +1537,14 @@ Priority - As input arg, it is the start point of boot priority,
return EFI_SUCCESS;
}
/**
EDES_TODO: Add function description
@param LocalBbsTable EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
PrintBbsTable (
IN BBS_TABLE *LocalBbsTable
@@ -1524,6 +1585,14 @@ PrintBbsTable (
DEBUG ((DEBUG_ERROR, "\n"));
}
/**
EDES_TODO: Add function description
@param Entry EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsRefreshBbsTableForBoot (
IN BDS_COMMON_OPTION *Entry

View File

@@ -19,6 +19,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Bugbug: Candidate for a PCD entries
//
/**
EDES_TODO: Add function description
@param CurBBSEntry EDES_TODO: Add parameter description
@param Index EDES_TODO: Add parameter description
@param BufSize EDES_TODO: Add parameter description
@param BootString EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
#define MAX_BBS_ENTRIES 0x100
VOID
@@ -29,38 +40,57 @@ BdsBuildLegacyDevNameString (
OUT CHAR16 *BootString
);
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsDeleteAllInvalidLegacyBootOptions (
VOID
);
/**
Add the legacy boot options from BBS table if they do not exist.
@param VOID EDES_TODO: Add parameter description
@retval EFI_SUCCESS The boot options are added successfully or they are already in boot options.
@retval others An error occurred when creating legacy boot options.
**/
EFI_STATUS
BdsAddNonExistingLegacyBootOptions (
VOID
)
/*++
Routine Description:
Add the legacy boot options from BBS table if they do not exist.
Arguments:
None.
Returns:
EFI_SUCCESS - The boot options are added successfully or they are already in boot options.
others - An error occurred when creating legacy boot options.
--*/
;
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsUpdateLegacyDevOrder (
VOID
);
/**
EDES_TODO: Add function description
@param Entry EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsRefreshBbsTableForBoot (
IN BDS_COMMON_OPTION *Entry

View File

@@ -14,24 +14,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
VOID *
EfiAllocateZeroPool (
IN UINTN Size
)
/*++
Routine Description:
/**
Wrap original AllocatePool gBS call
and ZeroMem gBS call into a single
function in order to decrease code length
Arguments:
Returns:
Valid pointer to the allocated buffer
Null for failure
@param Size The size to allocate
--*/
@return Valid pointer to the allocated buffer
@retval Null for failure
**/
VOID *
EfiAllocateZeroPool (
IN UINTN Size
)
{
EFI_STATUS Status;
VOID *Ptr;
@@ -45,31 +43,25 @@ Returns:
return Ptr;
}
/**
Find the first instance of this Protocol
in the system and return it's interface
@param ProtocolGuid - Provides the protocol to search for
@param Interface - On return, a pointer to the first interface
that matches ProtocolGuid
@retval EFI_SUCCESS A protocol instance matching ProtocolGuid was found
@retval EFI_NOT_FOUND No protocol instances were found that match ProtocolGuid
**/
EFI_STATUS
EfiLibLocateProtocol (
IN EFI_GUID *ProtocolGuid,
OUT VOID **Interface
)
/*++
Routine Description:
Find the first instance of this Protocol
in the system and return it's interface
Arguments:
ProtocolGuid - Provides the protocol to search for
Interface - On return, a pointer to the first interface
that matches ProtocolGuid
Returns:
EFI_SUCCESS - A protocol instance matching ProtocolGuid was found
EFI_NOT_FOUND - No protocol instances were found that match ProtocolGuid
--*/
{
EFI_STATUS Status;
@@ -81,25 +73,20 @@ Returns:
return Status;
}
/**
Function opens and returns a file handle to the root directory of a volume.
@param DeviceHandle - A handle for a device
@return A valid file handle or NULL is returned
**/
EFI_FILE_HANDLE
EfiLibOpenRoot (
IN EFI_HANDLE DeviceHandle
)
/*++
Routine Description:
Function opens and returns a file handle to the root directory of a volume.
Arguments:
DeviceHandle - A handle for a device
Returns:
A valid file handle or NULL is returned
--*/
{
EFI_STATUS Status;
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
@@ -131,34 +118,27 @@ Returns:
return EFI_ERROR (Status) ? NULL : File;
}
/**
Helper function called as part of the code needed
to allocate the proper sized buffer for various
EFI interfaces.
@param Status - Current status
@param Buffer - Current allocated buffer, or NULL
@param BufferSize - Current buffer size needed
@retval TRUE if the buffer was reallocated and the caller
should try the API again.
**/
BOOLEAN
EfiGrowBuffer (
IN OUT EFI_STATUS *Status,
IN OUT VOID **Buffer,
IN UINTN BufferSize
)
/*++
Routine Description:
Helper function called as part of the code needed
to allocate the proper sized buffer for various
EFI interfaces.
Arguments:
Status - Current status
Buffer - Current allocated buffer, or NULL
BufferSize - Current buffer size needed
Returns:
TRUE - if the buffer was reallocated and the caller
should try the API again.
--*/
{
BOOLEAN TryAgain;
@@ -195,60 +175,48 @@ Returns:
return TryAgain;
}
/**
Function returns the value of the specified variable.
@param Name - A Null-terminated Unicode string that is
the name of the vendor's variable.
@param VendorGuid - A unique identifier for the vendor.
@return The payload of the variable.
**/
VOID *
EfiLibGetVariable (
IN CHAR16 *Name,
IN EFI_GUID *VendorGuid
)
/*++
Routine Description:
Function returns the value of the specified variable.
Arguments:
Name - A Null-terminated Unicode string that is
the name of the vendor's variable.
VendorGuid - A unique identifier for the vendor.
Returns:
None
--*/
{
UINTN VarSize;
return BdsLibGetVariableAndSize (Name, VendorGuid, &VarSize);
}
/**
Function deletes the variable specified by VarName and VarGuid.
@param VarName - A Null-terminated Unicode string that is
the name of the vendor's variable.
@param VendorGuid - A unique identifier for the vendor.
@retval EFI_SUCCESS The variable was found and removed
@retval EFI_UNSUPPORTED The variable store was inaccessible
@retval EFI_OUT_OF_RESOURCES The temporary buffer was not available
@retval EFI_NOT_FOUND The variable was not found
**/
EFI_STATUS
EfiLibDeleteVariable (
IN CHAR16 *VarName,
IN EFI_GUID *VarGuid
)
/*++
Routine Description:
Function deletes the variable specified by VarName and VarGuid.
Arguments:
VarName - A Null-terminated Unicode string that is
the name of the vendor's variable.
VendorGuid - A unique identifier for the vendor.
Returns:
EFI_SUCCESS - The variable was found and removed
EFI_UNSUPPORTED - The variable store was inaccessible
EFI_OUT_OF_RESOURCES - The temporary buffer was not available
EFI_NOT_FOUND - The variable was not found
--*/
{
VOID *VarBuf;
EFI_STATUS Status;
@@ -268,26 +236,21 @@ Returns:
return Status;
}
EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *
EfiLibFileSystemVolumeLabelInfo (
IN EFI_FILE_HANDLE FHand
)
/*++
Routine Description:
/**
Function gets the file system information from an open file descriptor,
and stores it in a buffer allocated from pool.
Arguments:
Fhand - A file handle
@param FHand The file handle.
Returns:
@return A pointer to a buffer with file information or NULL is returned
A pointer to a buffer with file information or NULL is returned
--*/
**/
EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *
EfiLibFileSystemVolumeLabelInfo (
IN EFI_FILE_HANDLE FHand
)
{
EFI_STATUS Status;
EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *Buffer;
@@ -313,6 +276,15 @@ Returns:
return Buffer;
}
/**
Duplicate a string.
@param Src The source.
@return A new string which is duplicated copy of the source.
@retval NULL If there is not enought memory.
**/
CHAR16 *
EfiStrDuplicate (
IN CHAR16 *Src
@@ -331,26 +303,20 @@ EfiStrDuplicate (
return Dest;
}
EFI_FILE_INFO *
EfiLibFileInfo (
IN EFI_FILE_HANDLE FHand
)
/*++
Routine Description:
/**
Function gets the file information from an open file descriptor, and stores it
in a buffer allocated from pool.
Arguments:
@param FHand File Handle.
Fhand - A file handle
@return A pointer to a buffer with file information or NULL is returned
Returns:
A pointer to a buffer with file information or NULL is returned
--*/
**/
EFI_FILE_INFO *
EfiLibFileInfo (
IN EFI_FILE_HANDLE FHand
)
{
EFI_STATUS Status;
EFI_FILE_INFO *Buffer;
@@ -377,25 +343,21 @@ Returns:
return Buffer;
}
/**
Function is used to determine the number of device path instances
that exist in a device path.
@param DevicePath - A pointer to a device path data structure.
@return This function counts and returns the number of device path instances
in DevicePath.
**/
UINTN
EfiDevicePathInstanceCount (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
/*++
Routine Description:
Function is used to determine the number of device path instances
that exist in a device path.
Arguments:
DevicePath - A pointer to a device path data structure.
Returns:
This function counts and returns the number of device path instances
in DevicePath.
--*/
{
UINTN Count;
UINTN Size;
@@ -408,31 +370,25 @@ Returns:
return Count;
}
/**
Adjusts the size of a previously allocated buffer.
@param OldPool - A pointer to the buffer whose size is being adjusted.
@param OldSize - The size of the current buffer.
@param NewSize - The size of the new buffer.
@retval EFI_SUCEESS The requested number of bytes were allocated.
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
@retval EFI_INVALID_PARAMETER The buffer was invalid.
**/
VOID *
EfiReallocatePool (
IN VOID *OldPool,
IN UINTN OldSize,
IN UINTN NewSize
)
/*++
Routine Description:
Adjusts the size of a previously allocated buffer.
Arguments:
OldPool - A pointer to the buffer whose size is being adjusted.
OldSize - The size of the current buffer.
NewSize - The size of the new buffer.
Returns:
EFI_SUCEESS - The requested number of bytes were allocated.
EFI_OUT_OF_RESOURCES - The pool requested could not be allocated.
EFI_INVALID_PARAMETER - The buffer was invalid.
--*/
{
VOID *NewPool;
@@ -452,26 +408,22 @@ Returns:
return NewPool;
}
/**
Compare two EFI_TIME data.
@param FirstTime - A pointer to the first EFI_TIME data.
@param SecondTime - A pointer to the second EFI_TIME data.
@retval TRUE The FirstTime is not later than the SecondTime.
@retval FALSE The FirstTime is later than the SecondTime.
**/
BOOLEAN
TimeCompare (
IN EFI_TIME *FirstTime,
IN EFI_TIME *SecondTime
)
/*++
Routine Description:
Compare two EFI_TIME data.
Arguments:
FirstTime - A pointer to the first EFI_TIME data.
SecondTime - A pointer to the second EFI_TIME data.
Returns:
TRUE The FirstTime is not later than the SecondTime.
FALSE The FirstTime is later than the SecondTime.
--*/
{
if (FirstTime->Year != SecondTime->Year) {
return (BOOLEAN) (FirstTime->Year < SecondTime->Year);
@@ -490,6 +442,16 @@ Returns:
return (BOOLEAN) (FirstTime->Nanosecond <= SecondTime->Nanosecond);
}
/**
Get a string from the Data Hub record based on
a device path.
@param DevPath The device Path.
@return A string located from the Data Hub records based on
the device path.
**/
UINT16 *
EfiLibStrFromDatahub (
IN EFI_DEVICE_PATH_PROTOCOL *DevPath

View File

@@ -24,36 +24,50 @@ EFI_GUID mFileExplorerGuid = FILE_EXPLORE_FORMSET_GUID;
CHAR16 mBootMaintStorageName[] = L"BmData";
CHAR16 mFileExplorerStorageName[] = L"FeData";
/**
Init all memu.
@param CallbackData The
@return EDES_TODO: Add description for return value
**/
VOID
InitAllMenu (
IN BMM_CALLBACK_DATA *CallbackData
);
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
FreeAllMenu (
VOID
);
/**
Create string tokens for a menu from its help strings and display strings
@param CallbackData EDES_TODO: Add parameter description
@param HiiHandle - Hii Handle of the package to be updated.
@param MenuOption - The Menu whose string tokens need to be created
@retval EFI_SUCCESS string tokens created successfully
@retval others contain some errors
**/
EFI_STATUS
CreateMenuStringToken (
IN BMM_CALLBACK_DATA *CallbackData,
IN EFI_HII_HANDLE HiiHandle,
IN BM_MENU_OPTION *MenuOption
)
/*++
Routine Description:
Create string tokens for a menu from its help strings and display strings
Arguments:
HiiHandle - Hii Handle of the package to be updated.
MenuOption - The Menu whose string tokens need to be created
Returns:
EFI_SUCCESS - string tokens created successfully
others - contain some errors
--*/
{
BM_MENU_ENTRY *NewMenuEntry;
UINTN Index;
@@ -81,6 +95,28 @@ Returns:
return EFI_SUCCESS;
}
/**
This function allows a caller to extract the current configuration for one
or more named elements from the target driver.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Request - A null-terminated Unicode string in <ConfigRequest> format.
@param Progress - On return, points to a character in the Request string.
Points to the string's null terminator if request was successful.
Points to the most recent '&' before the first failing name/value
pair (or the beginning of the string if the failure is in the
first name/value pair) if the request was not successful.
@param Results - A null-terminated Unicode string in <ConfigAltResp> format which
has all values filled in for the names in the Request string.
String to be allocated by the called function.
@retval EFI_SUCCESS The Results is filled with the requested values.
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
@retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
**/
EFI_STATUS
EFIAPI
BootMaintExtractConfig (
@@ -89,31 +125,6 @@ BootMaintExtractConfig (
OUT EFI_STRING *Progress,
OUT EFI_STRING *Results
)
/*++
Routine Description:
This function allows a caller to extract the current configuration for one
or more named elements from the target driver.
Arguments:
This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
Request - A null-terminated Unicode string in <ConfigRequest> format.
Progress - On return, points to a character in the Request string.
Points to the string's null terminator if request was successful.
Points to the most recent '&' before the first failing name/value
pair (or the beginning of the string if the failure is in the
first name/value pair) if the request was not successful.
Results - A null-terminated Unicode string in <ConfigAltResp> format which
has all values filled in for the names in the Request string.
String to be allocated by the called function.
Returns:
EFI_SUCCESS - The Results is filled with the requested values.
EFI_OUT_OF_RESOURCES - Not enough memory to store the results.
EFI_INVALID_PARAMETER - Request is NULL, illegal syntax, or unknown name.
EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
--*/
{
EFI_STATUS Status;
UINTN BufferSize;
@@ -136,6 +147,24 @@ BootMaintExtractConfig (
return Status;
}
/**
This function processes the results of changes in configuration.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Action - Specifies the type of action taken by the browser.
@param QuestionId - A unique value which is sent to the original exporting driver
so that it can identify the type of data to expect.
@param Type - The type of value for the question.
@param Value - A pointer to the data being sent to the original exporting driver.
@param ActionRequest - On return, points to the action requested by the callback function.
@retval EFI_SUCCESS The callback successfully handled the action.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
@retval EFI_DEVICE_ERROR The variable could not be saved.
@retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
**/
EFI_STATUS
EFIAPI
BootMaintCallback (
@@ -146,27 +175,6 @@ BootMaintCallback (
IN EFI_IFR_TYPE_VALUE *Value,
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
/*++
Routine Description:
This function processes the results of changes in configuration.
Arguments:
This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
Action - Specifies the type of action taken by the browser.
QuestionId - A unique value which is sent to the original exporting driver
so that it can identify the type of data to expect.
Type - The type of value for the question.
Value - A pointer to the data being sent to the original exporting driver.
ActionRequest - On return, points to the action requested by the callback function.
Returns:
EFI_SUCCESS - The callback successfully handled the action.
EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the variable and its data.
EFI_DEVICE_ERROR - The variable could not be saved.
EFI_UNSUPPORTED - The specified Action is not supported by the callback.
--*/
{
BMM_CALLBACK_DATA *Private;
BM_MENU_ENTRY *NewMenuEntry;
@@ -527,27 +535,24 @@ BootMaintCallback (
return Status;
}
/**
Function handling request to apply changes for BMM pages.
@param Private - Pointer to callback data buffer.
@param CurrentFakeNVMap - Pointer to buffer holding data of various values used by BMM
@param FormId - ID of the form which has sent the request to apply change.
@retval EFI_SUCCESS Change successfully applied.
@retval Other Error occurs while trying to apply changes.
**/
EFI_STATUS
ApplyChangeHandler (
IN BMM_CALLBACK_DATA *Private,
IN BMM_FAKE_NV_DATA *CurrentFakeNVMap,
IN EFI_FORM_ID FormId
)
/*++
Routine Description:
Function handling request to apply changes for BMM pages.
Arguments:
Private - Pointer to callback data buffer.
CurrentFakeNVMap - Pointer to buffer holding data of various values used by BMM
FormId - ID of the form which has sent the request to apply change.
Returns:
EFI_SUCCESS - Change successfully applied.
Other - Error occurs while trying to apply changes.
--*/
{
BM_CONSOLE_CONTEXT *NewConsoleContext;
BM_TERMINAL_CONTEXT *NewTerminalContext;
@@ -717,6 +722,15 @@ Error:
return Status;
}
/**
EDES_TODO: Add function description
@param Private EDES_TODO: Add parameter description
@param CurrentFakeNVMap EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
DiscardChangeHandler (
IN BMM_CALLBACK_DATA *Private,
@@ -763,24 +777,20 @@ DiscardChangeHandler (
}
}
/**
Initialize the Boot Maintenance Utitliy
@param VOID EDES_TODO: Add parameter description
@retval EFI_SUCCESS utility ended successfully
@retval others contain some errors
**/
EFI_STATUS
InitializeBM (
VOID
)
/*++
Routine Description:
Initialize the Boot Maintenance Utitliy
Arguments:
ImageHandle - caller provided handle
SystemTable - caller provided system tables
Returns:
EFI_SUCCESS - utility ended successfully
others - contain some errors
--*/
{
EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
@@ -1020,6 +1030,14 @@ Returns:
return Status;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
InitAllMenu (
IN BMM_CALLBACK_DATA *CallbackData
@@ -1041,6 +1059,14 @@ InitAllMenu (
GetAllConsoles ();
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
FreeAllMenu (
VOID
@@ -1055,22 +1081,19 @@ FreeAllMenu (
FreeAllConsoles ();
}
/**
Intialize all the string depositories.
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Description incomplete None.
**/
VOID
InitializeStringDepository (
VOID
)
/*++
Routine Description:
Intialize all the string depositories.
Arguments:
None.
Returns:
None.
--*/
{
STRING_DEPOSITORY *StringDepository;
StringDepository = EfiAllocateZeroPool (sizeof (STRING_DEPOSITORY) * STRING_DEPOSITORY_NUMBER);
@@ -1083,23 +1106,21 @@ Returns:
TerminalStrDepository = StringDepository;
}
/**
Fetch a usable string node from the string depository and return the string token.
@param CallbackData EDES_TODO: Add parameter description
@param StringDepository - Pointer of the string depository.
@retval EFI_STRING_ID String token.
**/
EFI_STRING_ID
GetStringTokenFromDepository (
IN BMM_CALLBACK_DATA *CallbackData,
IN STRING_DEPOSITORY *StringDepository
)
/*++
Routine Description:
Fetch a usable string node from the string depository and return the string token.
Arguments:
StringDepository - Pointer of the string depository.
Returns:
EFI_STRING_ID - String token.
--*/
{
STRING_LIST_NODE *CurrentListNode;
STRING_LIST_NODE *NextListNode;
@@ -1134,22 +1155,19 @@ Returns:
return StringDepository->CurrentNode->StringToken;
}
/**
Reclaim string depositories by moving the current node pointer to list head..
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Description incomplete None.
**/
VOID
ReclaimStringDepository (
VOID
)
/*++
Routine Description:
Reclaim string depositories by moving the current node pointer to list head..
Arguments:
None.
Returns:
None.
--*/
{
UINTN DepositoryIndex;
STRING_DEPOSITORY *StringDepository;
@@ -1161,22 +1179,19 @@ Returns:
}
}
/**
Release resource for all the string depositories.
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Description incomplete None.
**/
VOID
CleanUpStringDepository (
VOID
)
/*++
Routine Description:
Release resource for all the string depositories.
Arguments:
None.
Returns:
None.
--*/
{
UINTN NodeIndex;
UINTN DepositoryIndex;
@@ -1204,20 +1219,19 @@ Returns:
SafeFreePool (FileOptionStrDepository);
}
/**
Start boot maintenance manager
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BdsStartBootMaint (
VOID
)
/*++
Routine Description:
Start boot maintenance manager
Arguments:
Returns:
--*/
{
EFI_STATUS Status;
LIST_ENTRY BdsBootOptionList;
@@ -1254,20 +1268,19 @@ Returns:
return Status;
}
/**
Dispatch BMM formset and FileExplorer formset.
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
FormSetDispatcher (
IN BMM_CALLBACK_DATA *CallbackData
)
/*++
Routine Description:
Dispatch BMM formset and FileExplorer formset.
Arguments:
Returns:
--*/
{
EFI_STATUS Status;
EFI_BROWSER_ACTION_REQUEST ActionRequest;

File diff suppressed because it is too large Load Diff

View File

@@ -19,27 +19,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
#include "BBSsupport.h"
/**
EDES_TODO: Add function description
@param MenuType Use this parameter to identify current
Menu type
EDES_TODO: Incomplete Descriptions NULL Cannot allocate memory for current menu
EDES_TODO: Incomplete Descriptions entry
EDES_TODO: Incomplete Descriptions Others A valid pointer pointing to the allocated
EDES_TODO: Incomplete Descriptions memory pool for current menu entry
**/
BM_MENU_ENTRY *
BOpt_CreateMenuEntry (
UINTN MenuType
)
/*++
Routine Description
Create Menu Entry for future use, make all types together
in order to reduce code size
Arguments:
MenuType Use this parameter to identify current
Menu type
Returns:
NULL Cannot allocate memory for current menu
entry
Others A valid pointer pointing to the allocated
memory pool for current menu entry
--*/
{
BM_MENU_ENTRY *MenuEntry;
UINTN ContextSize;
@@ -96,21 +91,18 @@ Returns:
return MenuEntry;
}
/**
EDES_TODO: Add function description
@param MenuEntry EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
BOpt_DestroyMenuEntry (
BM_MENU_ENTRY *MenuEntry
)
/*++
Routine Description :
Destroy the menu entry passed in
Arguments :
The menu entry need to be destroyed
Returns :
None
--*/
{
BM_LOAD_CONTEXT *LoadContext;
BM_FILE_CONTEXT *FileContext;
@@ -180,25 +172,20 @@ BOpt_DestroyMenuEntry (
SafeFreePool (MenuEntry);
}
/**
EDES_TODO: Add function description
@param MenuOption EDES_TODO: Add parameter description
@param MenuNumber EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
BM_MENU_ENTRY *
BOpt_GetMenuEntry (
BM_MENU_OPTION *MenuOption,
UINTN MenuNumber
)
/*++
Rountine Description :
Use this routine to get one particular menu entry in specified
menu
Arguments :
MenuOption The menu that we will search
MenuNumber The menunubmer that we want
Returns :
The desired menu entry
--*/
{
BM_MENU_ENTRY *NewMenuEntry;
UINTN Index;
@@ -218,29 +205,19 @@ BOpt_GetMenuEntry (
return NewMenuEntry;
}
/**
EDES_TODO: Add function description
@param CallbackData BMM context data
@retval EFI_SUCCESS Success find the file system
@retval EFI_OUT_OF_RESOURCES Can not create menu entry
**/
EFI_STATUS
BOpt_FindFileSystem (
IN BMM_CALLBACK_DATA *CallbackData
)
/*++
Routine Description
Find file systems for current Extensible Firmware
Including Handles that support Simple File System
protocol, Load File protocol.
Building up the FileSystem Menu for user selection
All file system will be stored in FsOptionMenu
for future use.
Arguments:
CallbackData - BMM context data
Returns:
EFI_SUCCESS - Success find the file system
EFI_OUT_OF_RESOURCES - Can not create menu entry
--*/
{
UINTN NoBlkIoHandles;
UINTN NoSimpleFsHandles;

View File

@@ -14,16 +14,41 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
/**
EDES_TODO: Add function description
@param DevPath EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_DEVICE_PATH_PROTOCOL *
DevicePathInstanceDup (
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
);
/**
EDES_TODO: Add function description
@param DevicePath EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
UpdateComAttributeFromVariable (
EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
/**
EDES_TODO: Add function description
@param DevicePath EDES_TODO: Add parameter description
@param ChangeTerminal EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
ChangeTerminalDevicePath (
EFI_DEVICE_PATH_PROTOCOL *DevicePath,
@@ -136,6 +161,14 @@ ChangeTerminalDevicePath (
}
/**
EDES_TODO: Add function description
@param DevicePath EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
ChangeVariableDevicePath (
EFI_DEVICE_PATH_PROTOCOL *DevicePath
@@ -200,24 +233,22 @@ ChangeVariableDevicePath (
return ;
}
/**
Retrieve ACPI UID of UART from device path
@param Handle EDES_TODO: Add parameter description
@param AcpiUid EDES_TODO: Add parameter description
@retval TRUE Find valid UID from device path
@retval FALSE Can't find
**/
BOOLEAN
RetrieveUartUid (
IN EFI_HANDLE Handle,
IN OUT UINT32 *AcpiUid
)
/*++
Routine Description:
Retrieve ACPI UID of UART from device path
Arguments:
Handles - EFI_SERIAL_IO_PROTOCOL handle
Returns:
TRUE - Find valid UID from device path
FALSE - Can't find
--*/
{
UINT32 Match;
UINT8 *Ptr;
@@ -249,24 +280,21 @@ Returns:
}
}
/**
Sort Uart handles array with Acpi->UID from low to high
@param Handles EFI_SERIAL_IO_PROTOCOL handle buffer
@param NoHandles EFI_SERIAL_IO_PROTOCOL handle count
EDES_TODO: Incomplete Descriptions None
**/
VOID
SortedUartHandle (
IN EFI_HANDLE *Handles,
IN UINTN NoHandles
)
/*++
Routine Description:
Sort Uart handles array with Acpi->UID from low to high
Arguments:
Handles - EFI_SERIAL_IO_PROTOCOL handle buffer
NoHandles - EFI_SERIAL_IO_PROTOCOL handle count
Returns:
None
--*/
{
UINTN Index1;
UINTN Index2;
@@ -299,6 +327,16 @@ Returns:
}
}
/**
EDES_TODO: Add function description
@param DevicePath EDES_TODO: Add parameter description
@param Termi EDES_TODO: Add parameter description
@param Com EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
BOOLEAN
IsTerminalDevicePath (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
@@ -306,20 +344,19 @@ IsTerminalDevicePath (
OUT UINTN *Com
);
/**
Build a list containing all serial devices
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
LocateSerialIo (
VOID
)
/*++
Routine Description:
Build a list containing all serial devices
Arguments:
Returns:
--*/
{
UINT8 *Ptr;
UINTN Index;
@@ -507,21 +544,19 @@ Returns:
return EFI_SUCCESS;
}
/**
Update Com Ports attributes from DevicePath
@param DevicePath DevicePath that contains Com ports
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
UpdateComAttributeFromVariable (
EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
/*++
Routine Description:
Update Com Ports attributes from DevicePath
Arguments:
DevicePath - DevicePath that contains Com ports
Returns:
--*/
{
EFI_DEVICE_PATH_PROTOCOL *Node;
EFI_DEVICE_PATH_PROTOCOL *SerialNode;
@@ -630,25 +665,21 @@ Returns:
return EFI_SUCCESS;
}
/**
Function creates a device path data structure that identically matches the
device path passed in.
@param DevPath A pointer to a device path data structure.
EDES_TODO: Incomplete Descriptions The new copy of DevPath is created to identically match the input.
EDES_TODO: Incomplete Descriptions Otherwise, NULL is returned.
**/
EFI_DEVICE_PATH_PROTOCOL *
DevicePathInstanceDup (
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
)
/*++
Routine Description:
Function creates a device path data structure that identically matches the
device path passed in.
Arguments:
DevPath - A pointer to a device path data structure.
Returns:
The new copy of DevPath is created to identically match the input.
Otherwise, NULL is returned.
--*/
{
EFI_DEVICE_PATH_PROTOCOL *NewDevPath;
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
@@ -682,6 +713,14 @@ Returns:
return NewDevPath;
}
/**
EDES_TODO: Add function description
@param ConsoleMenuType EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
GetConsoleMenu (
IN UINTN ConsoleMenuType
@@ -801,22 +840,20 @@ GetConsoleMenu (
return EFI_SUCCESS;
}
/**
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
GetAllConsoles (
VOID
)
/*++
Routine Description:
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
Arguments:
Returns:
EFI_SUCCESS
Others
--*/
{
GetConsoleMenu (BM_CONSOLE_IN_CONTEXT_SELECT);
GetConsoleMenu (BM_CONSOLE_OUT_CONTEXT_SELECT);
@@ -824,22 +861,20 @@ Returns:
return EFI_SUCCESS;
}
/**
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
FreeAllConsoles (
VOID
)
/*++
Routine Description:
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
Arguments:
Returns:
EFI_SUCCESS
Others
--*/
{
BOpt_FreeMenu (&ConsoleOutMenu);
BOpt_FreeMenu (&ConsoleInpMenu);
@@ -848,27 +883,24 @@ Returns:
return EFI_SUCCESS;
}
/**
Test whether DevicePath is a valid Terminal
@param DevicePath DevicePath to be checked
@param Termi If is terminal, give its type
@param Com If is Com Port, give its type
@retval TRUE If DevicePath point to a Terminal
FALSE
**/
BOOLEAN
IsTerminalDevicePath (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT TYPE_OF_TERMINAL *Termi,
OUT UINTN *Com
)
/*++
Routine Description:
Test whether DevicePath is a valid Terminal
Arguments:
DevicePath - DevicePath to be checked
Termi - If is terminal, give its type
Com - If is Com Port, give its type
Returns:
TRUE - If DevicePath point to a Terminal
FALSE
--*/
{
UINT8 *Ptr;
BOOLEAN IsTerminal;
@@ -935,22 +967,19 @@ Returns:
return TRUE;
}
/**
Get mode number according to column and row
@param CallbackData BMM_CALLBACK_DATA
EDES_TODO: Incomplete Descriptions None.
**/
VOID
GetConsoleOutMode (
IN BMM_CALLBACK_DATA *CallbackData
)
/*++
Routine Description:
Get mode number according to column and row
Arguments:
CallbackData - BMM_CALLBACK_DATA
Returns:
None.
--*/
{
UINTN Col;
UINTN Row;

View File

@@ -14,22 +14,21 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
/**
Update the File Explore page.
@param CallbackData EDES_TODO: Add parameter description
@param MenuOption Pointer to menu options to display.
EDES_TODO: Incomplete Descriptions None.
**/
VOID
UpdateFileExplorePage (
IN BMM_CALLBACK_DATA *CallbackData,
BM_MENU_OPTION *MenuOption
)
/*++
Routine Description:
Update the File Explore page.
Arguments:
MenuOption - Pointer to menu options to display.
Returns:
None.
--*/
{
UINTN Index;
BM_MENU_ENTRY *NewMenuEntry;
@@ -93,25 +92,22 @@ Returns:
);
}
/**
Update the file explower page with the refershed file system.
@param CallbackData BMM context data
@param KeyValue Key value to identify the type of data to expect.
@retval TRUE Inform the caller to create a callback packet to exit file explorer.
@retval FALSE Indicate that there is no need to exit file explorer.
**/
BOOLEAN
UpdateFileExplorer (
IN BMM_CALLBACK_DATA *CallbackData,
IN UINT16 KeyValue
)
/*++
Routine Description:
Update the file explower page with the refershed file system.
Arguments:
CallbackData - BMM context data
KeyValue - Key value to identify the type of data to expect.
Returns:
TRUE - Inform the caller to create a callback packet to exit file explorer.
FALSE - Indicate that there is no need to exit file explorer.
--*/
{
UINT16 FileOptionMask;
BM_MENU_ENTRY *NewMenuEntry;
@@ -214,6 +210,24 @@ Returns:
return ExitFileExplorer;
}
/**
This function processes the results of changes in configuration.
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Action Specifies the type of action taken by the browser.
@param QuestionId A unique value which is sent to the original exporting driver
so that it can identify the type of data to expect.
@param Type The type of value for the question.
@param Value A pointer to the data being sent to the original exporting driver.
@param ActionRequest On return, points to the action requested by the callback function.
@retval EFI_SUCCESS The callback successfully handled the action.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
@retval EFI_DEVICE_ERROR The variable could not be saved.
@retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
**/
EFI_STATUS
EFIAPI
FileExplorerCallback (
@@ -224,27 +238,6 @@ FileExplorerCallback (
IN EFI_IFR_TYPE_VALUE *Value,
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
/*++
Routine Description:
This function processes the results of changes in configuration.
Arguments:
This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
Action - Specifies the type of action taken by the browser.
QuestionId - A unique value which is sent to the original exporting driver
so that it can identify the type of data to expect.
Type - The type of value for the question.
Value - A pointer to the data being sent to the original exporting driver.
ActionRequest - On return, points to the action requested by the callback function.
Returns:
EFI_SUCCESS - The callback successfully handled the action.
EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the variable and its data.
EFI_DEVICE_ERROR - The variable could not be saved.
EFI_UNSUPPORTED - The specified Action is not supported by the callback.
--*/
{
BMM_CALLBACK_DATA *Private;
FILE_EXPLORER_NV_DATA *NvRamMap;

View File

@@ -14,26 +14,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
/**
Refresh the global UpdateData structure.
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Incomplete Descriptions None.
**/
VOID
RefreshUpdateData (
VOID
)
/*++
Routine Description:
Refresh the global UpdateData structure.
Arguments:
None.
Returns:
None.
--*/
{
gUpdateData.Offset = 0;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdatePageStart (
IN BMM_CALLBACK_DATA *CallbackData
@@ -58,6 +63,14 @@ UpdatePageStart (
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdatePageEnd (
IN BMM_CALLBACK_DATA *CallbackData
@@ -107,6 +120,15 @@ UpdatePageEnd (
);
}
/**
EDES_TODO: Add function description
@param LabelId EDES_TODO: Add parameter description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
CleanUpPage (
IN UINT16 LabelId,
@@ -128,6 +150,14 @@ CleanUpPage (
);
}
/**
EDES_TODO: Add function description
@param FileContext EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
BootThisFile (
IN BM_FILE_CONTEXT *FileContext
@@ -161,6 +191,14 @@ BootThisFile (
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateConCOMPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -190,6 +228,14 @@ UpdateConCOMPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateBootDelPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -229,6 +275,14 @@ UpdateBootDelPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateDrvAddHandlePage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -257,6 +311,14 @@ UpdateDrvAddHandlePage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateDrvDelPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -294,6 +356,14 @@ UpdateDrvDelPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateDriverAddHandleDescPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -356,6 +426,16 @@ UpdateDriverAddHandleDescPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param UpdatePageId EDES_TODO: Add parameter description
@param ConsoleMenu EDES_TODO: Add parameter description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateConsolePage (
IN UINT16 UpdatePageId,
@@ -429,6 +509,16 @@ UpdateConsolePage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param UpdatePageId EDES_TODO: Add parameter description
@param OptionMenu EDES_TODO: Add parameter description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateOrderPage (
IN UINT16 UpdatePageId,
@@ -489,6 +579,14 @@ UpdateOrderPage (
);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateBootNextPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -554,6 +652,14 @@ UpdateBootNextPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateTimeOutPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -587,22 +693,19 @@ UpdateTimeOutPage (
UpdatePageEnd (CallbackData);
}
/**
Refresh the text mode page
@param CallbackData BMM_CALLBACK_DATA
EDES_TODO: Incomplete Descriptions None.
**/
VOID
UpdateConModePage (
IN BMM_CALLBACK_DATA *CallbackData
)
/*++
Routine Description:
Refresh the text mode page
Arguments:
CallbackData - BMM_CALLBACK_DATA
Returns:
None.
--*/
{
UINTN Mode;
UINTN Index;
@@ -698,6 +801,14 @@ Returns:
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateTerminalPage (
IN BMM_CALLBACK_DATA *CallbackData
@@ -864,6 +975,15 @@ UpdateTerminalPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param UpdatePageId EDES_TODO: Add parameter description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdatePageBody (
IN UINT16 UpdatePageId,
@@ -897,6 +1017,16 @@ UpdatePageBody (
}
}
/**
EDES_TODO: Add function description
@param DeviceType EDES_TODO: Add parameter description
@param OptionIndex EDES_TODO: Add parameter description
@param OptionSize EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID *
GetLegacyBootOptionVar (
IN UINTN DeviceType,
@@ -969,6 +1099,15 @@ GetLegacyBootOptionVar (
return NULL;
}
/**
EDES_TODO: Add function description
@param UpdatePageId EDES_TODO: Add parameter description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdateSetLegacyDeviceOrderPage (
IN UINT16 UpdatePageId,
@@ -1164,6 +1303,15 @@ UpdateSetLegacyDeviceOrderPage (
UpdatePageEnd (CallbackData);
}
/**
EDES_TODO: Add function description
@param Private EDES_TODO: Add parameter description
@param NewPageId EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
UpdatePageId (
BMM_CALLBACK_DATA *Private,

View File

@@ -14,25 +14,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "BootMaint.h"
EFI_STATUS
Var_DelBootOption (
VOID
)
/*++
Routine Description:
/**
Delete Boot Option that represent a Deleted state in BootOptionMenu.
After deleting this boot option, call Var_ChangeBootOrder to
make sure BootOrder is in valid state.
Arguments:
LoadOption -- Pointer to the boot option that to be deleted
Returns:
EFI_SUCCESS
Others
@param VOID EDES_TODO: Add parameter description
--*/
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
Var_DelBootOption (
VOID
)
{
BM_MENU_ENTRY *NewMenuEntry;
BM_LOAD_CONTEXT *NewLoadContext;
@@ -83,25 +80,23 @@ Returns:
return Status;
}
EFI_STATUS
Var_ChangeBootOrder (
VOID
)
/*++
Routine Description:
/**
After any operation on Boot####, there will be a discrepancy in BootOrder.
Since some are missing but in BootOrder, while some are present but are
not reflected by BootOrder. Then a function rebuild BootOrder from
scratch by content from BootOptionMenu is needed.
Arguments:
Returns:
EFI_SUCCESS
Others
@param VOID EDES_TODO: Add parameter description
--*/
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
Var_ChangeBootOrder (
VOID
)
{
EFI_STATUS Status;
@@ -177,25 +172,22 @@ Returns:
return EFI_SUCCESS;
}
EFI_STATUS
Var_DelDriverOption (
VOID
)
/*++
Routine Description:
/**
Delete Load Option that represent a Deleted state in BootOptionMenu.
After deleting this Driver option, call Var_ChangeDriverOrder to
make sure DriverOrder is in valid state.
Arguments:
LoadOption -- Pointer to the Driver option that to be deleted
Returns:
EFI_SUCCESS
Others
@param VOID EDES_TODO: Add parameter description
--*/
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
Var_DelDriverOption (
VOID
)
{
BM_MENU_ENTRY *NewMenuEntry;
BM_LOAD_CONTEXT *NewLoadContext;
@@ -238,26 +230,24 @@ Returns:
return Status;
}
EFI_STATUS
Var_ChangeDriverOrder (
VOID
)
/*++
Routine Description:
/**
After any operation on Driver####, there will be a discrepancy in
DriverOrder. Since some are missing but in DriverOrder, while some
are present but are not reflected by DriverOrder. Then a function
rebuild DriverOrder from scratch by content from DriverOptionMenu is
needed.
Arguments:
Returns:
EFI_SUCCESS
Others
@param VOID EDES_TODO: Add parameter description
--*/
EDES_TODO: Incomplete Descriptions EFI_SUCCESS
EDES_TODO: Incomplete Descriptions Others
**/
EFI_STATUS
Var_ChangeDriverOrder (
VOID
)
{
EFI_STATUS Status;
BM_MENU_ENTRY *NewMenuEntry;
@@ -324,6 +314,14 @@ Returns:
return EFI_SUCCESS;
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
Var_UpdateAllConsoleOption (
VOID
@@ -374,6 +372,16 @@ Var_UpdateAllConsoleOption (
}
}
/**
EDES_TODO: Add function description
@param ConsoleName EDES_TODO: Add parameter description
@param ConsoleMenu EDES_TODO: Add parameter description
@param UpdatePageId EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateConsoleOption (
IN UINT16 *ConsoleName,
@@ -464,6 +472,14 @@ Var_UpdateConsoleOption (
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateConsoleInpOption (
VOID
@@ -472,6 +488,14 @@ Var_UpdateConsoleInpOption (
return Var_UpdateConsoleOption (L"ConIn", &ConsoleInpMenu, FORM_CON_IN_ID);
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateConsoleOutOption (
VOID
@@ -480,6 +504,14 @@ Var_UpdateConsoleOutOption (
return Var_UpdateConsoleOption (L"ConOut", &ConsoleOutMenu, FORM_CON_OUT_ID);
}
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateErrorOutOption (
VOID
@@ -488,6 +520,18 @@ Var_UpdateErrorOutOption (
return Var_UpdateConsoleOption (L"ErrOut", &ConsoleErrMenu, FORM_CON_ERR_ID);
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@param HiiHandle EDES_TODO: Add parameter description
@param DescriptionData EDES_TODO: Add parameter description
@param OptionalData EDES_TODO: Add parameter description
@param ForceReconnect EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateDriverOption (
IN BMM_CALLBACK_DATA *CallbackData,
@@ -653,6 +697,15 @@ Var_UpdateDriverOption (
return EFI_SUCCESS;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@param NvRamMap EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateBootOption (
IN BMM_CALLBACK_DATA *CallbackData,
@@ -811,6 +864,14 @@ Var_UpdateBootOption (
return EFI_SUCCESS;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateBootNext (
IN BMM_CALLBACK_DATA *CallbackData
@@ -860,6 +921,14 @@ Var_UpdateBootNext (
return Status;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateBootOrder (
IN BMM_CALLBACK_DATA *CallbackData
@@ -925,6 +994,14 @@ Var_UpdateBootOrder (
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateDriverOrder (
IN BMM_CALLBACK_DATA *CallbackData
@@ -982,6 +1059,14 @@ Var_UpdateDriverOrder (
return EFI_SUCCESS;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateBBSOption (
IN BMM_CALLBACK_DATA *CallbackData
@@ -1278,6 +1363,14 @@ Var_UpdateBBSOption (
return Status;
}
/**
EDES_TODO: Add function description
@param CallbackData EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
Var_UpdateConMode (
IN BMM_CALLBACK_DATA *CallbackData