]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmAccess.h
Update the Guid Value of Ext SCSI Pass Thru Protocol
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmAccess.h
CommitLineData
878ddf1f 1/** @file\r
2 This file declares SMM SMRAM Access abstraction protocol\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 Module Name: SmmAccess.h\r
14\r
15 @par Revision Reference:\r
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
17 Version 0.9.\r
18**/\r
19\r
20#ifndef _SMM_ACCESS_H_\r
21#define _SMM_ACCESS_H_\r
22\r
23typedef struct _EFI_SMM_ACCESS_PROTOCOL EFI_SMM_ACCESS_PROTOCOL;\r
24\r
25#define EFI_SMM_ACCESS_PROTOCOL_GUID \\r
26 { \\r
27 0x3792095a, 0xe309, 0x4c1e, {0xaa, 0x01, 0x85, 0xf5, 0x65, 0x5a, 0x17, 0xf1 } \\r
28 }\r
29\r
30//\r
31// SMM Access specification constant and types\r
32//\r
33// *******************************************************\r
34// EFI_SMRAM_STATE\r
35// *******************************************************\r
36//\r
37#define EFI_SMRAM_OPEN 0x00000001\r
38#define EFI_SMRAM_CLOSED 0x00000002\r
39#define EFI_SMRAM_LOCKED 0x00000004\r
40#define EFI_CACHEABLE 0x00000008\r
41#define EFI_ALLOCATED 0x00000010\r
42\r
43//\r
44// SMM Access specification Member Function\r
45//\r
46/**\r
47 Opens the SMRAM area to be accessible by a boot-service driver.\r
48\r
0647c9ad
LG
49 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
50 @param DescriptorIndex Indicates that the driver wishes to open\r
51 the memory tagged by this index.\r
878ddf1f 52\r
0647c9ad 53 @retval EFI_SUCCESS The operation was successful.\r
878ddf1f 54 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
0647c9ad 55 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
878ddf1f 56\r
57**/\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *EFI_SMM_OPEN) (\r
61 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
62 UINTN DescriptorIndex\r
63 );\r
64\r
65/**\r
66 Inhibits access to the SMRAM.\r
67\r
0647c9ad
LG
68 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
69 @param DescriptorIndex Indicates that the driver wishes to open\r
70 the memory tagged by this index.\r
878ddf1f 71\r
0647c9ad
LG
72 @retval EFI_SUCCESS The operation was successful.\r
73 @retval EFI_DEVICE_ERROR The given DescriptorIndex is not open.\r
878ddf1f 74 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
0647c9ad 75 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
878ddf1f 76\r
77**/\r
78typedef\r
79EFI_STATUS\r
80(EFIAPI *EFI_SMM_CLOSE) (\r
81 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
82 UINTN DescriptorIndex\r
83 );\r
84\r
85/**\r
86 Inhibits access to the SMRAM.\r
0647c9ad
LG
87 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
88 @param DescriptorIndex Indicates that the driver wishes to open\r
89 the memory tagged by this index.\r
90\r
91 @retval EFI_SUCCESS The operation was successful.\r
92 @retval EFI_DEVICE_ERROR The given DescriptorIndex is not open.\r
878ddf1f 93 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
0647c9ad 94 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
878ddf1f 95\r
96**/\r
97typedef\r
98EFI_STATUS\r
99(EFIAPI *EFI_SMM_LOCK) (\r
100 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
101 UINTN DescriptorIndex\r
102 );\r
103\r
104/**\r
105 Queries the memory controller for the possible regions that will support SMRAM.\r
106\r
0647c9ad
LG
107 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
108 @param SmramMapSize A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
109 @param SmramMap A pointer to the buffer in which firmware places the current memory map.\r
878ddf1f 110\r
0647c9ad
LG
111 @retval EFI_SUCCESS The chipset supported the given resource.\r
112 @retval EFI_BUFFER_TOO_SMALL The SmramMap parameter was too small.\r
878ddf1f 113\r
114**/\r
115typedef\r
116EFI_STATUS\r
117(EFIAPI *EFI_SMM_CAPABILITIES) (\r
118 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
119 IN OUT UINTN *SmramMapSize,\r
120 IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap\r
121 );\r
122\r
123/**\r
124 @par Protocol Description:\r
125 This protocol is used to control the visibility of the SMRAM on the platform.\r
126\r
127 @param Open\r
128 Opens the SMRAM. \r
129\r
130 @param Close\r
131 Closes the SMRAM.\r
132\r
133 @param Lock\r
134 Locks the SMRAM. \r
135\r
136 @param GetCapabilities\r
137 Gets information on possible SMRAM regions.\r
138\r
139 @param LockState\r
140Indicates the current state of the SMRAM. Set to TRUE if any region is locked. \r
141\r
142 @param OpenState\r
143Indicates the current state of the SMRAM. Set to TRUE if any region is open. \r
144\r
145**/\r
146struct _EFI_SMM_ACCESS_PROTOCOL {\r
147 EFI_SMM_OPEN Open;\r
148 EFI_SMM_CLOSE Close;\r
149 EFI_SMM_LOCK Lock;\r
150 EFI_SMM_CAPABILITIES GetCapabilities;\r
151 BOOLEAN LockState;\r
152 BOOLEAN OpenState;\r
153};\r
154\r
155extern EFI_GUID gEfiSmmAccessProtocolGuid;\r
156\r
157#endif\r