Print this page
de-linting of .s files
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86pc/boot/boot_gdt.s
+++ new/usr/src/uts/i86pc/boot/boot_gdt.s
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27
28 -#if defined(__lint)
29 -#pragma pack(1)
30 -struct {
31 - uint16_t limit_low;
32 - uint16_t base_low;
33 - uint8_t base_middle;
34 - uint8_t attr;
35 - uint8_t attr_and_limit;
36 - uint8_t base_high;
37 -} global_descriptor_table[8];
38 -struct {
39 - uint16_t limit; /* sizeof (global_descriptor_table) - 1 */
40 - void *base; /* &global_descriptor_table */
41 -} gdt_info;
42 -#pragma pack()
43 -
44 -#else /* __lint */
45 -
46 28 .align 16
47 29 .data
48 30 /*
49 31 * This must remain in sync with the entries in intel/sys/gdt.h; in
50 32 * particular kmdb uses B64CODE_SEL or B32CODE_SEL in perpetuity for
51 33 * its IDT entries (they're copied to the kernel's GDT in init_idt()).
52 34 */
53 35
54 36 global_descriptor_table:
55 37 .long 0
56 38 .long 0
57 39
58 40 /* GDT_B32DATA: 32 bit flat data descriptor */
59 41 .value 0xFFFF /* segment limit 0..15 */
60 42 .value 0x0000 /* segment base 0..15 */
61 43 .byte 0x0 /* segment base 16..23 */
62 44 .byte 0x92 /* P = 1, read/write data */
63 45 .byte 0xCF /* G=1, B=1, Limit (16..19)=1111 */
64 46 .byte 0x0 /* segment base 24..32 */
65 47
66 48 /* GDT_B32CODE 32 bit flat code descriptor */
67 49 .value 0xFFFF /* segment limit 0..15 */
68 50 .value 0x0000 /* segment base 0..15 */
69 51 .byte 0x0 /* segment base 16..23 */
70 52 .byte 0x9A /* P=1, code, exec, readable */
71 53 .byte 0xCF /* G=1, D=1, Limit (16..19)=1111 */
72 54 .byte 0x0 /* segment base 24..32 */
73 55
74 56 /*
75 57 * GDT_B16CODE 16 bit code descriptor for doing BIOS calls
76 58 */
77 59 .value 0xFFFF /* segment limit 0..15 */
78 60 .value 0x0000 /* segment base 0..15 */
79 61 .byte 0x0 /* segment base 16..23 */
80 62 .byte 0x9A /* P=1, code, exec, readable */
81 63 .byte 0x0F /* G=0, D=0, Limit (16..19)=1111 */
82 64 .byte 0x0 /* segment base 24..32 */
83 65
84 66 /*
85 67 * GDT_B16DATA 16 bit data descriptor for doing BIOS calls
86 68 */
87 69 .value 0xFFFF /* segment limit 0..15 */
88 70 .value 0x0000 /* segment base 0..15 */
89 71 .byte 0x0 /* segment base 16..23 */
90 72 .byte 0x92 /* P = 1, read/write data */
91 73 .byte 0x4F /* G=0, D=1, Limit (16..19)=1111 */
92 74 .byte 0x0 /* segment base 24..32 */
93 75
94 76 /* GDT_B64CODE: 64 bit flat code descriptor - only L bit has meaning */
95 77 .value 0xFFFF /* segment limit 0..15 */
96 78 .value 0x0000 /* segment base 0..15 */
97 79 .byte 0x0 /* segment base 16..23 */
98 80 .byte 0x9A /* P=1, code, exec, readable */
99 81 .byte 0xAF /* G=1, D=0, L=1, Limit (16..19)=1111 */
100 82 .byte 0x0 /* segment base 24..32 */
101 83
102 84 /*
103 85 * unused
104 86 */
105 87 .long 0
106 88 .long 0
107 89
108 90 /*
109 91 * GDT_BGSTMP -- an entry for kmdb to use during boot
110 92 * the fast reboot code uses this entry for memory copies, too.
111 93 */
112 94 .value 0x0001 /* segment limit 0..15 */
113 95
114 96 .globl fake_cpu_gdt_base_0_15
115 97 fake_cpu_gdt_base_0_15:
116 98
117 99 .value 0x0000 /* segment base 0..15 */
118 100
119 101 .globl fake_cpu_gdt_base_16_23
120 102 fake_cpu_gdt_base_16_23:
121 103 .byte 0x0 /* segment base 16..23 */
122 104 .byte 0x9A /* P=1, code, exec, readable */
123 105 .byte 0xC0 /* G=1, D=1, Limit (16..19)=0000 */
124 106
125 107 .globl fake_cpu_gdt_base_24_31
126 108 fake_cpu_gdt_base_24_31:
127 109 .byte 0x0 /* segment base 24..32 */
128 110
129 111 / .long 0
130 112 / .long 0
131 113
132 114 gdt_info:
133 115 .value gdt_info - global_descriptor_table - 1
134 116 .long global_descriptor_table
135 117 .long 0 /* needed for 64 bit */
↓ open down ↓ |
80 lines elided |
↑ open up ↑ |
136 118
137 119 fake_cpu:
138 120 .4byte 0
139 121 .4byte 0
140 122 .4byte 0
141 123 .globl fake_cpu_ptr
142 124 fake_cpu_ptr:
143 125 .4byte 0
144 126 .skip 0x6c0, 0
145 127
146 -#endif /* __lint */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX