Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Example GDT entry for a TSS
- ; TSS for transitioning between rings, 1-byte gran, base=tss, limit=TSS_SIZE-1
- gdt_tss:
- dw TSS_SIZE-1 ; segment length, bits 0-15
- dw tss ; segment base, bits 0-15
- db 0x0 ; segment base, bits 16-23
- db 10001001b ; access flags (8 bits)
- db 00000000b ; flags (4 bits) + segment length, bits 16-19
- db 0x0 ; segment base, bits 24-31
- ; Example TSS structure
- tss:
- dd 0x0
- dd 0x4000 ;esp0
- dd 0x10 ;ss0
- TIMES 22 dd 0x0
- dw 0x0
- dw TSS_SIZE ;IOPB offset
- ; dd 0x0 ; SSP: If not using a shadow stack (CET disabled)
- ; this can be removed
- tssend:
- TSS_SIZE equ tssend - tss
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement