]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
Clean up GenericBdsLib.h to remove unnecessary include header files.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / PlatformBdsLib.h
CommitLineData
ddac74d1 1/** @file\r
2 Platform BDS library definition. Platform package can provide hook library\r
3 instances to implement platform specific behavior.\r
4\r
5Copyright (c) 2008, Intel Corporation. <BR>\r
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
19#include <Protocol/Bds.h>\r
20#include <Protocol/GenericMemoryTest.h>\r
1a0e3ddc 21#include <Library/GenericBdsLib.h>\r
ddac74d1 22\r
23//\r
24// Bds AP Context data\r
25//\r
26#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE SIGNATURE_32 ('B', 'd', 's', 'A')\r
27typedef struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE EFI_BDS_ARCH_PROTOCOL_INSTANCE;\r
28\r
29struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE {\r
30 UINTN Signature;\r
31 EFI_HANDLE Handle;\r
32 EFI_BDS_ARCH_PROTOCOL Bds;\r
33 ///\r
34 /// Save the current boot mode\r
35 ///\r
36 EFI_BOOT_MODE BootMode;\r
37 ///\r
38 /// Set true if boot with default settings\r
39 ///\r
40 BOOLEAN DefaultBoot;\r
41 ///\r
42 /// The system default timeout for choose the boot option\r
43 ///\r
44 UINT16 TimeoutDefault;\r
45 ///\r
46 /// Memory Test Level\r
47 ///\r
48 EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel;\r
49};\r
50\r
51/**\r
52 Platform Bds init. Include the platform firmware vendor, revision\r
53 and so crc check.\r
54\r
55 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
56\r
57**/\r
58VOID\r
59EFIAPI\r
60PlatformBdsInit (\r
61 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData\r
62 );\r
63\r
64/**\r
65 The function will excute with as the platform policy, current policy\r
66 is driven by boot mode. IBV/OEM can customize this code for their specific\r
67 policy action.\r
68\r
69 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
70 @param DriverOptionList The header of the driver option link list\r
71 @param BootOptionList The header of the boot option link list\r
72\r
73**/\r
74VOID\r
75EFIAPI\r
76PlatformBdsPolicyBehavior (\r
77 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,\r
78 IN LIST_ENTRY *DriverOptionList,\r
79 IN LIST_ENTRY *BootOptionList\r
80 );\r
81\r
82/**\r
83 Hook point after a boot attempt fails.\r
84\r
85 @param Option Pointer to Boot Option that failed to boot.\r
86 @param Status Status returned from failed boot.\r
87 @param ExitData Exit data returned from failed boot.\r
88 @param ExitDataSize Exit data size returned from failed boot.\r
89\r
90**/\r
91VOID\r
92EFIAPI\r
93PlatformBdsBootFail (\r
94 IN BDS_COMMON_OPTION *Option,\r
95 IN EFI_STATUS Status,\r
96 IN CHAR16 *ExitData,\r
97 IN UINTN ExitDataSize\r
98 );\r
99\r
100/**\r
101 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
102 return, so the UEFI 2.0 specification defines that you will default to an\r
103 interactive mode and stop processing the BootOrder list in this case. This\r
104 is alos a platform implementation and can be customized by IBV/OEM.\r
105\r
106 @param Option Pointer to Boot Option that succeeded to boot.\r
107\r
108**/\r
109VOID\r
110EFIAPI\r
111PlatformBdsBootSuccess (\r
112 IN BDS_COMMON_OPTION *Option\r
113 );\r
114\r
115\r
116/**\r
117 This function locks platform flash that is not allowed to be updated during normal boot path.\r
118 The flash layout is platform specific.\r
119\r
120 @retval EFI_SUCCESS The non-updatable flash areas.\r
121**/\r
122EFI_STATUS\r
123EFIAPI\r
124PlatformBdsLockNonUpdatableFlash (\r
125 VOID\r
126 );\r
127#endif\r