2 STM service protocol definition
4 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _SM_MONITOR_INIT_PROTOCOL_H_
16 #define _SM_MONITOR_INIT_PROTOCOL_H_
19 #include <Register/StmApi.h>
21 #define EFI_SM_MONITOR_INIT_PROTOCOL_GUID \
22 { 0x228f344d, 0xb3de, 0x43bb, 0xa4, 0xd7, 0xea, 0x20, 0xb, 0x1b, 0x14, 0x82}
30 Load STM image to MSEG.
32 @param StmImage STM image
33 @param StmImageSize STM image size
35 @retval EFI_SUCCESS Load STM to MSEG successfully
36 @retval EFI_ALREADY_STARTED STM image is already loaded to MSEG
37 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
38 @retval EFI_UNSUPPORTED MSEG is not enabled
43 (EFIAPI
*EFI_SM_MONITOR_LOAD_MONITOR
) (
44 IN EFI_PHYSICAL_ADDRESS StmImage
,
50 Add resources in list to database.
52 @param ResourceList A pointer to resource list to be added
53 @param NumEntries Optional number of entries.
54 If 0, list must be terminated by END_OF_RESOURCES.
56 @retval EFI_SUCCESS If resources are added
57 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
58 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
63 (EFIAPI
*EFI_SM_MONITOR_ADD_PI_RESOURCE
) (
64 IN STM_RSC
*ResourceList
,
65 IN UINT32 NumEntries OPTIONAL
70 Delete resources in list to database.
72 @param ResourceList A pointer to resource list to be deleted
73 NULL means delete all resources.
74 @param NumEntries Optional number of entries.
75 If 0, list must be terminated by END_OF_RESOURCES.
77 @retval EFI_SUCCESS If resources are deleted
78 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
83 (EFIAPI
*EFI_SM_MONITOR_DELETE_PI_RESOURCE
) (
84 IN STM_RSC
*ResourceList OPTIONAL
,
85 IN UINT32 NumEntries OPTIONAL
92 @param ResourceList A pointer to resource list to be filled
93 @param ResourceSize On input it means size of resource list input.
94 On output it means size of resource list filled,
95 or the size of resource list to be filled if size of too small.
97 @retval EFI_SUCCESS If resources are returned.
98 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
103 (EFIAPI
*EFI_SM_MONITOR_GET_PI_RESOURCE
) (
104 OUT STM_RSC
*ResourceList
,
105 IN OUT UINT32
*ResourceSize
108 typedef UINT32 EFI_SM_MONITOR_STATE
;
109 #define EFI_SM_MONITOR_STATE_ENABLED 0x1
110 #define EFI_SM_MONITOR_STATE_ACTIVATED 0x2
121 (EFIAPI
*EFI_SM_MONITOR_GET_MONITOR_STATE
) (
125 typedef struct _EFI_SM_MONITOR_INIT_PROTOCOL
{
127 // Valid at boot-time only
129 EFI_SM_MONITOR_LOAD_MONITOR LoadMonitor
;
130 EFI_SM_MONITOR_ADD_PI_RESOURCE AddPiResource
;
131 EFI_SM_MONITOR_DELETE_PI_RESOURCE DeletePiResource
;
132 EFI_SM_MONITOR_GET_PI_RESOURCE GetPiResource
;
136 EFI_SM_MONITOR_GET_MONITOR_STATE GetMonitorState
;
137 } EFI_SM_MONITOR_INIT_PROTOCOL
;
139 extern EFI_GUID gEfiSmMonitorInitProtocolGuid
;