segments.h (233203) | segments.h (282274) |
---|---|
1/*- 2 * Copyright (c) 1989, 1990 William F. Jolitz 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 | 1/*- 2 * Copyright (c) 1989, 1990 William F. Jolitz 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * William Jolitz. 8 * --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 |
34 * $FreeBSD: head/sys/i386/include/segments.h 233203 2012-03-19 21:24:50Z tijl $ | 34 * $FreeBSD: head/sys/i386/include/segments.h 282274 2015-04-30 15:48:48Z jhb $ |
35 */ 36 37#ifndef _MACHINE_SEGMENTS_H_ 38#define _MACHINE_SEGMENTS_H_ 39 40/* 41 * 386 Segmentation Data Structures and definitions 42 * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 --- 34 unchanged lines hidden (view full) --- 77#define SEGEX_EXT 0x01 /* recursive or externally induced */ 78#define SEGEX_IDT 0x02 /* interrupt descriptor table */ 79#define SEGEX_TI 0x04 /* local descriptor table */ 80 /* other bits are affected descriptor index */ 81#define SEGEX_IDX(s) (((s)>>3)&0x1fff) 82 83#ifdef _KERNEL 84extern int _default_ldt; | 35 */ 36 37#ifndef _MACHINE_SEGMENTS_H_ 38#define _MACHINE_SEGMENTS_H_ 39 40/* 41 * 386 Segmentation Data Structures and definitions 42 * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 --- 34 unchanged lines hidden (view full) --- 77#define SEGEX_EXT 0x01 /* recursive or externally induced */ 78#define SEGEX_IDT 0x02 /* interrupt descriptor table */ 79#define SEGEX_TI 0x04 /* local descriptor table */ 80 /* other bits are affected descriptor index */ 81#define SEGEX_IDX(s) (((s)>>3)&0x1fff) 82 83#ifdef _KERNEL 84extern int _default_ldt; |
85#ifdef XEN 86extern struct proc_ldt default_proc_ldt; 87extern union descriptor *gdt; 88extern union descriptor *ldt; 89#else | |
90extern union descriptor gdt[]; 91extern union descriptor ldt[NLDT]; | 85extern union descriptor gdt[]; 86extern union descriptor ldt[NLDT]; |
92#endif | |
93extern struct soft_segment_descriptor gdt_segs[]; 94extern struct gate_descriptor *idt; 95extern struct region_descriptor r_gdt, r_idt; 96 97void lgdt(struct region_descriptor *rdp); 98void sdtossd(struct segment_descriptor *sdp, 99 struct soft_segment_descriptor *ssdp); 100void ssdtosd(struct soft_segment_descriptor *ssdp, 101 struct segment_descriptor *sdp); 102#endif /* _KERNEL */ 103 104#endif /* !_MACHINE_SEGMENTS_H_ */ | 87extern struct soft_segment_descriptor gdt_segs[]; 88extern struct gate_descriptor *idt; 89extern struct region_descriptor r_gdt, r_idt; 90 91void lgdt(struct region_descriptor *rdp); 92void sdtossd(struct segment_descriptor *sdp, 93 struct soft_segment_descriptor *ssdp); 94void ssdtosd(struct soft_segment_descriptor *ssdp, 95 struct segment_descriptor *sdp); 96#endif /* _KERNEL */ 97 98#endif /* !_MACHINE_SEGMENTS_H_ */ |