1 #ifndef _ASM_IA64_SAL_H
2 #define _ASM_IA64_SAL_H
26 #define IA64_SAL_PLATFORM_FEATURE_BUS_LOCK_BIT 0
27 #define IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT_BIT 1
28 #define IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT_BIT 2
29 #define IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT_BIT 3
31 #define IA64_SAL_PLATFORM_FEATURE_BUS_LOCK (1<<IA64_SAL_PLATFORM_FEATURE_BUS_LOCK_BIT)
32 #define IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT (1<<IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT_BIT)
33 #define IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT (1<<IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT_BIT)
34 #define IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT (1<<IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT_BIT)
48 #define __IA64_FW_CALL(entry,result,a0,a1,a2,a3,a4,a5,a6,a7) \
49 result = (*entry)(a0,a1,a2,a3,a4,a5,a6,a7)
51 # define IA64_FW_CALL(entry,result,args...) do { \
52 unsigned long __ia64_sc_flags; \
53 struct ia64_fpreg __ia64_sc_fr[6]; \
54 ia64_save_scratch_fpregs(__ia64_sc_fr); \
55 spin_lock_irqsave(&sal_lock, __ia64_sc_flags); \
56 __IA64_FW_CALL(entry, result, args); \
57 spin_unlock_irqrestore(&sal_lock, __ia64_sc_flags); \
58 ia64_load_scratch_fpregs(__ia64_sc_fr); \
61 # define SAL_CALL(result,args...) \
62 IA64_FW_CALL(ia64_sal, result, args);
64 # define SAL_CALL_NOLOCK(result,args...) do { \
65 unsigned long __ia64_scn_flags; \
66 struct ia64_fpreg __ia64_scn_fr[6]; \
67 ia64_save_scratch_fpregs(__ia64_scn_fr); \
68 local_irq_save(__ia64_scn_flags); \
69 __IA64_FW_CALL(ia64_sal, result, args); \
70 local_irq_restore(__ia64_scn_flags); \
71 ia64_load_scratch_fpregs(__ia64_scn_fr); \
74 # define SAL_CALL_REENTRANT(result,args...) do { \
75 struct ia64_fpreg __ia64_scs_fr[6]; \
76 ia64_save_scratch_fpregs(__ia64_scs_fr); \
78 __IA64_FW_CALL(ia64_sal, result, args); \
80 ia64_load_scratch_fpregs(__ia64_scs_fr); \
83 #define SAL_SET_VECTORS 0x01000000
84 #define SAL_GET_STATE_INFO 0x01000001
85 #define SAL_GET_STATE_INFO_SIZE 0x01000002
86 #define SAL_CLEAR_STATE_INFO 0x01000003
87 #define SAL_MC_RENDEZ 0x01000004
88 #define SAL_MC_SET_PARAMS 0x01000005
89 #define SAL_REGISTER_PHYSICAL_ADDR 0x01000006
91 #define SAL_CACHE_FLUSH 0x01000008
92 #define SAL_CACHE_INIT 0x01000009
93 #define SAL_PCI_CONFIG_READ 0x01000010
94 #define SAL_PCI_CONFIG_WRITE 0x01000011
95 #define SAL_FREQ_BASE 0x01000012
96 #define SAL_PHYSICAL_ID_INFO 0x01000013
98 #define SAL_UPDATE_PAL 0x01000020
164 #define SAL_DESC_SIZE(type) "\060\040\020\040\020\020"[(unsigned) type]
224 #define IA64_SAL_AP_EXTERNAL_INT 0
238 #define SAL_VERSION_CODE(major, minor) ((bin2bcd(major) << 8) | bin2bcd(minor))
272 #define SAL_MC_PARAM_RZ_ALWAYS 0x1
273 #define SAL_MC_PARAM_BINIT_ESCALATE 0x10
280 #define SAL_PROC_DEV_ERR_SECT_GUID \
281 EFI_GUID(0xe429faf1, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
282 #define SAL_PLAT_MEM_DEV_ERR_SECT_GUID \
283 EFI_GUID(0xe429faf2, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
284 #define SAL_PLAT_SEL_DEV_ERR_SECT_GUID \
285 EFI_GUID(0xe429faf3, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
286 #define SAL_PLAT_PCI_BUS_ERR_SECT_GUID \
287 EFI_GUID(0xe429faf4, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
288 #define SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID \
289 EFI_GUID(0xe429faf5, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
290 #define SAL_PLAT_PCI_COMP_ERR_SECT_GUID \
291 EFI_GUID(0xe429faf6, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
292 #define SAL_PLAT_SPECIFIC_ERR_SECT_GUID \
293 EFI_GUID(0xe429faf7, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
294 #define SAL_PLAT_HOST_CTLR_ERR_SECT_GUID \
295 EFI_GUID(0xe429faf8, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
296 #define SAL_PLAT_BUS_ERR_SECT_GUID \
297 EFI_GUID(0xe429faf9, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81)
298 #define PROCESSOR_ABSTRACTION_LAYER_OVERWRITE_GUID \
299 EFI_GUID(0x6cb0a200, 0x893a, 0x11da, 0x96, 0xd2, 0x0, 0x10, 0x83, 0xff, \
302 #define MAX_CACHE_ERRORS 6
303 #define MAX_TLB_ERRORS 6
304 #define MAX_BUS_ERRORS 1
335 #define sal_log_severity_recoverable 0
336 #define sal_log_severity_fatal 1
337 #define sal_log_severity_corrected 2
343 #define ERI_NOT_VALID 0x0
344 #define ERI_NOT_ACCESSIBLE 0x30
345 #define ERI_CONTAINMENT_WARN 0x22
346 #define ERI_UNCORRECTED_ERROR 0x20
347 #define ERI_COMPONENT_RESET 0x24
348 #define ERI_CORR_ERROR_LOG 0x21
349 #define ERI_CORR_ERROR_THRESH 0x29
436 #define SAL_LPI_PSI_INFO(l) \
437 ({ sal_log_processor_info_t *_l = (l); \
438 ((sal_processor_static_info_t *) \
439 ((char *) _l->info + ((_l->valid.num_cache_check + _l->valid.num_tlb_check \
440 + _l->valid.num_bus_check + _l->valid.num_reg_file_check \
441 + _l->valid.num_ms_check) * sizeof(sal_log_mod_error_info_t) \
442 + sizeof(struct sal_cpuid_info)))); \
673 ia64_sal_cache_init (
void)
685 ia64_sal_clear_state_info (
u64 sal_info_type)
698 ia64_sal_get_state_info (
u64 sal_info_type,
u64 *sal_info)
702 sal_info, 0, 0, 0, 0);
714 ia64_sal_get_state_info_size (
u64 sal_info_type)
730 ia64_sal_mc_rendez (
void)
749 timeout, rz_always, 0, 0);
766 ia64_sal_pci_config_write (
u64 pci_config_addr,
int type,
u64 size,
u64 value)
793 ia64_sal_set_vectors (
u64 vector_type,
794 u64 handler_addr1,
u64 gp1,
u64 handler_len1,
795 u64 handler_addr2,
u64 gp2,
u64 handler_len2)
799 handler_addr1, gp1, handler_len1,
800 handler_addr2, gp2, handler_len2);
807 ia64_sal_update_pal (
u64 param_buf,
u64 scratch_buf,
u64 scratch_buf_size,
814 *error_code = isrv.v0;
815 if (scratch_buf_size_needed)
816 *scratch_buf_size_needed = isrv.v1;
822 ia64_sal_physical_id_info(
u16 *splid)
843 #define IA64_SAL_OEMFUNC_MIN 0x02000000
844 #define IA64_SAL_OEMFUNC_MAX 0x03ffffff
854 unsigned long *drift_info);
855 #ifdef CONFIG_HOTPLUG_CPU
862 struct sal_to_os_boot {
890 extern struct sal_to_os_boot sal_boot_rendez_state[
NR_CPUS];
892 extern void ia64_jump_to_sal(
struct sal_to_os_boot *);
897 #define PALO_MAX_TLB_PURGES 0xFFFF
898 #define PALO_SIG "PALO"
911 #define NPTCG_FROM_PAL 0
912 #define NPTCG_FROM_PALO 1
913 #define NPTCG_FROM_KERNEL_PARAMETER 2