+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2007, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- ExtendedSalLib.h\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-#ifndef _EXTENDED_SAL_LIB_H__\r
-#define _EXTENDED_SAL_LIB_H__\r
-\r
-/**\r
- Register ESAL Class and it's asociated global.\r
- \r
- This function Registers one or more Extended SAL services in a given\r
- class along with the associated global context.\r
- This function is only available prior to ExitBootServices().\r
-\r
- @param ClassGuid GUID of function class\r
- @param ModuleGlobal Module global for Function.\r
- \r
- @retval EFI_SUCCESS The Extended SAL services were registered.\r
- @retval EFI_UNSUPPORTED This function was called after ExitBootServices().\r
- @retval EFI_OUT_OF_RESOURCES There are not enough resources available to register one or more of the specified services.\r
- @retval Other ClassGuid could not be installed onto a new handle. \r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RegisterEsalClass (\r
- IN CONST EFI_GUID *ClassGuid,\r
- IN VOID *ModuleGlobal, OPTIONAL\r
- ...\r
- )\r
-;\r
-\r
-/**\r
- Calls an Extended SAL Class service that was previously registered with RegisterEsalClass().\r
- \r
- This function calls an Extended SAL Class service that was previously registered with RegisterEsalClass().\r
-\r
- @param ClassGuid GUID of function\r
- @param FunctionId Function in ClassGuid to call\r
- @param Arg2 Argument 2 ClassGuid/FunctionId defined\r
- @param Arg3 Argument 3 ClassGuid/FunctionId defined\r
- @param Arg4 Argument 4 ClassGuid/FunctionId defined\r
- @param Arg5 Argument 5 ClassGuid/FunctionId defined\r
- @param Arg6 Argument 6 ClassGuid/FunctionId defined\r
- @param Arg7 Argument 7 ClassGuid/FunctionId defined\r
- @param Arg8 Argument 8 ClassGuid/FunctionId defined\r
- \r
- @retval EFI_SAL_ERROR The address of ExtendedSalProc() can not be determined\r
- for the current CPU execution mode.\r
- @retval Other See the return status from ExtendedSalProc() in the\r
- EXTENDED_SAL_BOOT_SERVICE_PROTOCOL. \r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalCall (\r
- IN EFI_GUID *ClassGuid,\r
- IN UINT64 FunctionId,\r
- IN UINT64 Arg2,\r
- IN UINT64 Arg3,\r
- IN UINT64 Arg4,\r
- IN UINT64 Arg5,\r
- IN UINT64 Arg6,\r
- IN UINT64 Arg7,\r
- IN UINT64 Arg8\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalStallFunctionId service in the Extended SAL Stall Services Class.\r
- \r
- This function is a wrapper for the EsalStallFunctionId service in the Extended SAL\r
- Stall Services Class. See EsalStallFunctionId in the Extended SAL Specification.\r
-\r
- @param Microseconds The number of microseconds to delay.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalStall (\r
- IN UINTN Microseconds\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalSetNewPalEntryFunctionId service in the Extended SAL PAL Services Services Class.\r
- \r
- This function is a wrapper for the EsalSetNewPalEntryFunctionId service in the Extended SAL\r
- PAL Services Services Class. See EsalSetNewPalEntryFunctionId in the Extended SAL Specification.\r
-\r
- @param PhyicalAddress If TRUE, then PalEntryPoint is a physical address.\r
- If FALSE, then PalEntryPoint is a virtual address.\r
- @param PalEntryPoint The PAL Entry Point being set.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalSetNewPalEntry (\r
- IN BOOLEAN PhysicalAddress,\r
- IN UINT64 PalEntryPoint\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL PAL Services Services Class.\r
- \r
- This function is a wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL\r
- PAL Services Services Class. See EsalGetStateBufferFunctionId in the Extended SAL Specification.\r
-\r
- @param PhyicalAddress If TRUE, then PalEntryPoint is a physical address.\r
- If FALSE, then PalEntryPoint is a virtual address.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetNewPalEntry (\r
- IN BOOLEAN PhysicalAddress\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetStateBufferFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetStateBufferFunctionId in the Extended SAL Specification.\r
-\r
- @param McaType See type parameter in the SAL Procedure SAL_GET_STATE_INFO.\r
- @param McaBuffer A pointer to the base address of the returned buffer. Copied from SAL_RETURN_REGS.r9.\r
- @param BufferSize A pointer to the size, in bytes, of the returned buffer. Copied from SAL_RETURN_REGS.r10.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetStateBuffer (\r
- IN UINT64 McaType,\r
- OUT UINT8 **McaBuffer,\r
- OUT UINTN *BufferSize\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalSaveStateBufferFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalSaveStateBufferFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalSaveStateBufferFunctionId in the Extended SAL Specification.\r
-\r
- @param McaType See type parameter in the SAL Procedure SAL_GET_STATE_INFO.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalSaveStateBuffer (\r
- IN UINT64 McaType\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetVectorsFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetVectorsFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetVectorsFunctionId in the Extended SAL Specification.\r
-\r
- @param VectorType The vector type to retrieve.\r
- 0 ¨C MCA, 1 - BSP INIT, 2 ¨C BOOT_RENDEZ, 3 ¨C AP INIT.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetVectors (\r
- IN UINT64 VectorType\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalMcGetParamsFunctionId in the Extended SAL Specification.\r
-\r
- @param ParamInfoType The parameter type to retrieve.\r
- 1 ¨C rendezvous interrupt\r
- 2 ¨C wake up\r
- 3 ¨C Corrected Platform Error Vector.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalMcGetParams (\r
- IN UINT64 ParamInfoType\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalMcGetParamsFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalMcGetParamsFunctionId in the Extended SAL Specification.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalMcGetMcParams (\r
- VOID\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetMcCheckinFlagsFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetMcCheckinFlagsFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetMcCheckinFlagsFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuIndex The index of the CPU in the set of enabled CPUs to check.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetMcCheckinFlags (\r
- IN UINT64 CpuIndex\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalAddCpuDataFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalAddCpuDataFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalAddCpuDataFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU being added.\r
- @param Enabled The enable flag for the CPU being added.\r
- TRUE means the CPU is enabled.\r
- FALSE means the CPU is disabled.\r
- @param PalCompatibility The PAL Compatibility value for the CPU being added.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalAddCpuData (\r
- IN UINT64 CpuGlobalId,\r
- IN BOOLEAN Enabled,\r
- IN UINT64 PalCompatibility\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalRemoveCpuDataFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalRemoveCpuDataFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalRemoveCpuDataFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU being removed.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalRemoveCpuData (\r
- IN UINT64 CpuGlobalId\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalModifyCpuDataFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalModifyCpuDataFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalModifyCpuDataFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU being modified.\r
- @param Enabled The enable flag for the CPU being modified.\r
- TRUE means the CPU is enabled.\r
- FALSE means the CPU is disabled.\r
- @param PalCompatibility The PAL Compatibility value for the CPU being modified.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalModifyCpuData (\r
- IN UINT64 CpuGlobalId,\r
- IN BOOLEAN Enabled,\r
- IN UINT64 PalCompatibility\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetCpuDataByIdFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetCpuDataByIdFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetCpuDataByIdFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU being looked up.\r
- @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.\r
- If FALSE, then the index in the set of all CPUs in the database is returned.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetCpuDataById (\r
- IN UINT64 CpuGlobalId,\r
- IN BOOLEAN IndexByEnabledCpu\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetCpuDataByIndexFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetCpuDataByIndexFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetCpuDataByIndexFunctionId in the Extended SAL Specification.\r
-\r
- @param Index The Global ID for the CPU being modified.\r
- @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.\r
- If FALSE, then the index in the set of all CPUs in the database is returned.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetCpuDataByIndex (\r
- IN UINT64 Index,\r
- IN BOOLEAN IndexByEnabledCpu\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalWhoAmIFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalWhoAmIFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalWhoAmIFunctionId in the Extended SAL Specification.\r
-\r
- @param IndexByEnabledCpu If TRUE, then the index in the set of enabled CPUs in the database is returned.\r
- If FALSE, then the index in the set of all CPUs in the database is returned.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalWhoAmI (\r
- IN BOOLEAN IndexByEnabledCpu\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalNumProcessors service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalNumProcessors service in the Extended SAL\r
- MCA Log Services Class. See EsalNumProcessors in the Extended SAL Specification.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalNumProcessors (\r
- VOID\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalSetMinStateFnctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalSetMinStateFnctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalSetMinStateFnctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU whose MINSTATE pointer is being set.\r
- @param MinStatePointer The physical address of the MINSTATE buffer for the CPU specified by CpuGlobalId.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalSetMinState (\r
- IN UINT64 CpuGlobalId,\r
- IN EFI_PHYSICAL_ADDRESS MinStatePointer\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalGetMinStateFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalGetMinStateFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalGetMinStateFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU whose MINSTATE pointer is being retrieved.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalGetMinState (\r
- IN UINT64 CpuGlobalId\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalMcsGetStateInfoFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalMcsGetStateInfoFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalMcsGetStateInfoFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU whose MCA state buffer is being retrieved.\r
- @param StateBufferPointer A pointer to the returned MCA state buffer.\r
- @param RequiredStateBufferSize A pointer to the size, in bytes, of the returned MCA state buffer.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalMcaGetStateInfo (\r
- IN UINT64 CpuGlobalId,\r
- OUT EFI_PHYSICAL_ADDRESS *StateBufferPointer,\r
- OUT UINT64 *RequiredStateBufferSize\r
- )\r
-;\r
-\r
-/**\r
- Wrapper for the EsalMcaRegisterCpuFunctionId service in the Extended SAL MCA Log Services Class.\r
- \r
- This function is a wrapper for the EsalMcaRegisterCpuFunctionId service in the Extended SAL\r
- MCA Log Services Class. See EsalMcaRegisterCpuFunctionId in the Extended SAL Specification.\r
-\r
- @param CpuGlobalId The Global ID for the CPU whose MCA state buffer is being set.\r
- @param StateBufferPointer A pointer to the MCA state buffer.\r
-\r
-**/\r
-SAL_RETURN_REGS\r
-EFIAPI\r
-EsalMcaRegisterCpu (\r
- IN UINT64 CpuGlobalId,\r
- IN EFI_PHYSICAL_ADDRESS StateBufferPointer\r
- )\r
-;\r
-\r
-#endif\r