51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
;gdt.inc
|
|
;Author: Josh Holtrop
|
|
;Date: 10/30/03
|
|
;Modified: 03/02/04
|
|
|
|
gdtr:
|
|
dw gdt_end-gdt-1
|
|
dd GDT_V
|
|
gdt:
|
|
dd 0
|
|
dd 0
|
|
|
|
KERNEL_CODE equ $-gdt
|
|
dw 0xffff ;limit 15:0
|
|
dw 0x0000 ;base 15:0
|
|
db 0x00 ;base 23:16
|
|
db 0x9A ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
|
|
db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16
|
|
db 0x00 ;base 31:24
|
|
|
|
KERNEL_DATA equ $-gdt
|
|
dw 0xffff ;limit 15:0
|
|
dw 0x0000 ;base 15:0
|
|
db 0x00 ;base 23:16
|
|
db 0x92 ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
|
|
db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16
|
|
db 0x00 ;base 31:24
|
|
|
|
|
|
USER_CODE equ $-gdt
|
|
dw 0xffff ;limit 15:0
|
|
dw 0x0000 ;base 15:0
|
|
db 0x00 ;base 23:16
|
|
db 0xFA ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
|
|
db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16
|
|
db 0x00 ;base 31:24
|
|
|
|
USER_DATA equ $-gdt
|
|
dw 0xffff ;limit 15:0
|
|
dw 0x0000 ;base 15:0
|
|
db 0x00 ;base 23:16
|
|
db 0xF2 ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
|
|
db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16
|
|
db 0x00 ;base 31:24
|
|
|
|
|
|
gdt_end:
|
|
|
|
|
|
|