]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
EmulatorPkg: Support a second GOP window
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / PlatformBdsLib.h
CommitLineData
ddac74d1 1/** @file\r
0a6f4824 2 Platform BDS library definition. A platform can implement\r
727fed5a 3 instances to support platform-specific behavior.\r
ddac74d1 4\r
0a6f4824 5Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
c0a00b14 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
ddac74d1 7\r
8**/\r
9\r
10#ifndef __PLATFORM_BDS_LIB_H_\r
11#define __PLATFORM_BDS_LIB_H_\r
12\r
ddac74d1 13#include <Protocol/GenericMemoryTest.h>\r
1a0e3ddc 14#include <Library/GenericBdsLib.h>\r
ddac74d1 15\r
a798a789 16/**\r
17 Perform the memory test base on the memory test intensive level,\r
18 and update the memory resource.\r
19\r
20 @param Level The memory test intensive level.\r
21\r
49fd8a35 22 @retval EFI_STATUS Successfully test all the system memory, and update\r
a798a789 23 the memory resource\r
24\r
25**/\r
26typedef\r
27EFI_STATUS\r
28(EFIAPI *BASEM_MEMORY_TEST)(\r
29 IN EXTENDMEM_COVERAGE_LEVEL Level\r
30 );\r
31\r
32/**\r
33 This routine is called to see if there are any capsules we need to process.\r
49fd8a35 34 If the boot mode is not UPDATE, then we do nothing. Otherwise, find the\r
a798a789 35 capsule HOBS and produce firmware volumes for them via the DXE service.\r
36 Then call the dispatcher to dispatch drivers from them. Finally, check\r
37 the status of the updates.\r
38\r
39 This function should be called by BDS in case we need to do some\r
40 sort of processing even if there is no capsule to process. We\r
41 need to do this if an earlier update went away and we need to\r
42 clear the capsule variable so on the next reset PEI does not see it and\r
43 think there is a capsule available.\r
44\r
49fd8a35 45 @param BootMode The current boot mode\r
a798a789 46\r
49fd8a35 47 @retval EFI_INVALID_PARAMETER The boot mode is not correct for an update.\r
48 @retval EFI_SUCCESS There is no error when processing a capsule.\r
a798a789 49\r
50**/\r
0a6f4824 51typedef\r
a798a789 52EFI_STATUS\r
53(EFIAPI *PROCESS_CAPSULES)(\r
54 IN EFI_BOOT_MODE BootMode\r
55 );\r
56\r
ddac74d1 57/**\r
727fed5a 58 Platform Bds initialization. Includes the platform firmware vendor, revision\r
ddac74d1 59 and so crc check.\r
60\r
ddac74d1 61**/\r
62VOID\r
63EFIAPI\r
64PlatformBdsInit (\r
f7cdf5cd 65 VOID\r
ddac74d1 66 );\r
67\r
68/**\r
70d3fe9d 69 The function will execute with as the platform policy, current policy\r
ddac74d1 70 is driven by boot mode. IBV/OEM can customize this code for their specific\r
71 policy action.\r
72\r
ddac74d1 73 @param DriverOptionList The header of the driver option link list\r
74 @param BootOptionList The header of the boot option link list\r
a798a789 75 @param ProcessCapsules A pointer to ProcessCapsules()\r
76 @param BaseMemoryTest A pointer to BaseMemoryTest()\r
ddac74d1 77\r
78**/\r
79VOID\r
80EFIAPI\r
81PlatformBdsPolicyBehavior (\r
ddac74d1 82 IN LIST_ENTRY *DriverOptionList,\r
a798a789 83 IN LIST_ENTRY *BootOptionList,\r
84 IN PROCESS_CAPSULES ProcessCapsules,\r
85 IN BASEM_MEMORY_TEST BaseMemoryTest\r
ddac74d1 86 );\r
87\r
88/**\r
0a6f4824 89 Hook point for a user-provided function, for after a boot attempt fails.\r
ddac74d1 90\r
49fd8a35 91 @param Option A pointer to Boot Option that failed to boot.\r
92 @param Status The status returned from failed boot.\r
93 @param ExitData The exit data returned from failed boot.\r
94 @param ExitDataSize The exit data size returned from failed boot.\r
ddac74d1 95\r
96**/\r
97VOID\r
98EFIAPI\r
99PlatformBdsBootFail (\r
100 IN BDS_COMMON_OPTION *Option,\r
101 IN EFI_STATUS Status,\r
102 IN CHAR16 *ExitData,\r
103 IN UINTN ExitDataSize\r
104 );\r
105\r
106/**\r
107 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
108 return, so the UEFI 2.0 specification defines that you will default to an\r
109 interactive mode and stop processing the BootOrder list in this case. This\r
727fed5a 110 is also a platform implementation, and can be customized by an IBV/OEM.\r
ddac74d1 111\r
49fd8a35 112 @param Option A pointer to the Boot Option that successfully booted.\r
ddac74d1 113\r
114**/\r
115VOID\r
116EFIAPI\r
117PlatformBdsBootSuccess (\r
971d3ab1 118 IN BDS_COMMON_OPTION *Option\r
ddac74d1 119 );\r
120\r
121\r
122/**\r
123 This function locks platform flash that is not allowed to be updated during normal boot path.\r
124 The flash layout is platform specific.\r
125\r
24cdd14e
LG
126 **/\r
127VOID\r
ddac74d1 128EFIAPI\r
129PlatformBdsLockNonUpdatableFlash (\r
130 VOID\r
131 );\r
24cdd14e
LG
132\r
133/**\r
134 Lock the ConsoleIn device in system table. All key\r
135 presses will be ignored until the Password is typed in. The only way to\r
136 disable the password is to type it in to a ConIn device.\r
137\r
49fd8a35 138 @param Password The password used to lock ConIn device.\r
24cdd14e 139\r
49fd8a35 140 @retval EFI_SUCCESS Lock the Console In Spliter virtual handle successfully.\r
141 @retval EFI_UNSUPPORTED Password not found.\r
24cdd14e
LG
142\r
143**/\r
144EFI_STATUS\r
145EFIAPI\r
146LockKeyboards (\r
147 IN CHAR16 *Password\r
148 );\r
149\r
ddac74d1 150#endif\r