2 STM service protocol definition
4 Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _SM_MONITOR_INIT_PROTOCOL_H_
10 #define _SM_MONITOR_INIT_PROTOCOL_H_
13 #include <Register/Intel/StmApi.h>
15 #define EFI_SM_MONITOR_INIT_PROTOCOL_GUID \
16 { 0x228f344d, 0xb3de, 0x43bb, 0xa4, 0xd7, 0xea, 0x20, 0xb, 0x1b, 0x14, 0x82}
24 Load STM image to MSEG.
26 @param StmImage STM image
27 @param StmImageSize STM image size
29 @retval EFI_SUCCESS Load STM to MSEG successfully
30 @retval EFI_ALREADY_STARTED STM image is already loaded to MSEG
31 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
32 @retval EFI_UNSUPPORTED MSEG is not enabled
37 (EFIAPI
*EFI_SM_MONITOR_LOAD_MONITOR
)(
38 IN EFI_PHYSICAL_ADDRESS StmImage
,
44 Add resources in list to database.
46 @param ResourceList A pointer to resource list to be added
47 @param NumEntries Optional number of entries.
48 If 0, list must be terminated by END_OF_RESOURCES.
50 @retval EFI_SUCCESS If resources are added
51 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
52 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
57 (EFIAPI
*EFI_SM_MONITOR_ADD_PI_RESOURCE
)(
58 IN STM_RSC
*ResourceList
,
59 IN UINT32 NumEntries OPTIONAL
64 Delete resources in list to database.
66 @param ResourceList A pointer to resource list to be deleted
67 NULL means delete all resources.
68 @param NumEntries Optional number of entries.
69 If 0, list must be terminated by END_OF_RESOURCES.
71 @retval EFI_SUCCESS If resources are deleted
72 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
77 (EFIAPI
*EFI_SM_MONITOR_DELETE_PI_RESOURCE
)(
78 IN STM_RSC
*ResourceList OPTIONAL
,
79 IN UINT32 NumEntries OPTIONAL
86 @param ResourceList A pointer to resource list to be filled
87 @param ResourceSize On input it means size of resource list input.
88 On output it means size of resource list filled,
89 or the size of resource list to be filled if size of too small.
91 @retval EFI_SUCCESS If resources are returned.
92 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
97 (EFIAPI
*EFI_SM_MONITOR_GET_PI_RESOURCE
)(
98 OUT STM_RSC
*ResourceList
,
99 IN OUT UINT32
*ResourceSize
102 typedef UINT32 EFI_SM_MONITOR_STATE
;
103 #define EFI_SM_MONITOR_STATE_ENABLED 0x1
104 #define EFI_SM_MONITOR_STATE_ACTIVATED 0x2
115 (EFIAPI
*EFI_SM_MONITOR_GET_MONITOR_STATE
)(
119 typedef struct _EFI_SM_MONITOR_INIT_PROTOCOL
{
121 // Valid at boot-time only
123 EFI_SM_MONITOR_LOAD_MONITOR LoadMonitor
;
124 EFI_SM_MONITOR_ADD_PI_RESOURCE AddPiResource
;
125 EFI_SM_MONITOR_DELETE_PI_RESOURCE DeletePiResource
;
126 EFI_SM_MONITOR_GET_PI_RESOURCE GetPiResource
;
130 EFI_SM_MONITOR_GET_MONITOR_STATE GetMonitorState
;
131 } EFI_SM_MONITOR_INIT_PROTOCOL
;
133 extern EFI_GUID gEfiSmMonitorInitProtocolGuid
;