1 /* $NetBSD: linux_machdep.h,v 1.11 2008/01/28 14:31:35 njoly Exp $ */
4 * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Emmanuel Dreyfus
17 * 4. The name of the author may not be used to endorse or promote
18 * products derived from this software without specific prior written
21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
34 #ifndef _AMD64_LINUX_MACHDEP_H
35 #define _AMD64_LINUX_MACHDEP_H
37 #define LINUX_STATFS_64BIT /* Needed for full 64bit struct statfs */
39 #include <compat/linux/common/linux_types.h>
40 #include <compat/linux/common/linux_signal.h>
41 #include <compat/linux/common/linux_siginfo.h>
43 /* From <asm/sigcontext.h> */
44 struct linux__fpstate
{
53 u_int32_t st_space
[32];
54 u_int32_t xmm_space
[64];
55 u_int32_t reserved2
[24];
58 /* From <asm/sigcontext.h> */
59 struct linux_sigcontext
{
86 struct linux__fpstate
*fpstate
;
87 u_int64_t reserved1
[8];
90 /* From <asm/ucontext.h> */
91 struct linux_ucontext
{
93 struct linux_ucontext
*luc_link
;
94 linux_stack_t luc_stack
;
95 struct linux_sigcontext luc_mcontext
;
96 linux_sigset_t luc_sigmask
;
99 /* From linux/arch/x86_64/kernel/signal.c */
100 struct linux_rt_sigframe
{
102 struct linux_ucontext uc
;
103 struct linux_siginfo info
;
108 void linux_syscall_intern(struct proc
*);
110 #endif /* !_KERNEL */
112 #define LINUX_VSYSCALL_START 0xffffffffff600000
113 #define LINUX_VSYSCALL_SIZE 1024
114 #define LINUX_VSYSCALL_MAXNR 3
116 #define LINUX_UNAME_ARCH MACHINE_ARCH
118 #define LINUX_LARGEFILE64
119 #define LINUX_IPC_FORCE64
122 * Used in ugly patch to fake device numbers.
124 /* Major device numbers for new style ptys. */
125 #define LINUX_PTC_MAJOR 2
126 #define LINUX_PTS_MAJOR 3
127 /* Major device numbers of VT device on both Linux and NetBSD. */
128 #define LINUX_CONS_MAJOR 4
130 #endif /* _AMD64_LINUX_MACHDEP_H */