|
|
1.1 root 1:
2: /* Segment indexes. Must match the gdt definition in segment.c. */
3: enum {
4: NULL_SEG,
5: FLAT_CODE,
6: FLAT_DATA,
7: RELOC_CODE,
8: RELOC_DATA,
9: NUM_SEG,
10: };
11:
12: /* Values for segment selector register */
13: #define FLAT_CS (FLAT_CODE << 3)
14: #define FLAT_DS (FLAT_DATA << 3)
15: #define RELOC_CS (RELOC_CODE << 3)
16: #define RELOC_DS (RELOC_DATA << 3)
17:
18: /* i386 segment descriptor */
19: struct segment_desc {
20: unsigned short limit_0;
21: unsigned short base_0;
22: unsigned char base_16;
23: unsigned char types;
24: unsigned char flags;
25: unsigned char base_24;
26: };
27:
28: extern struct segment_desc gdt[NUM_SEG];
29:
30: #define GDT_LIMIT ((NUM_SEG << 3) - 1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.