/* module IA64_SAL_ROUTINES.H "X-5" * ************************************************************************* * * * Copyright 2002 Compaq Computer Corporation * * * * COMPAQ Registered in U.S. Patent and Trademark Office. * * * * Confidential computer software. Valid license from Compaq or * * authorized sublicensor required for possession, use or copying. * * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * * Computer Software Documentation, and Technical Data for Commercial * * Items are licensed to the U.S. Government under vendor's standard * * commercial license. * * * * Compaq shall not be liable for technical or editorial errors or * * omissions contained herein. The information in this document is * * subject to change without notice. * * * ************************************************************************* *++ * * FACILITY: * * VMS Executive (LIB_H) * * ABSTRACT: * * This module contains the C function prototypes for the IA64 SAL * routines that begin with the IA64_SAL$ prefix. * * * AUTHOR: Andrew Crager * * CREATION DATE: 19-Aug-2002 * * MODIFICATION HISTORY: * * X-5 TLC Tony Camuso 3-Aug-2005 * PCIe Extended Config Space support: add flag param * for extended config space accesses. * * X-4 KLN3560 Karen L. Noel 18-Feb-2005 * Add prototype for ESI functions. * * X-3 KLN3534 Karen L. Noel 1-Sep-2004 * Add jacket for calling SAL physical ID info. * * X-2 KLN3128 Karen L. Noel 7-Nov-2002 * o Call exe$ar_sal_proc. * o Make ia64_sal$cache_flush simpler to call. * * * X-1 Andrew Crager 19-Aug-2002 * Initial version. * *-- */ #ifndef __IA64_SAL__ROUTINES_LOADED #define __IA64_SAL__ROUTINES_LOADED 1 #pragma __required_pointer_size __save #pragma __required_pointer_size __long #include #include /*** SAL jacket routine prototype for SAL_PROC. ***/ typedef SAL_RET (SAL_PROC) (unsigned __int64 func_id, unsigned __int64 arg1, unsigned __int64 arg2, unsigned __int64 arg3, unsigned __int64 arg4, unsigned __int64 arg5, unsigned __int64 arg6, unsigned __int64 arg7); #pragma linkage_ia64 sal_proc_linkage=(result(r8,r9,r10,r11)) #pragma use_linkage sal_proc_linkage (SAL_PROC) extern SAL_PROC *exe$ar_sal_proc; /*** SAL jacket routines for the various SAL_PROC calls. ***/ #pragma inline (ia64_sal$set_vectors) static __int64 ia64_sal$set_vectors ( SAL_SV_RET *sal_ret_ptr, unsigned __int64 vec_type, unsigned __int64 phys_addr_1, unsigned __int64 gp_1, unsigned __int64 len_cs_1, unsigned __int64 phys_addr_2, unsigned __int64 gp_2, unsigned __int64 len_cs_2) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_SET_VECTORS, vec_type, phys_addr_1, gp_1, len_cs_1, phys_addr_2, gp_2, len_cs_2); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$get_state_info) static __int64 ia64_sal$get_state_info (SAL_GSI_RET *sal_ret_ptr, unsigned __int64 type, unsigned __int64 memaddr) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_GET_STATE_INFO, type, 0, memaddr, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$get_state_info_size) static __int64 ia64_sal$get_state_info_size (SAL_GSIS_RET *sal_ret_ptr, unsigned __int64 type) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_GET_STATE_INFO_SIZE, type, 0, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$clear_state_info) static __int64 ia64_sal$clear_state_info (SAL_CSI_RET *sal_ret_ptr, unsigned __int64 type) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_CLEAR_STATE_INFO, type, 0, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$mc_rendez) static __int64 ia64_sal$mc_rendez (SAL_MCR_RET *sal_ret_ptr) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_MC_RENDEZ, 0, 0, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$mc_set_params) static __int64 ia64_sal$mc_set_params (SAL_MCSP_RET *sal_ret_ptr, unsigned __int64 param_type, unsigned __int64 i_or_m, unsigned __int64 i_or_m_val, unsigned __int64 time_out, unsigned __int64 mca_opt) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_MC_SET_PARAMS, param_type, i_or_m, i_or_m_val, time_out, mca_opt, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$reg_phys_addr) static __int64 ia64_sal$reg_phys_addr (SAL_RPA_RET *sal_ret_ptr, unsigned __int64 phys_entity, unsigned __int64 p_addr) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_REG_PHYS_ADDR, phys_entity, p_addr, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$cache_flush) static __int64 ia64_sal$cache_flush (unsigned __int64 i_or_d) { SAL_RET sal_ret; sal_ret = exe$ar_sal_proc ( IA64_SAL$K_CACHE_FLUSH, i_or_d, 0,0,0,0,0,0); return (sal_ret.sal_ret$q_status); } #pragma inline (ia64_sal$cache_init) static __int64 ia64_sal$cache_init (SAL_CI_RET *sal_ret_ptr) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_CACHE_INIT, 0, 0, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$pci_cfg_read) static __int64 ia64_sal$pci_cfg_read (SAL_PCICR_RET *sal_ret_ptr, unsigned __int64 addr, unsigned __int64 size, unsigned __int64 addr_type) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_PCI_CFG_READ, addr, size, addr_type, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$pci_cfg_write) static __int64 ia64_sal$pci_cfg_write (SAL_PCICW_RET *sal_ret_ptr, unsigned __int64 addr, unsigned __int64 size, unsigned __int64 value, unsigned __int64 addr_type) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_PCI_CFG_WRITE, addr, size, value, addr_type, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$freq_base) static __int64 ia64_sal$freq_base (SAL_FB_RET *sal_ret_ptr, unsigned __int64 clock_type) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_FREQ_BASE, clock_type, 0, 0, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } #pragma inline (ia64_sal$physical_id_info) static __int64 ia64_sal$physical_id_info (unsigned int *plid) { SAL_RET sal_ret; sal_ret = exe$ar_sal_proc ( IA64_SAL$K_PHYSICAL_ID_INFO, 0, 0, 0, 0, 0, 0, 0); *plid = ((SAL_PID_RET *)&sal_ret)->sal_pid_ret$w_plid; return (sal_ret.sal_ret$q_status); } #pragma inline (ia64_sal$update_pal) static __int64 ia64_sal$update_pal (SAL_UPAL_RET *sal_ret_ptr, unsigned __int64 param_buf, unsigned __int64 scratch_buf, unsigned __int64 scratch_buf_size) { *(SAL_RET *)sal_ret_ptr = exe$ar_sal_proc ( IA64_SAL$K_UPDATE_PAL, param_buf, scratch_buf, scratch_buf_size, 0, 0, 0, 0); return (((SAL_RET *)sal_ret_ptr)->sal_ret$q_status); } /* Extended SAL functions */ typedef struct _esi_ret { unsigned __int64 esi_ret$q_status; unsigned __int64 esi_ret$q_status2; } ESI_RET; int exe$get_esi_entry (EFI_GUID * guid_p, void ** code_va_p, void ** gp_p); ESI_RET exe$call_esi_phys ( void * code_va, void * gp, unsigned __int64 esi_func_id, unsigned __int64 arg1, unsigned __int64 arg2, unsigned __int64 arg3); #pragma linkage_ia64 esi_linkage=(result(r8,r9)) #pragma use_linkage esi_linkage (exe$call_esi_phys) #pragma __required_pointer_size __restore #endif /* __IA64_SAL_ROUTINES_LOADED */