]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/PlatformBdsLib.h
Add function headers & file header for PlatformBdsLib
[mirror_edk2.git] / MdeModulePkg / Include / Library / PlatformBdsLib.h
CommitLineData
e2270e40 1/** @file\r
2 Platform BDS library definition. Platform package can provide hook library\r
3 instances to implement platform specific behavior.\r
93e3992d 4\r
e2270e40 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
93e3992d 10\r
e2270e40 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
93e3992d 13\r
e2270e40 14**/\r
93e3992d 15\r
16#ifndef __PLATFORM_BDS_LIB_H_\r
17#define __PLATFORM_BDS_LIB_H_\r
18\r
19#include <PiDxe.h>\r
20#include <Protocol/Bds.h>\r
21#include <Protocol/GenericMemoryTest.h>\r
22\r
23//\r
24// Bds AP Context data\r
25//\r
26#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE EFI_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
e2270e40 51/**\r
52 Platform Bds init. Incude 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 @return None.\r
58\r
59**/\r
93e3992d 60VOID\r
61EFIAPI\r
62PlatformBdsInit (\r
63 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData\r
64 )\r
65;\r
66\r
e2270e40 67/**\r
68 The function will excute with as the platform policy, current policy\r
69 is driven by boot mode. IBV/OEM can customize this code for their specific\r
70 policy action.\r
71\r
72 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
73 @param DriverOptionList The header of the driver option link list\r
74 @param BootOptionList The header of the boot option link list\r
75\r
76**/\r
93e3992d 77VOID\r
78EFIAPI\r
79PlatformBdsPolicyBehavior (\r
80 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,\r
81 IN LIST_ENTRY *DriverOptionList,\r
82 IN LIST_ENTRY *BootOptionList\r
83 )\r
84;\r
85\r
e2270e40 86/**\r
87 Hook point after a boot attempt fails.\r
88\r
89 @param Option Pointer to Boot Option that failed to boot.\r
90 @param Status Status returned from failed boot.\r
91 @param ExitData Exit data returned from failed boot.\r
92 @param ExitDataSize Exit data size returned from failed boot.\r
93\r
94 @return None.\r
93e3992d 95\r
e2270e40 96**/\r
93e3992d 97VOID\r
e2270e40 98EFIAPI\r
93e3992d 99PlatformBdsBootFail (\r
100 IN BDS_COMMON_OPTION *Option,\r
101 IN EFI_STATUS Status,\r
102 IN CHAR16 *ExitData,\r
103 IN UINTN ExitDataSize\r
104 )\r
105;\r
106\r
e2270e40 107/**\r
108 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
109 return, so the UEFI 2.0 specification defines that you will default to an\r
110 interactive mode and stop processing the BootOrder list in this case. This\r
111 is alos a platform implementation and can be customized by IBV/OEM.\r
112\r
113 @param Option Pointer to Boot Option that succeeded to boot.\r
114\r
115**/\r
93e3992d 116VOID\r
e2270e40 117EFIAPI\r
93e3992d 118PlatformBdsBootSuccess (\r
119 IN BDS_COMMON_OPTION *Option\r
120 )\r
121;\r
122\r
e2270e40 123\r
124/**\r
125 This function locks platform flash that is not allowed to be updated during normal boot path.\r
126 The flash layout is platform specific.\r
127\r
128 @retval EFI_SUCCESS The non-updatable flash areas.\r
129 @retval Others Some error occurs when locking non-updatable flash areas.\r
130**/\r
93e3992d 131EFI_STATUS\r
132EFIAPI\r
133PlatformBdsLockNonUpdatableFlash (\r
134 VOID\r
135 )\r
136;\r
137#endif\r