1*f0286e4fSskrll /* $NetBSD: proc.h,v 1.19 2020/08/14 16:18:36 skrll Exp $ */ 2c1f753f9Sreinoud 3c1f753f9Sreinoud /* 4c1f753f9Sreinoud * Copyright (c) 1994 Mark Brinicombe. 5c1f753f9Sreinoud * All rights reserved. 6c1f753f9Sreinoud * 7c1f753f9Sreinoud * Redistribution and use in source and binary forms, with or without 8c1f753f9Sreinoud * modification, are permitted provided that the following conditions 9c1f753f9Sreinoud * are met: 10c1f753f9Sreinoud * 1. Redistributions of source code must retain the above copyright 11c1f753f9Sreinoud * notice, this list of conditions and the following disclaimer. 12c1f753f9Sreinoud * 2. Redistributions in binary form must reproduce the above copyright 13c1f753f9Sreinoud * notice, this list of conditions and the following disclaimer in the 14c1f753f9Sreinoud * documentation and/or other materials provided with the distribution. 15c1f753f9Sreinoud * 3. All advertising materials mentioning features or use of this software 16c1f753f9Sreinoud * must display the following acknowledgement: 17c1f753f9Sreinoud * This product includes software developed by the RiscBSD team. 18c1f753f9Sreinoud * 4. The name "RiscBSD" nor the name of the author may be used to 19c1f753f9Sreinoud * endorse or promote products derived from this software without specific 20c1f753f9Sreinoud * prior written permission. 21c1f753f9Sreinoud * 22c1f753f9Sreinoud * THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED 23c1f753f9Sreinoud * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24c1f753f9Sreinoud * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25c1f753f9Sreinoud * IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 26c1f753f9Sreinoud * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27c1f753f9Sreinoud * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28c1f753f9Sreinoud * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29c1f753f9Sreinoud * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30c1f753f9Sreinoud * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31c1f753f9Sreinoud * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32c1f753f9Sreinoud * SUCH DAMAGE. 33c1f753f9Sreinoud */ 34c1f753f9Sreinoud 358a91aadeSmatt #ifndef _ARM_PROC_H_ 368a91aadeSmatt #define _ARM_PROC_H_ 37c1f753f9Sreinoud 38c1f753f9Sreinoud /* 39c1f753f9Sreinoud * Machine-dependent part of the proc structure for arm. 40c1f753f9Sreinoud */ 4123bc2503Sthorpej 425afa6838Sthorpej struct trapframe; 432a540cd4Sagc struct lwp; 445afa6838Sthorpej 4523bc2503Sthorpej struct mdlwp { 467efdc6dfSmatt struct trapframe *md_tf; 47b45167b6Srearnsha int md_flags; 48*f0286e4fSskrll volatile uint32_t md_astpending; 4923bc2503Sthorpej }; 5023bc2503Sthorpej 51b45167b6Srearnsha /* Flags setttings for md_flags */ 527efdc6dfSmatt #define MDLWP_NOALIGNFLT 0x00000002 /* For EXEC_AOUT */ 53202aa3d6Smatt #define MDLWP_VFPINTR 0x00000004 /* VFP used in intr */ 54b45167b6Srearnsha 55b45167b6Srearnsha 56c1f753f9Sreinoud struct mdproc { 57c2931c2bSmatt void (*md_syscall)(struct trapframe *, struct lwp *, uint32_t); 580b956d0bSbriggs int pmc_enabled; /* bitfield of enabled counters */ 590b956d0bSbriggs void *pmc_state; /* port-specific pmc state */ 60308ab8a7Smatt char md_march[12]; /* machine arch of executable */ 61c1f753f9Sreinoud }; 620b956d0bSbriggs 635ea98e6aSmartin #define PROC_MACHINE_ARCH(P) ((P)->p_md.md_march) 64308ab8a7Smatt #define PROC0_MD_INITIALIZERS .p_md = { .md_march = MACHINE_ARCH }, 65308ab8a7Smatt 668a91aadeSmatt #endif /* _ARM_PROC_H_ */ 67