pcb_ext.h revision 83366
143412Snewton/*-
243412Snewton * Copyright (c) 1997 Jonathan Lemon
343412Snewton * All rights reserved.
443412Snewton *
543412Snewton * Redistribution and use in source and binary forms, with or without
643412Snewton * modification, are permitted provided that the following conditions
743412Snewton * are met:
843412Snewton * 1. Redistributions of source code must retain the above copyright
943412Snewton *    notice, this list of conditions and the following disclaimer.
1043412Snewton * 2. Redistributions in binary form must reproduce the above copyright
1143412Snewton *    notice, this list of conditions and the following disclaimer in the
1243412Snewton *    documentation and/or other materials provided with the distribution.
1343412Snewton *
1443412Snewton * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1543412Snewton * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1643412Snewton * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1743412Snewton * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1843412Snewton * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1943412Snewton * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2043412Snewton * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2143412Snewton * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2243412Snewton * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2343412Snewton * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2443412Snewton * SUCH DAMAGE.
2543412Snewton *
2643412Snewton * $FreeBSD: head/sys/i386/include/pcb_ext.h 83366 2001-09-12 08:38:13Z julian $
2749267Snewton */
2850477Speter
2943412Snewton#ifndef _I386_PCB_EXT_H_
3043412Snewton#define _I386_PCB_EXT_H_
3143412Snewton
3243412Snewton/*
3343412Snewton * Extension to the 386 process control block
3443412Snewton */
3543412Snewton#include <machine/tss.h>
3643412Snewton#include <machine/vm86.h>
3743412Snewton#include <machine/segments.h>
3843412Snewton
3943412Snewtonstruct pcb_ext {
4043412Snewton	struct 	segment_descriptor ext_tssd;	/* tss descriptor */
4143412Snewton	struct 	i386tss	ext_tss;	/* per-process i386tss */
4243412Snewton	caddr_t	ext_iomap;		/* i/o permission bitmap */
4343412Snewton	struct	vm86_kernel ext_vm86;	/* vm86 area */
4443412Snewton};
4543412Snewton
4643412Snewtonstruct pcb_ldt {
4743412Snewton	caddr_t	ldt_base;
4843412Snewton	int	ldt_len;
4943412Snewton	int	ldt_refcnt;
5043412Snewton	u_long	ldt_active;
5143412Snewton	struct	segment_descriptor ldt_sd;
5243412Snewton};
5343412Snewton
5443412Snewton#ifdef _KERNEL
5543412Snewton
5643412Snewtonint i386_extend_pcb __P((struct thread *));
5743412Snewtonvoid set_user_ldt __P((struct pcb *));
5843412Snewtonstruct pcb_ldt *user_ldt_alloc __P((struct pcb *, int));
5943412Snewtonvoid user_ldt_free __P((struct pcb *));
6043412Snewton
6143412Snewton#endif
6243412Snewton
6343412Snewton#endif /* _I386_PCB_EXT_H_ */
6443412Snewton