Deleted Added
full compact
segments.h (127914) segments.h (168035)
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/amd64/include/segments.h 127914 2004-04-05 21:29:41Z imp $
34 * $FreeBSD: head/sys/amd64/include/segments.h 168035 2007-03-30 00:06:21Z jkim $
35 */
36
37#ifndef _MACHINE_SEGMENTS_H_
38#define _MACHINE_SEGMENTS_H_
39
40/*
41 * AMD64 Segmentation Data Structures and definitions
42 */

--- 152 unchanged lines hidden (view full) ---

195 * Entries in the Global Descriptor Table (GDT)
196 */
197#define GNULL_SEL 0 /* Null Descriptor */
198#define GCODE_SEL 1 /* Kernel Code Descriptor */
199#define GDATA_SEL 2 /* Kernel Data Descriptor */
200#define GUCODE32_SEL 3 /* User 32 bit code Descriptor */
201#define GUDATA_SEL 4 /* User 32/64 bit Data Descriptor */
202#define GUCODE_SEL 5 /* User 64 bit Code Descriptor */
35 */
36
37#ifndef _MACHINE_SEGMENTS_H_
38#define _MACHINE_SEGMENTS_H_
39
40/*
41 * AMD64 Segmentation Data Structures and definitions
42 */

--- 152 unchanged lines hidden (view full) ---

195 * Entries in the Global Descriptor Table (GDT)
196 */
197#define GNULL_SEL 0 /* Null Descriptor */
198#define GCODE_SEL 1 /* Kernel Code Descriptor */
199#define GDATA_SEL 2 /* Kernel Data Descriptor */
200#define GUCODE32_SEL 3 /* User 32 bit code Descriptor */
201#define GUDATA_SEL 4 /* User 32/64 bit Data Descriptor */
202#define GUCODE_SEL 5 /* User 64 bit Code Descriptor */
203#define GPROC0_SEL 6 /* TSS for entering kernel etc */
203#define GPROC0_SEL 6 /* TSS for entering kernel etc */
204/* slot 6 is second half of GPROC0_SEL */
204/* slot 6 is second half of GPROC0_SEL */
205#define NGDT 8
205#define GUGS32_SEL 8 /* User 32 bit GS Descriptor */
206#define NGDT 9
206
207#ifdef _KERNEL
208extern struct user_segment_descriptor gdt[];
209extern struct soft_segment_descriptor gdt_segs[];
210extern struct gate_descriptor *idt;
211extern struct region_descriptor r_gdt, r_idt;
212
213void lgdt(struct region_descriptor *rdp);
214void sdtossd(struct user_segment_descriptor *sdp,
215 struct soft_segment_descriptor *ssdp);
216void ssdtosd(struct soft_segment_descriptor *ssdp,
217 struct user_segment_descriptor *sdp);
218void ssdtosyssd(struct soft_segment_descriptor *ssdp,
219 struct system_segment_descriptor *sdp);
220#endif /* _KERNEL */
221
222#endif /* !_MACHINE_SEGMENTS_H_ */
207
208#ifdef _KERNEL
209extern struct user_segment_descriptor gdt[];
210extern struct soft_segment_descriptor gdt_segs[];
211extern struct gate_descriptor *idt;
212extern struct region_descriptor r_gdt, r_idt;
213
214void lgdt(struct region_descriptor *rdp);
215void sdtossd(struct user_segment_descriptor *sdp,
216 struct soft_segment_descriptor *ssdp);
217void ssdtosd(struct soft_segment_descriptor *ssdp,
218 struct user_segment_descriptor *sdp);
219void ssdtosyssd(struct soft_segment_descriptor *ssdp,
220 struct system_segment_descriptor *sdp);
221#endif /* _KERNEL */
222
223#endif /* !_MACHINE_SEGMENTS_H_ */