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