2 Platform BDS library definition. Platform package can provide hook library
3 instances to implement platform specific behavior.
5 Copyright (c) 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __PLATFORM_BDS_LIB_H_
17 #define __PLATFORM_BDS_LIB_H_
19 #include <Protocol/Bds.h>
20 #include <Protocol/GenericMemoryTest.h>
23 // Bds AP Context data
25 #define EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE SIGNATURE_32 ('B', 'd', 's', 'A')
26 typedef struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE EFI_BDS_ARCH_PROTOCOL_INSTANCE
;
28 struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE
{
31 EFI_BDS_ARCH_PROTOCOL Bds
;
33 /// Save the current boot mode
35 EFI_BOOT_MODE BootMode
;
37 /// Set true if boot with default settings
41 /// The system default timeout for choose the boot option
43 UINT16 TimeoutDefault
;
47 EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel
;
51 Platform Bds init. Include the platform firmware vendor, revision
54 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
60 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE
*PrivateData
64 The function will excute with as the platform policy, current policy
65 is driven by boot mode. IBV/OEM can customize this code for their specific
68 @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
69 @param DriverOptionList The header of the driver option link list
70 @param BootOptionList The header of the boot option link list
75 PlatformBdsPolicyBehavior (
76 IN EFI_BDS_ARCH_PROTOCOL_INSTANCE
*PrivateData
,
77 IN LIST_ENTRY
*DriverOptionList
,
78 IN LIST_ENTRY
*BootOptionList
82 Hook point after a boot attempt fails.
84 @param Option Pointer to Boot Option that failed to boot.
85 @param Status Status returned from failed boot.
86 @param ExitData Exit data returned from failed boot.
87 @param ExitDataSize Exit data size returned from failed boot.
93 IN BDS_COMMON_OPTION
*Option
,
100 Hook point after a boot attempt succeeds. We don't expect a boot option to
101 return, so the UEFI 2.0 specification defines that you will default to an
102 interactive mode and stop processing the BootOrder list in this case. This
103 is alos a platform implementation and can be customized by IBV/OEM.
105 @param Option Pointer to Boot Option that succeeded to boot.
110 PlatformBdsBootSuccess (
111 IN BDS_COMMON_OPTION
*Option
116 This function locks platform flash that is not allowed to be updated during normal boot path.
117 The flash layout is platform specific.
119 @retval EFI_SUCCESS The non-updatable flash areas.
123 PlatformBdsLockNonUpdatableFlash (