1*0a6a1f1dSLionel Sambuc /* $NetBSD: proc.h,v 1.42 2014/02/20 18:19:10 dsl Exp $ */ 26c8f7fc3SBen Gras 36c8f7fc3SBen Gras /* 46c8f7fc3SBen Gras * Copyright (c) 1991 Regents of the University of California. 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. Neither the name of the University nor the names of its contributors 166c8f7fc3SBen Gras * may be used to endorse or promote products derived from this software 176c8f7fc3SBen Gras * without specific prior written permission. 186c8f7fc3SBen Gras * 196c8f7fc3SBen Gras * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 206c8f7fc3SBen Gras * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 216c8f7fc3SBen Gras * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 226c8f7fc3SBen Gras * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 236c8f7fc3SBen Gras * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 246c8f7fc3SBen Gras * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 256c8f7fc3SBen Gras * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 266c8f7fc3SBen Gras * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 276c8f7fc3SBen Gras * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 286c8f7fc3SBen Gras * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 296c8f7fc3SBen Gras * SUCH DAMAGE. 306c8f7fc3SBen Gras * 316c8f7fc3SBen Gras * @(#)proc.h 7.1 (Berkeley) 5/15/91 326c8f7fc3SBen Gras */ 336c8f7fc3SBen Gras 346c8f7fc3SBen Gras #ifndef _I386_PROC_H_ 356c8f7fc3SBen Gras #define _I386_PROC_H_ 366c8f7fc3SBen Gras 376c8f7fc3SBen Gras #include <machine/frame.h> 386c8f7fc3SBen Gras #include <machine/pcb.h> 396c8f7fc3SBen Gras 406c8f7fc3SBen Gras /* 416c8f7fc3SBen Gras * Machine-dependent part of the lwp structure for i386. 426c8f7fc3SBen Gras */ 436c8f7fc3SBen Gras struct pmap; 446c8f7fc3SBen Gras struct vm_page; 456c8f7fc3SBen Gras 466c8f7fc3SBen Gras struct mdlwp { 476c8f7fc3SBen Gras struct trapframe *md_regs; /* registers on current frame */ 486c8f7fc3SBen Gras int md_flags; /* machine-dependent flags */ 496c8f7fc3SBen Gras volatile int md_astpending; /* AST pending for this process */ 506c8f7fc3SBen Gras struct pmap *md_gc_pmap; /* pmap being garbage collected */ 516c8f7fc3SBen Gras struct vm_page *md_gc_ptp; /* pages from pmap g/c */ 526c8f7fc3SBen Gras }; 536c8f7fc3SBen Gras 546c8f7fc3SBen Gras /* md_flags */ 556c8f7fc3SBen Gras #define MDL_IOPL 0x0002 /* XEN: i/o privilege */ 566c8f7fc3SBen Gras 576c8f7fc3SBen Gras struct mdproc { 586c8f7fc3SBen Gras int md_flags; 596c8f7fc3SBen Gras void (*md_syscall)(struct trapframe *); 606c8f7fc3SBen Gras /* Syscall handling function */ 616c8f7fc3SBen Gras }; 626c8f7fc3SBen Gras 636c8f7fc3SBen Gras /* md_flags */ 646c8f7fc3SBen Gras #define MDP_USEDMTRR 0x0002 /* has set volatile MTRRs */ 656c8f7fc3SBen Gras 666c8f7fc3SBen Gras #endif /* _I386_PROC_H_ */ 67