Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: hpux_machdep.h,v 1.24 2009/12/10 14:13:49 matt Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Jason R. Thorpe.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     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.
     18  *
     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.
     30  */
     31 
     32 #ifndef _HP300_HPUX_MACHDEP_H_
     33 #define _HP300_HPUX_MACHDEP_H_
     34 
     35 /*
     36  * Information pushed on stack when a signal is delivered.
     37  * This is used by the kernel to restore state following
     38  * execution of the signal handler.  It is also made available
     39  * to the handler to allow it to restore state properly if
     40  * a non-standard exit is performed.
     41  */
     42 struct hpuxsigcontext {
     43 	int	hsc_syscall;		/* ??? (syscall number?) */
     44 	char	hsc_action;		/* ??? */
     45 	char	hsc_pad1;
     46 	char	hsc_pad2;
     47 	char	hsc_onstack;		/* sigstack state to restore */
     48 	int	hsc_mask;		/* signal mask to restore */
     49 	int	hsc_sp;			/* sp to restore */
     50 	short	hsc_ps;			/* psl to restore */
     51 	int	hsc_pc;			/* pc to restore */
     52 
     53 	/*
     54 	 * The following are not actually used by HP-UX.  They exist
     55 	 * for the convenience of the compatibility code.
     56 	 */
     57 	short	_hsc_pad;
     58 	int	_hsc_ap;		/* pointer to hpuxsigstate */
     59 };
     60 
     61 #ifdef _KERNEL
     62 struct exec_package;
     63 struct exec_vmcmd;
     64 
     65 int	hpux_cpu_makecmds(struct lwp *, struct exec_package *);
     66 int	hpux_cpu_vmcmd(struct lwp *, struct exec_vmcmd *);
     67 int	hpux_cpu_sysconf_arch(void);
     68 int	hpux_to_bsd_uoff(int *, int *, struct lwp *);
     69 
     70 void	hpux_sendsig(const ksiginfo_t *, const sigset_t *);
     71 void	hpux_setregs(struct lwp *, struct exec_package *, vaddr_t);
     72 #endif /* _KERNEL */
     73 
     74 #endif /* ! _HP300_HPUX_MACHDEP_H_ */
     75