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