]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFrameworkPkg/Include/Protocol/SmmAccess.h
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmAccess.h
... / ...
CommitLineData
1/** @file\r
2 This file declares the SMM SMRAM Access abstraction protocol, which is used to control \r
3 the visibility of the SMRAM on the platform. The expectation is\r
4 that the north bridge or memory controller would publish this protocol. \r
5 For example, the Memory Controller Hub (MCH) has the hardware provision for this \r
6 type of control. Because of the protected, distinguished class of memory for IA-32 \r
7 systems, the expectation is that this protocol would be supported only on IA-32 systems.\r
8\r
9Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
10This program and the accompanying materials are licensed and made available under \r
11the terms and conditions of the BSD License that accompanies this distribution. \r
12The full text of the license may be found at\r
13http://opensource.org/licenses/bsd-license.php. \r
14 \r
15THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
16WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
17\r
18 @par Revision Reference:\r
19 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
20 Version 0.9.\r
21**/\r
22\r
23#ifndef _SMM_ACCESS_H_\r
24#define _SMM_ACCESS_H_\r
25\r
26#include <Guid/SmramMemoryReserve.h>\r
27\r
28typedef struct _EFI_SMM_ACCESS_PROTOCOL EFI_SMM_ACCESS_PROTOCOL;\r
29\r
30#define EFI_SMM_ACCESS_PROTOCOL_GUID \\r
31 { \\r
32 0x3792095a, 0xe309, 0x4c1e, {0xaa, 0x01, 0x85, 0xf5, 0x65, 0x5a, 0x17, 0xf1 } \\r
33 }\r
34\r
35//\r
36// SMM Access specification Member Function\r
37//\r
38/**\r
39 Opens the SMRAM area to be accessible by a boot-service driver.\r
40\r
41 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
42 @param DescriptorIndex Indicates that the driver wishes to open\r
43 the memory tagged by this index.\r
44\r
45 @retval EFI_SUCCESS The operation was successful.\r
46 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
47 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
48\r
49**/\r
50typedef\r
51EFI_STATUS\r
52(EFIAPI *EFI_SMM_OPEN)(\r
53 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
54 UINTN DescriptorIndex\r
55 );\r
56\r
57/**\r
58 Inhibits access to the SMRAM.\r
59\r
60 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
61 @param DescriptorIndex Indicates that the driver wishes to close\r
62 the memory tagged by this index.\r
63\r
64 @retval EFI_SUCCESS The operation was successful.\r
65 @retval EFI_DEVICE_ERROR The given DescriptorIndex is not open.\r
66 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
67 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
68\r
69**/\r
70typedef\r
71EFI_STATUS\r
72(EFIAPI *EFI_SMM_CLOSE)(\r
73 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
74 UINTN DescriptorIndex\r
75 );\r
76\r
77/**\r
78 Inhibits access to the SMRAM.\r
79\r
80 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
81 @param DescriptorIndex Indicates that the driver wishes to lock\r
82 the memory tagged by this index.\r
83\r
84 @retval EFI_SUCCESS The operation was successful.\r
85 @retval EFI_DEVICE_ERROR The given DescriptorIndex is not open.\r
86 @retval EFI_INVALID_PARAMETER The given DescriptorIndex is not supported.\r
87 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
88\r
89**/\r
90typedef\r
91EFI_STATUS\r
92(EFIAPI *EFI_SMM_LOCK)(\r
93 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
94 UINTN DescriptorIndex\r
95 );\r
96\r
97/**\r
98 Queries the memory controller for the possible regions that will support SMRAM.\r
99\r
100 @param This The EFI_SMM_ACCESS_PROTOCOL instance.\r
101 @param SmramMapSize A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
102 @param SmramMap A pointer to the buffer in which firmware places the current memory map.\r
103\r
104 @retval EFI_SUCCESS The chipset supported the given resource.\r
105 @retval EFI_BUFFER_TOO_SMALL The SmramMap parameter was too small.\r
106\r
107**/\r
108typedef\r
109EFI_STATUS\r
110(EFIAPI *EFI_SMM_CAPABILITIES)(\r
111 IN EFI_SMM_ACCESS_PROTOCOL *This,\r
112 IN OUT UINTN *SmramMapSize,\r
113 IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap\r
114 );\r
115\r
116/**\r
117 This protocol is used to control the visibility of the SMRAM on the platform.\r
118**/\r
119struct _EFI_SMM_ACCESS_PROTOCOL {\r
120 EFI_SMM_OPEN Open; ///< Opens the SMRAM.\r
121 EFI_SMM_CLOSE Close; ///< Closes the SMRAM.\r
122 EFI_SMM_LOCK Lock; ///< Locks the SMRAM.\r
123 EFI_SMM_CAPABILITIES GetCapabilities; ///< Gets information on possible SMRAM regions.\r
124 BOOLEAN LockState; ///< Indicates the current state of the SMRAM. Set to TRUE if any region is locked.\r
125 BOOLEAN OpenState; ///< Indicates the current state of the SMRAM. Set to TRUE if any region is open.\r
126};\r
127\r
128extern EFI_GUID gEfiSmmAccessProtocolGuid;\r
129\r
130#endif\r