42 lines
571 B
ArmAsm
42 lines
571 B
ArmAsm
.code64
|
|
.global gdt64_tss
|
|
|
|
gdt64:
|
|
gdt64_null:
|
|
.long 0
|
|
.long 0
|
|
gdt64_cs:
|
|
.long 0
|
|
.byte 0
|
|
.byte 0b10011100
|
|
.byte 0b00100000
|
|
.byte 0
|
|
gdt64_ds:
|
|
.long 0
|
|
.byte 0
|
|
.byte 0b10010010
|
|
.word 0
|
|
gdt64_cs_user:
|
|
.long 0
|
|
.byte 0
|
|
.byte 0b11111100
|
|
.byte 0b00100000
|
|
.byte 0
|
|
gdt64_ds_user:
|
|
.long 0
|
|
.byte 0
|
|
.byte 0b11110010
|
|
.word 0
|
|
gdt64_tss:
|
|
.long 0
|
|
.long 0
|
|
.long 0
|
|
.long 0
|
|
gdtr:
|
|
.word . - gdt64 - 1
|
|
.quad gdt64
|
|
|
|
.global load_gdt
|
|
load_gdt:
|
|
lgdt (gdtr)
|
|
ret
|