8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / uts / sun4u / sys / iocache.h
blob65a239821fc5b69d9e9d6bc19ed073fac79f6863
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright (c) 1991-1994,1997-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_IOCACHE_H
28 #define _SYS_IOCACHE_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifndef _ASM
33 #include <sys/sysiosbus.h>
34 #endif
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 #define OFF_STR_BUF_CTRL_REG 0x2800
41 #define STR_BUF_CTRL_REG_SIZE (NATURAL_REG_SIZE)
42 #define OFF_STR_BUF_FLUSH_REG 0x2808
43 #define STR_BUF_FLUSH_REG_SIZE (NATURAL_REG_SIZE)
44 #define OFF_STR_BUF_SYNC_REG 0x2810
45 #define STR_BUF_SYNC_REG_SIZE (NATURAL_REG_SIZE)
46 #define STR_BUF_PAGE_TAG_DIAG 0x5800
48 #define STREAM_BUF_DISABLE 0x0ull
49 #define STREAM_BUF_ENABLE 0x1ull
50 #define STREAM_BUF_DIAG_ENABLE 0x2ull
51 #define IOCACHE_LINE_SIZE_MASK 0x3f /* 64 byte line size */
52 #define STREAM_BUF_OFF 1 /* All stream bufs off */
53 #define STREAM_BUF_TIMEOUT 2 /* Streaming buf timed out */
54 #define STREAM_CACHE_LINES 16
56 #define STR_PG_VALID 0x2ull
57 #define STR_PG_SHIFT 11
58 #define STR_PG_MASK 0x3ffffull
60 #if defined(_KERNEL) && !defined(_ASM)
62 extern int stream_buf_init(struct sbus_soft_state *, caddr_t);
63 extern int stream_buf_resume_init(struct sbus_soft_state *);
64 extern void sync_stream_buf(struct sbus_soft_state *, uint_t, uint_t, int *,
65 uint64_t);
67 #endif /* _KERNEL && !_ASM */
69 #ifdef __cplusplus
71 #endif
73 #endif /* _SYS_IOCACHE_H */