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