55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
|
|
|
|
gdtr:
|
|
dw gdt_end-gdt-1
|
|
dd GDT
|
|
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
|
|
VESA_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 0x40 ;flags ([G][D/B][0][0]) / limit 19:16
|
|
db 0x00 ;base 31:24
|
|
VESA_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 0x40 ;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:
|
|
|
|
|
|
|