1 /* $NetBSD: darwin_machdep.h,v 1.9 2005/12/11 12:18:43 christos Exp $ */
4 * Copyright (c) 2002-2003 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_MACHDEP_H_
33 #define _DARWIN_MACHDEP_H_
35 #include <compat/darwin/darwin_signal.h>
36 #include <machine/mach_machdep.h>
38 #define DARWIN_USRSTACK 0xbfff0000
39 #define DARWIN_USRSTACK32 0x00000000bfff0000L
42 * User context versions for newer sigreturn
44 #define DARWIN_UCVERS_X2 1
46 void darwin_fork_child_return(void *);
48 struct darwin_mcontext
{
49 struct mach_ppc_exception_state es
;
50 struct mach_ppc_thread_state ss
;
51 struct mach_ppc_float_state fs
;
52 struct mach_ppc_vector_state vs
;
55 struct darwin_sigframe
{
57 /* struct darwin_mcontext without the vs field */
58 struct darwin__mcontext
{
59 struct mach_ppc_exception_state es
;
60 struct mach_ppc_thread_state ss
;
61 struct mach_ppc_float_state fs
;
64 /* struct darwin_ucontext with some padding */
65 struct darwin__ucontext
{
67 struct darwin_ucontext uctx
;
73 volatile unsigned int lock_data
[10];
77 * Communications page stuff
79 #define DARWIN_COMMPAGE_BASE 0xffff8000
80 #define DARWIN_COMMPAGE_LEN 0x00002000 /* 2 pages */
82 #define DARWIN_COMMPAGE_VERSION 1
84 #define DARWIN_CAP_ALTIVEC 0x00000001
85 #define DARWIN_CAP_64BIT 0x00000002
86 #define DARWIN_CAP_CACHE32 0x00000004
87 #define DARWIN_CAP_CACHE64 0x00000008
88 #define DARWIN_CAP_CACHE128 0x00000010
89 #define DARWIN_CAP_DODCBA 0x00000020
90 #define DARWIN_CAP_DCBA 0x00000040
91 #define DARWIN_CAP_DOSTREAM 0x00000080
92 #define DARWIN_CAP_STREAM 0x00000100
93 #define DARWIN_CAP_DODCBT 0x00000200
94 #define DARWIN_CAP_DCBT 0x00000400
95 #define DARWIN_CAP_UP 0x00008000
96 #define DARWIN_CAP_NCPUMASK 0x00ff0000
97 #define DARWIN_CAP_NCPUSHIFT 16
98 #define DARWIN_CAP_GRAPHOP 0x08000000
99 #define DARWIN_CAP_STFIWX 0x10000000
100 #define DARWIN_CAP_FSQRTX 0x20000000
102 #endif /* !_DARWIN_MACHDEP_H_ */