2 Platform BDS library definition. A platform can implement
3 instances to support platform-specific behavior.
5 Copyright (c) 2008 - 2009, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __PLATFORM_BDS_LIB_H_
17 #define __PLATFORM_BDS_LIB_H_
19 #include <Protocol/GenericMemoryTest.h>
20 #include <Library/GenericBdsLib.h>
23 Perform the memory test base on the memory test intensive level,
24 and update the memory resource.
26 @param Level The memory test intensive level.
28 @retval EFI_STATUS Success test all the system memory and update
34 (EFIAPI
*BASEM_MEMORY_TEST
)(
35 IN EXTENDMEM_COVERAGE_LEVEL Level
39 This routine is called to see if there are any capsules we need to process.
40 If the boot mode is not UPDATE, then we do nothing. Otherwise find the
41 capsule HOBS and produce firmware volumes for them via the DXE service.
42 Then call the dispatcher to dispatch drivers from them. Finally, check
43 the status of the updates.
45 This function should be called by BDS in case we need to do some
46 sort of processing even if there is no capsule to process. We
47 need to do this if an earlier update went away and we need to
48 clear the capsule variable so on the next reset PEI does not see it and
49 think there is a capsule available.
51 @param BootMode the current boot mode
53 @retval EFI_INVALID_PARAMETER boot mode is not correct for an update
54 @retval EFI_SUCCESS There is no error when processing capsule
59 (EFIAPI
*PROCESS_CAPSULES
)(
60 IN EFI_BOOT_MODE BootMode
64 Platform Bds initialization. Includes the platform firmware vendor, revision
75 The function will excute with as the platform policy, current policy
76 is driven by boot mode. IBV/OEM can customize this code for their specific
79 @param DriverOptionList The header of the driver option link list
80 @param BootOptionList The header of the boot option link list
81 @param ProcessCapsules A pointer to ProcessCapsules()
82 @param BaseMemoryTest A pointer to BaseMemoryTest()
87 PlatformBdsPolicyBehavior (
88 IN LIST_ENTRY
*DriverOptionList
,
89 IN LIST_ENTRY
*BootOptionList
,
90 IN PROCESS_CAPSULES ProcessCapsules
,
91 IN BASEM_MEMORY_TEST BaseMemoryTest
95 Hook point after a boot attempt fails.
97 @param Option Pointer to Boot Option that failed to boot.
98 @param Status Status returned from failed boot.
99 @param ExitData Exit data returned from failed boot.
100 @param ExitDataSize Exit data size returned from failed boot.
105 PlatformBdsBootFail (
106 IN BDS_COMMON_OPTION
*Option
,
107 IN EFI_STATUS Status
,
109 IN UINTN ExitDataSize
113 Hook point after a boot attempt succeeds. We don't expect a boot option to
114 return, so the UEFI 2.0 specification defines that you will default to an
115 interactive mode and stop processing the BootOrder list in this case. This
116 is also a platform implementation, and can be customized by an IBV/OEM.
118 @param Option Pointer to Boot Option that successfully booted.
123 PlatformBdsBootSuccess (
124 IN BDS_COMMON_OPTION
*Option
129 This function locks platform flash that is not allowed to be updated during normal boot path.
130 The flash layout is platform specific.
135 PlatformBdsLockNonUpdatableFlash (
140 Lock the ConsoleIn device in system table. All key
141 presses will be ignored until the Password is typed in. The only way to
142 disable the password is to type it in to a ConIn device.
144 @param Password Password used to lock ConIn device.
146 @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully.
147 @retval EFI_UNSUPPORTED Password not found