]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/PlatformBdsLib.h
Code scrube for MdeModule Definitions.
[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
e2270e40 57**/\r
93e3992d 58VOID\r
59EFIAPI\r
60PlatformBdsInit (\r
61 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData\r
62 )\r
63;\r
64\r
e2270e40 65/**\r
66 The function will excute with as the platform policy, current policy\r
67 is driven by boot mode. IBV/OEM can customize this code for their specific\r
68 policy action.\r
69\r
70 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance\r
71 @param DriverOptionList The header of the driver option link list\r
72 @param BootOptionList The header of the boot option link list\r
73\r
74**/\r
93e3992d 75VOID\r
76EFIAPI\r
77PlatformBdsPolicyBehavior (\r
78 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,\r
79 IN LIST_ENTRY *DriverOptionList,\r
80 IN LIST_ENTRY *BootOptionList\r
81 )\r
82;\r
83\r
e2270e40 84/**\r
85 Hook point after a boot attempt fails.\r
86\r
87 @param Option Pointer to Boot Option that failed to boot.\r
88 @param Status Status returned from failed boot.\r
89 @param ExitData Exit data returned from failed boot.\r
90 @param ExitDataSize Exit data size returned from failed boot.\r
91\r
e2270e40 92**/\r
93e3992d 93VOID\r
e2270e40 94EFIAPI\r
93e3992d 95PlatformBdsBootFail (\r
96 IN BDS_COMMON_OPTION *Option,\r
97 IN EFI_STATUS Status,\r
98 IN CHAR16 *ExitData,\r
99 IN UINTN ExitDataSize\r
100 )\r
101;\r
102\r
e2270e40 103/**\r
104 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
105 return, so the UEFI 2.0 specification defines that you will default to an\r
106 interactive mode and stop processing the BootOrder list in this case. This\r
107 is alos a platform implementation and can be customized by IBV/OEM.\r
108\r
109 @param Option Pointer to Boot Option that succeeded to boot.\r
110\r
111**/\r
93e3992d 112VOID\r
e2270e40 113EFIAPI\r
93e3992d 114PlatformBdsBootSuccess (\r
115 IN BDS_COMMON_OPTION *Option\r
116 )\r
117;\r
118\r
e2270e40 119\r
120/**\r
121 This function locks platform flash that is not allowed to be updated during normal boot path.\r
122 The flash layout is platform specific.\r
123\r
124 @retval EFI_SUCCESS The non-updatable flash areas.\r
e2270e40 125**/\r
93e3992d 126EFI_STATUS\r
127EFIAPI\r
128PlatformBdsLockNonUpdatableFlash (\r
129 VOID\r
130 )\r
131;\r
132#endif\r