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 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_CPU_MODULE_IMPL_H 28 #define _SYS_CPU_MODULE_IMPL_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #include <sys/cpu_module.h> 33 #include <sys/cpuvar.h> 34 #include <sys/types.h> 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 typedef struct cmi_mc_ops { 41 int (*cmi_mc_patounum)(void *, uint64_t, uint32_t, int, mc_unum_t *); 42 int (*cmi_mc_unumtopa)(void *, mc_unum_t *, nvlist_t *, uint64_t *); 43 } cmi_mc_ops_t; 44 45 typedef struct cmi_ops { 46 int (*cmi_init)(cpu_t *, void **); 47 void (*cmi_post_init)(void *); 48 void (*cmi_post_mpstartup)(void *); 49 void (*cmi_fini)(void *); 50 void (*cmi_faulted_enter)(void *); 51 void (*cmi_faulted_exit)(void *); 52 int (*cmi_scrubber_enable)(void *, uint64_t, uint64_t); 53 void (*cmi_mca_init)(void *); 54 int (*cmi_mca_trap)(void *, struct regs *); 55 int (*cmi_mca_inject)(void *, cmi_mca_regs_t *, uint_t); 56 void (*cmi_mca_poke)(void *); 57 void (*cmi_mc_register)(void *, const cmi_mc_ops_t *, void *); 58 const struct cmi_mc_ops *(*cmi_mc_getops)(void *); 59 } cmi_ops_t; 60 61 typedef struct cmi { 62 struct cmi *cmi_next; 63 const cmi_ops_t *cmi_ops; 64 struct modctl *cmi_modp; 65 uint_t cmi_refcnt; 66 } cmi_t; 67 68 extern int cmi_panic_on_uncorrectable_error; 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* _SYS_CPU_MODULE_IMPL_H */ 75