]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
Code scrub for PlatformBdsLibNull.inf library instance.
[mirror_edk2.git] / MdeModulePkg / 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 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
25
26 **/
27 VOID
28 PlatformBdsInit (
29 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData
30 )
31 {
32 return;
33 }
34
35 /**
36 Connect the predefined platform default console device. Always try to find
37 and enable the vga device if have.
38
39 @param PlatformConsole Predfined platform default console device array.
40
41 @retval EFI_SUCCESS Success connect at least one ConIn and ConOut
42 device, there must have one ConOut device is
43 active vga device.
44 @return Return the status of BdsLibConnectAllDefaultConsoles ()
45
46 **/
47 EFI_STATUS
48 PlatformBdsConnectConsole (
49 IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole
50 )
51 {
52 return EFI_SUCCESS;
53 }
54
55 /**
56 Connect with predeined platform connect sequence,
57 the OEM/IBV can customize with their own connect sequence.
58 **/
59 VOID
60 PlatformBdsConnectSequence (
61 VOID
62 )
63 {
64 return;
65 }
66
67 /**
68 Load the predefined driver option, OEM/IBV can customize this
69 to load their own drivers
70
71 @param BdsDriverLists - The header of the driver option link list.
72
73 **/
74 VOID
75 PlatformBdsGetDriverOption (
76 IN OUT LIST_ENTRY *BdsDriverLists
77 )
78 {
79 return;
80 }
81
82 /**
83 Perform the platform diagnostic, such like test memory. OEM/IBV also
84 can customize this fuction to support specific platform diagnostic.
85
86 @param MemoryTestLevel The memory test intensive level
87 @param QuietBoot Indicate if need to enable the quiet boot
88
89 **/
90 VOID
91 PlatformBdsDiagnostics (
92 IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel,
93 IN BOOLEAN QuietBoot
94 )
95 {
96 return;
97 }
98
99 /**
100 The function will excute with as the platform policy, current policy
101 is driven by boot mode. IBV/OEM can customize this code for their specific
102 policy action.
103
104
105 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
106 @param DriverOptionList The header of the driver option link list
107 @param BootOptionList The header of the boot option link list
108
109 **/
110 VOID
111 PlatformBdsPolicyBehavior (
112 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,
113 IN OUT LIST_ENTRY *DriverOptionList,
114 IN OUT LIST_ENTRY *BootOptionList
115 )
116 {
117 return ;
118 }
119
120 /**
121 Hook point after a boot attempt succeeds. We don't expect a boot option to
122 return, so the EFI 1.0 specification defines that you will default to an
123 interactive mode and stop processing the BootOrder list in this case. This
124 is alos a platform implementation and can be customized by IBV/OEM.
125
126 @param Option Pointer to Boot Option that succeeded to boot.
127
128 **/
129 VOID
130 PlatformBdsBootSuccess (
131 IN BDS_COMMON_OPTION *Option
132 )
133 {
134 return;
135 }
136
137 /**
138 Hook point after a boot attempt fails.
139
140 @param Option Pointer to Boot Option that failed to boot.
141 @param Status Status returned from failed boot.
142 @param ExitData Exit data returned from failed boot.
143 @param ExitDataSize Exit data size returned from failed boot.
144
145 **/
146 VOID
147 PlatformBdsBootFail (
148 IN BDS_COMMON_OPTION *Option,
149 IN EFI_STATUS Status,
150 IN CHAR16 *ExitData,
151 IN UINTN ExitDataSize
152 )
153 {
154 return;
155 }
156
157 /**
158 This function is remained for IBV/OEM to do some platform action,
159 if there no console device can be connected.
160
161 @return EFI_SUCCESS Direct return success now.
162
163 **/
164 EFI_STATUS
165 PlatformBdsNoConsoleAction (
166 VOID
167 )
168 {
169 return EFI_SUCCESS;
170 }
171
172 /**
173 This function locks platform flash that is not allowed to be updated during normal boot path.
174 The flash layout is platform specific.
175
176 @retval EFI_SUCCESS The non-updatable flash areas.
177 **/
178 EFI_STATUS
179 EFIAPI
180 PlatformBdsLockNonUpdatableFlash (
181 VOID
182 )
183 {
184 return EFI_SUCCESS;
185 }