the entire string is translated.\r
\r
\r
- @param a Pointer to input Ascii string.\r
+ @param AStr Pointer to input Ascii string.\r
@param Size The number of characters to translate.\r
- @param u Pointer to output Unicode string buffer.\r
+ @param UStr Pointer to output Unicode string buffer.\r
\r
@return None\r
\r
**/\r
VOID\r
AsciiToUnicodeSize (\r
- IN UINT8 *a,\r
+ IN UINT8 *AStr,\r
IN UINTN Size,\r
- OUT UINT16 *u\r
+ OUT UINT16 *UStr\r
)\r
{\r
- UINTN i;\r
+ UINTN Idx;\r
\r
- i = 0;\r
- while (a[i] != 0) {\r
- u[i] = (CHAR16) a[i];\r
- if (i == Size) {\r
+ Idx = 0;\r
+ while (AStr[Idx] != 0) {\r
+ UStr[Idx] = (CHAR16) AStr[Idx];\r
+ if (Idx == Size) {\r
break;\r
}\r
\r
- i++;\r
+ Idx++;\r
}\r
- u[i] = 0;\r
+ UStr[Idx] = 0;\r
}\r
\r
/**\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Build Legacy Device Name String according.\r
\r
- @param CurBBSEntry EDES_TODO: Add parameter description\r
- @param Index EDES_TODO: Add parameter description\r
- @param BufSize EDES_TODO: Add parameter description\r
- @param BootString EDES_TODO: Add parameter description\r
+ @param CurBBSEntry BBS Table.\r
+ @param Index Index.\r
+ @param BufSize The buffer size.\r
+ @param BootString The output string.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @return VOID No output.\r
\r
**/\r
VOID\r
CHAR16 *Fmt;\r
CHAR16 *Type;\r
UINT8 *StringDesc;\r
- CHAR16 temp[80];\r
+ CHAR16 Temp[80];\r
\r
switch (Index) {\r
//\r
//\r
// Only get fisrt 32 characters, this is suggested by BBS spec\r
//\r
- AsciiToUnicodeSize (StringDesc, 32, temp);\r
+ AsciiToUnicodeSize (StringDesc, 32, Temp);\r
Fmt = L"%s";\r
- Type = temp;\r
+ Type = Temp;\r
}\r
\r
//\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Check if the boot option is a legacy one.\r
\r
- @param BootOptionVar EDES_TODO: Add parameter description\r
- @param BbsEntry EDES_TODO: Add parameter description\r
- @param BbsIndex EDES_TODO: Add parameter description\r
+ @param BootOptionVar The boot option data payload.\r
+ @param BbsEntry The BBS Table.\r
+ @param BbsIndex The table index.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval TRUE It is a legacy boot option.\r
+ @retval FALSE It is not a legacy boot option.\r
\r
**/\r
BOOLEAN\r
}\r
\r
/**\r
+ Delete all the invalid legacy boot options.\r
\r
- Delete boot option specified by OptionNumber and adjust the boot order.\r
-\r
- @param OptionNumber The boot option to be deleted.\r
- @param BootOrder Boot order list to be adjusted by remove this boot option.\r
- @param BootOrderSize The size of Boot order list will be modified.\r
\r
- @retval EFI_SUCCESS The boot option is deleted successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-BdsDeleteBootOption (\r
- IN UINTN OptionNumber,\r
- IN OUT UINT16 *BootOrder,\r
- IN OUT UINTN *BootOrderSize\r
- )\r
-{\r
- UINT16 BootOption[100];\r
- UINTN Index;\r
- EFI_STATUS Status;\r
- UINTN Index2Del;\r
-\r
- Status = EFI_SUCCESS;\r
- Index2Del = 0;\r
-\r
- UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", OptionNumber);\r
- Status = EfiLibDeleteVariable (BootOption, &gEfiGlobalVariableGuid);\r
- //\r
- // adjust boot order array\r
- //\r
- for (Index = 0; Index < *BootOrderSize / sizeof (UINT16); Index++) {\r
- if (BootOrder[Index] == OptionNumber) {\r
- Index2Del = Index;\r
- break;\r
- }\r
- }\r
-\r
- if (Index != *BootOrderSize / sizeof (UINT16)) {\r
- for (Index = 0; Index < *BootOrderSize / sizeof (UINT16) - 1; Index++) {\r
- if (Index >= Index2Del) {\r
- BootOrder[Index] = BootOrder[Index + 1];\r
- }\r
- }\r
-\r
- *BootOrderSize -= sizeof (UINT16);\r
- }\r
-\r
- return Status;\r
-\r
-}\r
-\r
-/**\r
- Delete all the invalid legacy boot options.\r
\r
@retval EFI_SUCCESS All invalide legacy boot options are deleted.\r
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.\r
@retval EFI_NOT_FOUND Fail to retrive variable of boot order.\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsDeleteAllInvalidLegacyBootOptions (\r
VOID\r
)\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Find all legacy boot option by device type.\r
\r
- @param BootOrder EDES_TODO: Add parameter description\r
- @param BootOptionNum EDES_TODO: Add parameter description\r
- @param DevType EDES_TODO: Add parameter description\r
- @param Attribute EDES_TODO: Add parameter description\r
- @param BbsIndex EDES_TODO: Add parameter description\r
- @param OptionNumber EDES_TODO: Add parameter description\r
+ @param BootOrder The boot order array.\r
+ @param BootOptionNum The number of boot option.\r
+ @param DevType Device type.\r
+ @param Attribute The boot option attribute.\r
+ @param BbsIndex The BBS table index.\r
+ @param OptionNumber The boot option index.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval TRUE The Legacy boot option is found.\r
+ @retval FALSE The legacy boot option is not found.\r
\r
**/\r
BOOLEAN\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Create a legacy boot option.\r
\r
- @param BbsItem EDES_TODO: Add parameter description\r
- @param Index EDES_TODO: Add parameter description\r
- @param BootOrderList EDES_TODO: Add parameter description\r
- @param BootOrderListSize EDES_TODO: Add parameter description\r
+ @param BbsItem The BBS Table entry.\r
+ @param Index Index of the specified entry in BBS table.\r
+ @param BootOrderList The boot order list.\r
+ @param BootOrderListSize The size of boot order list.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_OUT_OF_RESOURCE No enough memory.\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @return Other value if the legacy boot option is not created.\r
\r
**/\r
EFI_STATUS\r
\r
Add the legacy boot options from BBS table if they do not exist.\r
\r
+ \r
+\r
@retval EFI_SUCCESS The boot options are added successfully \r
or they are already in boot options.\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsAddNonExistingLegacyBootOptions (\r
VOID\r
)\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Fill the device order buffer.\r
\r
- @param BbsTable EDES_TODO: Add parameter description\r
- @param BbsType EDES_TODO: Add parameter description\r
- @param BbsCount EDES_TODO: Add parameter description\r
- @param Buf EDES_TODO: Add parameter description\r
+ @param BbsTable The BBS table.\r
+ @param BbsType The BBS Type.\r
+ @param BbsCount The BBS Count.\r
+ @param Buf device order buffer.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @return The device order buffer.\r
\r
**/\r
UINT16 *\r
IN BBS_TABLE *BbsTable,\r
IN BBS_TYPE BbsType,\r
IN UINTN BbsCount,\r
- IN UINT16 *Buf\r
+ OUT UINT16 *Buf\r
)\r
{\r
UINTN Index;\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Create the device order buffer.\r
\r
- @param BbsTable EDES_TODO: Add parameter description\r
- @param BbsCount EDES_TODO: Add parameter description\r
+ @param BbsTable The BBS table.\r
+ @param BbsCount The BBS Count.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCES The buffer is created and the EFI variable named \r
+ VAR_LEGACY_DEV_ORDER and EfiLegacyDevOrderGuid is\r
+ set correctly.\r
+ @return Other value if the set of EFI variable fails. Check gRT->SetVariable\r
+ for detailed information.\r
\r
**/\r
EFI_STATUS\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsUpdateLegacyDevOrder (\r
VOID\r
)\r
UINT16 *NewBEVPtr;\r
UINT16 *NewDevPtr;\r
UINT16 Length;\r
- UINT16 tmp;\r
+ UINT16 Tmp;\r
UINTN FDIndex;\r
UINTN HDIndex;\r
UINTN CDIndex;\r
\r
for (Index2 = Index + 1; Index2 < FDIndex; Index2++) {\r
if (0 == (NewFDPtr[Index2] & 0xFF00)) {\r
- tmp = NewFDPtr[Index];\r
+ Tmp = NewFDPtr[Index];\r
NewFDPtr[Index] = NewFDPtr[Index2];\r
- NewFDPtr[Index2] = tmp;\r
+ NewFDPtr[Index2] = Tmp;\r
break;\r
}\r
}\r
\r
for (Index2 = Index + 1; Index2 < HDIndex; Index2++) {\r
if (0 == (NewHDPtr[Index2] & 0xFF00)) {\r
- tmp = NewHDPtr[Index];\r
+ Tmp = NewHDPtr[Index];\r
NewHDPtr[Index] = NewHDPtr[Index2];\r
- NewHDPtr[Index2] = tmp;\r
+ NewHDPtr[Index2] = Tmp;\r
break;\r
}\r
}\r
\r
for (Index2 = Index + 1; Index2 < CDIndex; Index2++) {\r
if (0 == (NewCDPtr[Index2] & 0xFF00)) {\r
- tmp = NewCDPtr[Index];\r
+ Tmp = NewCDPtr[Index];\r
NewCDPtr[Index] = NewCDPtr[Index2];\r
- NewCDPtr[Index2] = tmp;\r
+ NewCDPtr[Index2] = Tmp;\r
break;\r
}\r
}\r
\r
for (Index2 = Index + 1; Index2 < NETIndex; Index2++) {\r
if (0 == (NewNETPtr[Index2] & 0xFF00)) {\r
- tmp = NewNETPtr[Index];\r
+ Tmp = NewNETPtr[Index];\r
NewNETPtr[Index] = NewNETPtr[Index2];\r
- NewNETPtr[Index2] = tmp;\r
+ NewNETPtr[Index2] = Tmp;\r
break;\r
}\r
}\r
\r
for (Index2 = Index + 1; Index2 < BEVIndex; Index2++) {\r
if (0 == (NewBEVPtr[Index2] & 0xFF00)) {\r
- tmp = NewBEVPtr[Index];\r
+ Tmp = NewBEVPtr[Index];\r
NewBEVPtr[Index] = NewBEVPtr[Index2];\r
- NewBEVPtr[Index2] = tmp;\r
+ NewBEVPtr[Index2] = Tmp;\r
break;\r
}\r
}\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Set Boot Priority for specified device type.\r
\r
- @param DeviceType EDES_TODO: Add parameter description\r
- @param LocalBbsTable EDES_TODO: Add parameter description\r
- @param Priority EDES_TODO: Add parameter description\r
+ @param DeviceType The device type.\r
+ @param LocalBbsTable The BBS table.\r
+ @param Priority The prority table.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS The function completes successfully.\r
+ @retval EFI_NOT_FOUND Failed to find device.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
-\r
- @param LocalBbsTable EDES_TODO: Add parameter description\r
+ Print the BBS Table.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param LocalBbsTable The BBS table.\r
\r
**/\r
VOID\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
BdsRefreshBbsTableForBoot (\r
IN BDS_COMMON_OPTION *Entry\r
)\r
\r
**/\r
\r
-#ifndef _EFI_BDS_BBS_SUPPORT_H\r
-#define _EFI_BDS_BBS_SUPPORT_H\r
+#ifndef _EFI_BDS_BBS_SUPPORT_H_\r
+#define _EFI_BDS_BBS_SUPPORT_H_\r
\r
#include "BootMaint.h"\r
-//\r
-// Bugbug: Candidate for a PCD entries\r
-//\r
+\r
#define MAX_BBS_ENTRIES 0x100\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Build Legacy Device Name String according.\r
\r
- @param CurBBSEntry EDES_TODO: Add parameter description\r
- @param Index EDES_TODO: Add parameter description\r
- @param BufSize EDES_TODO: Add parameter description\r
- @param BootString EDES_TODO: Add parameter description\r
+ @param CurBBSEntry BBS Table.\r
+ @param Index Index.\r
+ @param BufSize The buffer size.\r
+ @param BootString The output string.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @return VOID No output.\r
\r
**/\r
VOID\r
);\r
\r
/**\r
- EDES_TODO: Add function description.\r
-\r
- @param VOID EDES_TODO: Add parameter description\r
+ Delete all the invalid legacy boot options.\r
\r
- @return EDES_TODO: Add description for return value\r
+ \r
\r
+ @retval EFI_SUCCESS All invalide legacy boot options are deleted.\r
+ @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.\r
+ @retval EFI_NOT_FOUND Fail to retrive variable of boot order.\r
**/\r
EFI_STATUS\r
BdsDeleteAllInvalidLegacyBootOptions (\r
Add the legacy boot options from BBS table if they do not exist.\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ \r
\r
@retval EFI_SUCCESS The boot options are added successfully or they are already in boot options.\r
@retval others An error occurred when creating legacy boot options.\r
;\r
\r
/**\r
- EDES_TODO: Add function description.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ Add the legacy boot devices from BBS table into \r
+ the legacy device boot order.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS The boot devices are added successfully.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- EDES_TODO: Add function description.\r
\r
- @param Entry EDES_TODO: Add parameter description\r
+ Set the boot priority for BBS entries based on boot option entry and boot order.\r
\r
- @return EDES_TODO: Add description for return value\r
+ @param Entry The boot option is to be checked for refresh BBS table.\r
+ \r
+ @retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.\r
\r
**/\r
EFI_STATUS\r
/**\r
\r
Find the first instance of this Protocol\r
- in the system and return it's interface\r
+ in the system and return it's interface.\r
\r
\r
@param ProtocolGuid Provides the protocol to search for\r
Function deletes the variable specified by VarName and VarGuid.\r
\r
\r
- @param VarName - A Null-terminated Unicode string that is\r
+ @param VarName A Null-terminated Unicode string that is\r
the name of the vendor's variable.\r
\r
- @param VendorGuid - A unique identifier for the vendor.\r
+ @param VarGuid A unique identifier for the vendor.\r
\r
@retval EFI_SUCCESS The variable was found and removed\r
@retval EFI_UNSUPPORTED The variable store was inaccessible\r
UINT64 Count;\r
EFI_DATA_RECORD_HEADER *Record;\r
EFI_SUBCLASS_TYPE1_HEADER *DataHdr;\r
- EFI_GUID MiscGuid = EFI_MISC_SUBCLASS_GUID;\r
- EFI_MISC_ONBOARD_DEVICE_DATA *ob;\r
+ EFI_GUID MiscGuid;\r
+ EFI_MISC_ONBOARD_DEVICE_DATA *Ob;\r
EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *Port;\r
EFI_TIME CurTime;\r
\r
+ CopyGuid (&MiscGuid, &gEfiMiscSubClassGuid);\r
+\r
Status = gBS->LocateProtocol (\r
&gEfiDataHubProtocolGuid,\r
NULL,\r
//\r
DataHdr = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
if (EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER == DataHdr->RecordType) {\r
- ob = (EFI_MISC_ONBOARD_DEVICE_DATA *) (DataHdr + 1);\r
- if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &ob->OnBoardDevicePath, DevPath)) {\r
- GetProducerString (&Record->ProducerName, ob->OnBoardDeviceDescription, &Desc);\r
+ Ob = (EFI_MISC_ONBOARD_DEVICE_DATA *) (DataHdr + 1);\r
+ if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &Ob->OnBoardDevicePath, DevPath)) {\r
+ GetProducerString (&Record->ProducerName, Ob->OnBoardDeviceDescription, &Desc);\r
return Desc;\r
}\r
}\r
/**\r
Init all memu.\r
\r
- @param CallbackData The \r
-\r
- @return EDES_TODO: Add description for return value\r
+ @param CallbackData The BMM context data.\r
\r
**/\r
VOID\r
);\r
\r
/**\r
- EDES_TODO: Add function description.\r
-\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
- @return EDES_TODO: Add description for return value\r
+ Free up all Menu Option list.\r
\r
**/\r
VOID\r
@param Private The BMM context data.\r
@param CurrentFakeNVMap The current Fack NV Map.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
}\r
\r
/**\r
- Initialize the Boot Maintenance Utitliy\r
-\r
+ Initialize the Boot Maintenance Utitliy.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
\r
@retval EFI_SUCCESS utility ended successfully\r
@retval others contain some errors\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
/**\r
Free up all Menu Option list.\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Intialize all the string depositories.\r
\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Fetch a usable string node from the string depository and return the string token.\r
\r
\r
- @param CallbackData EDES_TODO: Add parameter description\r
- @param StringDepository - Pointer of the string depository.\r
+ @param CallbackData The BMM context data.\r
+ @param StringDepository The string repository.\r
\r
@retval EFI_STRING_ID String token.\r
\r
Reclaim string depositories by moving the current node pointer to list head..\r
\r
\r
- @param VOID \r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Release resource for all the string depositories.\r
\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Start boot maintenance manager\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS If BMM is invoked successfully.\r
@return Other value if BMM return unsuccessfully.\r
@param CallbackData The BMM context data.\r
\r
@retval EFI_SUCCESS If function complete successfully.\r
- @retturn Other value if the Setup Browser process BMM's pages and\r
+ @return Other value if the Setup Browser process BMM's pages and\r
return unsuccessfully.\r
\r
**/\r
\r
**/\r
\r
-#ifndef _BOOT_MAINT_H\r
-#define _BOOT_MAINT_H\r
+#ifndef _BOOT_MAINT_H_\r
+#define _BOOT_MAINT_H_\r
\r
#include "Bds.h"\r
#include "BBSsupport.h"\r
//\r
// Constants which are variable names used to access variables\r
//\r
-#define VarLegacyDevOrder L"LegacyDevOrder"\r
+#define VAR_LEGACY_DEV_ORDER L"LegacyDevOrder"\r
\r
-#define VarConOutMode L"ConOutMode"\r
+#define VAR_CON_OUT_MODE L"ConOutMode"\r
\r
//\r
// Guid of a NV Variable which store the information about the\r
//\r
// String Contant\r
//\r
-#define StrFloppy L"Floppy Drive #%02x"\r
-#define StrHardDisk L"HardDisk Drive #%02x"\r
-#define StrCDROM L"ATAPI CDROM Drive #%02x"\r
-#define StrNET L"NET Drive #%02x"\r
-#define StrBEV L"BEV Drive #%02x"\r
-#define StrFloppyHelp L"Select Floppy Drive #%02x"\r
-#define StrHardDiskHelp L"Select HardDisk Drive #%02x"\r
-#define StrCDROMHelp L"Select ATAPI CDROM Drive #%02x"\r
-#define StrNETHelp L"NET Drive #%02x"\r
-#define StrBEVHelp L"BEV Drive #%02x"\r
+#define STR_FLOPPY L"Floppy Drive #%02x"\r
+#define STR_HARDDISK L"HardDisk Drive #%02x"\r
+#define STR_CDROM L"ATAPI CDROM Drive #%02x"\r
+#define STR_NET L"NET Drive #%02x"\r
+#define STR_BEV L"BEV Drive #%02x"\r
+#define STR_FLOPPY_HELP L"Select Floppy Drive #%02x"\r
+#define STR_HARDDISK_HELP L"Select HardDisk Drive #%02x"\r
+#define STR_CDROM_HELP L"Select ATAPI CDROM Drive #%02x"\r
+#define STR_NET_HELP L"NET Drive #%02x"\r
+#define STR_BEV_HELP L"BEV Drive #%02x"\r
\r
//\r
// Variable created with this flag will be "Efi:...."\r
#define MAX_CHAR 480\r
#define MAX_CHAR_SIZE (MAX_CHAR * 2)\r
\r
-//\r
-// Check to see if current build support option active feature of\r
-// some driver option\r
-//\r
-#ifndef LOAD_OPTION_ACTIVE\r
-#define LOAD_OPTION_ACTIVE 0x00000001\r
-#endif\r
-\r
-//\r
-// Check to see if current build support force reconnect feature of\r
-// some driver option\r
-//\r
-#ifndef LOAD_OPTION_FORCE_RECONNECT\r
-#define LOAD_OPTION_FORCE_RECONNECT 0x00000002\r
-#endif\r
-\r
extern EFI_GUID mBootMaintGuid;\r
extern EFI_GUID mFileExplorerGuid;\r
\r
All files and sub-directories in current directory\r
will be stored in DirectoryMenu for future use.\r
\r
- @param FileOption Pointer for Dir to explore.\r
+ @param CallbackData The BMM context data.\r
+ @param MenuEntry The Menu Entry.\r
\r
- @retval TRUE Get files from current dir successfully.\r
- @retval FALSE Can't get files from current dir.\r
+ @retval EFI_SUCCESS Get files from current dir successfully.\r
+ @return Other value if can't get files from current dir.\r
\r
**/\r
EFI_STATUS\r
All valid handles in the system except those consume SimpleFs, LoadFile\r
are stored in DriverMenu for future use.\r
\r
- @param VOID \r
+ \r
\r
@retval EFI_SUCCESS The function complets successfully.\r
@return Other value if failed to build the DriverMenu.\r
Build the BootOptionMenu according to BootOrder Variable.\r
This Routine will access the Boot#### to get EFI_LOAD_OPTION.\r
\r
- @param None\r
+ @param CallbackData The BMM context data.\r
\r
@return The number of the Var Boot####.\r
\r
/**\r
Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.\r
/**\r
Free out resouce allocated from Legacy Boot Options.\r
\r
- @param VOID.\r
+ .\r
\r
- @return VOID.\r
+ .\r
\r
**/\r
VOID\r
);\r
\r
/**\r
- Free resources allocated in Allocate Rountine\r
+ Free resources allocated in Allocate Rountine.\r
\r
@param FreeMenu Menu to be freed\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
Get the Option Number that has not been allocated for use.\r
\r
- @param VOID\r
+ \r
\r
@return The available Option Number.\r
\r
\r
Get the Option Number that is not in use.\r
\r
- @param VOID\r
+ \r
\r
@return The unused Option Number.\r
\r
// Locate all serial io devices for console\r
//\r
/**\r
- Build a list containing all serial devices\r
-\r
+ Build a list containing all serial devices.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @retval EFI_UNSUPPORTED No serial ports present.\r
\r
**/\r
EFI_STATUS\r
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function always complete successfully.\r
\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ EDES_TODO: Add parameter description\r
\r
@retval EFI_SUCCESS The function always complete successfully.\r
**/\r
\r
@param DevicePath\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
ChangeVariableDevicePath (\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
-);\r
+ IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ )\r
+;\r
\r
/**\r
Update the multi-instance device path of Terminal Device based on\r
**/\r
EFI_STATUS\r
ChangeTerminalDevicePath (\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
- BOOLEAN ChangeTerminal\r
-);\r
+ IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
+ IN BOOLEAN ChangeTerminal\r
+ );\r
//\r
// Variable operation by menu selection\r
//\r
make sure BootOrder is in valid state.\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ EDES_TODO: Add parameter description\r
\r
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to \r
BM_LOAD_CONTEXT marked for deletion is deleted\r
scratch by content from BootOptionMenu is needed.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The boot order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
make sure DriverOrder is in valid state.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS Load Option is successfully updated.\r
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
needed.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The driver order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
/**\r
Refresh the global UpdateData structure.\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
opcode deletion.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param UpdatePageId The form ID.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param UpdatePageId The form ID. It also spefies the legacy device type.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
UpdateSetLegacyDeviceOrderPage (\r
IN UINT16 UpdatePageId,\r
IN BMM_CALLBACK_DATA *CallbackData\r
-);\r
+ );\r
\r
\r
/**\r
/**\r
\r
Find the first instance of this Protocol\r
- in the system and return it's interface\r
+ in the system and return it's interface.\r
\r
\r
@param ProtocolGuid Provides the protocol to search for\r
\r
@param Name String part of EFI variable name\r
@param VendorGuid GUID part of EFI variable name\r
- @param VariableSize Returns the size of the EFI variable that was read\r
+ @param VarSize Returns the size of the EFI variable that was read\r
\r
@return Dynamically allocated memory that contains a copy of the EFI variable.\r
@return Caller is responsible freeing the buffer.\r
@param VarName - A Null-terminated Unicode string that is\r
the name of the vendor's variable.\r
\r
- @param VendorGuid - A unique identifier for the vendor.\r
+ @param VarGuid - A unique identifier for the vendor.\r
\r
@retval EFI_SUCCESS The variable was found and removed\r
@retval EFI_UNSUPPORTED The variable store was inaccessible\r
@param OptionIndex Returns the index number (#### in Boot####).\r
@param OptionSize Return the size of the Boot### variable.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID *\r
IN UINTN DeviceType,\r
OUT UINTN *OptionIndex,\r
OUT UINTN *OptionSize\r
- );\r
+ );\r
\r
/**\r
- Initialize the Boot Maintenance Utitliy\r
-\r
+ Initialize the Boot Maintenance Utitliy.\r
\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
- @retval EFI_SUCCESS utility ended successfully\r
- @retval others contain some errors\r
+ @retval EFI_SUCCESS utility ended successfully.\r
+ @retval others contain some errors.\r
\r
**/\r
EFI_STATUS\r
Start boot maintenance manager\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS If BMM is invoked successfully.\r
@return Other value if BMM return unsuccessfully.\r
Intialize all the string depositories.\r
\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Reclaim string depositories by moving the current node pointer to list head..\r
\r
\r
- @param VOID \r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
Release resource for all the string depositories.\r
\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param Private The BMM context data.\r
@param CurrentFakeNVMap The current Fack NV Map.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param Private The BMM context data.\r
@param NewPageId The original page ID.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
of the file to be boot from.\r
\r
@retval EFI_SUCCESS The function completed successfull.\r
- @retun Other value if the boot from the file fails.\r
+ @return Other value if the boot from the file fails.\r
\r
**/\r
EFI_STATUS\r
@param CallbackData The BMM context data.\r
\r
@retval EFI_SUCCESS If function complete successfully.\r
- @retturn Other value if the Setup Browser process BMM's pages and\r
+ @return Other value if the Setup Browser process BMM's pages and\r
return unsuccessfully.\r
\r
**/\r
}\r
\r
/**\r
- Free resources allocated in Allocate Rountine\r
+ Free resources allocated in Allocate Rountine.\r
\r
@param FreeMenu Menu to be freed\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
All files and sub-directories in current directory\r
will be stored in DirectoryMenu for future use.\r
\r
- @param FileOption Pointer for Dir to explore.\r
+ @param CallbackData The BMM context data.\r
+ @param MenuEntry The Menu Entry.\r
\r
- @retval TRUE Get files from current dir successfully.\r
- @retval FALSE Can't get files from current dir.\r
+ @retval EFI_SUCCESS Get files from current dir successfully.\r
+ @return Other value if can't get files from current dir.\r
\r
**/\r
EFI_STATUS\r
/**\r
Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@retval EFI_OUT_OF_RESOURCES No enough memory to complete this function.\r
/**\r
Free out resouce allocated from Legacy Boot Options.\r
\r
- @param VOID.\r
+ \r
\r
- @return VOID.\r
+ .\r
\r
**/\r
VOID\r
Build the BootOptionMenu according to BootOrder Variable.\r
This Routine will access the Boot#### to get EFI_LOAD_OPTION.\r
\r
- @param None\r
+ @param CallbackData The BMM context data.\r
\r
@return The number of the Var Boot####.\r
\r
All valid handles in the system except those consume SimpleFs, LoadFile\r
are stored in DriverMenu for future use.\r
\r
- @param VOID \r
+ \r
\r
@retval EFI_SUCCESS The function complets successfully.\r
@return Other value if failed to build the DriverMenu.\r
\r
Get the Option Number that has not been allocated for use.\r
\r
- @param VOID\r
+ \r
\r
@return The available Option Number.\r
\r
\r
Get the Option Number that is not in use.\r
\r
- @param VOID\r
+ \r
\r
@return The unused Option Number.\r
\r
**/\r
EFI_STATUS\r
ChangeTerminalDevicePath (\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
- IN BOOLEAN ChangeTerminal\r
+ IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
+ IN BOOLEAN ChangeTerminal\r
)\r
{\r
EFI_DEVICE_PATH_PROTOCOL *Node;\r
\r
@param DevicePath\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
}\r
\r
/**\r
- Sort Uart handles array with Acpi->UID from low to high\r
+ Sort Uart handles array with Acpi->UID from low to high.\r
\r
\r
@param Handles EFI_SERIAL_IO_PROTOCOL handle buffer\r
);\r
\r
/**\r
- Build a list containing all serial devices\r
+ Build a list containing all serial devices.\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
- @return EDES_TODO: Add description for return value\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @retval EFI_UNSUPPORTED No serial ports present.\r
\r
**/\r
EFI_STATUS\r
Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function always complete successfully.\r
\r
Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu\r
\r
\r
- @param VOID EDES_TODO: Add parameter description\r
+ EDES_TODO: Add parameter description\r
\r
@retval EFI_SUCCESS The function always complete successfully.\r
**/\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
ConOut = gST->ConOut;\r
MaxMode = (UINTN) (ConOut->Mode->MaxMode);\r
- ModeInfo = EfiLibGetVariable (VarConOutMode, &gEfiGenericPlatformVariableGuid);\r
+ ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);\r
\r
if (ModeInfo != NULL) {\r
CurrentCol = ModeInfo->Column;\r
@param CallbackData The BMM context data.\r
@param MenuOption Pointer to menu options to display.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
-#ifndef _FORM_GUID_H\r
-#define _FORM_GUID_H\r
+#ifndef _FORM_GUID_H_\r
+#define _FORM_GUID_H_\r
\r
#define BOOT_MAINT_FORMSET_GUID \\r
{ \\r
/**\r
Refresh the global UpdateData structure.\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
opcode deletion.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
of the file to be boot from.\r
\r
@retval EFI_SUCCESS The function completed successfull.\r
- @retun Other value if the boot from the file fails.\r
+ @return Other value if the boot from the file fails.\r
\r
**/\r
EFI_STATUS\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
}\r
\r
/**\r
- EDES_TODO: Add function description.\r
+ Update console page.\r
\r
- @param UpdatePageId EDES_TODO: Add parameter description\r
- @param ConsoleMenu EDES_TODO: Add parameter description\r
+ @param UpdatePageId The form ID to be updated.\r
+ @param ConsoleMenu The console menu list.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param OptionMenu The new list.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param UpdatePageId The form ID.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
@param OptionIndex Returns the index number (#### in Boot####).\r
@param OptionSize Return the size of the Boot### variable.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID *\r
@param UpdatePageId The form ID. It also spefies the legacy device type.\r
@param CallbackData The BMM context data.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
case FORM_SET_FD_ORDER_ID:\r
OptionMenu = (BM_MENU_OPTION *) &LegacyFDMenu;\r
Key = (UINT16) LEGACY_FD_QUESTION_ID;\r
- TypeStr = StrFloppy;\r
- TypeStrHelp = StrFloppyHelp;\r
+ TypeStr = STR_FLOPPY;\r
+ TypeStrHelp = STR_FLOPPY_HELP;\r
BbsType = BBS_FLOPPY;\r
LegacyOrder = CallbackData->BmmFakeNvData.LegacyFD;\r
OldData = CallbackData->BmmOldFakeNVData.LegacyFD;\r
case FORM_SET_HD_ORDER_ID:\r
OptionMenu = (BM_MENU_OPTION *) &LegacyHDMenu;\r
Key = (UINT16) LEGACY_HD_QUESTION_ID;\r
- TypeStr = StrHardDisk;\r
- TypeStrHelp = StrHardDiskHelp;\r
+ TypeStr = STR_HARDDISK;\r
+ TypeStrHelp = STR_HARDDISK_HELP;\r
BbsType = BBS_HARDDISK;\r
LegacyOrder = CallbackData->BmmFakeNvData.LegacyHD;\r
OldData = CallbackData->BmmOldFakeNVData.LegacyHD;\r
case FORM_SET_CD_ORDER_ID:\r
OptionMenu = (BM_MENU_OPTION *) &LegacyCDMenu;\r
Key = (UINT16) LEGACY_CD_QUESTION_ID;\r
- TypeStr = StrCDROM;\r
- TypeStrHelp = StrCDROMHelp;\r
+ TypeStr = STR_CDROM;\r
+ TypeStrHelp = STR_CDROM_HELP;\r
BbsType = BBS_CDROM;\r
LegacyOrder = CallbackData->BmmFakeNvData.LegacyCD;\r
OldData = CallbackData->BmmOldFakeNVData.LegacyCD;\r
case FORM_SET_NET_ORDER_ID:\r
OptionMenu = (BM_MENU_OPTION *) &LegacyNETMenu;\r
Key = (UINT16) LEGACY_NET_QUESTION_ID;\r
- TypeStr = StrNET;\r
- TypeStrHelp = StrNETHelp;\r
+ TypeStr = STR_NET;\r
+ TypeStrHelp = STR_NET_HELP;\r
BbsType = BBS_EMBED_NETWORK;\r
LegacyOrder = CallbackData->BmmFakeNvData.LegacyNET;\r
OldData = CallbackData->BmmOldFakeNVData.LegacyNET;\r
case FORM_SET_BEV_ORDER_ID:\r
OptionMenu = (BM_MENU_OPTION *) &LegacyBEVMenu;\r
Key = (UINT16) LEGACY_BEV_QUESTION_ID;\r
- TypeStr = StrBEV;\r
- TypeStrHelp = StrBEVHelp;\r
+ TypeStr = STR_BEV;\r
+ TypeStrHelp = STR_BEV_HELP;\r
BbsType = BBS_BEV_DEVICE;\r
LegacyOrder = CallbackData->BmmFakeNvData.LegacyBEV;\r
OldData = CallbackData->BmmOldFakeNVData.LegacyBEV;\r
@param Private The BMM context data.\r
@param NewPageId The original page ID.\r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
After deleting this boot option, call Var_ChangeBootOrder to\r
make sure BootOrder is in valid state.\r
\r
-\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to \r
BM_LOAD_CONTEXT marked for deletion is deleted\r
@return Others If failed to update the "BootOrder" variable after deletion. \r
scratch by content from BootOptionMenu is needed.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The boot order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
make sure DriverOrder is in valid state.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS Load Option is successfully updated.\r
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
needed.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The driver order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- @param VOID\r
+ \r
\r
- @return VOID\r
+ \r
\r
**/\r
VOID\r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
console device.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The function complete successfully.\r
@return The EFI variable can be saved. See gRT->SetVariable \r
@param HiiHandle The HII handle associated with the BMM formset.\r
@param DescriptionData The description of this driver option.\r
@param OptionalData The optional load option.\r
- @param ForceReconnect EDES_TODO: Add parameter description\r
+ @param ForceReconnect If to force reconnect.\r
\r
@retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
@retval EFI_SUCCESS If function completes successfully.\r
@retval EFI_SUCCESS If function completes successfully.\r
\r
**/\r
-\r
EFI_STATUS\r
Var_UpdateBootOption (\r
IN BMM_CALLBACK_DATA *CallbackData,\r
}\r
\r
Status = gRT->SetVariable (\r
- VarConOutMode,\r
+ VAR_CON_OUT_MODE,\r
&gEfiGenericPlatformVariableGuid,\r
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
sizeof (CONSOLE_OUT_MODE),\r
}\r
\r
/**\r
- Hook to enable UI timeout override behavior.\r
-\r
-\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
- EDES_TODO: Incomplete Descriptions NONE\r
+ Invoke Boot Manager. Hook to enable UI timeout override behavior.\r
\r
**/\r
VOID\r