#ifndef _BDS_MODULE_H_\r
#define _BDS_MODULE_H_\r
\r
-#undef EFI_SPECIFICATION_VERSION\r
-#define EFI_SPECIFICATION_VERSION 0x0002000A\r
#include <PiDxe.h>\r
#include <MdeModuleHii.h>\r
\r
#include <Library/PlatformBdsLib.h>\r
\r
#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_FROM_THIS(_this) \\r
- CR (_this, \\r
- EFI_BDS_ARCH_PROTOCOL_INSTANCE, \\r
- Bds, \\r
- EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \\r
+ CR ((_this), \\r
+ EFI_BDS_ARCH_PROTOCOL_INSTANCE, \\r
+ Bds, \\r
+ EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \\r
)\r
\r
/**\r
\r
Show progress bar with title above it. It only works in Graphics mode.\r
\r
-\r
@param TitleForeground Foreground color for Title.\r
@param TitleBackground Background color for Title.\r
@param Title Title above progress bar.\r
\r
Install Boot Device Selection Protocol\r
\r
-\r
@param ImageHandle The image handle.\r
@param SystemTable The system table.\r
\r
@retval EFI_SUCEESS BDS has finished initializing.\r
- Rerun the\r
- dispatcher and recall BDS.Entry\r
- @retval Other Return value from AllocatePool()\r
- or gBS->InstallProtocolInterface\r
+ Return the dispatcher and recall BDS.Entry\r
+ @retval Other Return status from AllocatePool() or gBS->InstallProtocolInterface\r
\r
**/\r
EFI_STATUS\r
Service routine for BdsInstance->Entry(). Devices are connected, the\r
consoles are initialized, and the boot options are tried.\r
\r
- @param This - Protocol Instance structure.\r
+ @param This Protocol Instance structure.\r
\r
**/\r
VOID\r
/** @file\r
- The entry of the bds\r
+ This module produce main entry for BDS phase - BdsEntry. \r
+ When this module was dispatched by DxeCore, gEfiBdsArchProtocolGuid will be installed\r
+ which contains interface of BdsEntry.\r
+ After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
+ to enter BDS phase.\r
\r
Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
\r
Install Boot Device Selection Protocol\r
\r
-\r
@param ImageHandle The image handle.\r
@param SystemTable The system table.\r
\r
@retval EFI_SUCEESS BDS has finished initializing.\r
- Rerun the\r
- dispatcher and recall BDS.Entry\r
- @retval Other Return value from AllocatePool()\r
- or gBS->InstallProtocolInterface\r
+ Return the dispatcher and recall BDS.Entry\r
+ @retval Other Return status from AllocatePool() or gBS->InstallProtocolInterface\r
\r
**/\r
EFI_STATUS\r
Service routine for BdsInstance->Entry(). Devices are connected, the\r
consoles are initialized, and the boot options are tried.\r
\r
- @param This - Protocol Instance structure.\r
+ @param This Protocol Instance structure.\r
\r
**/\r
VOID\r
order list.\r
\r
\r
- @param CurrentBbsEntry Pointer to current BBS table.\r
- @param CurrentBbsDevPath Pointer to the Device Path Protocol instance of BBS\r
- @param Index Index of the specified entry in BBS table.\r
- @param BootOrderList On input, the original boot order list.\r
- On output, the new boot order list attached with the\r
- created node.\r
- @param BootOrderListSize On input, the original size of boot order list.\r
- - On output, the size of new boot order list.\r
+ @param CurrentBbsEntry Pointer to current BBS table.\r
+ @param CurrentBbsDevPath Pointer to the Device Path Protocol instance of BBS\r
+ @param Index Index of the specified entry in BBS table.\r
+ @param BootOrderList On input, the original boot order list.\r
+ On output, the new boot order list attached with the\r
+ created node.\r
+ @param BootOrderListSize On input, the original size of boot order list.\r
+ On output, the size of new boot order list.\r
\r
@retval EFI_SUCCESS Boot Option successfully created.\r
@retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.\r
if (BootOrder != NULL) {\r
FreePool (BootOrder);\r
}\r
- //\r
- // For debug\r
- //\r
- PrintBbsTable (LocalBbsTable);\r
\r
+ DEBUG_CODE_BEGIN();\r
+ PrintBbsTable (LocalBbsTable);\r
+ DEBUG_CODE_END();\r
+ \r
return Status;\r
}\r
\r
@param CallbackData The BMM context data.\r
\r
- \r
-\r
**/\r
VOID\r
InitAllMenu (\r
/**\r
Free up all Menu Option list.\r
\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
FreeAllMenu (\r
/**\r
Intialize all the string depositories.\r
\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
InitializeStringDepository (\r
/**\r
Fetch a usable string node from the string depository and return the string token.\r
\r
-\r
@param CallbackData The BMM context data.\r
@param StringDepository The string repository.\r
\r
/**\r
Reclaim string depositories by moving the current node pointer to list head..\r
\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
ReclaimStringDepository (\r
/**\r
Release resource for all the string depositories.\r
\r
-\r
- \r
-\r
- \r
-\r
**/\r
VOID\r
CleanUpStringDepository (\r