5 Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
7 SPDX-License-Identifier: BSD-2-Clause-Patent
15 This protocol is used to report and control what BIOS is mapped to the
16 BIOS address space anchored at 4GB boundary.
18 This protocol is EFI compatible.
20 E.G. For current generation ICH, the 4GB-16MB to 4GB range can be mapped
24 #ifndef _EFI_ACTIVE_BIOS_PROTOCOL_H_
25 #define _EFI_ACTIVE_BIOS_PROTOCOL_H_
31 #define EFI_ACTIVE_BIOS_PROTOCOL_GUID \
33 0xebbe2d1b, 0x1647, 0x4bda, 0xab, 0x9a, 0x78, 0x63, 0xe3, 0x96, 0xd4, 0x1a \
35 extern EFI_GUID gEfiActiveBiosProtocolGuid
;
38 /// Forward reference for ANSI C compatibility
40 typedef struct _EFI_ACTIVE_BIOS_PROTOCOL EFI_ACTIVE_BIOS_PROTOCOL
;
43 /// Protocol definitions
47 ActiveBiosStatePci
, /// Obsolete since VLV
50 } EFI_ACTIVE_BIOS_STATE
;
54 (EFIAPI
*EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE
) (
55 IN EFI_ACTIVE_BIOS_PROTOCOL
* This
,
56 IN EFI_ACTIVE_BIOS_STATE DesiredState
,
62 Change the current active BIOS settings to the requested state.
63 The caller is responsible for requesting a supported state from
64 the EFI_ACTIVE_BIOS_STATE selections.
65 This will fail if someone has locked the interface and the correct key is
68 @param[in] This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.
69 @param[in] DesiredState The requested state to configure the system for.
70 @param[in] Key If the interface is locked, Key must be the Key
71 returned from the LockState function call.
73 @retval EFI_SUCCESS The function completed successfully
74 @retval EFI_ACCESS_DENIED The interface is currently locked.
81 (EFIAPI
*EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE
) (
82 IN EFI_ACTIVE_BIOS_PROTOCOL
* This
,
90 Lock the current active BIOS state from further changes. This allows a
91 caller to implement a critical section. This is optionally supported
92 functionality. Size conscious implementations may choose to require
93 callers cooperate without support from this protocol.
95 @param[in] This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.
96 @param[in] Lock TRUE to lock the current state, FALSE to unlock.
97 @param[in] Key If Lock is TRUE, then a key will be returned. If
98 Lock is FALSE, the key returned from the prior call
99 to lock the protocol must be provided to unlock the
100 protocol. The value of Key is undefined except that
103 @retval EFI_SUCCESS Command succeed.
104 @exception EFI_UNSUPPORTED The function is not supported.
105 @retval EFI_ACCESS_DENIED The interface is currently locked.
106 @retval EFI_DEVICE_ERROR Device error, command aborts abnormally.
111 /// Protocol definition
113 /// Note that some functions are optional. This means that they may be NULL.
114 /// Caller is required to verify that an optional function is defined by checking
115 /// that the value is not NULL.
117 struct _EFI_ACTIVE_BIOS_PROTOCOL
{
118 EFI_ACTIVE_BIOS_STATE State
;
119 EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE SetState
;
120 EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE LockState
;