1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-12-22 06:38:07 +00:00

Update linux-initialization-2.md

This commit is contained in:
wuyuxin 2020-11-16 20:44:51 +08:00 committed by GitHub
parent eb6d1204a9
commit af6b5d82b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ Where:
* `Offset` - is offset to entry point of an interrupt handler; * `Offset` - is offset to entry point of an interrupt handler;
* `DPL` - Descriptor Privilege Level; * `DPL` - Descriptor Privilege Level;
* `P` - Segment Present flag; * `P` - Segment Present flag;
* `Segment selector` - a code segment selector in GDT or LDT (actually it always point to GDT in linux) * `Segment selector` - a code segment selector in GDT or LDT (actually in linux, it must point to a valid descriptor in your GDT.)
```C ```C
#define __KERNEL_CS (GDT_ENTRY_KERNEL_CS*8) // 0000 0000 0001 0000 #define __KERNEL_CS (GDT_ENTRY_KERNEL_CS*8) // 0000 0000 0001 0000
#define GDT_ENTRY_KERNEL_CS 2 #define GDT_ENTRY_KERNEL_CS 2