Rev 178 | Rev 206 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 178 | Rev 188 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
42 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
43 | /* KTEXT descriptor */ |
43 | /* KTEXT descriptor */ |
44 | { .limit_0_15 = 0xffff, |
44 | { .limit_0_15 = 0xffff, |
45 | .base_0_15 = 0, |
45 | .base_0_15 = 0, |
46 | .base_16_23 = 0, |
46 | .base_16_23 = 0, |
47 | .access = AR_PRESENT | AR_CODE | DPL_KERNEL, |
47 | .access = AR_PRESENT | AR_CODE | DPL_KERNEL | AR_READABLE , |
48 | .limit_16_19 = 0xf, |
48 | .limit_16_19 = 0xf, |
49 | .available = 0, |
49 | .available = 0, |
50 | .longmode = 1, |
50 | .longmode = 1, |
51 | .special = 0, |
51 | .special = 0, |
52 | .granularity = 1, |
52 | .granularity = 1, |
53 | .base_24_31 = 0 }, |
53 | .base_24_31 = 0 }, |
54 | /* KDATA descriptor */ |
54 | /* KDATA descriptor */ |
55 | { .limit_0_15 = 0xffff, |
55 | { .limit_0_15 = 0xffff, |
56 | .base_0_15 = 0, |
56 | .base_0_15 = 0, |
Line 58... | Line 58... | ||
58 | .access = AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_KERNEL, |
58 | .access = AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_KERNEL, |
59 | .limit_16_19 = 0xf, |
59 | .limit_16_19 = 0xf, |
60 | .available = 0, |
60 | .available = 0, |
61 | .longmode = 0, |
61 | .longmode = 0, |
62 | .special = 0, |
62 | .special = 0, |
63 | .granularity = 0, |
63 | .granularity = 1, |
64 | .base_24_31 = 0 }, |
64 | .base_24_31 = 0 }, |
65 | /* UTEXT descriptor */ |
65 | /* UTEXT descriptor */ |
66 | { .limit_0_15 = 0xffff, |
66 | { .limit_0_15 = 0xffff, |
67 | .base_0_15 = 0, |
67 | .base_0_15 = 0, |
68 | .base_16_23 = 0, |
68 | .base_16_23 = 0, |
Line 82... | Line 82... | ||
82 | .available = 0, |
82 | .available = 0, |
83 | .longmode = 0, |
83 | .longmode = 0, |
84 | .special = 1, |
84 | .special = 1, |
85 | .granularity = 1, |
85 | .granularity = 1, |
86 | .base_24_31 = 0 }, |
86 | .base_24_31 = 0 }, |
- | 87 | /* KTEXT 16-bit protected */ |
|
- | 88 | { .limit_0_15 = 0xffff, |
|
- | 89 | .base_0_15 = 0, |
|
- | 90 | .base_16_23 = 0, |
|
- | 91 | .access = AR_PRESENT | AR_CODE | DPL_KERNEL | AR_READABLE, |
|
- | 92 | .limit_16_19 = 0xf, |
|
- | 93 | .available = 0, |
|
- | 94 | .longmode = 0, |
|
- | 95 | .special = 0, |
|
- | 96 | .granularity = 1, |
|
- | 97 | .base_24_31 = 0 }, |
|
87 | /* TSS descriptor - set up will be completed later */ |
98 | /* TSS descriptor - set up will be completed later */ |
88 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } |
99 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } |
89 | }; |
100 | }; |
90 | 101 | ||
91 | struct idescriptor idt[IDT_ITEMS]; |
102 | struct idescriptor idt[IDT_ITEMS]; |
92 | 103 | ||
93 | static struct tss tss; |
104 | static struct tss tss; |
94 | 105 | ||
95 | /* gdtr is changed by kmp before next CPU is initialized */ |
106 | /* Does not compile correctly if it does not exist */ |
96 | struct ptr_16_32 gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt) }; |
- | |
97 | //struct ptr_16_32 gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) }; |
- | |
98 | struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(idt) }; |
107 | int __attribute__ ((section ("K_DATA_START"))) __fake; |