]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Include/Protocol/SmMonitorInit.h
BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue
[mirror_edk2.git] / UefiCpuPkg / Include / Protocol / SmMonitorInit.h
CommitLineData
f7c11c53
MK
1/** @file\r
2 STM service protocol definition\r
3\r
4 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
5 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**/\r
14\r
15#ifndef _SM_MONITOR_INIT_PROTOCOL_H_\r
16#define _SM_MONITOR_INIT_PROTOCOL_H_\r
17\r
18#include <PiSmm.h>\r
19#include <Register/StmApi.h>\r
20\r
21#define EFI_SM_MONITOR_INIT_PROTOCOL_GUID \\r
22 { 0x228f344d, 0xb3de, 0x43bb, 0xa4, 0xd7, 0xea, 0x20, 0xb, 0x1b, 0x14, 0x82}\r
23\r
24//\r
25// STM service\r
26//\r
27\r
28/**\r
29\r
30 Load STM image to MSEG.\r
31\r
32 @param StmImage STM image\r
33 @param StmImageSize STM image size\r
34\r
35 @retval EFI_SUCCESS Load STM to MSEG successfully\r
36 @retval EFI_ALREADY_STARTED STM image is already loaded to MSEG\r
37 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image\r
38 @retval EFI_UNSUPPORTED MSEG is not enabled\r
39\r
40**/\r
41typedef\r
42EFI_STATUS\r
43(EFIAPI *EFI_SM_MONITOR_LOAD_MONITOR) (\r
44 IN EFI_PHYSICAL_ADDRESS StmImage,\r
45 IN UINTN StmImageSize\r
46 );\r
47\r
48/**\r
49\r
50 Add resources in list to database.\r
51\r
52 @param ResourceList A pointer to resource list to be added\r
53 @param NumEntries Optional number of entries.\r
54 If 0, list must be terminated by END_OF_RESOURCES.\r
55\r
56 @retval EFI_SUCCESS If resources are added\r
57 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer\r
58 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.\r
59\r
60**/\r
61typedef\r
62EFI_STATUS\r
63(EFIAPI *EFI_SM_MONITOR_ADD_PI_RESOURCE) (\r
64 IN STM_RSC *ResourceList,\r
65 IN UINT32 NumEntries OPTIONAL\r
66 );\r
67\r
68/**\r
69\r
70 Delete resources in list to database.\r
71\r
72 @param ResourceList A pointer to resource list to be deleted\r
73 NULL means delete all resources.\r
74 @param NumEntries Optional number of entries.\r
75 If 0, list must be terminated by END_OF_RESOURCES.\r
76\r
77 @retval EFI_SUCCESS If resources are deleted\r
78 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer\r
79\r
80**/\r
81typedef\r
82EFI_STATUS\r
83(EFIAPI *EFI_SM_MONITOR_DELETE_PI_RESOURCE) (\r
84 IN STM_RSC *ResourceList OPTIONAL,\r
85 IN UINT32 NumEntries OPTIONAL\r
86 );\r
87\r
88/**\r
89\r
90 Get BIOS resources.\r
91\r
92 @param ResourceList A pointer to resource list to be filled\r
93 @param ResourceSize On input it means size of resource list input.\r
94 On output it means size of resource list filled,\r
95 or the size of resource list to be filled if size of too small.\r
96\r
97 @retval EFI_SUCCESS If resources are returned.\r
98 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.\r
99\r
100**/\r
101typedef\r
102EFI_STATUS\r
103(EFIAPI *EFI_SM_MONITOR_GET_PI_RESOURCE) (\r
104 OUT STM_RSC *ResourceList,\r
105 IN OUT UINT32 *ResourceSize\r
106 );\r
107\r
108typedef UINT32 EFI_SM_MONITOR_STATE;\r
109#define EFI_SM_MONITOR_STATE_ENABLED 0x1\r
110#define EFI_SM_MONITOR_STATE_ACTIVATED 0x2\r
111\r
112/**\r
113\r
114 Get STM state\r
115\r
116 @return STM state\r
117\r
118**/\r
119typedef\r
120EFI_SM_MONITOR_STATE\r
121(EFIAPI *EFI_SM_MONITOR_GET_MONITOR_STATE) (\r
122 VOID\r
123 );\r
124\r
125typedef struct _EFI_SM_MONITOR_INIT_PROTOCOL {\r
126 //\r
127 // Valid at boot-time only\r
128 //\r
129 EFI_SM_MONITOR_LOAD_MONITOR LoadMonitor;\r
130 EFI_SM_MONITOR_ADD_PI_RESOURCE AddPiResource;\r
131 EFI_SM_MONITOR_DELETE_PI_RESOURCE DeletePiResource;\r
132 EFI_SM_MONITOR_GET_PI_RESOURCE GetPiResource;\r
133 //\r
134 // Valid at runtime\r
135 //\r
136 EFI_SM_MONITOR_GET_MONITOR_STATE GetMonitorState;\r
137} EFI_SM_MONITOR_INIT_PROTOCOL;\r
138\r
139extern EFI_GUID gEfiSmMonitorInitProtocolGuid;\r
140\r
141#endif\r