4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
32 * This must remain in sync with the entries in x86/include/sys/gdt.h;
33 * in particular kmdb uses B64CODE_SEL or B32CODE_SEL in perpetuity for
34 * its IDT entries (they're copied to the kernel's GDT in init_idt()).
37 global_descriptor_table
:
41 /* GDT_B32DATA: 32 bit flat data descriptor */
42 .value 0xFFFF /* segment limit 0..15 */
43 .value 0x0000 /* segment base 0..15 */
44 .byte 0x0 /* segment base 16..23 */
45 .byte 0x92 /* P = 1, read/write data */
46 .byte 0xCF /* G=1, B=1, Limit (16..19)=1111 */
47 .byte 0x0 /* segment base 24..32 */
49 /* GDT_B32CODE 32 bit flat code descriptor */
50 .value 0xFFFF /* segment limit 0..15 */
51 .value 0x0000 /* segment base 0..15 */
52 .byte 0x0 /* segment base 16..23 */
53 .byte 0x9A /* P=1, code, exec, readable */
54 .byte 0xCF /* G=1, D=1, Limit (16..19)=1111 */
55 .byte 0x0 /* segment base 24..32 */
58 * GDT_B16CODE 16 bit code descriptor for doing BIOS calls
60 .value 0xFFFF /* segment limit 0..15 */
61 .value 0x0000 /* segment base 0..15 */
62 .byte 0x0 /* segment base 16..23 */
63 .byte 0x9A /* P=1, code, exec, readable */
64 .byte 0x0F /* G=0, D=0, Limit (16..19)=1111 */
65 .byte 0x0 /* segment base 24..32 */
68 * GDT_B16DATA 16 bit data descriptor for doing BIOS calls
70 .value 0xFFFF /* segment limit 0..15 */
71 .value 0x0000 /* segment base 0..15 */
72 .byte 0x0 /* segment base 16..23 */
73 .byte 0x92 /* P = 1, read/write data */
74 .byte 0x4F /* G=0, D=1, Limit (16..19)=1111 */
75 .byte 0x0 /* segment base 24..32 */
77 /* GDT_B64CODE: 64 bit flat code descriptor - only L bit has meaning */
78 .value 0xFFFF /* segment limit 0..15 */
79 .value 0x0000 /* segment base 0..15 */
80 .byte 0x0 /* segment base 16..23 */
81 .byte 0x9A /* P=1, code, exec, readable */
82 .byte 0xAF /* G=1, D=0, L=1, Limit (16..19)=1111 */
83 .byte 0x0 /* segment base 24..32 */
92 * GDT_BGSTMP -- an entry for kmdb to use during boot
93 * the fast reboot code uses this entry for memory copies, too.
95 .value 0x0001 /* segment limit 0..15 */
97 .globl fake_cpu_gdt_base_0_15
98 fake_cpu_gdt_base_0_15
:
100 .value 0x0000 /* segment base 0..15 */
102 .globl fake_cpu_gdt_base_16_23
103 fake_cpu_gdt_base_16_23
:
104 .byte 0x0 /* segment base 16..23 */
105 .byte 0x9A /* P=1, code, exec, readable */
106 .byte 0xC0 /* G=1, D=1, Limit (16..19)=0000 */
108 .globl fake_cpu_gdt_base_24_31
109 fake_cpu_gdt_base_24_31
:
110 .byte 0x0 /* segment base 24..32 */
116 .value gdt_info - global_descriptor_table - 1
117 .long global_descriptor_table
118 .long 0 /* needed for 64 bit */