Home | History | Annotate | Line # | Download | only in include
netbsd32_machdep.h revision 1.2.18.1
      1  1.2.18.1  yamt /*	$NetBSD: netbsd32_machdep.h,v 1.2.18.1 2007/10/27 11:27:45 yamt Exp $	*/
      2       1.1  matt 
      3       1.1  matt /*
      4       1.1  matt  * Copyright (c) 1998, 2001 Matthew R. Green
      5       1.1  matt  * All rights reserved.
      6       1.1  matt  *
      7       1.1  matt  * Redistribution and use in source and binary forms, with or without
      8       1.1  matt  * modification, are permitted provided that the following conditions
      9       1.1  matt  * are met:
     10       1.1  matt  * 1. Redistributions of source code must retain the above copyright
     11       1.1  matt  *    notice, this list of conditions and the following disclaimer.
     12       1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     14       1.1  matt  *    documentation and/or other materials provided with the distribution.
     15       1.1  matt  * 3. The name of the author may not be used to endorse or promote products
     16       1.1  matt  *    derived from this software without specific prior written permission.
     17       1.1  matt  *
     18       1.1  matt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19       1.1  matt  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20       1.1  matt  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21       1.1  matt  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     22       1.1  matt  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     23       1.1  matt  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     24       1.1  matt  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     25       1.1  matt  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     26       1.1  matt  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27       1.1  matt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28       1.1  matt  * SUCH DAMAGE.
     29       1.1  matt  */
     30       1.1  matt 
     31       1.1  matt #ifndef _MACHINE_NETBSD32_H_
     32       1.1  matt #define _MACHINE_NETBSD32_H_
     33       1.1  matt 
     34       1.1  matt #include <sys/types.h>
     35       1.1  matt #include <sys/proc.h>
     36       1.1  matt 
     37       1.1  matt typedef	u_int32_t netbsd32_pointer_t;
     38       1.1  matt 
     39       1.1  matt /*
     40       1.1  matt  * Convert a pointer in the 32-bit world to a valid 64-bit pointer.
     41       1.1  matt  */
     42       1.1  matt #define	NETBSD32PTR64(p32)	((void *)(u_long)(u_int)(p32))
     43       1.1  matt 
     44  1.2.18.1  yamt /* ppc32 has 32bit aligned 64bit integers */
     45  1.2.18.1  yamt #define NETBSD32_INT64_ALIGN __attribute__((__aligned__(4)))
     46  1.2.18.1  yamt 
     47       1.1  matt #include <compat/netbsd32/netbsd32.h>
     48       1.1  matt #include <powerpc/frame.h>
     49       1.1  matt 
     50       1.1  matt /* from <arch/sparc/include/signal.h> */
     51       1.1  matt typedef u_int32_t netbsd32_sigcontextp_t;
     52       1.1  matt 
     53       1.1  matt struct netbsd32_sigcontext {
     54       1.1  matt 	int		sc_onstack;	/* sigstack state to restore */
     55       1.1  matt 	int		__sc_mask13;	/* signal mask to restore (old style) */
     56       1.1  matt 	/* begin machine dependent portion */
     57       1.1  matt 	struct trapframe32 sc_frame;	/* saved registers */
     58       1.1  matt 	sigset_t	sc_mask;	/* signal mask to restore (new style) */
     59       1.1  matt };
     60       1.1  matt 
     61       1.1  matt struct netbsd32_sigcontext13 {
     62       1.1  matt 	int	sc_onstack;		/* sigstack state to restore */
     63       1.1  matt 	int	sc_mask;		/* signal mask to restore (old style) */
     64       1.1  matt 	/* begin machine dependent portion */
     65       1.1  matt 	struct trapframe32 sc_frame;	/* saved registers */
     66       1.1  matt };
     67       1.1  matt 
     68       1.1  matt struct exec_package;
     69       1.1  matt void netbsd32_setregs (struct lwp *, struct exec_package *, u_long);
     70       1.1  matt int netbsd32_sigreturn (struct lwp *, void *, register_t *);
     71       1.1  matt void netbsd32_sendsig (int sig, sigset_t *, u_long);
     72       1.1  matt 
     73       1.1  matt extern char netbsd32_esigcode[], netbsd32_sigcode[];
     74       1.1  matt 
     75       1.1  matt /*
     76       1.1  matt  * Need to plug into get sparc specific ioctl's.
     77       1.1  matt  */
     78       1.1  matt #define	NETBSD32_MD_IOCTL	/* enable netbsd32_md_ioctl() */
     79       1.2   dsl int netbsd32_md_ioctl(struct file *, netbsd32_u_long, void *, struct proc *);
     80       1.1  matt 
     81       1.1  matt #endif /* _MACHINE_NETBSD32_H_ */
     82