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 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23 * Use is subject to license terms.
24 */
25
26#ifndef	_SYS_PX_SPACE_H
27#define	_SYS_PX_SPACE_H
28
29#ifdef	__cplusplus
30extern "C" {
31#endif
32
33#define	PX_SPURINTR_MSG_DEFAULT -1ull
34
35extern char px_panic_hb_msg[];
36extern char px_panic_rc_msg[];
37extern char px_panic_rp_msg[];
38extern char px_panic_fab_msg[];
39
40extern uint_t px_max_errorq_size;
41extern ushort_t px_command_default;
42extern uint_t px_set_latency_timer_register;
43extern uint64_t px_perr_fatal;
44extern uint64_t px_serr_fatal;
45extern hrtime_t px_intrpend_timeout;
46extern uint_t px_unclaimed_intr_max;
47extern uint_t px_unclaimed_intr_block;
48extern uint32_t px_spurintr_duration;
49extern uint64_t px_spurintr_msgs;
50extern uint_t px_stream_buf_enable;
51extern uint_t px_stream_buf_exists;
52extern uint_t px_use_contexts;
53extern uint_t px_ctx_no_active_flush;
54extern uint_t px_context_minpages;
55
56extern uint_t px_mmu_error_intr_enable;
57extern uint_t px_rerun_disable;
58
59extern uint_t px_error_intr_enable;
60extern uint_t px_dwsync_disable;
61extern uint_t px_intsync_disable;
62
63extern uint_t px_intr_retry_intv;
64extern uint8_t px_latency_timer;
65extern uint_t px_panic_on_fatal_errors;
66extern uint_t px_thermal_intr_fatal;
67extern uint_t px_buserr_interrupt;
68
69extern uint64_t px_errtrig_pa;
70
71extern uint_t px_check_all_handlers;
72extern uint_t px_lock_tlb;
73
74extern uint64_t px_dvma_debug_on;
75extern uint64_t px_dvma_debug_off;
76extern uint32_t px_dvma_debug_rec;
77extern uint_t px_dvma_page_cache_entries;
78extern uint_t px_dvma_page_cache_clustsz;
79extern int px_dvma_sync_before_unmap;
80#ifdef	PX_DMA_PROF
81extern uint_t px_dvmaft_npages;
82extern uint_t px_dvmaft_limit;
83extern uint_t px_dvmaft_free;
84extern uint_t px_dvmaft_success;
85extern uint_t px_dvmaft_exhaust;
86extern uint_t px_dvma_vmem_alloc;
87extern uint_t px_dvma_vmem_xalloc;
88extern uint_t px_dvma_vmem_free;
89extern uint_t px_dvma_vmem_xfree;
90#endif	/* PX_DMA_PROF */
91extern uint_t px_disable_fdvma;
92
93extern uint_t px_iommu_ctx_lock_failure;
94extern uintptr_t px_kmem_clid;
95
96extern uint_t px_max_msiq_msgs;
97extern uint_t px_min_msiq_msgs;
98
99/* timeout length in micro seconds */
100#define	PX_MSEC_TO_USEC	1000
101#define	PX_PME_TO_ACK_TIMEOUT	(1000 * PX_MSEC_TO_USEC)
102#define	PX_LUP_POLL_INTERVAL	(10 * PX_MSEC_TO_USEC)
103#define	PX_LUP_POLL_TO		(10 * PX_LUP_POLL_INTERVAL)
104
105#define	PX_PWR_PIL		1
106#define	PX_MAX_L1_TRIES		5
107
108extern uint64_t px_pme_to_ack_timeout;
109extern uint64_t px_lup_poll_to;
110extern uint64_t px_lup_poll_interval;
111extern uint32_t	px_pwr_pil;
112extern uint32_t px_max_l1_tries;
113
114/* Print and Log tunables */
115extern uint32_t px_log;
116extern uint32_t px_die;
117
118#ifdef	__cplusplus
119}
120#endif
121
122#endif	/* _SYS_PX_SPACE_H */
123