4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
24 * Copyright (c) 2001 by Sun Microsystems, Inc.
25 * All rights reserved.
28 #ifndef _SYS_ECC_KSTAT_H
29 #define _SYS_ECC_KSTAT_H
31 #pragma ident "%Z%%M% %I% %E% SMI"
37 #define KSTAT_CE_UNUM_NAMLEN 60
40 * Using these stats are not reset to zero during system operation.
41 * To determine the number of errors between times "A" and "B" a program
42 * would have to snapshot the kstats and subtract the counts at time "A"
43 * from the counts at time "B".
47 * Legacy raw kstat: unix:0:ecc-mm-info
49 struct kstat_ecc_mm_info_1
{
51 char name
[KSTAT_CE_UNUM_NAMLEN
];
52 uint64_t intermittent_total
;
53 uint64_t persistent_total
;
54 uint64_t sticky_total
;
55 } ecc_mm
[1]; /* variable-length array */
59 * Named kstat: mm:(instance):ecc-info
61 struct kstat_ecc_mm_info_2
{
62 struct kstat_named name
;
63 struct kstat_named intermittent_total
;
64 struct kstat_named persistent_total
;
65 struct kstat_named sticky_total
;
68 #define kstat_ecc_mm_info kstat_ecc_mm_info_2
69 #define KSTAT_CE_INFO_VER_1 1
70 #define KSTAT_CE_INFO_VER_2 2
71 #define KSTAT_CE_INFO_VER KSTAT_CE_INFO_VER_2
74 * Clients of this kstat will have to check the version and maintain
75 * compatibility code to handle the previous versions.
77 * named kstat: unix:0:ecc-info:version
78 * - the version of the kstats implemented by the running kernel
80 * named kstat: unix:0:ecc-info:count
81 * - the current count of valid mm:ecc-info kstats
83 * named kstat: unix:0:ecc-info:maxcount
84 * - the maximum number of mm:ecc-info kstats
86 struct ecc_error_info
{
87 struct kstat_named version
;
88 struct kstat_named maxcount
;
89 struct kstat_named count
;
96 #endif /* _SYS_ECC_KSTAT_H */