/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _AO_H
#define _AO_H
#include <sys/cpu_module_ms_impl.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Rather than using torturous conditionals, we match errors using a table of
* ao_error_disp_t's. The members in the ao_error_disp_t are matched against
* the value of MCi_STATUS, with a successful match indicating that the given
* error occurred.
*
* While aed_stat_code will match most of the status code bits, a few of the
* minimize the number of ao_error_disp_t structures that must be created.
* For example, the dc.tag_par error can have r4 values drd or dwr. Rather
* than creating two ao_error_disp_t's, we use the separate aed_stat_r4_bits
* field to indicate both AO_MCA_R4_BIT_DRD and AO_MCA_R4_BIT_DWD. As the
* matching r4 values are drawn from aed_stat_r4_bits, we don't use the r4
* bits in aed_stat_code for matching. Similar reasoning lies behind the
* creation of the pp and ii fields.
*/
/*
* The AO_AED_F_* flags tell us how to interpret aspects of the error
* telemetry, such as which bits of the captured address are valid for
* this error.
*/
/* MCi_ADDR ... */
/*
* The AO_AED_ET_* flags group individual error dispositions into
* error types. This is used to nominate additional telemetry beyond the
* architectural bank registers to capture for this error type.
*/
typedef struct ao_error_disp {
/*
* We store non-architectutal config as inherited from the BIOS to assist
* in troubleshooting.
*/
struct ao_bios_cfg {
};
/*
* The master data structure used to hold MCA-related state.
*/
typedef struct ao_ms_mca {
} ao_ms_mca_t;
/*
* Per-chip shared state
*/
struct ao_chipshared {
};
/* Bit numbers for once-per-chip operations policed by cms_once */
enum ao_cfgonce_bitnum {
};
/*
* Per-CPU model-specific state
*/
struct ao_ms_data {
};
#ifdef _KERNEL
struct regs;
/*
* Our cms_ops operations and function prototypes for all non-NULL members.
*/
extern int ao_ms_init(cmi_hdl_t, void **);
extern void ao_ms_post_startup(cmi_hdl_t);
extern void ao_ms_post_mpstartup(cmi_hdl_t);
extern void ao_ms_mca_init(cmi_hdl_t, int);
uint64_t, void *);
const char **);
/*
* Local functions
*/
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _AO_H */