xref: /titanic_44/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.h (revision 25351652d920ae27c5a56c199da581033ce763f6)
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 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * etm_filter.h
29  *
30  * Header file of the event filter
31  *
32  */
33 
34 #ifndef _ETM_FILTER_H
35 #define	_ETM_FILTER_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #include <fm/fmd_api.h>
42 
43 #include "etm_iosvc.h"
44 
45 /* A physical root complex */
46 typedef struct etm_prc {
47 	int32_t		prc_id;			/* physical id of the rc */
48 	uint64_t	prc_cfg_handle;		/* bus address */
49 	char		*prc_name;		/* bound ldom name */
50 	size_t		prc_name_sz;		/* size of name */
51 	int		prc_status;		/* ldom query status */
52 	uint64_t	prc_did;		/* ldom id */
53 } etm_prc_t;
54 
55 void etm_filter_init(fmd_hdl_t *hdl);
56 void etm_filter_fini(fmd_hdl_t *hdl);
57 
58 int etm_filter_find_ldom_id(fmd_hdl_t *hdl, nvlist_t *erpt, char *name,
59     int name_size, uint64_t *did);
60 int etm_filter_find_ldom_name(fmd_hdl_t *hdl, uint64_t did, char *name,
61     int name_size);
62 void etm_filter_handle_ldom_event(fmd_hdl_t *hdl, etm_async_event_type_t event,
63     char *name);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif /* _ETM_FILTER_H */
70