/** @file
Main SAL API's defined in Intel Itanium Processor Family System Abstraction
Layer Specification Revision 3.2 (December 2003)
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __SAL_API_H__
#define __SAL_API_H__
///
/// SAL return status type
///
///
/// Call completed without error.
///
///
/// Call completed without error, but some information was lost due to overflow.
///
///
/// Call completed without error; effect a warm boot of the system to complete the update.
///
///
/// More information is available for retrieval.
///
///
/// Not implemented.
///
///
/// Invalid Argument.
///
///
/// Call completed without error.
///
///
/// Virtual address not registered.
///
///
/// No information available.
///
///
/// Scratch buffer required.
///
///
/// Return registers from SAL.
///
typedef struct {
///
/// SAL return status value in r8.
///
///
/// SAL returned value in r9.
///
///
/// SAL returned value in r10.
///
///
/// SAL returned value in r11.
///
/**
Prototype of SAL procedures.
@param FunctionId Functional identifier.
The upper 32 bits are ignored and only the lower 32 bits
are used. The following functional identifiers are defined:
0x01XXXXXX - Architected SAL functional group.
0x02XXXXXX to 0x03XXXXXX - OEM SAL functional group. Each OEM is
allowed to use the entire range in the 0x02XXXXXX to 0x03XXXXXX range.
0x04XXXXXX to 0xFFFFFFFF - Reserved.
@param Arg1 The first parameter of the architected/OEM specific SAL functions.
@param Arg2 The second parameter of the architected/OEM specific SAL functions.
@param Arg3 The third parameter passed to the ESAL function based.
@param Arg4 The fourth parameter passed to the ESAL function based.
@param Arg5 The fifth parameter passed to the ESAL function based.
@param Arg6 The sixth parameter passed to the ESAL function.
@param Arg7 The seventh parameter passed to the ESAL function based.
@return r8 Return status: positive number indicates successful,
negative number indicates failure.
r9 Other return parameter in r9.
r10 Other return parameter in r10.
r11 Other return parameter in r11.
**/
typedef
);
//
// SAL Procedure FunctionId definition
//
///
/// Register software code locations with SAL.
///
///
/// Return Machine State information obtained by SAL.
///
///
/// Obtain size of Machine State information.
///
///
/// Clear Machine State information.
///
///
/// Cause the processor to go into a spin loop within SAL.
///
///
/// Register the machine check interface layer with SAL.
///
///
/// Register the physical addresses of locations needed by SAL.
///
///
/// Flush the instruction or data caches.
///
///
/// Initialize the instruction and data caches.
///
///
/// Read from the PCI configuration space.
///
///
/// Write to the PCI configuration space.
///
///
/// Return the base frequency of the platform.
///
///
/// Returns information on the physical processor mapping within the platform.
///
///
/// Update the contents of firmware blocks.
///
//
// SAL Procedure parameter definitions
// Not much point in using typedefs or enums because all params
// are UINT64 and the entry point is common
//
//
// Parameter of EFI_SAL_SET_VECTORS
//
// Vector type
//
///
/// The format of a length_cs_n argument.
///
typedef struct {
//
// Parameter of EFI_SAL_GET_STATE_INFO, EFI_SAL_GET_STATE_INFO_SIZE, and EFI_SAL_CLEAR_STATE_INFO
//
// Type of information
//
//
// Parameter of EFI_SAL_MC_SET_PARAMS
//
// Unsigned 64-bit integer value for the parameter type of the machine check interface
//
//
// Unsigned 64-bit integer value indicating whether interrupt vector or
// memory address is specified
//
//
// Parameter of EFI_SAL_REGISTER_PAL_PHYSICAL_ADDR
//
// The encoded value of the entity whose physical address is registered
//
//
// Parameter of EFI_SAL_CACHE_FLUSH
//
// Unsigned 64-bit integer denoting type of cache flush operation
//
//
// Parameter of EFI_SAL_PCI_CONFIG_READ and EFI_SAL_PCI_CONFIG_WRITE
//
// PCI config size
//
//
// The type of PCI configuration address
//
///
/// The format of PCI Compatible Address.
///
typedef struct {
///
/// The format of Extended Register Address.
///
typedef struct {
//
// Parameter of EFI_SAL_FREQ_BASE
//
// Unsigned 64-bit integer specifying the type of clock source
//
//
// Parameter and return value of EFI_SAL_UPDATE_PAL
//
// Return parameter provides additional information on the
// failure when the status field contains a value of -3,
// returned in r9.
//
///
/// 64-byte header of update data block.
///
typedef struct {
///
/// Data structure pointed by the parameter param_buf.
/// It is a 16-byte aligned data structure in memory with a length of 32 bytes
/// that describes the new firmware. This information is organized in the form
/// of a linked list with each element describing one firmware component.
///
typedef struct _SAL_UPDATE_PAL_INFO_BLOCK {
///
/// SAL System Table Definitions.
///
#pragma pack(1)
typedef struct {
///
/// The ASCII string representation of "SST_" that confirms the presence of the table.
///
///
/// The length of the entire table in bytes, starting from offset zero and including the
/// header and all entries indicated by the EntryCount field.
///
///
/// The revision number of the Itanium Processor Family System Abstraction Layer
/// Specification supported by the SAL implementation, in binary coded decimal (BCD) format.
///
///
/// The number of entries in the variable portion of the table.
///
///
/// A modulo checksum of the entire table and the entries following this table.
///
///
/// Unused, must be zero.
///
///
/// Version Number of the SAL_A firmware implementation in BCD format.
///
///
/// Version Number of the SAL_B firmware implementation in BCD format.
///
///
/// An ASCII identification string which uniquely identifies the manufacturer
/// of the system hardware.
///
///
/// An ASCII identification string which uniquely identifies a family of
/// compatible products from the manufacturer.
///
///
/// Unused, must be zero.
///
//
// SAL System Types
//
#define EFI_SAL_ST_ENTRY_POINT 0
//
// SAL System Type Sizes
//
///
/// Format of Entrypoint Descriptor Entry.
///
typedef struct {
///
/// Format of Platform Features Descriptor Entry.
///
typedef struct {
//
// Value of Platform Feature List
//
///
/// Format of Translation Register Descriptor Entry.
///
typedef struct {
//
// Type of Translation Register
//
#define EFI_SAL_ST_TR_USAGE_INSTRUCTION 00
///
/// Definition of Coherence Domain Information.
///
typedef struct {
///
/// Format of Purge Translation Cache Coherence Domain Entry.
///
typedef struct {
///
/// Format of Application Processor Wake-Up Descriptor Entry.
///
typedef struct {
///
/// Format of Firmware Interface Table (FIT) Entry.
///
typedef struct {
//
// FIT Types
//
//
// Type from 0x02 to 0x0D is reserved.
//
//
// OEM-defined type range is from 0x10 to 0x7E.
// Here we defined the PEI_CORE type as 0x10
//
//
// FIT Entry
//
//
// Following definitions are for Error Record Structure
//
///
/// Format of TimeStamp field in Record Header.
///
typedef struct {
///
/// Definition of Record Header.
///
typedef struct {
///
/// Definition of Section Header.
///
typedef struct {
///
/// GUID of Processor Machine Check Errors.
///
#define SAL_PROCESSOR_ERROR_RECORD_INFO \
{ \
0xe429faf1, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for valid bits of MOD_ERROR_INFO
//
///
/// Definition of MOD_ERROR_INFO_STRUCT.
///
typedef struct {
///
/// Definition of CPUID_INFO_STRUCT.
///
typedef struct {
} CPUID_INFO;
typedef struct {
} FR_STRUCT;
//
// Bit masks for PSI_STATIC_STRUCT.ValidFieldBits
//
///
/// Definition of PSI_STATIC_STRUCT.
///
typedef struct {
//
// Bit masks for SAL_PROCESSOR_ERROR_RECORD.ValidationBits
//
///
/// Definition of Processor Machine Check Error Record.
///
typedef struct {
///
/// GUID of Platform Memory Device Error Info.
///
#define SAL_MEMORY_ERROR_RECORD_INFO \
{ \
0xe429faf2, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_MEMORY_ERROR_RECORD.ValidationBits
//
///
/// Definition of Platform Memory Device Error Info Record.
///
typedef struct {
///
/// GUID of Platform PCI Bus Error Info.
///
#define SAL_PCI_BUS_ERROR_RECORD_INFO \
{ \
0xe429faf4, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_PCI_BUS_ERROR_RECORD.ValidationBits
//
///
/// Designated PCI Bus identifier.
///
typedef struct {
} PCI_BUS_ID;
///
/// Definition of Platform PCI Bus Error Info Record.
///
typedef struct {
///
/// GUID of Platform PCI Component Error Info.
///
#define SAL_PCI_COMP_ERROR_RECORD_INFO \
{ \
0xe429faf6, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_PCI_COMPONENT_ERROR_RECORD.ValidationBits
//
///
/// Format of PCI Component Information to identify the device.
///
typedef struct {
///
/// Definition of Platform PCI Component Error Info.
///
typedef struct {
///
/// Platform SEL Device Error Info.
///
#define SAL_SEL_DEVICE_ERROR_RECORD_INFO \
{ \
0xe429faf3, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_SEL_DEVICE_ERROR_RECORD.ValidationBits
//
///
/// Definition of Platform SEL Device Error Info Record.
///
typedef struct {
///
/// GUID of Platform SMBIOS Device Error Info.
///
#define SAL_SMBIOS_ERROR_RECORD_INFO \
{ \
0xe429faf5, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_SMBIOS_DEVICE_ERROR_RECORD.ValidationBits
//
///
/// Definition of Platform SMBIOS Device Error Info Record.
///
typedef struct {
///
/// GUID of Platform Specific Error Info.
///
#define SAL_PLATFORM_ERROR_RECORD_INFO \
{ \
0xe429faf7, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// Bit masks for SAL_PLATFORM_SPECIFIC_ERROR_RECORD.ValidationBits
//
///
/// Definition of Platform Specific Error Info Record.
///
typedef struct {
///
/// Union of all the possible SAL Error Record Types.
///
typedef union {
#pragma pack()
#endif