]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/ValleyView2Soc/SouthCluster/Include/Protocol/ActiveBios.h
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / ValleyView2Soc / SouthCluster / Include / Protocol / ActiveBios.h
CommitLineData
3cbfba02
DW
1/**\r
2**/\r
3/**\r
4\r
5Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved\r
6\r
7ede8060 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
3cbfba02
DW
8\r
9\r
10\r
11 @file\r
12 ActiveBios.h\r
13\r
14 @brief\r
15 This protocol is used to report and control what BIOS is mapped to the\r
16 BIOS address space anchored at 4GB boundary.\r
17\r
18 This protocol is EFI compatible.\r
19\r
20 E.G. For current generation ICH, the 4GB-16MB to 4GB range can be mapped\r
21 to PCI, SPI, or FWH.\r
22\r
23**/\r
24#ifndef _EFI_ACTIVE_BIOS_PROTOCOL_H_\r
25#define _EFI_ACTIVE_BIOS_PROTOCOL_H_\r
26\r
27\r
28\r
29\r
30//\r
31#define EFI_ACTIVE_BIOS_PROTOCOL_GUID \\r
32 { \\r
33 0xebbe2d1b, 0x1647, 0x4bda, 0xab, 0x9a, 0x78, 0x63, 0xe3, 0x96, 0xd4, 0x1a \\r
34 }\r
35extern EFI_GUID gEfiActiveBiosProtocolGuid;\r
36\r
37///\r
38/// Forward reference for ANSI C compatibility\r
39///\r
40typedef struct _EFI_ACTIVE_BIOS_PROTOCOL EFI_ACTIVE_BIOS_PROTOCOL;\r
41\r
42///\r
43/// Protocol definitions\r
44///\r
45typedef enum {\r
46 ActiveBiosStateSpi,\r
47 ActiveBiosStatePci, /// Obsolete since VLV\r
48 ActiveBiosStateLpc,\r
49 ActiveBiosStateMax\r
50} EFI_ACTIVE_BIOS_STATE;\r
51\r
52typedef\r
53EFI_STATUS\r
54(EFIAPI *EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE) (\r
55 IN EFI_ACTIVE_BIOS_PROTOCOL * This,\r
56 IN EFI_ACTIVE_BIOS_STATE DesiredState,\r
57 IN UINTN Key\r
58 )\r
59/**\r
60\r
61 @brief\r
62 Change the current active BIOS settings to the requested state.\r
63 The caller is responsible for requesting a supported state from\r
64 the EFI_ACTIVE_BIOS_STATE selections.\r
65 This will fail if someone has locked the interface and the correct key is\r
66 not provided.\r
67\r
68 @param[in] This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.\r
69 @param[in] DesiredState The requested state to configure the system for.\r
70 @param[in] Key If the interface is locked, Key must be the Key\r
71 returned from the LockState function call.\r
72\r
73 @retval EFI_SUCCESS The function completed successfully\r
74 @retval EFI_ACCESS_DENIED The interface is currently locked.\r
75\r
76**/\r
77;\r
78\r
79typedef\r
80EFI_STATUS\r
81(EFIAPI *EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE) (\r
82 IN EFI_ACTIVE_BIOS_PROTOCOL * This,\r
83 IN BOOLEAN Lock,\r
84 IN OUT UINTN *Key\r
85 );\r
86\r
87/**\r
88\r
89 @brief\r
90 Lock the current active BIOS state from further changes. This allows a\r
91 caller to implement a critical section. This is optionally supported\r
92 functionality. Size conscious implementations may choose to require\r
93 callers cooperate without support from this protocol.\r
94\r
95 @param[in] This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.\r
96 @param[in] Lock TRUE to lock the current state, FALSE to unlock.\r
97 @param[in] Key If Lock is TRUE, then a key will be returned. If\r
98 Lock is FALSE, the key returned from the prior call\r
99 to lock the protocol must be provided to unlock the\r
100 protocol. The value of Key is undefined except that\r
101 it cannot be 0.\r
102\r
103 @retval EFI_SUCCESS Command succeed.\r
104 @exception EFI_UNSUPPORTED The function is not supported.\r
105 @retval EFI_ACCESS_DENIED The interface is currently locked.\r
106 @retval EFI_DEVICE_ERROR Device error, command aborts abnormally.\r
107\r
108**/\r
109\r
110///\r
111/// Protocol definition\r
112///\r
113/// Note that some functions are optional. This means that they may be NULL.\r
114/// Caller is required to verify that an optional function is defined by checking\r
115/// that the value is not NULL.\r
116///\r
117struct _EFI_ACTIVE_BIOS_PROTOCOL {\r
118 EFI_ACTIVE_BIOS_STATE State;\r
119 EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE SetState;\r
120 EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE LockState;\r
121};\r
122\r
123#endif\r