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.
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.
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]
22 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
29 #include <fm/fmd_api.h>
30 #include <sys/param.h>
32 #include <gmem_util.h>
38 #define GMEM_STAT_BUMP(name) gmem.gm_stats->name.fmds_value.ui64++
39 #define GMEM_FLTMAXCONF 95
41 typedef struct gmem_stat
{
42 fmd_stat_t bad_mem_resource
; /* # of malformed hc-scheme resource */
43 fmd_stat_t bad_close
; /* # of inapplicable case closes */
44 fmd_stat_t old_erpt
; /* # of erpts for removed components */
45 fmd_stat_t dimm_creat
; /* # of DIMM state structs created */
46 fmd_stat_t page_creat
; /* # of page state structs created */
47 fmd_stat_t ce_unknown
; /* # of unknown CEs seen */
48 fmd_stat_t ce_interm
; /* # of intermittent CEs seen */
49 fmd_stat_t ce_clearable_persis
; /* # of clearable persistent CEs seen */
50 fmd_stat_t ce_sticky
; /* # of sticky CEs seen */
51 fmd_stat_t dimm_migrat
; /* # of DIMMs migrated to new version */
54 typedef struct gmem_serd
{
61 gmem_list_t gm_dimms
; /* List of DIMM state structures */
62 gmem_list_t gm_pages
; /* List of page state structures */
63 gmem_stat_t
*gm_stats
; /* Module statistics */
64 size_t gm_pagesize
; /* Page size, in bytes */
65 uint64_t gm_pagemask
; /* Mask for page alignments */
66 uint32_t gm_max_retired_pages
; /* max num retired pages */
67 uint32_t gm_ce_n
; /* serd n */
68 uint64_t gm_ce_t
; /* serd t */
69 uint32_t gm_filter_ratio
; /* serd filter ratio */
70 uint32_t gm_low_ce_thresh
; /* low threshold retired pages */
71 uint32_t gm_nupos
; /* same number of upos */
72 uint32_t gm_dupce
; /* number of dup CEs */