1*8472SSean.Ye@Sun.COM /* 2*8472SSean.Ye@Sun.COM * CDDL HEADER START 3*8472SSean.Ye@Sun.COM * 4*8472SSean.Ye@Sun.COM * The contents of this file are subject to the terms of the 5*8472SSean.Ye@Sun.COM * Common Development and Distribution License (the "License"). 6*8472SSean.Ye@Sun.COM * You may not use this file except in compliance with the License. 7*8472SSean.Ye@Sun.COM * 8*8472SSean.Ye@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*8472SSean.Ye@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*8472SSean.Ye@Sun.COM * See the License for the specific language governing permissions 11*8472SSean.Ye@Sun.COM * and limitations under the License. 12*8472SSean.Ye@Sun.COM * 13*8472SSean.Ye@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*8472SSean.Ye@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*8472SSean.Ye@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*8472SSean.Ye@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*8472SSean.Ye@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*8472SSean.Ye@Sun.COM * 19*8472SSean.Ye@Sun.COM * CDDL HEADER END 20*8472SSean.Ye@Sun.COM */ 21*8472SSean.Ye@Sun.COM 22*8472SSean.Ye@Sun.COM /* 23*8472SSean.Ye@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*8472SSean.Ye@Sun.COM * Use is subject to license terms. 25*8472SSean.Ye@Sun.COM */ 26*8472SSean.Ye@Sun.COM 27*8472SSean.Ye@Sun.COM #ifndef _NHM_LOG_H 28*8472SSean.Ye@Sun.COM #define _NHM_LOG_H 29*8472SSean.Ye@Sun.COM 30*8472SSean.Ye@Sun.COM #ifdef __cplusplus 31*8472SSean.Ye@Sun.COM extern "C" { 32*8472SSean.Ye@Sun.COM #endif 33*8472SSean.Ye@Sun.COM 34*8472SSean.Ye@Sun.COM #include <sys/cpu_module.h> 35*8472SSean.Ye@Sun.COM 36*8472SSean.Ye@Sun.COM typedef struct nhm_dimm { 37*8472SSean.Ye@Sun.COM uint64_t dimm_size; 38*8472SSean.Ye@Sun.COM uint8_t nranks; 39*8472SSean.Ye@Sun.COM uint8_t nbanks; 40*8472SSean.Ye@Sun.COM uint8_t ncolumn; 41*8472SSean.Ye@Sun.COM uint8_t nrow; 42*8472SSean.Ye@Sun.COM uint8_t width; 43*8472SSean.Ye@Sun.COM char manufacturer[64]; 44*8472SSean.Ye@Sun.COM char serial_number[64]; 45*8472SSean.Ye@Sun.COM char part_number[16]; 46*8472SSean.Ye@Sun.COM char revision[2]; 47*8472SSean.Ye@Sun.COM char label[64]; 48*8472SSean.Ye@Sun.COM } nhm_dimm_t; 49*8472SSean.Ye@Sun.COM 50*8472SSean.Ye@Sun.COM extern nhm_dimm_t **nhm_dimms; 51*8472SSean.Ye@Sun.COM extern uint32_t nhm_chipset; 52*8472SSean.Ye@Sun.COM 53*8472SSean.Ye@Sun.COM extern errorq_t *nhm_queue; 54*8472SSean.Ye@Sun.COM extern kmutex_t nhm_mutex; 55*8472SSean.Ye@Sun.COM 56*8472SSean.Ye@Sun.COM extern void nhm_drain(void *, const void *, const errorq_elem_t *); 57*8472SSean.Ye@Sun.COM 58*8472SSean.Ye@Sun.COM extern int nhm_init(void); 59*8472SSean.Ye@Sun.COM extern int nhm_dev_init(void); 60*8472SSean.Ye@Sun.COM extern void nhm_dev_reinit(void); 61*8472SSean.Ye@Sun.COM extern void nhm_unload(void); 62*8472SSean.Ye@Sun.COM extern void nhm_dev_unload(void); 63*8472SSean.Ye@Sun.COM 64*8472SSean.Ye@Sun.COM extern int inhm_mc_register(cmi_hdl_t, void *, void *, void *); 65*8472SSean.Ye@Sun.COM extern void nhm_scrubber_enable(void); 66*8472SSean.Ye@Sun.COM extern void nhm_error_trap(cmi_hdl_t, boolean_t, boolean_t); 67*8472SSean.Ye@Sun.COM 68*8472SSean.Ye@Sun.COM extern void nhm_pci_cfg_setup(dev_info_t *); 69*8472SSean.Ye@Sun.COM extern void nhm_pci_cfg_free(void); 70*8472SSean.Ye@Sun.COM 71*8472SSean.Ye@Sun.COM extern uint8_t nhm_pci_getb(int, int, int, int, int *); 72*8472SSean.Ye@Sun.COM extern uint16_t nhm_pci_getw(int, int, int, int, int *); 73*8472SSean.Ye@Sun.COM extern uint32_t nhm_pci_getl(int, int, int, int, int *); 74*8472SSean.Ye@Sun.COM extern void nhm_pci_putb(int, int, int, int, uint8_t); 75*8472SSean.Ye@Sun.COM extern void nhm_pci_putw(int, int, int, int, uint16_t); 76*8472SSean.Ye@Sun.COM extern void nhm_pci_putl(int, int, int, int, uint32_t); 77*8472SSean.Ye@Sun.COM 78*8472SSean.Ye@Sun.COM extern uint64_t dimm_to_addr(int, int, int, uint64_t, uint64_t *, uint64_t *, 79*8472SSean.Ye@Sun.COM uint32_t *, uint32_t *, uint32_t *, uint32_t *, uint32_t *, uint32_t *); 80*8472SSean.Ye@Sun.COM 81*8472SSean.Ye@Sun.COM #ifdef __cplusplus 82*8472SSean.Ye@Sun.COM } 83*8472SSean.Ye@Sun.COM #endif 84*8472SSean.Ye@Sun.COM 85*8472SSean.Ye@Sun.COM #endif /* _NHM_LOG_H */ 86