summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-02 08:09:28 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-02 08:09:28 +0000
commite6b7d45e9d61371ca3c70aa68389663b6f718721 (patch)
treeb233035c4db52f459bc2c9ac0901a9dd3c47cf05 /MdeModulePkg
parent7e6a7a637839c3664cd39e3650116571235d0ea5 (diff)
downloadedk2-platforms-e6b7d45e9d61371ca3c70aa68389663b6f718721.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/Library/PlatformBdsLib.h24
-rw-r--r--MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c240
-rw-r--r--MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h4
-rw-r--r--MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf3
-rw-r--r--MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c24
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. <BR>
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 <PiDxe.h>
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. <BR>
# 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 };