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

@ -95,6 +95,22 @@ PlatformBdsShowProgress (
//
// Prototypes
//
/**
Install Boot Device Selection Protocol
@param ImageHandle The image handle.
@param SystemTable The system table.
@retval EFI_SUCEESS BDS has finished initializing.
Rerun the
dispatcher and recall BDS.Entry
@retval Other Return value from AllocatePool()
or gBS->InstallProtocolInterface
**/
EFI_STATUS
EFIAPI
BdsInitialize (
@ -102,6 +118,17 @@ BdsInitialize (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Service routine for BdsInstance->Entry(). Devices are connected, the
consoles are initialized, and the boot options are tried.
@param This - Protocol Instance structure.
@retval EFI_SUCEESS BDS->Entry has finished executing.
**/
VOID
EFIAPI
BdsEntry (

View File

@ -32,32 +32,27 @@ UINT16 *mBootNext = NULL;
EFI_HANDLE mBdsImageHandle;
/**
Install Boot Device Selection Protocol
@param ImageHandle The image handle.
@param SystemTable The system table.
@retval EFI_SUCEESS BDS has finished initializing.
Rerun the
dispatcher and recall BDS.Entry
@retval Other Return value from AllocatePool()
or gBS->InstallProtocolInterface
**/
EFI_STATUS
EFIAPI
BdsInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
/*++
Routine Description:
Install Boot Device Selection Protocol
Arguments:
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
Returns:
EFI_SUCEESS - BDS has finished initializing.
Rerun the
dispatcher and recall BDS.Entry
Other - Return value from AllocatePool()
or gBS->InstallProtocolInterface
--*/
{
EFI_STATUS Status;
@ -77,25 +72,20 @@ Returns:
return Status;
}
/**
In the loop of attempt to boot for the boot order
@param VOID No input parameter.
@retval VOID No returns.
**/
VOID
BdsBootDeviceSelect (
VOID
)
/*++
Routine Description:
In the loop of attempt to boot for the boot order
Arguments:
None.
Returns:
None.
--*/
{
EFI_STATUS Status;
LIST_ENTRY *Link;
@ -263,27 +253,22 @@ Returns:
}
/**
Service routine for BdsInstance->Entry(). Devices are connected, the
consoles are initialized, and the boot options are tried.
@param This - Protocol Instance structure.
@retval EFI_SUCEESS BDS->Entry has finished executing.
**/
VOID
EFIAPI
BdsEntry (
IN EFI_BDS_ARCH_PROTOCOL *This
)
/*++
Routine Description:
Service routine for BdsInstance->Entry(). Devices are connected, the
consoles are initialized, and the boot options are tried.
Arguments:
This - Protocol Instance structure.
Returns:
EFI_SUCEESS - BDS->Entry has finished executing.
--*/
{
EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData;
LIST_ENTRY DriverOptionList;
@ -327,7 +312,7 @@ Returns:
//
InitializeStringSupport ();
InitializeLanguage (TRUE);
InitializeFrontPage (FALSE);
InitializeFrontPage (TRUE);
//
// Set up the device list based on EFI 1.1 variables

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

View File

@ -30,6 +30,24 @@ BOOT_MANAGER_CALLBACK_DATA gBootManagerPrivate = {
}
};
/**
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
BootManagerCallback (
@ -40,27 +58,6 @@ BootManagerCallback (
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.
--*/
{
BDS_COMMON_OPTION *Option;
LIST_ENTRY *Link;
@ -102,22 +99,20 @@ BootManagerCallback (
return EFI_SUCCESS;
}
/**
Initialize HII information for the FrontPage
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
InitializeBootManager (
VOID
)
/*++
Routine Description:
Initialize HII information for the FrontPage
Arguments:
None
Returns:
--*/
{
EFI_STATUS Status;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
@ -158,24 +153,19 @@ Returns:
return Status;
}
/**
Hook to enable UI timeout override behavior.
@param VOID EDES_TODO: Add parameter description
EDES_TODO: Incomplete Descriptions NONE
**/
VOID
CallBootManager (
VOID
)
/*++
Routine Description:
Hook to enable UI timeout override behavior.
Arguments:
BdsDeviceList - Device List that BDS needs to connect.
Entry - Pointer to current Boot Entry.
Returns:
NONE
--*/
{
EFI_STATUS Status;
BDS_COMMON_OPTION *Option;

View File

@ -52,6 +52,19 @@ typedef struct {
EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
} BOOT_MANAGER_CALLBACK_DATA;
/**
EDES_TODO: Add function description
@param This EDES_TODO: Add parameter description
@param Action EDES_TODO: Add parameter description
@param QuestionId EDES_TODO: Add parameter description
@param Type EDES_TODO: Add parameter description
@param Value EDES_TODO: Add parameter description
@param ActionRequest EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
EFIAPI
BootManagerCallback (
@ -64,12 +77,28 @@ BootManagerCallback (
)
;
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
InitializeBootManager (
VOID
)
;
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
VOID
CallBootManager (
VOID

View File

@ -13,6 +13,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "Bds.h"
/**
This function locks the block
@param CpuIo A instance of EFI_CPU_IO_PROTOCOL.
@param Base The base address flash region to be locked.
@return VOID No return.
**/
VOID
BdsLockFv (
IN EFI_CPU_IO_PROTOCOL *CpuIo,
@ -55,13 +64,7 @@ BdsLockFv (
}
}
EFI_STATUS
ProcessCapsules (
EFI_BOOT_MODE BootMode
)
/*++
Routine Description:
/**
This routine is called to see if there are any capsules we need to process.
If the boot mode is not UPDATE, then we do nothing. Otherwise find the
@ -69,23 +72,22 @@ Routine Description:
Then call the dispatcher to dispatch drivers from them. Finally, check
the status of the updates.
Arguments:
BootMode - the current boot mode
@param BootMode - the current boot mode
Returns:
@retval EFI_INVALID_PARAMETER boot mode is not correct for an update
Note:
This function should be called by BDS in case we need to do some
sort of processing even if there is no capsule to process. We
need to do this if an earlier update went awry and we need to
clear the capsule variable so on the next reset PEI does not see it and
think there is a capsule available.
EFI_INVALID_PARAMETER - boot mode is not correct for an update
Note:
This function should be called by BDS in case we need to do some
sort of processing even if there is no capsule to process. We
need to do this if an earlier update went awry and we need to
clear the capsule variable so on the next reset PEI does not see it and
think there is a capsule available.
--*/
**/
EFI_STATUS
ProcessCapsules (
EFI_BOOT_MODE BootMode
)
{
EFI_STATUS Status;
EFI_PEI_HOB_POINTERS HobPointer;

View File

@ -39,6 +39,24 @@ DEVICE_MANAGER_MENU_ITEM mDeviceManagerMenuItemTable[] = {
#define MENU_ITEM_NUM \
(sizeof (mDeviceManagerMenuItemTable) / sizeof (DEVICE_MANAGER_MENU_ITEM))
/**
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
DeviceManagerCallback (
@ -49,27 +67,6 @@ DeviceManagerCallback (
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.
--*/
{
DEVICE_MANAGER_CALLBACK_DATA *PrivateData;
@ -113,22 +110,20 @@ DeviceManagerCallback (
return EFI_SUCCESS;
}
/**
Initialize HII information for the FrontPage
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
InitializeDeviceManager (
VOID
)
/*++
Routine Description:
Initialize HII information for the FrontPage
Arguments:
None
Returns:
--*/
{
EFI_STATUS Status;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
@ -169,25 +164,21 @@ Returns:
return Status;
}
/**
Call the browser and display the device manager
@param VOID EDES_TODO: Add parameter description
@retval EFI_SUCCESS Operation is successful.
@retval EFI_INVALID_PARAMETER If the inputs to SendForm function is not valid.
**/
EFI_STATUS
CallDeviceManager (
VOID
)
/*++
Routine Description:
Call the browser and display the device manager
Arguments:
None
Returns:
EFI_SUCCESS - Operation is successful.
EFI_INVALID_PARAMETER - If the inputs to SendForm function is not valid.
--*/
{
EFI_STATUS Status;
UINTN Count;

View File

@ -66,12 +66,24 @@ typedef struct {
ConfigAccess, \
DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE \
)
typedef struct {
EFI_STRING_ID StringId;
UINT16 Class;
} DEVICE_MANAGER_MENU_ITEM;
/**
EDES_TODO: Add function description
@param This EDES_TODO: Add parameter description
@param Action EDES_TODO: Add parameter description
@param QuestionId EDES_TODO: Add parameter description
@param Type EDES_TODO: Add parameter description
@param Value EDES_TODO: Add parameter description
@param ActionRequest EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
EFIAPI
DeviceManagerCallback (
@ -84,12 +96,28 @@ DeviceManagerCallback (
)
;
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
InitializeDeviceManager (
VOID
)
;
/**
EDES_TODO: Add function description
@param VOID EDES_TODO: Add parameter description
@return EDES_TODO: Add description for return value
**/
EFI_STATUS
CallDeviceManager (
VOID

View File

@ -37,6 +37,28 @@ FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate = {
}
};
/**
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
FakeExtractConfig (
@ -45,35 +67,26 @@ FakeExtractConfig (
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.
--*/
{
return EFI_NOT_FOUND;
}
/**
This function processes the results of changes in configuration.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Configuration - A null-terminated Unicode string in <ConfigResp> format.
@param Progress - A pointer to a string filled in with the offset of 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) or the terminating NULL if all was successful.
@retval EFI_SUCCESS The Results is processed successfully.
@retval EFI_INVALID_PARAMETER Configuration is NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
**/
EFI_STATUS
EFIAPI
FakeRouteConfig (
@ -81,29 +94,28 @@ FakeRouteConfig (
IN CONST EFI_STRING Configuration,
OUT EFI_STRING *Progress
)
/*++
Routine Description:
This function processes the results of changes in configuration.
Arguments:
This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
Configuration - A null-terminated Unicode string in <ConfigResp> format.
Progress - A pointer to a string filled in with the offset of 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) or the terminating NULL if all was successful.
Returns:
EFI_SUCCESS - The Results is processed successfully.
EFI_INVALID_PARAMETER - Configuration is NULL.
EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
--*/
{
return EFI_SUCCESS;
}
/**
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
FrontPageCallback (
@ -114,27 +126,6 @@ FrontPageCallback (
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.
--*/
{
CHAR8 *LanguageString;
CHAR8 *LangCode;
@ -235,23 +226,20 @@ FrontPageCallback (
return EFI_SUCCESS;
}
EFI_STATUS
InitializeFrontPage (
BOOLEAN ReInitializeStrings
)
/*++
Routine Description:
/**
Initialize HII information for the FrontPage
Arguments:
None
Returns:
EFI_SUCCESS - The operation is successful.
EFI_DEVICE_ERROR - If the dynamic opcode creation failed.
@param InitializeHiiData TRUE if HII elements need to be initialized.
--*/
@retval EFI_SUCCESS The operation is successful.
@retval EFI_DEVICE_ERROR If the dynamic opcode creation failed.
**/
EFI_STATUS
InitializeFrontPage (
BOOLEAN InitializeHiiData
)
{
EFI_STATUS Status;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
@ -268,7 +256,7 @@ Returns:
UINTN Index;
EFI_HII_HANDLE HiiHandle;
if (!ReInitializeStrings) {
if (InitializeHiiData) {
//
// Initialize the Device Manager
//
@ -456,21 +444,20 @@ Returns:
return Status;
}
/**
Call the browser and display the front page
@param VOID No input.
@return Status code that will be returned by
EFI_FORM_BROWSER2_PROTOCOL.SendForm ().
**/
EFI_STATUS
CallFrontPage (
VOID
)
/*++
Routine Description:
Call the browser and display the front page
Arguments:
None
Returns:
--*/
{
EFI_STATUS Status;
EFI_BROWSER_ACTION_REQUEST ActionRequest;
@ -510,26 +497,23 @@ Returns:
return Status;
}
/**
Acquire the string associated with the ProducerGuid and return it.
@param ProducerGuid - The Guid to search the HII database for
@param Token - The token value of the string to extract
@param String - The string that is extracted
@retval EFI_SUCCESS The function returns EFI_SUCCESS always.
**/
EFI_STATUS
GetProducerString (
IN EFI_GUID *ProducerGuid,
IN EFI_STRING_ID Token,
OUT CHAR16 **String
)
/*++
Routine Description:
Acquire the string associated with the ProducerGuid and return it.
Arguments:
ProducerGuid - The Guid to search the HII database for
Token - The token value of the string to extract
String - The string that is extracted
Returns:
EFI_SUCCESS - The function returns EFI_SUCCESS always.
--*/
{
EFI_STATUS Status;
@ -541,23 +525,21 @@ Returns:
return EFI_SUCCESS;
}
/**
Convert Processor Frequency Data to a string
@param ProcessorFrequency - The frequency data to process
@param String - The string that is created
@return VOID.
**/
VOID
ConvertProcessorToString (
IN EFI_PROCESSOR_CORE_FREQUENCY_DATA *ProcessorFrequency,
OUT CHAR16 **String
)
/*++
Routine Description:
Convert Processor Frequency Data to a string
Arguments:
ProcessorFrequency - The frequency data to process
String - The string that is created
Returns:
--*/
{
CHAR16 *StringBuffer;
UINTN Index;
@ -584,23 +566,21 @@ Returns:
return ;
}
/**
Convert Memory Size to a string
@param MemorySize - The size of the memory to process
@param String - The string that is created
@return VOID.
**/
VOID
ConvertMemorySizeToString (
IN UINT32 MemorySize,
OUT CHAR16 **String
)
/*++
Routine Description:
Convert Memory Size to a string
Arguments:
MemorySize - The size of the memory to process
String - The string that is created
Returns:
--*/
{
CHAR16 *StringBuffer;
@ -614,21 +594,19 @@ Returns:
return ;
}
/**
Update the banner information for the Front Page based on DataHub information
@param VOID No input.
@return No output.
**/
VOID
UpdateFrontPageStrings (
VOID
)
/*++
Routine Description:
Update the banner information for the Front Page based on DataHub information
Arguments:
None
Returns:
--*/
{
EFI_STATUS Status;
EFI_STRING_ID TokenToUpdate;
@ -725,25 +703,23 @@ Returns:
return ;
}
/**
Function waits for a given event to fire, or for an optional timeout to expire.
@param Event The event to wait for
@param Timeout An optional timeout value in 100 ns units.
@retval EFI_SUCCESS Event fired before Timeout expired.
@retval EFI_TIME_OUT Timout expired before Event fired..
**/
EFI_STATUS
WaitForSingleEvent (
IN EFI_EVENT Event,
IN UINT64 Timeout OPTIONAL
)
/*++
Routine Description:
Function waits for a given event to fire, or for an optional timeout to expire.
Arguments:
Event - The event to wait for
Timeout - An optional timeout value in 100 ns units.
Returns:
EFI_SUCCESS - Event fired before Timeout expired.
EFI_TIME_OUT - Timout expired before Event fired..
--*/
{
EFI_STATUS Status;
UINTN Index;
@ -792,24 +768,21 @@ Returns:
return Status;
}
/**
Function show progress bar to wait for user input.
@param TimeoutDefault - The fault time out value before the system
continue to boot.
@retval EFI_SUCCESS User pressed some key except "Enter"
@retval EFI_TIME_OUT Timout expired or user press "Enter"
**/
EFI_STATUS
ShowProgress (
IN UINT16 TimeoutDefault
)
/*++
Routine Description:
Function show progress bar to wait for user input.
Arguments:
TimeoutDefault - The fault time out value before the system
continue to boot.
Returns:
EFI_SUCCESS - User pressed some key except "Enter"
EFI_TIME_OUT - Timout expired or user press "Enter"
--*/
{
EFI_STATUS Status;
CHAR16 *TmpStr;
@ -888,28 +861,25 @@ Returns:
return EFI_SUCCESS;
}
/**
This function is the main entry of the platform setup entry.
The function will present the main menu of the system setup,
this is the platform reference part and can be customize.
@param TimeoutDefault - The fault time out value before the system
continue to boot.
@param ConnectAllHappened - The indicater to check if the connect all have
already happended.
@return VOID.
**/
VOID
PlatformBdsEnterFrontPage (
IN UINT16 TimeoutDefault,
IN BOOLEAN ConnectAllHappened
)
/*++
Routine Description:
This function is the main entry of the platform setup entry.
The function will present the main menu of the system setup,
this is the platform reference part and can be customize.
Arguments:
TimeoutDefault - The fault time out value before the system
continue to boot.
ConnectAllHappened - The indicater to check if the connect all have
already happended.
Returns:
None
--*/
{
EFI_STATUS Status;
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
@ -939,7 +909,7 @@ Returns:
do {
InitializeFrontPage (TRUE);
InitializeFrontPage (FALSE);
//
// Update Front Page strings

View File

@ -84,6 +84,28 @@ extern EFI_HII_CONFIG_ROUTING_PROTOCOL *gHiiConfigRouting;
extern UINTN gCallbackKey;
extern BOOLEAN gConnectAllHappened;
/**
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
FakeExtractConfig (
@ -93,6 +115,22 @@ FakeExtractConfig (
OUT EFI_STRING *Results
);
/**
This function processes the results of changes in configuration.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Configuration - A null-terminated Unicode string in <ConfigResp> format.
@param Progress - A pointer to a string filled in with the offset of 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) or the terminating NULL if all was successful.
@retval EFI_SUCCESS The Results is processed successfully.
@retval EFI_INVALID_PARAMETER Configuration is NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
**/
EFI_STATUS
EFIAPI
FakeRouteConfig (
@ -101,6 +139,24 @@ FakeRouteConfig (
OUT EFI_STRING *Progress
);
/**
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
FrontPageCallback (
@ -112,11 +168,32 @@ FrontPageCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
);
/**
Initialize HII information for the FrontPage
@param InitializeHiiData TRUE if HII elements need to be initialized.
@retval EFI_SUCCESS The operation is successful.
@retval EFI_DEVICE_ERROR If the dynamic opcode creation failed.
**/
EFI_STATUS
InitializeFrontPage (
IN BOOLEAN ReInitializeStrings
);
/**
Acquire the string associated with the ProducerGuid and return it.
@param ProducerGuid - The Guid to search the HII database for
@param Token - The token value of the string to extract
@param String - The string that is extracted
@retval EFI_SUCCESS The function returns EFI_SUCCESS always.
**/
EFI_STATUS
GetProducerString (
IN EFI_GUID *ProducerGuid,
@ -124,12 +201,37 @@ GetProducerString (
OUT CHAR16 **String
);
/**
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
);
/**
This function is the main entry of the platform setup entry.
The function will present the main menu of the system setup,
this is the platform reference part and can be customize.
@param TimeoutDefault - The fault time out value before the system
continue to boot.
@param ConnectAllHappened - The indicater to check if the connect all have
already happended.
@return VOID.
**/
VOID
PlatformBdsEnterFrontPage (
IN UINT16 TimeoutDefault,

View File

@ -22,26 +22,21 @@ EFI_EVENT mHotkeyEvent;
VOID *mHotkeyRegistration;
/**
Check if the Key Option is valid or not.
@param KeyOption The Hot Key Option to be checked.
@retval TRUE The Hot Key Option is valid.
@retval FALSE The Hot Key Option is invalid.
**/
BOOLEAN
IsKeyOptionValid (
IN EFI_KEY_OPTION *KeyOption
)
/*++
Routine Description:
Check if the Key Option is valid or not.
Arguments:
KeyOption - The Hot Key Option to be checked.
Returns:
TRUE - The Hot Key Option is valid.
FALSE - The Hot Key Option is invalid.
--*/
{
UINT16 BootOptionName[10];
UINT8 *BootOptionVar;
@ -71,28 +66,23 @@ Returns:
return (BOOLEAN) ((KeyOption->BootOptionCrc == Crc) ? TRUE : FALSE);
}
/**
Create Key#### for the given hotkey.
@param KeyOption The Hot Key Option to be added.
@param KeyOptionNumber The key option number for Key#### (optional).
@retval EFI_SUCCESS Register hotkey successfully.
@retval EFI_INVALID_PARAMETER The hotkey option is invalid.
**/
EFI_STATUS
RegisterHotkey (
IN EFI_KEY_OPTION *KeyOption,
OUT UINT16 *KeyOptionNumber
)
/*++
Routine Description:
Create Key#### for the given hotkey.
Arguments:
KeyOption - The Hot Key Option to be added.
KeyOptionNumber - The key option number for Key#### (optional).
Returns:
EFI_SUCCESS - Register hotkey successfully.
EFI_INVALID_PARAMETER - The hotkey option is invalid.
--*/
{
UINT16 KeyOptionName[10];
UINT16 *KeyOrder;
@ -234,26 +224,21 @@ Returns:
return Status;
}
/**
Delete Key#### for the given Key Option number.
@param KeyOptionNumber Key option number for Key####
@retval EFI_SUCCESS Unregister hotkey successfully.
@retval EFI_NOT_FOUND No Key#### is found for the given Key Option number.
**/
EFI_STATUS
UnregisterHotkey (
IN UINT16 KeyOptionNumber
)
/*++
Routine Description:
Delete Key#### for the given Key Option number.
Arguments:
KeyOptionNumber - Key option number for Key####
Returns:
EFI_SUCCESS - Unregister hotkey successfully.
EFI_NOT_FOUND - No Key#### is found for the given Key Option number.
--*/
{
UINT16 KeyOption[10];
UINTN Index;
@ -318,27 +303,22 @@ Returns:
return Status;
}
EFI_STATUS
HotkeyCallback (
IN EFI_KEY_DATA *KeyData
)
/*++
Routine Description:
/**
This is the common notification function for HotKeys, it will be registered
with SimpleTextInEx protocol interface - RegisterKeyNotify() of ConIn handle.
Arguments:
KeyData - A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed.
@param KeyData A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed.
Returns:
@retval EFI_SUCCESS KeyData is successfully processed.
EFI_SUCCESS - KeyData is successfully processed.
--*/
**/
EFI_STATUS
HotkeyCallback (
IN EFI_KEY_DATA *KeyData
)
{
BOOLEAN HotkeyCatched;
LIST_ENTRY BootLists;
@ -456,26 +436,21 @@ Returns:
return Status;
}
/**
Register the common HotKey notify function to given SimpleTextInEx protocol instance.
@param SimpleTextInEx Simple Text Input Ex protocol instance
@retval EFI_SUCCESS Register hotkey notification function successfully.
@retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures.
**/
EFI_STATUS
HotkeyRegisterNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleTextInEx
)
/*++
Routine Description:
Register the common HotKey notify function to given SimpleTextInEx protocol instance.
Arguments:
SimpleTextInEx - Simple Text Input Ex protocol instance
Returns:
EFI_SUCCESS - Register hotkey notification function successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate necessary data structures.
--*/
{
UINTN Index;
EFI_STATUS Status;
@ -513,26 +488,22 @@ Returns:
return EFI_SUCCESS;
}
/**
Callback function for SimpleTextInEx protocol install events
@param Event the event that is signaled.
@param Context not used here.
@return VOID
**/
VOID
EFIAPI
HotkeyEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
/*++
Routine Description:
Callback function for SimpleTextInEx protocol install events
Arguments:
Standard event notification function arguments:
Event - the event that is signaled.
Context - not used here.
Returns:
--*/
{
EFI_STATUS Status;
UINTN BufferSize;
@ -566,25 +537,20 @@ Returns:
}
}
/**
Insert Key Option to hotkey list.
@param KeyOption The Hot Key Option to be added to hotkey list.
@retval EFI_SUCCESS Add to hotkey list success.
**/
EFI_STATUS
HotkeyInsertList (
IN EFI_KEY_OPTION *KeyOption
)
/*++
Routine Description:
Insert Key Option to hotkey list.
Arguments:
KeyOption - The Hot Key Option to be added to hotkey list.
Returns:
EFI_SUCCESS - Add to hotkey list success.
--*/
{
BDS_HOTKEY_OPTION *HotkeyLeft;
BDS_HOTKEY_OPTION *HotkeyRight;
@ -664,25 +630,20 @@ Returns:
return EFI_SUCCESS;
}
/**
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
@param VOID
@retval EFI_SUCCESS Hotkey services successfully initialized.
**/
EFI_STATUS
InitializeHotkeyService (
VOID
)
/*++
Routine Description:
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
Arguments:
None
Returns:
EFI_SUCCESS - Hotkey services successfully initialized.
--*/
{
EFI_STATUS Status;
UINT32 BootOptionSupport;

View File

@ -37,72 +37,57 @@ typedef struct {
#define VarKeyOrder L"KeyOrder"
/**
Create Key#### for the given hotkey.
@param KeyOption - The Hot Key Option to be added.
@param KeyOptionNumber - The key option number for Key#### (optional).
@retval EFI_SUCCESS Register hotkey successfully.
@retval EFI_INVALID_PARAMETER The hotkey option is invalid.
**/
EFI_STATUS
RegisterHotkey (
IN EFI_KEY_OPTION *KeyOption,
OUT UINT16 *KeyOptionNumber
)
/*++
Routine Description:
Create Key#### for the given hotkey.
Arguments:
KeyOption - The Hot Key Option to be added.
KeyOptionNumber - The key option number for Key#### (optional).
Returns:
EFI_SUCCESS - Register hotkey successfully.
EFI_INVALID_PARAMETER - The hotkey option is invalid.
--*/
;
/**
Delete Key#### for the given Key Option number.
@param KeyOptionNumber - Key option number for Key####
@retval EFI_SUCCESS Unregister hotkey successfully.
@retval EFI_NOT_FOUND No Key#### is found for the given Key Option number.
**/
EFI_STATUS
UnregisterHotkey (
IN UINT16 KeyOptionNumber
)
/*++
Routine Description:
Delete Key#### for the given Key Option number.
Arguments:
KeyOptionNumber - Key option number for Key####
Returns:
EFI_SUCCESS - Unregister hotkey successfully.
EFI_NOT_FOUND - No Key#### is found for the given Key Option number.
--*/
;
/**
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
@param VOID
@retval EFI_SUCCESS Hotkey services successfully initialized.
**/
EFI_STATUS
InitializeHotkeyService (
VOID
)
/*++
Routine Description:
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
Arguments:
None
Returns:
EFI_SUCCESS - Hotkey services successfully initialized.
--*/
;
#endif

View File

@ -15,27 +15,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "HwErrRecSupport.h"
/**
Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
level of support for Hardware Error Record Persistence that is implemented
by the platform.
@param HwErrRecSupportLevel
zero value - Indicates that the platform implements no support for
Hardware Error Record Persistence.
non-zero value - Indicates that the platform implements Hardware Error
Record Persistence.
@return VOID
**/
VOID
InitializeHwErrRecSupport (
IN UINT16 HwErrRecSupportLevel
)
/*++
Routine Description:
Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
level of support for Hardware Error Record Persistence that is implemented
by the platform.
Arguments:
HwErrRecSupportLevel
zero value - Indicates that the platform implements no support for
Hardware Error Record Persistence.
non-zero value - Indicates that the platform implements Hardware Error
Record Persistence.
Returns:
--*/
{
EFI_STATUS Status;

View File

@ -18,27 +18,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Bds.h"
/**
Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
level of support for Hardware Error Record Persistence that is implemented
by the platform.
@param HwErrRecSupportLevel
zero value - Indicates that the platform implements no support for
Hardware Error Record Persistence.
non-zero value - Indicates that the platform implements Hardware Error
Record Persistence.
@return VOID
**/
VOID
InitializeHwErrRecSupport (
IN UINT16 HwErrRecSupportLevel
)
/*++
Routine Description:
Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
level of support for Hardware Error Record Persistence that is implemented
by the platform.
Arguments:
HwErrRecSupportLevel
zero value - Indicates that the platform implements no support for
Hardware Error Record Persistence.
non-zero value - Indicates that the platform implements Hardware Error
Record Persistence.
Returns:
--*/
;
#endif

View File

@ -250,21 +250,19 @@ FONT_PACK_BIN mFontBin = {
}
};
/**
Routine to export glyphs to the HII database. This is in addition to whatever is defined in the Graphics Console driver.
@param VOID
@return VOID
**/
VOID
ExportFonts (
VOID
)
/*++
Routine Description:
Routine to export glyphs to the HII database. This is in addition to whatever is defined in the Graphics Console driver.
Arguments:
None
Returns:
--*/
{
EFI_STATUS Status;
EFI_HANDLE DriverHandle;
@ -286,22 +284,20 @@ Returns:
FreePool (PackageList);
}
/**
Determine the current language that will be used
based on language related EFI Variables
@param LangCodesSettingRequired - If required to set LangCode variable
@return VOID
**/
VOID
InitializeLanguage (
BOOLEAN LangCodesSettingRequired
)
/*++
Routine Description:
Determine the current language that will be used
based on language related EFI Variables
Arguments:
LangCodesSettingRequired - If required to set LangCode variable
Returns:
--*/
{
EFI_STATUS Status;
UINTN Size;

View File

@ -17,22 +17,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "String.h"
/**
Determine the current language that will be used
based on language related EFI Variables
@param LangCodesSettingRequired - If required to set LangCode variable
@return VOID
**/
VOID
InitializeLanguage (
BOOLEAN LangCodesSettingRequired
)
/*++
Routine Description:
Determine the current language that will be used
based on language related EFI Variables
Arguments:
LangCodesSettingRequired - If required to set LangCode variable
Returns:
--*/
;
#endif // _LANGUAGE_H_

View File

@ -18,6 +18,21 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// BDS Platform Functions
//
/**
Show progress bar with title above it. It only works in Graphics mode.
@param TitleForeground Foreground color for Title.
@param TitleBackground Background color for Title.
@param Title Title above progress bar.
@param ProgressColor Progress bar color.
@param Progress Progress (0-100)
@param PreviousValue The previous value of the progress.
@retval EFI_STATUS Success update the progress bar
**/
EFI_STATUS
PlatformBdsShowProgress (
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,
@ -27,25 +42,6 @@ PlatformBdsShowProgress (
IN UINTN Progress,
IN UINTN PreviousValue
)
/*++
Routine Description:
Show progress bar with title above it. It only works in Graphics mode.
Arguments:
TitleForeground - Foreground color for Title.
TitleBackground - Background color for Title.
Title - Title above progress bar.
ProgressColor - Progress bar color.
Progress - Progress (0-100)
Returns:
EFI_STATUS - Success update the progress bar
--*/
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
@ -196,27 +192,22 @@ Returns:
return EFI_SUCCESS;
}
EFI_STATUS
BdsMemoryTest (
IN EXTENDMEM_COVERAGE_LEVEL Level
)
/*++
Routine Description:
/**
Perform the memory test base on the memory test intensive level,
and update the memory resource.
Arguments:
Level - The memory test intensive level.
@param Level The memory test intensive level.
Returns:
@retval EFI_STATUS Success test all the system memory and update
the memory resource
EFI_STATUS - Success test all the system memory and update
the memory resource
--*/
**/
EFI_STATUS
BdsMemoryTest (
IN EXTENDMEM_COVERAGE_LEVEL Level
)
{
EFI_STATUS Status;
EFI_STATUS KeyStatus;

View File

@ -22,22 +22,19 @@ EFI_GUID mBdsStringPackGuid = {
0x7bac95d3, 0xddf, 0x42f3, 0x9e, 0x24, 0x7c, 0x64, 0x49, 0x40, 0x37, 0x9a
};
/**
Initialize HII global accessor for string support
@param VOID
@retval EFI_SUCCESS String support initialize success.
**/
EFI_STATUS
InitializeStringSupport (
VOID
)
/*++
Routine Description:
Initialize HII global accessor for string support
Arguments:
None
Returns:
EFI_SUCCESS - String support initialize success.
--*/
{
EFI_STATUS Status;
EFI_HANDLE DriverHandle;
@ -70,23 +67,20 @@ Returns:
return Status;
}
/**
Get string by string id from HII Interface
@param Id String ID.
@retval CHAR16 * String from ID.
@retval NULL If error occurs.
**/
CHAR16 *
GetStringById (
IN EFI_STRING_ID Id
)
/*++
Routine Description:
Get string by string id from HII Interface
Arguments:
Id - String ID.
Returns:
CHAR16 * - String from ID.
NULL - If error occurs.
--*/
{
CHAR16 *String;

View File

@ -34,16 +34,45 @@ extern UINT8 BdsDxeStrings[];
0x7777E939, 0xD57E, 0x4DCB, 0xA0, 0x8E, 0x64, 0xD7, 0x98, 0x57, 0x1E, 0x0F \
}
/**
Get string by string id from HII Interface
@param Id String ID.
@retval CHAR16 * String from ID.
@retval NULL If error occurs.
**/
CHAR16 *
GetStringById (
IN EFI_STRING_ID Id
);
/**
Initialize HII global accessor for string support
@param VOID
@retval EFI_SUCCESS String support initialize success.
**/
EFI_STATUS
InitializeStringSupport (
VOID
);
/**
Call the browser and display the front page
@param VOID No input.
@return Status code that will be returned by
EFI_FORM_BROWSER2_PROTOCOL.SendForm ().
**/
EFI_STATUS
CallFrontPage (
VOID