summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/BdsDxe/BootMaint
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-22 06:46:58 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-22 06:46:58 +0000
commit30394aa1750a8408313a029c316ee7c05b5b2900 (patch)
treeb7bddc3f94dfc8bfed60d2e796d5edecf8c53939 /MdeModulePkg/Universal/BdsDxe/BootMaint
parenta4ac2531086924d7d26740ea46624ff620218e70 (diff)
downloadedk2-platforms-30394aa1750a8408313a029c316ee7c05b5b2900.tar.xz
Code scrub for BdsDxe module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5547 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c83
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h6
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c12
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c31
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h59
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c30
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c23
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/Data.c114
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c3
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h22
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c45
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c21
12 files changed, 139 insertions, 310 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
index 4d5a4580c6..e11e279247 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
@@ -25,11 +25,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param AStr Pointer to input Ascii string.
- @param Size The number of characters to translate.
+ @param Size The number of characters to translate.
@param UStr Pointer to output Unicode string buffer.
- @return None
-
**/
VOID
AsciiToUnicodeSize (
@@ -53,38 +51,6 @@ AsciiToUnicodeSize (
}
/**
-
- 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
- )
-{
- UINTN Index;
-
- //
- // just buffer copy, not character copy
- //
- for (Index = 0; Index < Length; Index++) {
- *AStr++ = (CHAR8) *UStr++;
- }
-
- return Index;
-}
-
-/**
Build Legacy Device Name String according.
@param CurBBSEntry BBS Table.
@@ -92,15 +58,13 @@ UnicodeToAscii (
@param BufSize The buffer size.
@param BootString The output string.
- @return VOID No output.
-
**/
VOID
BdsBuildLegacyDevNameString (
- IN BBS_TABLE *CurBBSEntry,
- IN UINTN Index,
- IN UINTN BufSize,
- OUT CHAR16 *BootString
+ IN BBS_TABLE *CurBBSEntry,
+ IN UINTN Index,
+ IN UINTN BufSize,
+ OUT CHAR16 *BootString
)
{
CHAR16 *Fmt;
@@ -248,7 +212,7 @@ BdsCreateLegacyBootOption (
BOOLEAN IndexNotFound;
BBS_BBS_DEVICE_PATH *NewBbsDevPathNode;
- if (NULL == (*BootOrderList)) {
+ if ((*BootOrderList) == NULL) {
CurrentBootOptionNo = 0;
} else {
for (ArrayIndex = 0; ArrayIndex < (UINTN) (*BootOrderListSize / sizeof (UINT16)); ArrayIndex++) {
@@ -282,7 +246,8 @@ BdsCreateLegacyBootOption (
//
// Create new BBS device path node with description string
//
- UnicodeToAscii (BootDesc, StrSize (BootDesc), HelpString);
+ UnicodeStrToAsciiStr ((CONST CHAR16*)&BootDesc, (CHAR8*)&HelpString);
+
StringLen = AsciiStrLen (HelpString);
NewBbsDevPathNode = AllocateZeroPool (sizeof (BBS_BBS_DEVICE_PATH) + StringLen);
if (NewBbsDevPathNode == NULL) {
@@ -431,8 +396,6 @@ BdsIsLegacyBootOption (
/**
Delete all the invalid legacy boot options.
-
-
@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.
@@ -502,7 +465,10 @@ BdsDeleteAllInvalidLegacyBootOptions (
SafeFreePool (BootOrder);
return EFI_OUT_OF_RESOURCES;
}
-
+
+ //
+ // Skip Non-Legacy boot options
+ //
if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) {
SafeFreePool (BootOptionVar);
Index++;
@@ -544,6 +510,9 @@ BdsDeleteAllInvalidLegacyBootOptions (
);
}
+ //
+ // Adjust the number of boot options.
+ //
if (BootOrderSize != 0) {
Status = gRT->SetVariable (
L"BootOrder",
@@ -600,6 +569,9 @@ BdsFindLegacyBootOptionByDevType (
return Found;
}
+ //
+ // Loop all boot option from variable
+ //
for (BootOrderIndex = 0; BootOrderIndex < BootOptionNum; BootOrderIndex++) {
Index = (UINTN) BootOrder[BootOrderIndex];
UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", Index);
@@ -612,6 +584,9 @@ BdsFindLegacyBootOptionByDevType (
continue;
}
+ //
+ // Skip Non-legacy boot option
+ //
if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, BbsIndex)) {
SafeFreePool (BootOptionVar);
continue;
@@ -659,6 +634,9 @@ BdsCreateOneLegacyBootOption (
DevPath = NULL;
+ //
+ // Create device path node.
+ //
BbsDevPathNode.Header.Type = BBS_DEVICE_PATH;
BbsDevPathNode.Header.SubType = BBS_BBS_DP;
SetDevicePathNodeLength (&BbsDevPathNode.Header, sizeof (BBS_BBS_DEVICE_PATH));
@@ -691,8 +669,6 @@ BdsCreateOneLegacyBootOption (
Add the legacy boot options from BBS table if they do not exist.
-
-
@retval EFI_SUCCESS The boot options are added successfully
or they are already in boot options.
@@ -876,6 +852,9 @@ BdsCreateDevOrder (
Ptr = NULL;
Status = EFI_SUCCESS;
+ //
+ // Count all boot devices
+ //
for (Index = 0; Index < BbsCount; Index++) {
if (BbsTable[Index].BootPriority == BBS_IGNORE_ENTRY) {
continue;
@@ -913,6 +892,9 @@ BdsCreateDevOrder (
TotalSize += (HeaderSize + sizeof (UINT16) * NETCount);
TotalSize += (HeaderSize + sizeof (UINT16) * BEVCount);
+ //
+ // Create buffer to hold all boot device order
+ //
DevOrder = AllocateZeroPool (TotalSize);
if (NULL == DevOrder) {
return EFI_OUT_OF_RESOURCES;
@@ -960,6 +942,9 @@ BdsCreateDevOrder (
Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_BEV_DEVICE, BbsCount, (UINT16 *) Ptr);
}
+ //
+ // Save device order for legacy boot device to variable.
+ //
Status = gRT->SetVariable (
VAR_LEGACY_DEV_ORDER,
&EfiLegacyDevOrderGuid,
@@ -1535,7 +1520,7 @@ PrintBbsTable (
@param Entry The boot option is to be checked for refresh BBS table.
@retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.
-
+ @return status of BdsSetBootPriority4SameTypeDev()
**/
EFI_STATUS
BdsRefreshBbsTableForBoot (
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
index 542c9d9c46..95326b8d58 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
@@ -56,9 +56,6 @@ BdsDeleteAllInvalidLegacyBootOptions (
Add the legacy boot options from BBS table if they do not exist.
-
-
-
@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.
@@ -83,13 +80,12 @@ BdsUpdateLegacyDevOrder (
);
/**
-
Set the boot priority for BBS entries based on boot option entry and boot order.
@param Entry The boot option is to be checked for refresh BBS table.
@retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.
-
+ @return status of BdsSetBootPriority4SameTypeDev()
**/
EFI_STATUS
BdsRefreshBbsTableForBoot (
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
index c6b44d61d7..2e4b1c6fb2 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
@@ -48,8 +48,7 @@ EfiLibLocateProtocol (
Function opens and returns a file handle to the root directory of a volume.
-
- @param DeviceHandle - A handle for a device
+ @param DeviceHandle A handle for a device
@return A valid file handle or NULL is returned
@@ -96,9 +95,9 @@ EfiLibOpenRoot (
EFI interfaces.
- @param Status - Current status
- @param Buffer - Current allocated buffer, or NULL
- @param BufferSize - Current buffer size needed
+ @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.
@@ -173,9 +172,8 @@ EfiLibGetVariable (
/**
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.
+ the name of the vendor's variable.
@param VarGuid A unique identifier for the vendor.
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index 44b30d841e..03b3818167 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -25,12 +25,12 @@ EFI_DEVICE_PATH_PROTOCOL EndDevicePath[] = {
};
-EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;
-EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID;
-EFI_GUID mFileExplorerGuid = FILE_EXPLORE_FORMSET_GUID;
+EFI_GUID EfiLegacyDevOrderGuid = EFI_LEGACY_DEV_ORDER_VARIABLE_GUID;
+EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID;
+EFI_GUID mFileExplorerGuid = FILE_EXPLORE_FORMSET_GUID;
-CHAR16 mBootMaintStorageName[] = L"BmData";
-CHAR16 mFileExplorerStorageName[] = L"FeData";
+CHAR16 mBootMaintStorageName[] = L"BmData";
+CHAR16 mFileExplorerStorageName[] = L"FeData";
/**
Init all memu.
@@ -102,14 +102,14 @@ CreateMenuStringToken (
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.
+ @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
+ @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.
@@ -540,10 +540,9 @@ BootMaintCallback (
/**
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.
+ @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.
@@ -728,10 +727,8 @@ Error:
Discard all changes done to the BMM pages such as Boot Order change,
Driver order change.
- @param Private The BMM context data.
- @param CurrentFakeNVMap The current Fack NV Map.
-
-
+ @param Private The BMM context data.
+ @param CurrentFakeNVMap The current Fack NV Map.
**/
VOID
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
index d15bbe04c8..b899bc86d7 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
@@ -278,13 +278,11 @@ typedef enum {
#define STRING_DEPOSITORY_NUMBER 8
-//
-// #pragma pack(1)
-//
-// Serial Ports attributes, first one is the value for
-// return from callback function, stringtoken is used to
-// display the value properly
-//
+///
+/// Serial Ports attributes, first one is the value for
+/// return from callback function, stringtoken is used to
+/// display the value properly
+///
typedef struct {
UINTN Value;
UINT16 StringToken;
@@ -498,8 +496,6 @@ BOpt_FindFiles (
All valid handles in the system except those consume SimpleFs, LoadFile
are stored in DriverMenu for future use.
-
-
@retval EFI_SUCCESS The function complets successfully.
@return Other value if failed to build the DriverMenu.
@@ -637,8 +633,6 @@ BOpt_IsEfiApp (
Get the Option Number that has not been allocated for use.
-
-
@return The available Option Number.
**/
@@ -651,8 +645,6 @@ BOpt_GetBootOptionNumber (
Get the Option Number that is not in use.
-
-
@return The unused Option Number.
**/
@@ -1316,26 +1308,6 @@ EfiLibFileInfo (
);
/**
-
- 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
- );
-
-/**
This function converts an input device structure to a Unicode string.
@param DevPath A pointer to the device path structure.
@@ -1542,11 +1514,6 @@ BdsStartBootMaint (
/**
Intialize all the string depositories.
-
-
-
-
-
**/
VOID
InitializeStringDepository (
@@ -1571,12 +1538,6 @@ GetStringTokenFromDepository (
/**
Reclaim string depositories by moving the current node pointer to list head..
-
-
-
-
-
-
**/
VOID
ReclaimStringDepository (
@@ -1586,11 +1547,6 @@ ReclaimStringDepository (
/**
Release resource for all the string depositories.
-
-
-
-
-
**/
VOID
CleanUpStringDepository (
@@ -1623,8 +1579,6 @@ ApplyChangeHandler (
@param Private The BMM context data.
@param CurrentFakeNVMap The current Fack NV Map.
-
-
**/
VOID
DiscardChangeHandler (
@@ -1638,8 +1592,6 @@ DiscardChangeHandler (
@param Private The BMM context data.
@param NewPageId The original page ID.
-
-
**/
VOID
UpdatePageId (
@@ -1736,7 +1688,6 @@ FormSetDispatcher (
/**
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.
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
index 0d39ae8f8e..903ecfcdd3 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
@@ -24,7 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param MenuType The Menu type to be created.
-
@retval NULL If failed to create the menu.
@return The menu.
@@ -37,6 +36,9 @@ BOpt_CreateMenuEntry (
BM_MENU_ENTRY *MenuEntry;
UINTN ContextSize;
+ //
+ // Get context size according to menu type
+ //
switch (MenuType) {
case BM_LOAD_CONTEXT_SELECT:
ContextSize = sizeof (BM_LOAD_CONTEXT);
@@ -65,13 +67,15 @@ BOpt_CreateMenuEntry (
default:
ContextSize = 0;
break;
-
}
- if (0 == ContextSize) {
+ if (ContextSize == 0) {
return NULL;
}
+ //
+ // Create new menu entry
+ //
MenuEntry = AllocateZeroPool (sizeof (BM_MENU_ENTRY));
if (NULL == MenuEntry) {
return MenuEntry;
@@ -80,8 +84,7 @@ BOpt_CreateMenuEntry (
MenuEntry->VariableContext = AllocateZeroPool (ContextSize);
if (NULL == MenuEntry->VariableContext) {
SafeFreePool (MenuEntry);
- MenuEntry = NULL;
- return MenuEntry;
+ return NULL;
}
MenuEntry->Signature = BM_MENU_ENTRY_SIGNATURE;
@@ -94,8 +97,6 @@ BOpt_CreateMenuEntry (
@param MenuEntry A pointer to BM_MENU_ENTRY.
- @retval VOID
-
**/
VOID
BOpt_DestroyMenuEntry (
@@ -504,9 +505,6 @@ BOpt_FindFileSystem (
Free resources allocated in Allocate Rountine.
@param FreeMenu Menu to be freed
-
-
-
**/
VOID
BOpt_FreeMenu (
@@ -685,8 +683,6 @@ BOpt_FindFiles (
/**
Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().
-
-
@retval EFI_SUCCESS The function complete successfully.
@retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.
@@ -825,10 +821,6 @@ BOpt_GetLegacyOptions (
/**
Free out resouce allocated from Legacy Boot Options.
-
-
- .
-
**/
VOID
BOpt_FreeLegacyOptions (
@@ -1243,8 +1235,6 @@ BOpt_IsEfiApp (
All valid handles in the system except those consume SimpleFs, LoadFile
are stored in DriverMenu for future use.
-
-
@retval EFI_SUCCESS The function complets successfully.
@return Other value if failed to build the DriverMenu.
@@ -1334,8 +1324,6 @@ BOpt_FindDrivers (
Get the Option Number that has not been allocated for use.
-
-
@return The available Option Number.
**/
@@ -1410,8 +1398,6 @@ BOpt_GetBootOptionNumber (
Get the Option Number that is not in use.
-
-
@return The unused Option Number.
**/
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
index 39be20bdbc..635dc34173 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
@@ -170,9 +170,7 @@ ChangeTerminalDevicePath (
based on the new BaudRate, Data Bits, parity and Stop Bits
set.
- @param DevicePath
-
-
+ @param DevicePath terminal device's path
**/
VOID
@@ -235,14 +233,11 @@ ChangeVariableDevicePath (
Node = NextDevicePathNode (Node);
}
-
- return ;
}
/**
Retrieve ACPI UID of UART from device path
-
@param Handle The handle for the UART device.
@param AcpiUid The ACPI UID on output.
@@ -289,12 +284,8 @@ RetrieveUartUid (
/**
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
-
- @retval VOID
-
**/
VOID
SortedUartHandle (
@@ -558,7 +549,7 @@ LocateSerialIo (
@param DevicePath DevicePath that contains Com ports
@retval EFI_SUCCESS The update is successful.
-
+ @retval EFI_NOT_FOUND Can not find specific menu entry
**/
EFI_STATUS
UpdateComAttributeFromVariable (
@@ -857,9 +848,6 @@ GetConsoleMenu (
/**
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
-
-
-
@retval EFI_SUCCESS The function always complete successfully.
**/
@@ -877,9 +865,6 @@ GetAllConsoles (
/**
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
-
- EDES_TODO: Add parameter description
-
@retval EFI_SUCCESS The function always complete successfully.
**/
EFI_STATUS
@@ -981,11 +966,7 @@ IsTerminalDevicePath (
/**
Get mode number according to column and row
-
@param CallbackData The BMM context data.
-
-
-
**/
VOID
GetConsoleOutMode (
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/Data.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/Data.c
index f1c57469ae..00ef410229 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/Data.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/Data.c
@@ -23,9 +23,9 @@ STRING_DEPOSITORY *DriverOptionStrDepository;
STRING_DEPOSITORY *DriverOptionHelpStrDepository;
STRING_DEPOSITORY *TerminalStrDepository;
-//
-// Terminal type string token storage
-//
+///
+/// Terminal type string token storage
+///
UINT16 TerminalType[] = {
STRING_TOKEN(STR_COM_TYPE_0),
STRING_TOKEN(STR_COM_TYPE_1),
@@ -33,117 +33,117 @@ UINT16 TerminalType[] = {
STRING_TOKEN(STR_COM_TYPE_3),
};
-//
-// File system selection menu
-//
+///
+/// File system selection menu
+///
BM_MENU_OPTION FsOptionMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Console Input Device Selection Menu
-//
+///
+/// Console Input Device Selection Menu
+///
BM_MENU_OPTION ConsoleInpMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Console Output Device Selection Menu
-//
+///
+/// Console Output Device Selection Menu
+///
BM_MENU_OPTION ConsoleOutMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Error Output Device Selection Menu
-//
+///
+/// Error Output Device Selection Menu
+///
BM_MENU_OPTION ConsoleErrMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Boot Option from variable Menu
-//
+///
+/// Boot Option from variable Menu
+///
BM_MENU_OPTION BootOptionMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Driver Option from variable menu
-//
+///
+/// Driver Option from variable menu
+///
BM_MENU_OPTION DriverOptionMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Legacy FD Info from LegacyBios.GetBbsInfo()
-//
+///
+/// Legacy FD Info from LegacyBios.GetBbsInfo()
+///
BM_MENU_OPTION LegacyFDMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Legacy HD Info from LegacyBios.GetBbsInfo()
-//
+///
+/// Legacy HD Info from LegacyBios.GetBbsInfo()
+///
BM_MENU_OPTION LegacyHDMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Legacy CD Info from LegacyBios.GetBbsInfo()
-//
+///
+/// Legacy CD Info from LegacyBios.GetBbsInfo()
+///
BM_MENU_OPTION LegacyCDMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Legacy NET Info from LegacyBios.GetBbsInfo()
-//
+///
+/// Legacy NET Info from LegacyBios.GetBbsInfo()
+///
BM_MENU_OPTION LegacyNETMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Legacy NET Info from LegacyBios.GetBbsInfo()
-//
+///
+/// Legacy NET Info from LegacyBios.GetBbsInfo()
+///
BM_MENU_OPTION LegacyBEVMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Files and sub-directories in current directory menu
-//
+///
+/// Files and sub-directories in current directory menu
+///
BM_MENU_OPTION DirectoryMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
0
};
-//
-// Handles in current system selection menu
-//
+///
+/// Handles in current system selection menu
+///
BM_MENU_OPTION DriverMenu = {
BM_MENU_OPTION_SIGNATURE,
NULL,
@@ -156,9 +156,9 @@ BM_MENU_OPTION TerminalMenu = {
0
};
-//
-// Value and string token correspondency for BaudRate
-//
+///
+/// Value and string token correspondency for BaudRate
+///
COM_ATTR BaudRateList[19] = {
{
115200,
@@ -238,9 +238,9 @@ COM_ATTR BaudRateList[19] = {
}
};
-//
-// Value and string token correspondency for DataBits
-//
+///
+/// Value and string token correspondency for DataBits
+///
COM_ATTR DataBitsList[4] = {
{
5,
@@ -260,9 +260,9 @@ COM_ATTR DataBitsList[4] = {
}
};
-//
-// Value and string token correspondency for Parity
-//
+///
+/// Value and string token correspondency for Parity
+///
COM_ATTR ParityList[5] = {
{
NoParity,
@@ -286,9 +286,9 @@ COM_ATTR ParityList[5] = {
}
};
-//
-// Value and string token correspondency for Baudreate
-//
+///
+/// Value and string token correspondency for Baudreate
+///
COM_ATTR StopBitsList[3] = {
{
OneStopBit,
@@ -304,9 +304,9 @@ COM_ATTR StopBitsList[3] = {
}
};
-//
-// Guid for messaging path, used in Serial port setting.
-//
+///
+/// Guid for messaging path, used in Serial port setting.
+///
EFI_GUID TerminalTypeGuid[4] = {
DEVICE_PATH_MESSAGING_PC_ANSI,
DEVICE_PATH_MESSAGING_VT_100,
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
index fb49a6452d..8a946d3e42 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
@@ -17,12 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Update the File Explore page.
-
@param CallbackData The BMM context data.
@param MenuOption Pointer to menu options to display.
-
-
**/
VOID
UpdateFileExplorePage (
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h b/MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h
index d0346d8095..2523d64c66 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h
@@ -82,14 +82,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define VARSTORE_ID_BOOT_MAINT 0x1000
#define VARSTORE_ID_FILE_EXPLORER 0x1001
-//
-// This is the structure that will be used to store the
-// question's current value. Use it at initialize time to
-// set default value for each question. When using at run
-// time, this map is returned by the callback function,
-// so dynamically changing the question's value will be
-// possible through this mechanism
-//
+///
+/// This is the structure that will be used to store the
+/// question's current value. Use it at initialize time to
+/// set default value for each question. When using at run
+/// time, this map is returned by the callback function,
+/// so dynamically changing the question's value will be
+/// possible through this mechanism
+///
typedef struct {
//
// Three questions displayed at the main page
@@ -195,9 +195,9 @@ typedef struct {
#define KEY_VALUE_SAVE_AND_EXIT_DRIVER 0x1002
#define KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER 0x1003
-//
-// This is the data structure used by File Explorer formset
-//
+///
+/// This is the data structure used by File Explorer formset
+///
typedef struct {
UINT16 DescriptionData[75];
UINT16 OptionalData[127];
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index 5f8b1779df..ff3d42f00d 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -17,10 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Refresh the global UpdateData structure.
-
-
-
-
**/
VOID
RefreshUpdateData (
@@ -33,12 +29,9 @@ RefreshUpdateData (
/**
Add a "Go back to main page" tag in front of the form when there are no
"Apply changes" and "Discard changes" tags in the end of the form.
-
-
+
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdatePageStart (
@@ -70,8 +63,6 @@ UpdatePageStart (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdatePageEnd (
@@ -130,8 +121,6 @@ UpdatePageEnd (
opcode deletion.
@param CallbackData The BMM context data.
-
-
**/
VOID
CleanUpPage (
@@ -202,9 +191,6 @@ BootThisFile (
by TerminaMenu. This list will be inserted to form FORM_CON_COM_SETUP_ID.
@param CallbackData The BMM context data.
-
-
-
**/
VOID
UpdateConCOMPage (
@@ -241,8 +227,6 @@ UpdateConCOMPage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateBootDelPage (
@@ -288,8 +272,6 @@ UpdateBootDelPage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateDrvAddHandlePage (
@@ -323,11 +305,8 @@ UpdateDrvAddHandlePage (
Create a lit of driver option from global DriverOptionMenu. It
allow user to delete the driver option.
-
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateDrvDelPage (
@@ -372,8 +351,6 @@ UpdateDrvDelPage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateDriverAddHandleDescPage (
@@ -444,8 +421,6 @@ UpdateDriverAddHandleDescPage (
@param ConsoleMenu The console menu list.
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateConsolePage (
@@ -528,8 +503,6 @@ UpdateConsolePage (
@param OptionMenu The new list.
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateOrderPage (
@@ -597,8 +570,6 @@ UpdateOrderPage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateBootNextPage (
@@ -671,8 +642,6 @@ UpdateBootNextPage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateTimeOutPage (
@@ -710,11 +679,8 @@ UpdateTimeOutPage (
/**
Refresh the text mode page
-
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateConModePage (
@@ -822,8 +788,6 @@ UpdateConModePage (
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdateTerminalPage (
@@ -998,8 +962,6 @@ UpdateTerminalPage (
@param UpdatePageId The form ID.
@param CallbackData The BMM context data.
-
-
**/
VOID
UpdatePageBody (
@@ -1043,8 +1005,6 @@ UpdatePageBody (
@param OptionIndex Returns the index number (#### in Boot####).
@param OptionSize Return the size of the Boot### variable.
-
-
**/
VOID *
GetLegacyBootOptionVar (
@@ -1125,7 +1085,6 @@ GetLegacyBootOptionVar (
@param UpdatePageId The form ID. It also spefies the legacy device type.
@param CallbackData The BMM context data.
-
**/
VOID
@@ -1329,8 +1288,6 @@ UpdateSetLegacyDeviceOrderPage (
@param Private The BMM context data.
@param NewPageId The original page ID.
-
-
**/
VOID
UpdatePageId (
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
index 35faf1ae27..b97af5cd29 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
@@ -176,9 +176,6 @@ Var_ChangeBootOrder (
After deleting this Driver option, call Var_ChangeDriverOrder to
make sure DriverOrder is in valid state.
-
-
-
@retval EFI_SUCCESS Load Option is successfully updated.
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI
Variable.
@@ -237,9 +234,6 @@ Var_DelDriverOption (
rebuild DriverOrder from scratch by content from DriverOptionMenu is
needed.
-
-
-
@retval EFI_SUCCESS The driver order is updated successfully.
@return EFI_STATUS other than EFI_SUCCESS if failed to
Set the "DriverOrder" EFI Variable.
@@ -320,10 +314,6 @@ Var_ChangeDriverOrder (
based on the new BaudRate, Data Bits, parity and Stop Bits
set.
-
-
-
-
**/
VOID
Var_UpdateAllConsoleOption (
@@ -486,9 +476,6 @@ Var_UpdateConsoleOption (
This function delete and build multi-instance device path ConIn
console device.
-
-
-
@retval EFI_SUCCESS The function complete successfully.
@return The EFI variable can be saved. See gRT->SetVariable
for detail return information.
@@ -505,9 +492,6 @@ Var_UpdateConsoleInpOption (
This function delete and build multi-instance device path ConOut
console device.
-
-
-
@retval EFI_SUCCESS The function complete successfully.
@return The EFI variable can be saved. See gRT->SetVariable
for detail return information.
@@ -524,9 +508,6 @@ Var_UpdateConsoleOutOption (
This function delete and build multi-instance device path ErrOut
console device.
-
-
-
@retval EFI_SUCCESS The function complete successfully.
@return The EFI variable can be saved. See gRT->SetVariable
for detail return information.
@@ -1272,7 +1253,7 @@ Var_UpdateBBSOption (
StrSize (LegacyDeviceContext->Description)
);
- UnicodeToAscii (DescString, StrSize (DescString), DescAsciiString);
+ UnicodeStrToAsciiStr((CONST CHAR16*)&DescString, (CHAR8 *)&DescAsciiString);
NewOptionSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (DescString) +
sizeof (BBS_BBS_DEVICE_PATH);