]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Platform BDS library definition. A platform can implement \r | |
3 | instances to support platform-specific behavior.\r | |
4 | \r | |
5 | Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials are licensed and made available under \r | |
7 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
8 | The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php. \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT 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 | |
19 | #include <Protocol/GenericMemoryTest.h>\r | |
20 | #include <Library/GenericBdsLib.h>\r | |
21 | \r | |
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 Successfully test all the system memory, and update\r | |
29 | the memory resource\r | |
30 | \r | |
31 | **/\r | |
32 | typedef\r | |
33 | EFI_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 The boot mode is not correct for an update.\r | |
54 | @retval EFI_SUCCESS There is no error when processing a capsule.\r | |
55 | \r | |
56 | **/\r | |
57 | typedef \r | |
58 | EFI_STATUS\r | |
59 | (EFIAPI *PROCESS_CAPSULES)(\r | |
60 | IN EFI_BOOT_MODE BootMode\r | |
61 | );\r | |
62 | \r | |
63 | /**\r | |
64 | Platform Bds initialization. Includes the platform firmware vendor, revision\r | |
65 | and so crc check.\r | |
66 | \r | |
67 | **/\r | |
68 | VOID\r | |
69 | EFIAPI\r | |
70 | PlatformBdsInit (\r | |
71 | VOID\r | |
72 | );\r | |
73 | \r | |
74 | /**\r | |
75 | The function will execute 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 | |
79 | @param DriverOptionList The header of the driver option link list\r | |
80 | @param BootOptionList The header of the boot option link list\r | |
81 | @param ProcessCapsules A pointer to ProcessCapsules()\r | |
82 | @param BaseMemoryTest A pointer to BaseMemoryTest()\r | |
83 | \r | |
84 | **/\r | |
85 | VOID\r | |
86 | EFIAPI\r | |
87 | PlatformBdsPolicyBehavior (\r | |
88 | IN LIST_ENTRY *DriverOptionList,\r | |
89 | IN LIST_ENTRY *BootOptionList,\r | |
90 | IN PROCESS_CAPSULES ProcessCapsules,\r | |
91 | IN BASEM_MEMORY_TEST BaseMemoryTest\r | |
92 | );\r | |
93 | \r | |
94 | /**\r | |
95 | Hook point for a user-provided function, for after a boot attempt fails. \r | |
96 | \r | |
97 | @param Option A pointer to Boot Option that failed to boot.\r | |
98 | @param Status The status returned from failed boot.\r | |
99 | @param ExitData The exit data returned from failed boot.\r | |
100 | @param ExitDataSize The exit data size returned from failed boot.\r | |
101 | \r | |
102 | **/\r | |
103 | VOID\r | |
104 | EFIAPI\r | |
105 | PlatformBdsBootFail (\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 | |
116 | is also a platform implementation, and can be customized by an IBV/OEM.\r | |
117 | \r | |
118 | @param Option A pointer to the Boot Option that successfully booted.\r | |
119 | \r | |
120 | **/\r | |
121 | VOID\r | |
122 | EFIAPI\r | |
123 | PlatformBdsBootSuccess (\r | |
124 | IN BDS_COMMON_OPTION *Option\r | |
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 | |
132 | **/\r | |
133 | VOID\r | |
134 | EFIAPI\r | |
135 | PlatformBdsLockNonUpdatableFlash (\r | |
136 | VOID\r | |
137 | );\r | |
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 The 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 | |
150 | EFI_STATUS\r | |
151 | EFIAPI\r | |
152 | LockKeyboards (\r | |
153 | IN CHAR16 *Password\r | |
154 | );\r | |
155 | \r | |
156 | #endif\r |