2 Platform BDS library definition. A platform can implement
3 instances to support platform-specific behavior.
5 Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __PLATFORM_BDS_LIB_H_
11 #define __PLATFORM_BDS_LIB_H_
13 #include <Protocol/GenericMemoryTest.h>
14 #include <Library/GenericBdsLib.h>
17 Perform the memory test base on the memory test intensive level,
18 and update the memory resource.
20 @param Level The memory test intensive level.
22 @retval EFI_STATUS Successfully test all the system memory, and update
28 (EFIAPI
*BASEM_MEMORY_TEST
)(
29 IN EXTENDMEM_COVERAGE_LEVEL Level
33 This routine is called to see if there are any capsules we need to process.
34 If the boot mode is not UPDATE, then we do nothing. Otherwise, find the
35 capsule HOBS and produce firmware volumes for them via the DXE service.
36 Then call the dispatcher to dispatch drivers from them. Finally, check
37 the status of the updates.
39 This function should be called by BDS in case we need to do some
40 sort of processing even if there is no capsule to process. We
41 need to do this if an earlier update went away and we need to
42 clear the capsule variable so on the next reset PEI does not see it and
43 think there is a capsule available.
45 @param BootMode The current boot mode
47 @retval EFI_INVALID_PARAMETER The boot mode is not correct for an update.
48 @retval EFI_SUCCESS There is no error when processing a capsule.
53 (EFIAPI
*PROCESS_CAPSULES
)(
54 IN EFI_BOOT_MODE BootMode
58 Platform Bds initialization. Includes the platform firmware vendor, revision
69 The function will execute with as the platform policy, current policy
70 is driven by boot mode. IBV/OEM can customize this code for their specific
73 @param DriverOptionList The header of the driver option link list
74 @param BootOptionList The header of the boot option link list
75 @param ProcessCapsules A pointer to ProcessCapsules()
76 @param BaseMemoryTest A pointer to BaseMemoryTest()
81 PlatformBdsPolicyBehavior (
82 IN LIST_ENTRY
*DriverOptionList
,
83 IN LIST_ENTRY
*BootOptionList
,
84 IN PROCESS_CAPSULES ProcessCapsules
,
85 IN BASEM_MEMORY_TEST BaseMemoryTest
89 Hook point for a user-provided function, for after a boot attempt fails.
91 @param Option A pointer to Boot Option that failed to boot.
92 @param Status The status returned from failed boot.
93 @param ExitData The exit data returned from failed boot.
94 @param ExitDataSize The exit data size returned from failed boot.
100 IN BDS_COMMON_OPTION
*Option
,
101 IN EFI_STATUS Status
,
103 IN UINTN ExitDataSize
107 Hook point after a boot attempt succeeds. We don't expect a boot option to
108 return, so the UEFI 2.0 specification defines that you will default to an
109 interactive mode and stop processing the BootOrder list in this case. This
110 is also a platform implementation, and can be customized by an IBV/OEM.
112 @param Option A pointer to the Boot Option that successfully booted.
117 PlatformBdsBootSuccess (
118 IN BDS_COMMON_OPTION
*Option
123 This function locks platform flash that is not allowed to be updated during normal boot path.
124 The flash layout is platform specific.
129 PlatformBdsLockNonUpdatableFlash (
134 Lock the ConsoleIn device in system table. All key
135 presses will be ignored until the Password is typed in. The only way to
136 disable the password is to type it in to a ConIn device.
138 @param Password The password used to lock ConIn device.
140 @retval EFI_SUCCESS Lock the Console In Spliter virtual handle successfully.
141 @retval EFI_UNSUPPORTED Password not found.