]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
Move library class GenericBdsLib and PlatformBdsLib to IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / PlatformBdsLibNull / BdsPlatform.c
CommitLineData
ddac74d1 1/** @file\r
2 This file include all platform action which can be customized by IBV/OEM.\r
3\r
4Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include "BdsPlatform.h"\r
16\r
17//\r
18// BDS Platform Functions\r
19//\r
20/**\r
21 Platform Bds init. Include the platform firmware vendor, revision\r
22 and so crc check.\r
23\r
24 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
25\r
26**/\r
27VOID\r
28EFIAPI\r
29PlatformBdsInit (\r
30 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData\r
31 )\r
32{\r
33 return;\r
34}\r
35\r
36/**\r
37 Connect the predefined platform default console device. Always try to find\r
38 and enable the vga device if have.\r
39\r
40 @param PlatformConsole Predefined platform default console device array.\r
41\r
42 @retval EFI_SUCCESS Success connect at least one ConIn and ConOut\r
43 device, there must have one ConOut device is\r
44 active vga device.\r
45 @return Return the status of BdsLibConnectAllDefaultConsoles ()\r
46\r
47**/\r
48EFI_STATUS\r
49PlatformBdsConnectConsole (\r
50 IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole\r
51 )\r
52{\r
53 return EFI_SUCCESS;\r
54}\r
55\r
56/**\r
57 Connect with predefined platform connect sequence,\r
58 the OEM/IBV can customize with their own connect sequence.\r
59**/\r
60VOID\r
61PlatformBdsConnectSequence (\r
62 VOID\r
63 )\r
64{\r
65 return;\r
66}\r
67\r
68/**\r
69 Load the predefined driver option, OEM/IBV can customize this\r
70 to load their own drivers\r
71\r
72 @param BdsDriverLists - The header of the driver option link list.\r
73\r
74**/\r
75VOID\r
76PlatformBdsGetDriverOption (\r
77 IN OUT LIST_ENTRY *BdsDriverLists\r
78 )\r
79{\r
80 return;\r
81}\r
82\r
83/**\r
84 Perform the platform diagnostic, such like test memory. OEM/IBV also\r
85 can customize this function to support specific platform diagnostic.\r
86\r
87 @param MemoryTestLevel The memory test intensive level\r
88 @param QuietBoot Indicate if need to enable the quiet boot\r
89\r
90**/\r
91VOID\r
92PlatformBdsDiagnostics (\r
93 IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel,\r
94 IN BOOLEAN QuietBoot\r
95 )\r
96{\r
97 return;\r
98}\r
99\r
100/**\r
101 The function will execute with as the platform policy, current policy\r
102 is driven by boot mode. IBV/OEM can customize this code for their specific\r
103 policy action.\r
104\r
105 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
106 @param DriverOptionList The header of the driver option link list\r
107 @param BootOptionList The header of the boot option link list\r
108\r
109**/\r
110VOID\r
111EFIAPI\r
112PlatformBdsPolicyBehavior (\r
113 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,\r
114 IN LIST_ENTRY *DriverOptionList,\r
115 IN LIST_ENTRY *BootOptionList\r
116 )\r
117{\r
118 return ;\r
119}\r
120\r
121/**\r
122 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
123 return, so the UEFI 2.0 specification defines that you will default to an\r
124 interactive mode and stop processing the BootOrder list in this case. This\r
125 is also a platform implementation and can be customized by IBV/OEM.\r
126\r
127 @param Option Pointer to Boot Option that succeeded to boot.\r
128\r
129**/\r
130VOID\r
131EFIAPI\r
132PlatformBdsBootSuccess (\r
133 IN BDS_COMMON_OPTION *Option\r
134 )\r
135{\r
136 return;\r
137}\r
138\r
139/**\r
140 Hook point after a boot attempt fails.\r
141\r
142 @param Option Pointer to Boot Option that failed to boot.\r
143 @param Status Status returned from failed boot.\r
144 @param ExitData Exit data returned from failed boot.\r
145 @param ExitDataSize Exit data size returned from failed boot.\r
146\r
147**/\r
148VOID\r
149EFIAPI\r
150PlatformBdsBootFail (\r
151 IN BDS_COMMON_OPTION *Option,\r
152 IN EFI_STATUS Status,\r
153 IN CHAR16 *ExitData,\r
154 IN UINTN ExitDataSize\r
155 )\r
156{\r
157 return;\r
158}\r
159\r
160/**\r
161 This function is remained for IBV/OEM to do some platform action,\r
162 if there no console device can be connected.\r
163\r
164 @return EFI_SUCCESS Direct return success now.\r
165\r
166**/\r
167EFI_STATUS\r
168PlatformBdsNoConsoleAction (\r
169 VOID\r
170 )\r
171{\r
172 return EFI_SUCCESS;\r
173}\r
174\r
175/**\r
176 This function locks platform flash that is not allowed to be updated during normal boot path.\r
177 The flash layout is platform specific.\r
178\r
179 @retval EFI_SUCCESS The non-updatable flash areas.\r
180**/\r
181EFI_STATUS\r
182EFIAPI\r
183PlatformBdsLockNonUpdatableFlash (\r
184 VOID\r
185 )\r
186{\r
187 return EFI_SUCCESS;\r
188}\r