/*
* 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 _GCPU_H
#define _GCPU_H
#include <sys/cpu_module_impl.h>
#include <sys/cpu_module_ms.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gcpu_error_disp {
/*
* For errorq_dispatch we need to have a single contiguous structure
* capturing all our logout data. We do not know in advance how many
* error detector banks there are in this cpu model, so we'll manually
* allocate additional space for the gcl_banks array below.
*/
typedef struct gcpu_bank_logout {
/*
* The data structure we "logout" all error telemetry from all banks of
* a cpu to. The gcl_data array declared with 1 member below will actually
* have gcl_nbanks members - variable with the actual cpu model present.
* After the gcl_data array there is a further model-specific array that
* may be allocated, and gcl_ms_logout will point to that if present.
* This cpu logout data must form one contiguous chunk of memory for
* dispatch with errorq_dispatch.
*/
typedef struct gcpu_logout {
/*
* gcl_flag values
*/
struct gcpu_bios_bankcfg {
};
struct gcpu_bios_cfg {
};
/*
* Events types in poll trace records. Keep these in sync with
* the generic cpu mdb module names for each (see gcpu_mpt_dump in mdb).
*/
typedef struct gcpu_poll_trace {
typedef struct gcpu_poll_trace_ctl {
/*
* For counting some of the important number or time for runtime
*/
typedef struct gcpu_mca_cmci {
/* Index for gcpu_mca_logout array below */
typedef struct gcpu_mca {
} gcpu_mca_t;
typedef struct gcpu_mce_status {
/*
* Flags for gcpu_mca_flags
*/
/*
* State shared by all cpus on a chip
*/
struct gcpu_chipshared {
};
struct gcpu_data {
};
#ifdef _KERNEL
struct regs;
/*
* CMI implementation
*/
extern void gcpu_post_startup(cmi_hdl_t);
extern void gcpu_post_mpstartup(cmi_hdl_t);
extern void gcpu_faulted_enter(cmi_hdl_t);
extern void gcpu_faulted_exit(cmi_hdl_t);
extern void gcpu_mca_init(cmi_hdl_t);
#ifndef __xpv
extern void gcpu_cmci_trap(cmi_hdl_t);
extern void gcpu_hdl_poke(cmi_hdl_t);
#else
extern void gcpu_xpv_panic_callback(void);
#endif
/*
* CMI global variable
*/
extern int cmi_enable_cmci;
/*
* Local functions
*/
extern void gcpu_mca_poll_init(cmi_hdl_t);
extern void gcpu_mca_poll_fini(cmi_hdl_t);
extern void gcpu_mca_poll_start(cmi_hdl_t);
extern void gcpu_poll_trace_init(gcpu_poll_trace_ctl_t *);
gcpu_mce_status_t *, boolean_t, int);
#ifdef __xpv
extern void gcpu_xpv_mca_init(int);
#endif /* __xpv */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _GCPU_H */