Last change
on this file since 1372 was 1, checked in by vboxsync, 55 years ago |
import
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
643 bytes
|
Line | |
---|
1 | /* Segment indexes. Must match the gdt definition in segment.c. */
|
---|
2 | enum {
|
---|
3 | NULL_SEG,
|
---|
4 | FLAT_CODE,
|
---|
5 | FLAT_DATA,
|
---|
6 | RELOC_CODE,
|
---|
7 | RELOC_DATA,
|
---|
8 | NUM_SEG,
|
---|
9 | };
|
---|
10 |
|
---|
11 | /* Values for segment selector register */
|
---|
12 | #define FLAT_CS (FLAT_CODE << 3)
|
---|
13 | #define FLAT_DS (FLAT_DATA << 3)
|
---|
14 | #define RELOC_CS (RELOC_CODE << 3)
|
---|
15 | #define RELOC_DS (RELOC_DATA << 3)
|
---|
16 |
|
---|
17 | /* i386 segment descriptor */
|
---|
18 | struct segment_desc {
|
---|
19 | unsigned short limit_0;
|
---|
20 | unsigned short base_0;
|
---|
21 | unsigned char base_16;
|
---|
22 | unsigned char types;
|
---|
23 | unsigned char flags;
|
---|
24 | unsigned char base_24;
|
---|
25 | };
|
---|
26 |
|
---|
27 | extern struct segment_desc gdt[NUM_SEG];
|
---|
28 |
|
---|
29 | #define GDT_LIMIT ((NUM_SEG << 3) - 1)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.