2 MCA/PMI/INIT Protocol as defined in PI Specification VOLUME 4.
4 This protocol provides services to handle Machine Checks (MCA),
5 Initialization (INIT) events, and Platform Management Interrupt (PMI) events
6 on an Intel Itanium Processor Family based system.
8 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
9 This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #ifndef __MCA_INIT_PMI_PROTOCOL_H__
20 #define __MCA_INIT_PMI_PROTOCOL_H__
23 /// Global ID for the MCA/PMI/INIT Protocol.
25 #define EFI_SAL_MCA_INIT_PMI_PROTOCOL_GUID \
26 { 0xb60dc6e8, 0x3b6f, 0x11d5, {0xaf, 0x9, 0x0, 0xa0, 0xc9, 0x44, 0xa0, 0x5b} }
30 /// Declare forward reference for the Timer Architectural Protocol
32 typedef struct _EFI_SAL_MCA_INIT_PMI_PROTOCOL EFI_SAL_MCA_INIT_PMI_PROTOCOL
;
36 /// MCA Records Structure
41 UINT64 EntryCount
: 16;
42 UINT64 DispatchedCount
: 16;
44 } SAL_MCA_COUNT_STRUCTURE
;
49 Prototype of MCA handler.
51 @param ModuleGlobal The context of MCA Handler
52 @param ProcessorStateParameters The processor state parameters (PSP)
53 @param MinstateBase Base address of the min-state
54 @param RendezvouseStateInformation Rendezvous state information to be passed to
55 the OS on OS MCA entry
56 @param CpuIndex Index of the logical processor
57 @param McaCountStructure Pointer to the MCA records structure
58 @param CorrectedMachineCheck This flag is set to TRUE is the MCA has been
59 corrected by the handler or by a previous handler
61 @retval EFI_SUCCESS Handler successfully returned
66 (EFIAPI
*EFI_SAL_MCA_HANDLER
)(
67 IN VOID
*ModuleGlobal
,
68 IN UINT64 ProcessorStateParameters
,
69 IN EFI_PHYSICAL_ADDRESS MinstateBase
,
70 IN UINT64 RendezvouseStateInformation
,
72 IN SAL_MCA_COUNT_STRUCTURE
*McaCountStructure
,
73 OUT BOOLEAN
*CorrectedMachineCheck
77 Prototype of INIT handler.
79 @param ModuleGlobal The context of INIT Handler
80 @param ProcessorStateParameters The processor state parameters (PSP)
81 @param MinstateBase Base address of the min-state
82 @param McaInProgress This flag indicates if an MCA is in progress
83 @param CpuIndex Index of the logical processor
84 @param McaCountStructure Pointer to the MCA records structure
85 @param DumpSwitchPressed This flag indicates the crash dump switch has been pressed
87 @retval EFI_SUCCESS Handler successfully returned
92 (EFIAPI
*EFI_SAL_INIT_HANDLER
)(
93 IN VOID
*ModuleGlobal
,
94 IN UINT64 ProcessorStateParameters
,
95 IN EFI_PHYSICAL_ADDRESS MinstateBase
,
96 IN BOOLEAN McaInProgress
,
98 IN SAL_MCA_COUNT_STRUCTURE
*McaCountStructure
,
99 OUT BOOLEAN
*DumpSwitchPressed
103 Prototype of PMI handler
105 @param ModuleGlobal The context of PMI Handler
106 @param CpuIndex Index of the logical processor
107 @param PmiVector The PMI vector number as received from the PALE_PMI exit state (GR24)
109 @retval EFI_SUCCESS Handler successfully returned
114 (EFIAPI
*EFI_SAL_PMI_HANDLER
)(
115 IN VOID
*ModuleGlobal
,
121 Register a MCA handler with the MCA dispatcher.
123 @param This The EFI_SAL_MCA_INIT_PMI_PROTOCOL instance
124 @param McaHandler The MCA handler to register
125 @param ModuleGlobal The context of MCA Handler
126 @param MakeFirst This flag specifies the handler should be made first in the list
127 @param MakeLast This flag specifies the handler should be made last in the list
129 @retval EFI_SUCCESS MCA Handle was registered
130 @retval EFI_OUT_OF_RESOURCES No more resources to register an MCA handler
131 @retval EFI_INVALID_PARAMETER Invalid parameters were passed
136 (EFIAPI
*EFI_SAL_REGISTER_MCA_HANDLER
)(
137 IN EFI_SAL_MCA_INIT_PMI_PROTOCOL
*This
,
138 IN EFI_SAL_MCA_HANDLER McaHandler
,
139 IN VOID
*ModuleGlobal
,
140 IN BOOLEAN MakeFirst
,
145 Register an INIT handler with the INIT dispatcher.
147 @param This The EFI_SAL_MCA_INIT_PMI_PROTOCOL instance
148 @param InitHandler The INIT handler to register
149 @param ModuleGlobal The context of INIT Handler
150 @param MakeFirst This flag specifies the handler should be made first in the list
151 @param MakeLast This flag specifies the handler should be made last in the list
153 @retval EFI_SUCCESS INIT Handle was registered
154 @retval EFI_OUT_OF_RESOURCES No more resources to register an INIT handler
155 @retval EFI_INVALID_PARAMETER Invalid parameters were passed
160 (EFIAPI
*EFI_SAL_REGISTER_INIT_HANDLER
)(
161 IN EFI_SAL_MCA_INIT_PMI_PROTOCOL
*This
,
162 IN EFI_SAL_INIT_HANDLER InitHandler
,
163 IN VOID
*ModuleGlobal
,
164 IN BOOLEAN MakeFirst
,
169 Register a PMI handler with the PMI dispatcher.
171 @param This The EFI_SAL_MCA_INIT_PMI_PROTOCOL instance
172 @param PmiHandler The PMI handler to register
173 @param ModuleGlobal The context of PMI Handler
174 @param MakeFirst This flag specifies the handler should be made first in the list
175 @param MakeLast This flag specifies the handler should be made last in the list
177 @retval EFI_SUCCESS PMI Handle was registered
178 @retval EFI_OUT_OF_RESOURCES No more resources to register an PMI handler
179 @retval EFI_INVALID_PARAMETER Invalid parameters were passed
184 (EFIAPI
*EFI_SAL_REGISTER_PMI_HANDLER
)(
185 IN EFI_SAL_MCA_INIT_PMI_PROTOCOL
*This
,
186 IN EFI_SAL_PMI_HANDLER PmiHandler
,
187 IN VOID
*ModuleGlobal
,
188 IN BOOLEAN MakeFirst
,
193 /// This protocol is used to register MCA, INIT and PMI handlers with their respective dispatcher
195 struct _EFI_SAL_MCA_INIT_PMI_PROTOCOL
{
196 EFI_SAL_REGISTER_MCA_HANDLER RegisterMcaHandler
;
197 EFI_SAL_REGISTER_INIT_HANDLER RegisterInitHandler
;
198 EFI_SAL_REGISTER_PMI_HANDLER RegisterPmiHandler
;
199 BOOLEAN McaInProgress
; ///< Whether MCA handler is in progress
200 BOOLEAN InitInProgress
; ///< Whether Init handler is in progress
201 BOOLEAN PmiInProgress
; ///< Whether Pmi handler is in progress
204 extern EFI_GUID gEfiSalMcaInitPmiProtocolGuid
;