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