3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #ifndef _EXTENDED_SAL_LIB_H__
21 #define _EXTENDED_SAL_LIB_H__
24 Register ESAL Class and it's asociated global.
26 This function Registers one or more Extended SAL services in a given
27 class along with the associated global context.
28 This function is only available prior to ExitBootServices().
30 @param ClassGuid GUID of function class
31 @param ModuleGlobal Module global for Function.
33 @retval EFI_SUCCESS The Extended SAL services were registered.
34 @retval EFI_UNSUPPORTED This function was called after ExitBootServices().
35 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to register one or more of the specified services.
36 @retval Other ClassGuid could not be installed onto a new handle.
42 IN CONST EFI_GUID
*ClassGuid
,
43 IN VOID
*ModuleGlobal
, OPTIONAL
49 Calls an Extended SAL Class service that was previously registered with RegisterEsalClass().
51 This function calls an Extended SAL Class service that was previously registered with RegisterEsalClass().
53 @param ClassGuid GUID of function
54 @param FunctionId Function in ClassGuid to call
55 @param Arg2 Argument 2 ClassGuid/FunctionId defined
56 @param Arg3 Argument 3 ClassGuid/FunctionId defined
57 @param Arg4 Argument 4 ClassGuid/FunctionId defined
58 @param Arg5 Argument 5 ClassGuid/FunctionId defined
59 @param Arg6 Argument 6 ClassGuid/FunctionId defined
60 @param Arg7 Argument 7 ClassGuid/FunctionId defined
61 @param Arg8 Argument 8 ClassGuid/FunctionId defined
63 @retval EFI_SAL_ERROR The address of ExtendedSalProc() can not be determined
64 for the current CPU execution mode.
65 @retval Other See the return status from ExtendedSalProc() in the
66 EXTENDED_SAL_BOOT_SERVICE_PROTOCOL.
72 IN EFI_GUID
*ClassGuid
,
85 Wrapper for the EsalStallFunctionId service in the Extended SAL Stall Services Class.
87 This function is a wrapper for the EsalStallFunctionId service in the Extended SAL
88 Stall Services Class. See EsalStallFunctionId in the Extended SAL Specification.
90 @param Microseconds The number of microseconds to delay.
101 Wrapper for the EsalSetNewPalEntryFunctionId service in the Extended SAL PAL Services Services Class.
103 This function is a wrapper for the EsalSetNewPalEntryFunctionId service in the Extended SAL
104 PAL Services Services Class. See EsalSetNewPalEntryFunctionId in the Extended SAL Specification.
106 @param PhyicalAddress If TRUE, then PalEntryPoint is a physical address.
107 If FALSE, then PalEntryPoint is a virtual address.
108 @param PalEntryPoint The PAL Entry Point being set.
114 IN BOOLEAN PhysicalAddress
,
115 IN UINT64 PalEntryPoint
120 Wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL PAL Services Services Class.
122 This function is a wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL
123 PAL Services Services Class. See EsalGetStateBufferFunctionId in the Extended SAL Specification.
125 @param PhyicalAddress If TRUE, then PalEntryPoint is a physical address.
126 If FALSE, then PalEntryPoint is a virtual address.
132 IN BOOLEAN PhysicalAddress
137 Wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL MCA Log Services Class.
139 This function is a wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL
140 MCA Log Services Class. See EsalGetStateBufferFunctionId in the Extended SAL Specification.
142 @param McaType See type parameter in the SAL Procedure SAL_GET_STATE_INFO.
143 @param McaBuffer A pointer to the base address of the returned buffer. Copied from SAL_RETURN_REGS.r9.
144 @param BufferSize A pointer to the size, in bytes, of the returned buffer. Copied from SAL_RETURN_REGS.r10.
151 OUT UINT8
**McaBuffer
,
152 OUT UINTN
*BufferSize
157 Wrapper for the EsalSaveStateBufferFunctionId service in the Extended SAL MCA Log Services Class.
159 This function is a wrapper for the EsalSaveStateBufferFunctionId service in the Extended SAL
160 MCA Log Services Class. See EsalSaveStateBufferFunctionId in the Extended SAL Specification.
162 @param McaType See type parameter in the SAL Procedure SAL_GET_STATE_INFO.
167 EsalSaveStateBuffer (
173 Wrapper for the EsalGetVectorsFunctionId service in the Extended SAL MCA Log Services Class.
175 This function is a wrapper for the EsalGetVectorsFunctionId service in the Extended SAL
176 MCA Log Services Class. See EsalGetVectorsFunctionId in the Extended SAL Specification.
178 @param VectorType The vector type to retrieve.
179 0 ¨C MCA, 1 - BSP INIT, 2 ¨C BOOT_RENDEZ, 3 ¨C AP INIT.
190 Wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL MCA Log Services Class.
192 This function is a wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL
193 MCA Log Services Class. See EsalMcGetParamsFunctionId in the Extended SAL Specification.
195 @param ParamInfoType The parameter type to retrieve.
196 1 ¨C rendezvous interrupt
198 3 ¨C Corrected Platform Error Vector.
204 IN UINT64 ParamInfoType
209 Wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL MCA Log Services Class.
211 This function is a wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL
212 MCA Log Services Class. See EsalMcGetParamsFunctionId in the Extended SAL Specification.
223 Wrapper for the EsalGetMcCheckinFlagsFunctionId service in the Extended SAL MCA Log Services Class.
225 This function is a wrapper for the EsalGetMcCheckinFlagsFunctionId service in the Extended SAL
226 MCA Log Services Class. See EsalGetMcCheckinFlagsFunctionId in the Extended SAL Specification.
228 @param CpuIndex The index of the CPU in the set of enabled CPUs to check.
233 EsalGetMcCheckinFlags (
239 Wrapper for the EsalAddCpuDataFunctionId service in the Extended SAL MCA Log Services Class.
241 This function is a wrapper for the EsalAddCpuDataFunctionId service in the Extended SAL
242 MCA Log Services Class. See EsalAddCpuDataFunctionId in the Extended SAL Specification.
244 @param CpuGlobalId The Global ID for the CPU being added.
245 @param Enabled The enable flag for the CPU being added.
246 TRUE means the CPU is enabled.
247 FALSE means the CPU is disabled.
248 @param PalCompatibility The PAL Compatibility value for the CPU being added.
254 IN UINT64 CpuGlobalId
,
256 IN UINT64 PalCompatibility
261 Wrapper for the EsalRemoveCpuDataFunctionId service in the Extended SAL MCA Log Services Class.
263 This function is a wrapper for the EsalRemoveCpuDataFunctionId service in the Extended SAL
264 MCA Log Services Class. See EsalRemoveCpuDataFunctionId in the Extended SAL Specification.
266 @param CpuGlobalId The Global ID for the CPU being removed.
272 IN UINT64 CpuGlobalId
277 Wrapper for the EsalModifyCpuDataFunctionId service in the Extended SAL MCA Log Services Class.
279 This function is a wrapper for the EsalModifyCpuDataFunctionId service in the Extended SAL
280 MCA Log Services Class. See EsalModifyCpuDataFunctionId in the Extended SAL Specification.
282 @param CpuGlobalId The Global ID for the CPU being modified.
283 @param Enabled The enable flag for the CPU being modified.
284 TRUE means the CPU is enabled.
285 FALSE means the CPU is disabled.
286 @param PalCompatibility The PAL Compatibility value for the CPU being modified.
292 IN UINT64 CpuGlobalId
,
294 IN UINT64 PalCompatibility
299 Wrapper for the EsalGetCpuDataByIdFunctionId service in the Extended SAL MCA Log Services Class.
301 This function is a wrapper for the EsalGetCpuDataByIdFunctionId service in the Extended SAL
302 MCA Log Services Class. See EsalGetCpuDataByIdFunctionId in the Extended SAL Specification.
304 @param CpuGlobalId The Global ID for the CPU being looked up.
305 @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.
306 If FALSE, then the index in the set of all CPUs in the database is returned.
312 IN UINT64 CpuGlobalId
,
313 IN BOOLEAN IndexByEnabledCpu
318 Wrapper for the EsalGetCpuDataByIndexFunctionId service in the Extended SAL MCA Log Services Class.
320 This function is a wrapper for the EsalGetCpuDataByIndexFunctionId service in the Extended SAL
321 MCA Log Services Class. See EsalGetCpuDataByIndexFunctionId in the Extended SAL Specification.
323 @param Index The Global ID for the CPU being modified.
324 @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.
325 If FALSE, then the index in the set of all CPUs in the database is returned.
330 EsalGetCpuDataByIndex (
332 IN BOOLEAN IndexByEnabledCpu
337 Wrapper for the EsalWhoAmIFunctionId service in the Extended SAL MCA Log Services Class.
339 This function is a wrapper for the EsalWhoAmIFunctionId service in the Extended SAL
340 MCA Log Services Class. See EsalWhoAmIFunctionId in the Extended SAL Specification.
342 @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.
343 If FALSE, then the index in the set of all CPUs in the database is returned.
349 IN BOOLEAN IndexByEnabledCpu
354 Wrapper for the EsalNumProcessors service in the Extended SAL MCA Log Services Class.
356 This function is a wrapper for the EsalNumProcessors service in the Extended SAL
357 MCA Log Services Class. See EsalNumProcessors in the Extended SAL Specification.
368 Wrapper for the EsalSetMinStateFnctionId service in the Extended SAL MCA Log Services Class.
370 This function is a wrapper for the EsalSetMinStateFnctionId service in the Extended SAL
371 MCA Log Services Class. See EsalSetMinStateFnctionId in the Extended SAL Specification.
373 @param CpuGlobalId The Global ID for the CPU whose MINSTATE pointer is being set.
374 @param MinStatePointer The physical address of the MINSTATE buffer for the CPU specified by CpuGlobalId.
380 IN UINT64 CpuGlobalId
,
381 IN EFI_PHYSICAL_ADDRESS MinStatePointer
386 Wrapper for the EsalGetMinStateFunctionId service in the Extended SAL MCA Log Services Class.
388 This function is a wrapper for the EsalGetMinStateFunctionId service in the Extended SAL
389 MCA Log Services Class. See EsalGetMinStateFunctionId in the Extended SAL Specification.
391 @param CpuGlobalId The Global ID for the CPU whose MINSTATE pointer is being retrieved.
397 IN UINT64 CpuGlobalId
402 Wrapper for the EsalMcsGetStateInfoFunctionId service in the Extended SAL MCA Log Services Class.
404 This function is a wrapper for the EsalMcsGetStateInfoFunctionId service in the Extended SAL
405 MCA Log Services Class. See EsalMcsGetStateInfoFunctionId in the Extended SAL Specification.
407 @param CpuGlobalId The Global ID for the CPU whose MCA state buffer is being retrieved.
408 @param StateBufferPointer A pointer to the returned MCA state buffer.
409 @param RequiredStateBufferSize A pointer to the size, in bytes, of the returned MCA state buffer.
414 EsalMcaGetStateInfo (
415 IN UINT64 CpuGlobalId
,
416 OUT EFI_PHYSICAL_ADDRESS
*StateBufferPointer
,
417 OUT UINT64
*RequiredStateBufferSize
422 Wrapper for the EsalMcaRegisterCpuFunctionId service in the Extended SAL MCA Log Services Class.
424 This function is a wrapper for the EsalMcaRegisterCpuFunctionId service in the Extended SAL
425 MCA Log Services Class. See EsalMcaRegisterCpuFunctionId in the Extended SAL Specification.
427 @param CpuGlobalId The Global ID for the CPU whose MCA state buffer is being set.
428 @param StateBufferPointer A pointer to the MCA state buffer.
434 IN UINT64 CpuGlobalId
,
435 IN EFI_PHYSICAL_ADDRESS StateBufferPointer