]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
BaseTools: remove uncalled functions
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / SmmMemoryAttribute.h
CommitLineData
e63da9f0
JW
1/** @file\r
2 SMM Memory Attribute Protocol provides retrieval and update service\r
3 for memory attributes in EFI SMM environment.\r
4\r
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __SMM_MEMORYATTRIBUTE_H__\r
17#define __SMM_MEMORYATTRIBUTE_H__\r
18\r
19//{69B792EA-39CE-402D-A2A6-F721DE351DFE}\r
20#define EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL_GUID \\r
21 { \\r
22 0x69b792ea, 0x39ce, 0x402d, { 0xa2, 0xa6, 0xf7, 0x21, 0xde, 0x35, 0x1d, 0xfe } \\r
23 }\r
24\r
25typedef struct _EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL;\r
26\r
27/**\r
28 This function set given attributes of the memory region specified by\r
29 BaseAddress and Length.\r
30\r
31 @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance.\r
32 @param BaseAddress The physical address that is the start address of\r
33 a memory region.\r
34 @param Length The size in bytes of the memory region.\r
35 @param Attributes The bit mask of attributes to set for the memory\r
36 region.\r
37\r
38 @retval EFI_SUCCESS The attributes were set for the memory region.\r
39 @retval EFI_INVALID_PARAMETER Length is zero.\r
40 Attributes specified an illegal combination of\r
41 attributes that cannot be set together.\r
42 @retval EFI_UNSUPPORTED The processor does not support one or more\r
43 bytes of the memory resource range specified\r
44 by BaseAddress and Length.\r
45 The bit mask of attributes is not support for\r
46 the memory resource range specified by\r
47 BaseAddress and Length.\r
48\r
49**/\r
50typedef\r
51EFI_STATUS\r
52(EFIAPI *EDKII_SMM_SET_MEMORY_ATTRIBUTES)(\r
53 IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This,\r
54 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
55 IN UINT64 Length,\r
56 IN UINT64 Attributes\r
57 );\r
58\r
59/**\r
60 This function clears given attributes of the memory region specified by\r
61 BaseAddress and Length.\r
62\r
63 @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance.\r
64 @param BaseAddress The physical address that is the start address of\r
65 a memory region.\r
66 @param Length The size in bytes of the memory region.\r
67 @param Attributes The bit mask of attributes to set for the memory\r
68 region.\r
69\r
70 @retval EFI_SUCCESS The attributes were set for the memory region.\r
71 @retval EFI_INVALID_PARAMETER Length is zero.\r
72 Attributes specified an illegal combination of\r
73 attributes that cannot be set together.\r
74 @retval EFI_UNSUPPORTED The processor does not support one or more\r
75 bytes of the memory resource range specified\r
76 by BaseAddress and Length.\r
77 The bit mask of attributes is not support for\r
78 the memory resource range specified by\r
79 BaseAddress and Length.\r
80\r
81**/\r
82typedef\r
83EFI_STATUS\r
84(EFIAPI *EDKII_SMM_CLEAR_MEMORY_ATTRIBUTES)(\r
85 IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This,\r
86 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
87 IN UINT64 Length,\r
88 IN UINT64 Attributes\r
89 );\r
90\r
91/**\r
92 This function retrieve the attributes of the memory region specified by\r
93 BaseAddress and Length. If different attributes are got from different part\r
94 of the memory region, EFI_NO_MAPPING will be returned.\r
95\r
96 @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance.\r
97 @param BaseAddress The physical address that is the start address of\r
98 a memory region.\r
99 @param Length The size in bytes of the memory region.\r
100 @param Attributes Pointer to attributes returned.\r
101\r
102 @retval EFI_SUCCESS The attributes got for the memory region.\r
103 @retval EFI_INVALID_PARAMETER Length is zero.\r
104 Attributes is NULL.\r
105 @retval EFI_NO_MAPPING Attributes are not consistent cross the memory\r
106 region.\r
107 @retval EFI_UNSUPPORTED The processor does not support one or more\r
108 bytes of the memory resource range specified\r
109 by BaseAddress and Length.\r
110 The bit mask of attributes is not support for\r
111 the memory resource range specified by\r
112 BaseAddress and Length.\r
113\r
114**/\r
115typedef\r
116EFI_STATUS\r
117(EFIAPI *EDKII_SMM_GET_MEMORY_ATTRIBUTES)(\r
118 IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This,\r
119 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
120 IN UINT64 Length,\r
121 OUT UINT64 *Attributes\r
122 );\r
123\r
124///\r
125/// SMM Memory Attribute Protocol provides services to retrieve or update\r
126/// attribute of memory in the EFI SMM environment.\r
127///\r
128struct _EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL {\r
129 EDKII_SMM_GET_MEMORY_ATTRIBUTES GetMemoryAttributes;\r
130 EDKII_SMM_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;\r
131 EDKII_SMM_CLEAR_MEMORY_ATTRIBUTES ClearMemoryAttributes;\r
132};\r
133\r
134extern EFI_GUID gEdkiiSmmMemoryAttributeProtocolGuid;\r
135\r
136#endif\r