From e6b7d45e9d61371ca3c70aa68389663b6f718721 Mon Sep 17 00:00:00 2001 From: klu2 Date: Tue, 2 Dec 2008 08:09:28 +0000 Subject: [PATCH] Code scrub for PlatformBdsLibNull.inf library instance. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6801 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Include/Library/PlatformBdsLib.h | 24 +- .../Library/PlatformBdsLibNull/BdsPlatform.c | 240 ++++++------------ .../Library/PlatformBdsLibNull/BdsPlatform.h | 4 +- .../PlatformBdsLibNull/PlatformBdsLibNull.inf | 3 +- .../Library/PlatformBdsLibNull/PlatformData.c | 24 +- 5 files changed, 106 insertions(+), 189 deletions(-) diff --git a/MdeModulePkg/Include/Library/PlatformBdsLib.h b/MdeModulePkg/Include/Library/PlatformBdsLib.h index 4740d7b68e..5b245f6f57 100644 --- a/MdeModulePkg/Include/Library/PlatformBdsLib.h +++ b/MdeModulePkg/Include/Library/PlatformBdsLib.h @@ -29,21 +29,21 @@ struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE { UINTN Signature; EFI_HANDLE Handle; EFI_BDS_ARCH_PROTOCOL Bds; - // - // Save the current boot mode - // + /// + /// Save the current boot mode + /// EFI_BOOT_MODE BootMode; - // - // Set true if boot with default settings - // + /// + /// Set true if boot with default settings + /// BOOLEAN DefaultBoot; - // - // The system default timeout for choose the boot option - // + /// + /// The system default timeout for choose the boot option + /// UINT16 TimeoutDefault; - // - // Memory Test Level - // + /// + /// Memory Test Level + /// EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel; }; diff --git a/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c b/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c index 5aaa72ab4d..0371b60372 100644 --- a/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c +++ b/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c @@ -1,6 +1,5 @@ /** @file - This file include all platform action which can be customized - by IBV/OEM. + This file include all platform action which can be customized by IBV/OEM. Copyright (c) 2004 - 2008, Intel Corporation.
All rights reserved. This program and the accompanying materials @@ -18,191 +17,132 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // BDS Platform Functions // +/** + Platform Bds init. Include the platform firmware vendor, revision + and so crc check. + + @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance + +**/ VOID PlatformBdsInit ( IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData ) -/*++ - -Routine Description: - - Platform Bds init. Incude the platform firmware vendor, revision - and so crc check. - -Arguments: - - PrivateData - The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance - -Returns: - - None. - ---*/ { return; } -EFI_STATUS -PlatformBdsConnectConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole - ) -/*++ - -Routine Description: - +/** Connect the predefined platform default console device. Always try to find and enable the vga device if have. -Arguments: - - PlatformConsole - Predfined platform default console device array. - -Returns: + @param PlatformConsole Predfined platform default console device array. - EFI_SUCCESS - Success connect at least one ConIn and ConOut - device, there must have one ConOut device is - active vga device. - - EFI_STATUS - Return the status of - BdsLibConnectAllDefaultConsoles () + @retval EFI_SUCCESS Success connect at least one ConIn and ConOut + device, there must have one ConOut device is + active vga device. + @return Return the status of BdsLibConnectAllDefaultConsoles () ---*/ +**/ +EFI_STATUS +PlatformBdsConnectConsole ( + IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole + ) { return EFI_SUCCESS; } +/** + Connect with predeined platform connect sequence, + the OEM/IBV can customize with their own connect sequence. +**/ VOID PlatformBdsConnectSequence ( VOID ) -/*++ - -Routine Description: - - Connect with predeined platform connect sequence, - the OEM/IBV can customize with their own connect sequence. - -Arguments: - - None. - -Returns: - - None. - ---*/ { return; } -VOID -PlatformBdsGetDriverOption ( - IN OUT LIST_ENTRY *BdsDriverLists - ) -/*++ - -Routine Description: - +/** Load the predefined driver option, OEM/IBV can customize this to load their own drivers - -Arguments: - BdsDriverLists - The header of the driver option link list. - -Returns: + @param BdsDriverLists - The header of the driver option link list. - None. - ---*/ +**/ +VOID +PlatformBdsGetDriverOption ( + IN OUT LIST_ENTRY *BdsDriverLists + ) { return; } +/** + Perform the platform diagnostic, such like test memory. OEM/IBV also + can customize this fuction to support specific platform diagnostic. + + @param MemoryTestLevel The memory test intensive level + @param QuietBoot Indicate if need to enable the quiet boot + +**/ VOID PlatformBdsDiagnostics ( IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel, IN BOOLEAN QuietBoot ) -/*++ - -Routine Description: - - Perform the platform diagnostic, such like test memory. OEM/IBV also - can customize this fuction to support specific platform diagnostic. - -Arguments: - - MemoryTestLevel - The memory test intensive level - - QuietBoot - Indicate if need to enable the quiet boot - -Returns: - - None. - ---*/ { return; } +/** + The function will excute with as the platform policy, current policy + is driven by boot mode. IBV/OEM can customize this code for their specific + policy action. + + + @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance + @param DriverOptionList The header of the driver option link list + @param BootOptionList The header of the boot option link list + +**/ VOID PlatformBdsPolicyBehavior ( IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData, IN OUT LIST_ENTRY *DriverOptionList, IN OUT LIST_ENTRY *BootOptionList ) -/*++ - -Routine Description: - - The function will excute with as the platform policy, current policy - is driven by boot mode. IBV/OEM can customize this code for their specific - policy action. - -Arguments: - - PrivateData - The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance - - DriverOptionList - The header of the driver option link list - - BootOptionList - The header of the boot option link list - -Returns: - - None. - ---*/ { return ; } -VOID -PlatformBdsBootSuccess ( - IN BDS_COMMON_OPTION *Option - ) -/*++ - -Routine Description: - +/** Hook point after a boot attempt succeeds. We don't expect a boot option to return, so the EFI 1.0 specification defines that you will default to an interactive mode and stop processing the BootOrder list in this case. This is alos a platform implementation and can be customized by IBV/OEM. -Arguments: - - Option - Pointer to Boot Option that succeeded to boot. + @param Option Pointer to Boot Option that succeeded to boot. -Returns: - - None. - ---*/ +**/ +VOID +PlatformBdsBootSuccess ( + IN BDS_COMMON_OPTION *Option + ) { return; } +/** + Hook point after a boot attempt fails. + + @param Option Pointer to Boot Option that failed to boot. + @param Status Status returned from failed boot. + @param ExitData Exit data returned from failed boot. + @param ExitDataSize Exit data size returned from failed boot. + +**/ VOID PlatformBdsBootFail ( IN BDS_COMMON_OPTION *Option, @@ -210,55 +150,31 @@ PlatformBdsBootFail ( IN CHAR16 *ExitData, IN UINTN ExitDataSize ) -/*++ - -Routine Description: - - Hook point after a boot attempt fails. - -Arguments: - - Option - Pointer to Boot Option that failed to boot. - - Status - Status returned from failed boot. - - ExitData - Exit data returned from failed boot. - - ExitDataSize - Exit data size returned from failed boot. - -Returns: - - None. - ---*/ { return; } -EFI_STATUS -PlatformBdsNoConsoleAction ( - VOID - ) -/*++ - -Routine Description: - +/** This function is remained for IBV/OEM to do some platform action, if there no console device can be connected. -Arguments: - - None. - -Returns: - - EFI_SUCCESS - Direct return success now. + @return EFI_SUCCESS Direct return success now. ---*/ +**/ +EFI_STATUS +PlatformBdsNoConsoleAction ( + VOID + ) { return EFI_SUCCESS; } +/** + This function locks platform flash that is not allowed to be updated during normal boot path. + The flash layout is platform specific. + + @retval EFI_SUCCESS The non-updatable flash areas. +**/ EFI_STATUS EFIAPI PlatformBdsLockNonUpdatableFlash ( diff --git a/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h b/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h index c25735117d..1d4990831f 100644 --- a/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h +++ b/MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef _BDS_PLATFORM_H -#define _BDS_PLATFORM_H +#ifndef _BDS_PLATFORM_H_ +#define _BDS_PLATFORM_H_ #include diff --git a/MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf b/MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf index 630680e0aa..9ff7dc73f0 100644 --- a/MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf +++ b/MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf @@ -1,6 +1,7 @@ #/** @file # -# Component name for module GenericBdsLib +# Provide NULL implementation for PlatformBdsLib library class interfaces which +# should be implemented by OEM. # # Copyright (c) 2007 - 2008, Intel Corporation.
# All rights reserved. This program and the accompanying materials diff --git a/MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c b/MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c index 7e4adc0007..a8763487b3 100644 --- a/MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c +++ b/MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c @@ -15,18 +15,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "BdsPlatform.h" -// -// Predefined platform default time out value -// +/// +/// Predefined platform default time out value +/// UINT16 gPlatformBootTimeOutDefault = 10; // // Platform specific keyboard device path // -// -// Predefined platform default console device path -// +/// +/// Predefined platform default console device path +/// BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = { { NULL, @@ -34,12 +34,12 @@ BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = { } }; -// -// Predefined platform specific driver option -// +/// +/// Predefined platform specific driver option +/// EFI_DEVICE_PATH_PROTOCOL *gPlatformDriverOption[] = { NULL }; -// -// Predefined platform connect sequence -// +/// +/// Predefined platform connect sequence +/// EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[] = { NULL }; -- 2.39.2