From bddd8b2d17cd843e817650b589124de1386dc1bb Mon Sep 17 00:00:00 2001 From: klu2 Date: Fri, 19 Dec 2008 09:06:17 +0000 Subject: [PATCH] Refine comments for BDS module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7084 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/BdsDxe/Bds.h | 20 ++++++---------- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 15 ++++++------ .../Universal/BdsDxe/BootMaint/BBSsupport.c | 24 +++++++++---------- .../Universal/BdsDxe/BootMaint/BootMaint.c | 22 ----------------- 4 files changed, 27 insertions(+), 54 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/Bds.h b/MdeModulePkg/Universal/BdsDxe/Bds.h index b02dfc0c8e..56b709ecca 100644 --- a/MdeModulePkg/Universal/BdsDxe/Bds.h +++ b/MdeModulePkg/Universal/BdsDxe/Bds.h @@ -15,8 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _BDS_MODULE_H_ #define _BDS_MODULE_H_ -#undef EFI_SPECIFICATION_VERSION -#define EFI_SPECIFICATION_VERSION 0x0002000A #include #include @@ -73,17 +71,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #define EFI_BDS_ARCH_PROTOCOL_INSTANCE_FROM_THIS(_this) \ - CR (_this, \ - EFI_BDS_ARCH_PROTOCOL_INSTANCE, \ - Bds, \ - EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \ + CR ((_this), \ + EFI_BDS_ARCH_PROTOCOL_INSTANCE, \ + Bds, \ + EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \ ) /** 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. @@ -112,15 +109,12 @@ PlatformBdsShowProgress ( 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 + Return the dispatcher and recall BDS.Entry + @retval Other Return status from AllocatePool() or gBS->InstallProtocolInterface **/ EFI_STATUS @@ -135,7 +129,7 @@ BdsInitialize ( Service routine for BdsInstance->Entry(). Devices are connected, the consoles are initialized, and the boot options are tried. - @param This - Protocol Instance structure. + @param This Protocol Instance structure. **/ VOID diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index ba72ba2ee3..c70559e098 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -1,5 +1,9 @@ /** @file - The entry of the bds + This module produce main entry for BDS phase - BdsEntry. + When this module was dispatched by DxeCore, gEfiBdsArchProtocolGuid will be installed + which contains interface of BdsEntry. + After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked + to enter BDS phase. Copyright (c) 2004 - 2008, Intel Corporation.
All rights reserved. This program and the accompanying materials @@ -44,15 +48,12 @@ 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 + Return the dispatcher and recall BDS.Entry + @retval Other Return status from AllocatePool() or gBS->InstallProtocolInterface **/ EFI_STATUS @@ -262,7 +263,7 @@ BdsBootDeviceSelect ( Service routine for BdsInstance->Entry(). Devices are connected, the consoles are initialized, and the boot options are tried. - @param This - Protocol Instance structure. + @param This Protocol Instance structure. **/ VOID diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c index 96000749c9..94261a0bef 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c @@ -172,14 +172,14 @@ BdsBuildLegacyDevNameString ( 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. + @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. @@ -1654,10 +1654,10 @@ BdsRefreshBbsTableForBoot ( if (BootOrder != NULL) { FreePool (BootOrder); } - // - // For debug - // - PrintBbsTable (LocalBbsTable); + DEBUG_CODE_BEGIN(); + PrintBbsTable (LocalBbsTable); + DEBUG_CODE_END(); + return Status; } diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c index 48f750d444..33be4199a7 100644 --- a/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c +++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c @@ -1041,8 +1041,6 @@ InitializeBM ( @param CallbackData The BMM context data. - - **/ VOID InitAllMenu ( @@ -1068,10 +1066,6 @@ InitAllMenu ( /** Free up all Menu Option list. - - - - **/ VOID FreeAllMenu ( @@ -1090,11 +1084,6 @@ FreeAllMenu ( /** Intialize all the string depositories. - - - - - **/ VOID InitializeStringDepository ( @@ -1115,7 +1104,6 @@ InitializeStringDepository ( /** Fetch a usable string node from the string depository and return the string token. - @param CallbackData The BMM context data. @param StringDepository The string repository. @@ -1164,11 +1152,6 @@ GetStringTokenFromDepository ( /** Reclaim string depositories by moving the current node pointer to list head.. - - - - - **/ VOID ReclaimStringDepository ( @@ -1188,11 +1171,6 @@ ReclaimStringDepository ( /** Release resource for all the string depositories. - - - - - **/ VOID CleanUpStringDepository (