xref: /minix3/sys/arch/arm/include/proc.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: proc.h,v 1.17 2014/02/24 16:57:57 christos Exp $	*/
26c8f7fc3SBen Gras 
36c8f7fc3SBen Gras /*
46c8f7fc3SBen Gras  * Copyright (c) 1994 Mark Brinicombe.
56c8f7fc3SBen Gras  * All rights reserved.
66c8f7fc3SBen Gras  *
76c8f7fc3SBen Gras  * Redistribution and use in source and binary forms, with or without
86c8f7fc3SBen Gras  * modification, are permitted provided that the following conditions
96c8f7fc3SBen Gras  * are met:
106c8f7fc3SBen Gras  * 1. Redistributions of source code must retain the above copyright
116c8f7fc3SBen Gras  *    notice, this list of conditions and the following disclaimer.
126c8f7fc3SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
136c8f7fc3SBen Gras  *    notice, this list of conditions and the following disclaimer in the
146c8f7fc3SBen Gras  *    documentation and/or other materials provided with the distribution.
156c8f7fc3SBen Gras  * 3. All advertising materials mentioning features or use of this software
166c8f7fc3SBen Gras  *    must display the following acknowledgement:
176c8f7fc3SBen Gras  *	This product includes software developed by the RiscBSD team.
186c8f7fc3SBen Gras  * 4. The name "RiscBSD" nor the name of the author may be used to
196c8f7fc3SBen Gras  *    endorse or promote products derived from this software without specific
206c8f7fc3SBen Gras  *    prior written permission.
216c8f7fc3SBen Gras  *
226c8f7fc3SBen Gras  * THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED
236c8f7fc3SBen Gras  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
246c8f7fc3SBen Gras  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
256c8f7fc3SBen Gras  * IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
266c8f7fc3SBen Gras  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
276c8f7fc3SBen Gras  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
286c8f7fc3SBen Gras  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
296c8f7fc3SBen Gras  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
306c8f7fc3SBen Gras  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
316c8f7fc3SBen Gras  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
326c8f7fc3SBen Gras  * SUCH DAMAGE.
336c8f7fc3SBen Gras  */
346c8f7fc3SBen Gras 
35*0a6a1f1dSLionel Sambuc #ifndef _ARM_PROC_H_
36*0a6a1f1dSLionel Sambuc #define _ARM_PROC_H_
376c8f7fc3SBen Gras 
386c8f7fc3SBen Gras /*
396c8f7fc3SBen Gras  * Machine-dependent part of the proc structure for arm.
406c8f7fc3SBen Gras  */
416c8f7fc3SBen Gras 
426c8f7fc3SBen Gras struct trapframe;
436c8f7fc3SBen Gras struct lwp;
446c8f7fc3SBen Gras 
456c8f7fc3SBen Gras struct mdlwp {
466c8f7fc3SBen Gras 	struct trapframe *md_tf;
476c8f7fc3SBen Gras 	int	md_flags;
486c8f7fc3SBen Gras };
496c8f7fc3SBen Gras 
506c8f7fc3SBen Gras /* Flags setttings for md_flags */
516c8f7fc3SBen Gras #define MDLWP_NOALIGNFLT	0x00000002	/* For EXEC_AOUT */
5284d9c625SLionel Sambuc #define MDLWP_VFPINTR		0x00000004	/* VFP used in intr */
536c8f7fc3SBen Gras 
546c8f7fc3SBen Gras 
556c8f7fc3SBen Gras struct mdproc {
566c8f7fc3SBen Gras 	void	(*md_syscall)(struct trapframe *, struct lwp *, uint32_t);
576c8f7fc3SBen Gras 	int	pmc_enabled;		/* bitfield of enabled counters */
586c8f7fc3SBen Gras 	void	*pmc_state;		/* port-specific pmc state */
5984d9c625SLionel Sambuc 	char	md_march[12];		/* machine arch of executable */
606c8f7fc3SBen Gras };
616c8f7fc3SBen Gras 
6284d9c625SLionel Sambuc #define	PROC0_MD_INITIALIZERS .p_md = { .md_march = MACHINE_ARCH },
6384d9c625SLionel Sambuc 
64*0a6a1f1dSLionel Sambuc #endif /* _ARM_PROC_H_ */
65