ao.h (8a40a695) | ao.h (4156fc34) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 18 unchanged lines hidden (view full) --- 27#ifndef _AO_H 28#define _AO_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#include <sys/types.h> 33#include <sys/mc.h> 34#include <sys/mca_amd.h> | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 18 unchanged lines hidden (view full) --- 27#ifndef _AO_H 28#define _AO_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#include <sys/types.h> 33#include <sys/mc.h> 34#include <sys/mca_amd.h> |
35#include <sys/mc_amd.h> |
|
35#include <sys/cpu_module_impl.h> 36#include <sys/nvpair.h> 37#include <sys/cyclic.h> 38#include <sys/errorq.h> 39#include <sys/kobj.h> 40#include <sys/fm/util.h> 41 42#ifdef __cplusplus --- 29 unchanged lines hidden (view full) --- 72 * creation of the pp and ii fields. 73 */ 74#define AO_AED_PANIC_NEVER 0x00 75#define AO_AED_PANIC_IFMCE 0x01 76#define AO_AED_PANIC_ALWAYS 0x80 77 78#define AO_AED_F_CORRECTABLE 0x01 79#define AO_AED_F_LOFAULT_OK 0x02 | 36#include <sys/cpu_module_impl.h> 37#include <sys/nvpair.h> 38#include <sys/cyclic.h> 39#include <sys/errorq.h> 40#include <sys/kobj.h> 41#include <sys/fm/util.h> 42 43#ifdef __cplusplus --- 29 unchanged lines hidden (view full) --- 73 * creation of the pp and ii fields. 74 */ 75#define AO_AED_PANIC_NEVER 0x00 76#define AO_AED_PANIC_IFMCE 0x01 77#define AO_AED_PANIC_ALWAYS 0x80 78 79#define AO_AED_F_CORRECTABLE 0x01 80#define AO_AED_F_LOFAULT_OK 0x02 |
81#define AO_AED_F_LINEAR 0x04 /* MCi_ADDR is a linear address */ 82#define AO_AED_F_PHYSICAL 0x08 /* MCi_ADDR is a physical address */ 83#define AO_AED_F_PAGEALIGNED 0x10 /* MCi_ADDR aligns to page size */ 84#define AO_AED_F_L2SETWAY 0x20 /* 3:0 = way, 15/14/13/12:6 = set */ |
|
80 | 85 |
86#define AO_AED_FLAGS_ADDRTYPE (AO_AED_F_LINEAR | AO_AED_F_PHYSICAL | \ 87 AO_AED_F_PAGEALIGNED | AO_AED_F_L2SETWAY) 88 |
|
81typedef struct ao_error_disp { 82 const char *aed_class; /* ereport class for use if match */ 83 uint64_t aed_ereport_members; /* ereport contents flags if match */ 84 uint64_t aed_stat_mask; /* status msr bits for match */ 85 uint64_t aed_stat_mask_res; /* status mask result for match */ 86 uint16_t aed_stat_code; /* status code for match */ 87 uint8_t aed_stat_extcode; /* extended status code for match */ 88 uint8_t aed_stat_pp_bits:4; /* AO_MCA_PP_BIT_* for pp matching */ 89 uint8_t aed_stat_ii_bits:4; /* AO_MCA_II_BIT_* for ii matching */ 90 uint16_t aed_stat_r4_bits; /* AO_MCA_R4_BIT_* for r4 matching */ | 89typedef struct ao_error_disp { 90 const char *aed_class; /* ereport class for use if match */ 91 uint64_t aed_ereport_members; /* ereport contents flags if match */ 92 uint64_t aed_stat_mask; /* status msr bits for match */ 93 uint64_t aed_stat_mask_res; /* status mask result for match */ 94 uint16_t aed_stat_code; /* status code for match */ 95 uint8_t aed_stat_extcode; /* extended status code for match */ 96 uint8_t aed_stat_pp_bits:4; /* AO_MCA_PP_BIT_* for pp matching */ 97 uint8_t aed_stat_ii_bits:4; /* AO_MCA_II_BIT_* for ii matching */ 98 uint16_t aed_stat_r4_bits; /* AO_MCA_R4_BIT_* for r4 matching */ |
99 uint8_t aed_addrvalid_hi; /* most significant valid addr bit */ 100 uint8_t aed_addrvalid_lo; /* least significant valid addr bit */ |
|
91 uint8_t aed_panic_when; /* extra conditions for panic */ 92 uint8_t aed_flags; /* AO_AED_F_* */ 93} ao_error_disp_t; 94 95/* 96 * The poller has two parts. First is the omni cyclic, which runs on all 97 * CPUs, and which polls the error MSRs at some fixed (long) interval. This 98 * cyclic will run on all machines, all the time, and thus must have minimal --- 37 unchanged lines hidden (view full) --- 136 * etc.), as well as a bank array. The bank array contains one ao_bank_logout_t 137 * per error reporting bank. 138 */ 139 140typedef struct ao_bank_logout { 141 uint64_t abl_status; /* Saved MCi_STATUS register */ 142 uint64_t abl_addr; /* Saved MCi_ADDR register */ 143 uint64_t abl_misc; /* Saved MCi_MISC register */ | 101 uint8_t aed_panic_when; /* extra conditions for panic */ 102 uint8_t aed_flags; /* AO_AED_F_* */ 103} ao_error_disp_t; 104 105/* 106 * The poller has two parts. First is the omni cyclic, which runs on all 107 * CPUs, and which polls the error MSRs at some fixed (long) interval. This 108 * cyclic will run on all machines, all the time, and thus must have minimal --- 37 unchanged lines hidden (view full) --- 146 * etc.), as well as a bank array. The bank array contains one ao_bank_logout_t 147 * per error reporting bank. 148 */ 149 150typedef struct ao_bank_logout { 151 uint64_t abl_status; /* Saved MCi_STATUS register */ 152 uint64_t abl_addr; /* Saved MCi_ADDR register */ 153 uint64_t abl_misc; /* Saved MCi_MISC register */ |
154 uint8_t abl_addr_type; /* flags & AO_AED_FLAGS_ADDRTYPE */ 155 uint8_t abl_addr_valid_hi; /* most significant valid addr bit */ 156 uint8_t abl_addr_valid_lo; /* least significant valid addr bit */ |
|
144} ao_bank_logout_t; 145 146#define AO_ACL_F_PRIV 0x1 /* #mc in kernel mode (else user) */ 147#define AO_ACL_F_FATAL 0x2 /* logout detected fatal error(s) */ 148 149typedef struct ao_cpu_logout { 150 ao_data_t *acl_ao; /* pointer to per-cpu ao_data_t */ 151 uintptr_t acl_ip; /* instruction pointer if #mc trap */ --- 88 unchanged lines hidden (view full) --- 240 241extern int ao_mca_logout(ao_cpu_logout_t *, struct regs *, int *, int, 242 uint32_t); 243extern void ao_mca_drain(void *, const void *, const errorq_elem_t *); 244extern nvlist_t *ao_fmri_create(ao_data_t *, nv_alloc_t *); 245 246extern void ao_mc_register(void *, const cmi_mc_ops_t *, void *); 247extern const struct cmi_mc_ops *ao_mc_getops(void *); | 157} ao_bank_logout_t; 158 159#define AO_ACL_F_PRIV 0x1 /* #mc in kernel mode (else user) */ 160#define AO_ACL_F_FATAL 0x2 /* logout detected fatal error(s) */ 161 162typedef struct ao_cpu_logout { 163 ao_data_t *acl_ao; /* pointer to per-cpu ao_data_t */ 164 uintptr_t acl_ip; /* instruction pointer if #mc trap */ --- 88 unchanged lines hidden (view full) --- 253 254extern int ao_mca_logout(ao_cpu_logout_t *, struct regs *, int *, int, 255 uint32_t); 256extern void ao_mca_drain(void *, const void *, const errorq_elem_t *); 257extern nvlist_t *ao_fmri_create(ao_data_t *, nv_alloc_t *); 258 259extern void ao_mc_register(void *, const cmi_mc_ops_t *, void *); 260extern const struct cmi_mc_ops *ao_mc_getops(void *); |
248extern int ao_mc_patounum(ao_data_t *, uint64_t, uint32_t, int, mc_unum_t *); | 261extern int ao_mc_patounum(ao_data_t *, uint64_t, uint8_t, uint8_t, uint32_t, 262 int, mc_unum_t *); |
249extern int ao_mc_unumtopa(ao_data_t *, mc_unum_t *, nvlist_t *, uint64_t *); 250 251extern void ao_pcicfg_write(uint_t, uint_t, uint_t, uint32_t); 252extern uint32_t ao_pcicfg_read(uint_t, uint_t, uint_t); 253 254extern int ao_chip_once(ao_data_t *, enum ao_cfgonce_bitnum); 255 256#endif /* _KERNEL */ 257 258#ifdef __cplusplus 259} 260#endif 261 262#endif /* _AO_H */ | 263extern int ao_mc_unumtopa(ao_data_t *, mc_unum_t *, nvlist_t *, uint64_t *); 264 265extern void ao_pcicfg_write(uint_t, uint_t, uint_t, uint32_t); 266extern uint32_t ao_pcicfg_read(uint_t, uint_t, uint_t); 267 268extern int ao_chip_once(ao_data_t *, enum ao_cfgonce_bitnum); 269 270#endif /* _KERNEL */ 271 272#ifdef __cplusplus 273} 274#endif 275 276#endif /* _AO_H */ |