pcb_ext.h revision 54188
11543Srgrimes/*-
21543Srgrimes * Copyright (c) 1997 Jonathan Lemon
31543Srgrimes * All rights reserved.
41543Srgrimes *
51543Srgrimes * Redistribution and use in source and binary forms, with or without
61543Srgrimes * modification, are permitted provided that the following conditions
71543Srgrimes * are met:
81543Srgrimes * 1. Redistributions of source code must retain the above copyright
91543Srgrimes *    notice, this list of conditions and the following disclaimer.
101543Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111543Srgrimes *    notice, this list of conditions and the following disclaimer in the
121543Srgrimes *    documentation and/or other materials provided with the distribution.
131543Srgrimes *
141543Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
151543Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
161543Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171543Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181543Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
191543Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
201543Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211543Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
221543Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
231543Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
241543Srgrimes * SUCH DAMAGE.
251543Srgrimes *
261543Srgrimes * $FreeBSD: head/sys/i386/include/pcb_ext.h 54188 1999-12-06 04:53:08Z luoqi $
271543Srgrimes */
281543Srgrimes
291543Srgrimes#ifndef _I386_PCB_EXT_H_
301543Srgrimes#define _I386_PCB_EXT_H_
311543Srgrimes
321543Srgrimes/*
331543Srgrimes * Extension to the 386 process control block
342166Spaul */
351543Srgrimes#include <machine/tss.h>
361543Srgrimes#include <machine/vm86.h>
372166Spaul#include <machine/segments.h>
382166Spaul
392166Spaulstruct pcb_ext {
401543Srgrimes	struct 	segment_descriptor ext_tssd;	/* tss descriptor */
411543Srgrimes	struct 	i386tss	ext_tss;	/* per-process i386tss */
421977Sjkh	caddr_t	ext_iomap;		/* i/o permission bitmap */
431977Sjkh	struct	vm86_kernel ext_vm86;	/* vm86 area */
441977Sjkh};
451977Sjkh
461977Sjkhstruct pcb_ldt {
471977Sjkh	caddr_t	ldt_base;
481977Sjkh	int	ldt_len;
491977Sjkh	int	ldt_refcnt;
501977Sjkh	u_long	ldt_active;
511543Srgrimes	struct	segment_descriptor ldt_sd;
522166Spaul};
532166Spaul
54#ifdef KERNEL
55
56#ifdef USER_LDT
57void set_user_ldt __P((struct pcb *));
58struct pcb_ldt *user_ldt_alloc __P((struct pcb *, int));
59void user_ldt_free __P((struct pcb *));
60#endif
61
62#endif
63
64#endif /* _I386_PCB_EXT_H_ */
65