]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2DeviceRefCodePkg/ValleyView2Soc/SouthCluster/Include/Protocol/ActiveBiosProtocol.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[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
7ede8060 12 SPDX-License-Identifier: BSD-2-Clause-Patent\r
3cbfba02
DW
13\r
14\r
15**/\r
16\r
17\r
18#ifndef _EFI_ACTIVE_BIOS_PROTOCOL_H_\r
19#define _EFI_ACTIVE_BIOS_PROTOCOL_H_\r
20\r
21//\r
22// Define the protocol GUID\r
23//\r
24#define EFI_ACTIVE_BIOS_PROTOCOL_GUID \\r
25 { 0xebbe2d1b, 0x1647, 0x4bda, {0xab, 0x9a, 0x78, 0x63, 0xe3, 0x96, 0xd4, 0x1a} }\r
26\r
27typedef struct _EFI_ACTIVE_BIOS_PROTOCOL EFI_ACTIVE_BIOS_PROTOCOL;\r
28\r
29//\r
30// Protocol definitions\r
31//\r
32typedef enum {\r
33 ActiveBiosStateSpi,\r
34 ActiveBiosStatePci,\r
35 ActiveBiosStateLpc,\r
36 ActiveBiosStateMax\r
37} EFI_ACTIVE_BIOS_STATE;\r
38\r
39typedef\r
40EFI_STATUS\r
41(EFIAPI *EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE) (\r
42 IN EFI_ACTIVE_BIOS_PROTOCOL *This,\r
43 IN EFI_ACTIVE_BIOS_STATE DesiredState,\r
44 IN UINTN Key\r
45 );\r
46/*++\r
47\r
48Routine Description:\r
49\r
50 Change the current active BIOS settings to the requested state.\r
51 The caller is responsible for requesting a supported state from\r
52 the EFI_ACTIVE_BIOS_STATE selections.\r
53\r
54 This will fail if someone has locked the interface and the correct key is\r
55 not provided.\r
56\r
57Arguments:\r
58\r
59 This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.\r
60 DesiredState The requested state to configure the system for.\r
61 Key If the interface is locked, Key must be the Key\r
62 returned from the LockState function call.\r
63\r
64Returns:\r
65\r
66 EFI_SUCCESS Command succeed.\r
67 EFI_ACCESS_DENIED The interface is currently locked.\r
68 EFI_DEVICE_ERROR Device error, command aborts abnormally.\r
69\r
70--*/\r
71\r
72typedef\r
73EFI_STATUS\r
74(EFIAPI *EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE) (\r
75 IN EFI_ACTIVE_BIOS_PROTOCOL *This,\r
76 IN BOOLEAN Lock,\r
77 IN OUT UINTN *Key\r
78 );\r
79/*++\r
80\r
81Routine Description:\r
82\r
83 Lock the current active BIOS state from further changes. This allows a\r
84 caller to implement a critical section. This is optionally supported\r
85 functionality. Size conscious implementations may choose to require\r
86 callers cooperate without support from this protocol.\r
87\r
88Arguments:\r
89\r
90 This Pointer to the EFI_ACTIVE_BIOS_PROTOCOL instance.\r
91 Lock TRUE to lock the current state, FALSE to unlock.\r
92 Key If Lock is TRUE, then a key will be returned. If\r
93 Lock is FALSE, the key returned from the prior call\r
94 to lock the protocol must be provided to unlock the\r
95 protocol. The value of Key is undefined except that it\r
96 will never be 0.\r
97\r
98Returns:\r
99\r
100 EFI_SUCCESS Command succeed.\r
101 EFI_UNSUPPORTED The function is not supported.\r
102 EFI_ACCESS_DENIED The interface is currently locked.\r
103 EFI_DEVICE_ERROR Device error, command aborts abnormally.\r
104\r
105--*/\r
106\r
107//\r
108// Protocol definition\r
109//\r
110// Note that some functions are optional. This means that they may be NULL.\r
111// Caller is required to verify that an optional function is defined by checking\r
112// that the value is not NULL.\r
113//\r
114struct _EFI_ACTIVE_BIOS_PROTOCOL {\r
115 EFI_ACTIVE_BIOS_STATE State;\r
116 EFI_ACTIVE_BIOS_SET_ACTIVE_BIOS_STATE SetState;\r
117 EFI_ACTIVE_BIOS_LOCK_ACTIVE_BIOS_STATE LockState;\r
118};\r
119\r
120//\r
121// Extern the GUID for protocol users.\r
122//\r
123extern EFI_GUID gEfiActiveBiosProtocolGuid;\r
124\r
125#endif\r