📄 pal.h
字号:
in : 1, /* 0 = MC, 1 = INIT */ rs : 1, /* RSE valid */ cm : 1, /* MC corrected */ ex : 1, /* MC is expected */ cr : 1, /* Control regs valid*/ pc : 1, /* Perf cntrs valid */ dr : 1, /* Debug regs valid */ tr : 1, /* Translation regs * valid */ rr : 1, /* Region regs valid */ ar : 1, /* App regs valid */ br : 1, /* Branch regs valid */ pr : 1, /* Predicate registers * valid */ fp : 1, /* fp registers valid*/ b1 : 1, /* Preserved bank one * general registers * are valid */ b0 : 1, /* Preserved bank zero * general registers * are valid */ gr : 1, /* General registers * are valid * (excl. banked regs) */ dsize : 16, /* size of dynamic * state returned * by the processor */ se : 1, /* Shared error. MCA in a shared structure */ reserved2 : 10, cc : 1, /* Cache check */ tc : 1, /* TLB check */ bc : 1, /* Bus check */ rc : 1, /* Register file check */ uc : 1; /* Uarch check */} pal_processor_state_info_t;typedef struct pal_cache_check_info_s { u64 op : 4, /* Type of cache * operation that * caused the machine * check. */ level : 2, /* Cache level */ reserved1 : 2, dl : 1, /* Failure in data part * of cache line */ tl : 1, /* Failure in tag part * of cache line */ dc : 1, /* Failure in dcache */ ic : 1, /* Failure in icache */ mesi : 3, /* Cache line state */ mv : 1, /* mesi valid */ way : 5, /* Way in which the * error occurred */ wiv : 1, /* Way field valid */ reserved2 : 1, dp : 1, /* Data poisoned on MBE */ reserved3 : 8, index : 20, /* Cache line index */ reserved4 : 2, is : 1, /* instruction set (1 == ia32) */ iv : 1, /* instruction set field valid */ pl : 2, /* privilege level */ pv : 1, /* privilege level field valid */ mcc : 1, /* Machine check corrected */ tv : 1, /* Target address * structure is valid */ rq : 1, /* Requester identifier * structure is valid */ rp : 1, /* Responder identifier * structure is valid */ pi : 1; /* Precise instruction pointer * structure is valid */} pal_cache_check_info_t;typedef struct pal_tlb_check_info_s { u64 tr_slot : 8, /* Slot# of TR where * error occurred */ trv : 1, /* tr_slot field is valid */ reserved1 : 1, level : 2, /* TLB level where failure occurred */ reserved2 : 4, dtr : 1, /* Fail in data TR */ itr : 1, /* Fail in inst TR */ dtc : 1, /* Fail in data TC */ itc : 1, /* Fail in inst. TC */ op : 4, /* Cache operation */ reserved3 : 30, is : 1, /* instruction set (1 == ia32) */ iv : 1, /* instruction set field valid */ pl : 2, /* privilege level */ pv : 1, /* privilege level field valid */ mcc : 1, /* Machine check corrected */ tv : 1, /* Target address * structure is valid */ rq : 1, /* Requester identifier * structure is valid */ rp : 1, /* Responder identifier * structure is valid */ pi : 1; /* Precise instruction pointer * structure is valid */} pal_tlb_check_info_t;typedef struct pal_bus_check_info_s { u64 size : 5, /* Xaction size */ ib : 1, /* Internal bus error */ eb : 1, /* External bus error */ cc : 1, /* Error occurred * during cache-cache * transfer. */ type : 8, /* Bus xaction type*/ sev : 5, /* Bus error severity*/ hier : 2, /* Bus hierarchy level */ dp : 1, /* Data poisoned on MBE */ bsi : 8, /* Bus error status * info */ reserved2 : 22, is : 1, /* instruction set (1 == ia32) */ iv : 1, /* instruction set field valid */ pl : 2, /* privilege level */ pv : 1, /* privilege level field valid */ mcc : 1, /* Machine check corrected */ tv : 1, /* Target address * structure is valid */ rq : 1, /* Requester identifier * structure is valid */ rp : 1, /* Responder identifier * structure is valid */ pi : 1; /* Precise instruction pointer * structure is valid */} pal_bus_check_info_t;typedef struct pal_reg_file_check_info_s { u64 id : 4, /* Register file identifier */ op : 4, /* Type of register * operation that * caused the machine * check. */ reg_num : 7, /* Register number */ rnv : 1, /* reg_num valid */ reserved2 : 38, is : 1, /* instruction set (1 == ia32) */ iv : 1, /* instruction set field valid */ pl : 2, /* privilege level */ pv : 1, /* privilege level field valid */ mcc : 1, /* Machine check corrected */ reserved3 : 3, pi : 1; /* Precise instruction pointer * structure is valid */} pal_reg_file_check_info_t;typedef struct pal_uarch_check_info_s { u64 sid : 5, /* Structure identification */ level : 3, /* Level of failure */ array_id : 4, /* Array identification */ op : 4, /* Type of * operation that * caused the machine * check. */ way : 6, /* Way of structure */ wv : 1, /* way valid */ xv : 1, /* index valid */ reserved1 : 8, index : 8, /* Index or set of the uarch * structure that failed. */ reserved2 : 24, is : 1, /* instruction set (1 == ia32) */ iv : 1, /* instruction set field valid */ pl : 2, /* privilege level */ pv : 1, /* privilege level field valid */ mcc : 1, /* Machine check corrected */ tv : 1, /* Target address * structure is valid */ rq : 1, /* Requester identifier * structure is valid */ rp : 1, /* Responder identifier * structure is valid */ pi : 1; /* Precise instruction pointer * structure is valid */} pal_uarch_check_info_t;typedef union pal_mc_error_info_u { u64 pmei_data; pal_processor_state_info_t pme_processor; pal_cache_check_info_t pme_cache; pal_tlb_check_info_t pme_tlb; pal_bus_check_info_t pme_bus; pal_reg_file_check_info_t pme_reg_file; pal_uarch_check_info_t pme_uarch;} pal_mc_error_info_t;#define pmci_proc_unknown_check pme_processor.uc#define pmci_proc_bus_check pme_processor.bc#define pmci_proc_tlb_check pme_processor.tc#define pmci_proc_cache_check pme_processor.cc#define pmci_proc_dynamic_state_size pme_processor.dsize#define pmci_proc_gpr_valid pme_processor.gr#define pmci_proc_preserved_bank0_gpr_valid pme_processor.b0#define pmci_proc_preserved_bank1_gpr_valid pme_processor.b1#define pmci_proc_fp_valid pme_processor.fp#define pmci_proc_predicate_regs_valid pme_processor.pr#define pmci_proc_branch_regs_valid pme_processor.br#define pmci_proc_app_regs_valid pme_processor.ar#define pmci_proc_region_regs_valid pme_processor.rr#define pmci_proc_translation_regs_valid pme_processor.tr#define pmci_proc_debug_regs_valid pme_processor.dr#define pmci_proc_perf_counters_valid pme_processor.pc#define pmci_proc_control_regs_valid pme_processor.cr#define pmci_proc_machine_check_expected pme_processor.ex#define pmci_proc_machine_check_corrected pme_processor.cm#define pmci_proc_rse_valid pme_processor.rs#define pmci_proc_machine_check_or_init pme_processor.in#define pmci_proc_dynamic_state_valid pme_processor.dy#define pmci_proc_operation pme_processor.op#define pmci_proc_trap_lost pme_processor.tl#define pmci_proc_hardware_damage pme_processor.hd#define pmci_proc_uncontained_storage_damage pme_processor.us#define pmci_proc_machine_check_isolated pme_processor.ci#define pmci_proc_continuable pme_processor.co#define pmci_proc_storage_intergrity_synced pme_processor.sy#define pmci_proc_min_state_save_area_regd pme_processor.mn#define pmci_proc_distinct_multiple_errors pme_processor.me#define pmci_proc_pal_attempted_rendezvous pme_processor.ra#define pmci_proc_pal_rendezvous_complete pme_processor.rz#define pmci_cache_level pme_cache.level#define pmci_cache_line_state pme_cache.mesi#define pmci_cache_line_state_valid pme_cache.mv#define pmci_cache_line_index pme_cache.index#define pmci_cache_instr_cache_fail pme_cache.ic#define pmci_cache_data_cache_fail pme_cache.dc#define pmci_cache_line_tag_fail pme_cache.tl#define pmci_cache_line_data_fail pme_cache.dl#define pmci_cache_operation pme_cache.op#define pmci_cache_way_valid pme_cache.wv#define pmci_cache_target_address_valid pme_cache.tv#define pmci_cache_way pme_cache.way#define pmci_cache_mc pme_cache.mc#define pmci_tlb_instr_translation_cache_fail pme_tlb.itc#define pmci_tlb_data_translation_cache_fail pme_tlb.dtc#define pmci_tlb_instr_translation_reg_fail pme_tlb.itr#define pmci_tlb_data_translation_reg_fail pme_tlb.dtr#define pmci_tlb_translation_reg_slot pme_tlb.tr_slot#define pmci_tlb_mc pme_tlb.mc#define pmci_bus_status_info pme_bus.bsi#define pmci_bus_req_address_valid pme_bus.rq#define pmci_bus_resp_address_valid pme_bus.rp#define pmci_bus_target_address_valid pme_bus.tv#define pmci_bus_error_severity pme_bus.sev#define pmci_bus_transaction_type pme_bus.type#define pmci_bus_cache_cache_transfer pme_bus.cc#define pmci_bus_transaction_size pme_bus.size#define pmci_bus_internal_error pme_bus.ib#define pmci_bus_external_error pme_bus.eb#define pmci_bus_mc pme_bus.mc/* * NOTE: this min_state_save area struct only includes the 1KB * architectural state save area. The other 3 KB is scratch space * for PAL. */typedef struct pal_min_state_area_s { u64 pmsa_nat_bits; /* nat bits for saved GRs */ u64 pmsa_gr[15]; /* GR1 - GR15 */ u64 pmsa_bank0_gr[16]; /* GR16 - GR31 */ u64 pmsa_bank1_gr[16]; /* GR16 - GR31 */ u64 pmsa_pr; /* predicate registers */ u64 pmsa_br0; /* branch register 0 */ u64 pmsa_rsc; /* ar.rsc */ u64 pmsa_iip; /* cr.iip */ u64 pmsa_ipsr; /* cr.ipsr */ u64 pmsa_ifs; /* cr.ifs */ u64 pmsa_xip; /* previous iip */ u64 pmsa_xpsr; /* previous psr */ u64 pmsa_xfs; /* previous ifs */ u64 pmsa_br1; /* branch register 1 */ u64 pmsa_reserved[70]; /* pal_min_state_area should total to 1KB */} pal_min_state_area_t;struct ia64_pal_retval { /* * A zero status value indicates call completed without error. * A negative status value indicates reason of call failure. * A positive status value indicates success but an * informational value should be printed (e.g., "reboot for * change to take effect"). */ s64 status; u64 v0; u64 v1; u64 v2;};/* * Note: Currently unused PAL arguments are generally labeled * "reserved" so the value specified in the PAL documentation * (generally 0) MUST be passed. Reserved parameters are not optional * parameters. */extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64);extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64);extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64);extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64);extern void ia64_save_scratch_fpregs (struct ia64_fpreg *);extern void ia64_load_scratch_fpregs (struct ia64_fpreg *);#define PAL_CALL(iprv,a0,a1,a2,a3) do { \ struct ia64_fpreg fr[6]; \ ia64_save_scratch_fpregs(fr); \ iprv = ia64_pal_call_static(a0, a1, a2, a3); \ ia64_load_scratch_fpregs(fr); \} while (0)#define PAL_CALL_STK(iprv,a0,a1,a2,a3) do { \ struct ia64_fpreg fr[6]; \ ia64_save_scratch_fpregs(fr); \ iprv = ia64_pal_call_stacked(a0, a1, a2, a3); \ ia64_load_scratch_fpregs(fr); \} while (0)#define PAL_CALL_PHYS(iprv,a0,a1,a2,a3) do { \ struct ia64_fpreg fr[6]; \ ia64_save_scratch_fpregs(fr); \ iprv = ia64_pal_call_phys_static(a0, a1, a2, a3); \ ia64_load_scratch_fpregs(fr); \} while (0)#define PAL_CALL_PHYS_STK(iprv,a0,a1,a2,a3) do { \ struct ia64_fpreg fr[6]; \ ia64_save_scratch_fpregs(fr); \ iprv = ia64_pal_call_phys_stacked(a0, a1, a2, a3); \ ia64_load_scratch_fpregs(fr); \} while (0)typedef int (*ia64_pal_handler) (u64, ...);extern ia64_pal_handler ia64_pal;extern void ia64_pal_handler_init (void *);extern ia64_pal_handler ia64_pal;extern pal_cache_config_info_t l0d_cache_config_info;extern pal_cache_config_info_t l0i_cache_config_info;extern pal_cache_config_info_t l1_cache_config_info;extern pal_cache_config_info_t l2_cache_config_info;extern pal_cache_protection_info_t l0d_cache_protection_info;extern pal_cache_protection_info_t l0i_cache_protection_info;extern pal_cache_protection_info_t l1_cache_protection_info;extern pal_cache_protection_info_t l2_cache_protection_info;extern pal_cache_config_info_t pal_cache_config_info_get(pal_cache_level_t, pal_cache_type_t);extern pal_cache_protection_info_t pal_cache_protection_info_get(pal_cache_level_t, pal_cache_type_t);extern void pal_error(int);/* Useful wrappers for the current list of pal procedures */typedef union pal_bus_features_u { u64 pal_bus_features_val; struct { u64 pbf_reserved1 : 29; u64 pbf_req_bus_parking : 1; u64 pbf_bus_lock_mask : 1; u64 pbf_enable_half_xfer_rate : 1; u64 pbf_reserved2 : 20; u64 pbf_enable_shared_line_replace : 1; u64 pbf_enable_exclusive_line_replace : 1; u64 pbf_disable_xaction_queueing : 1; u64 pbf_disable_resp_err_check : 1; u64 pbf_disable_berr_check : 1; u64 pbf_disable_bus_req_internal_err_signal : 1; u64 pbf_disable_bus_req_berr_signal : 1; u64 pbf_disable_bus_init_event_check : 1; u64 pbf_disable_bus_init_event_signal : 1; u64 pbf_disable_bus_addr_err_check : 1; u64 pbf_disable_bus_addr_err_signal : 1; u64 pbf_disable_bus_data_err_check : 1; } pal_bus_features_s;} pal_bus_features_u_t;extern void pal_bus_features_print (u64);/* Provide information about configurable processor bus features */static inline s64
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -