FreeBSD/Linux Kernel Cross Reference
sys/i386/ldt.c
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: ldt.c,v $
29 * Revision 2.5 91/05/14 16:10:48 mrt
30 * Correcting copyright
31 *
32 * Revision 2.4 91/02/05 17:12:45 mrt
33 * Changed to new Mach copyright
34 * [91/02/01 17:35:36 mrt]
35 *
36 * Revision 2.3 90/08/27 21:57:15 dbg
37 * Use new segment definitions.
38 * [90/07/25 dbg]
39 *
40 * Revision 2.2 90/05/03 15:33:38 dbg
41 * Created.
42 * [90/02/15 dbg]
43 *
44 */
45
46 /*
47 * "Local" descriptor table. At the moment, all tasks use the
48 * same LDT.
49 */
50 #include <i386/seg.h>
51 #include <mach/i386/vm_types.h>
52 #include <mach/i386/vm_param.h>
53
54 extern int syscall();
55
56 struct fake_descriptor ldt[LDTSZ] = {
57 /*007*/ { (unsigned int)&syscall,
58 KERNEL_CS,
59 0, /* no parameters */
60 ACC_P|ACC_PL_U|ACC_CALL_GATE
61 }, /* call gate for system calls */
62 /*00F*/ { 0, 0, 0, 0 }, /* unused */
63 /*017*/ { 0,
64 (VM_MAX_ADDRESS-VM_MIN_ADDRESS-1)>>12,
65 SZ_32|SZ_G,
66 ACC_P|ACC_PL_U|ACC_CODE_R
67 }, /* user code segment */
68 /*01F*/ { 0,
69 (VM_MAX_ADDRESS-VM_MIN_ADDRESS-1)>>12,
70 SZ_32|SZ_G,
71 ACC_P|ACC_PL_U|ACC_DATA_W
72 }, /* user data segment */
73 };
Cache object: cbf3ee89aa3aac72793f041957e46839
|