1 /* $NetBSD: darwin_commpage.h,v 1.6 2005/12/11 12:19:56 christos Exp $ */
4 * Copyright (c) 2004 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _DARWIN_COMMPAGE_H_
33 #define _DARWIN_COMMPAGE_H_
35 struct darwin_commpage
{
36 int dcp_signature
; /* 0/0x000 */
38 short dcp_version
; /* 30/0x01e */
39 char dcp_cap
; /* 32/0x020 */
40 char dcp_ncpu
; /* 33/0x021 */
42 char dcp_vector
; /* 36/0x024 */
43 char dcp_64bit
; /* 37/0x025 */
44 short dcp_cachelinelen
; /* 38/0x026 */
46 long long dcp_2pow52
; /* 64/0x040 */
47 long long dcp_10pow6
; /* 72/0x048 */
49 long long dcp_timebase
; /* 96/0x060 */
50 long long dcp_timestamp
; /* 104/0x068 */
51 long long dcp_secpertick
; /* 112/0x070 */
53 char dcp_mach_absolute_time
[32]; /* 512/0x200 */
54 char dcp_spinlock_try
[64]; /* 544/0x220 */
55 char dcp_spinlock_lock
[64]; /* 608/0x260 */
56 char dcp_spinlock_unlock
[32]; /* 672/0x2a0 */
57 char dcp_pthread_getspecific
[32]; /* 704/0x2c0 */
58 char dcp_gettimeofday
[512]; /* 736/0x2e0 */
59 char dcp_sys_dcache_flush
[64]; /* 1248/0x4e0 */
60 char dcp_sys_icache_invalidate
[96]; /* 1312/0x520 */
61 char dcp_pthread_self
[64]; /* 1408/0x580 */
62 char dcp_spinlock_relinquish
[64]; /* 1472/0x5c0 */
63 char dcp_bzero
[384]; /* 1536/0x600 */
64 char dcp_bcopy
[32]; /* 1920/0x780 */
65 char dcp_memcpy
[2144]; /* 1952/0x7a0 */
66 char dcp_bigcopy
[1536]; /* 4096/0x1000 */
69 int darwin_commpage_map(struct proc
*);
71 extern int darwin_commpage_mach_absolute_time
[];
72 extern int darwin_commpage_spinlock_try
[];
73 extern int darwin_commpage_spinlock_lock
[];
74 extern int darwin_commpage_spinlock_unlock
[];
75 extern int darwin_commpage_pthread_getspecific
[];
76 extern int darwin_commpage_gettimeofday
[];
77 extern int darwin_commpage_sys_dcache_flush
[];
78 extern int darwin_commpage_sys_icache_invalidate
[];
79 extern int darwin_commpage_pthread_self
[];
80 extern int darwin_commpage_spinlock_relinquish
[];
81 extern int darwin_commpage_bzero
[];
82 extern int darwin_commpage_bcopy
[];
83 extern int darwin_commpage_memcpy
[];
84 extern int darwin_commpage_bigcopy
[];
86 extern int darwin_commpage_mach_absolute_time_size
[];
87 extern int darwin_commpage_spinlock_try_size
[];
88 extern int darwin_commpage_spinlock_lock_size
[];
89 extern int darwin_commpage_spinlock_unlock_size
[];
90 extern int darwin_commpage_pthread_getspecific_size
[];
91 extern int darwin_commpage_gettimeofday_size
[];
92 extern int darwin_commpage_sys_dcache_flush_size
[];
93 extern int darwin_commpage_sys_icache_invalidate_size
[];
94 extern int darwin_commpage_pthread_self_size
[];
95 extern int darwin_commpage_spinlock_relinquish_size
[];
96 extern int darwin_commpage_bzero_size
[];
97 extern int darwin_commpage_bcopy_size
[];
98 extern int darwin_commpage_memcpy_size
[];
99 extern int darwin_commpage_bigcopy_size
[];
101 #endif /* _DARWIN_COMMPAGE_H_ */