mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Data segment descriptors are not needed in 64-bit mode
This commit is contained in:
@@ -29,12 +29,6 @@ start:
|
|||||||
; load the 64-bit GDT
|
; load the 64-bit GDT
|
||||||
lgdt [gdt64.pointer]
|
lgdt [gdt64.pointer]
|
||||||
|
|
||||||
; update selectors
|
|
||||||
mov ax, gdt64.data
|
|
||||||
mov ss, ax
|
|
||||||
mov ds, ax
|
|
||||||
mov es, ax
|
|
||||||
|
|
||||||
jmp gdt64.code:long_mode_start
|
jmp gdt64.code:long_mode_start
|
||||||
|
|
||||||
set_up_page_tables:
|
set_up_page_tables:
|
||||||
@@ -202,9 +196,7 @@ section .rodata
|
|||||||
gdt64:
|
gdt64:
|
||||||
dq 0 ; zero entry
|
dq 0 ; zero entry
|
||||||
.code: equ $ - gdt64 ; new
|
.code: equ $ - gdt64 ; new
|
||||||
dq (1<<44) | (1<<47) | (1<<41) | (1<<43) | (1<<53) ; code segment
|
dq (1<<44) | (1<<47) | (1<<43) | (1<<53) ; code segment
|
||||||
.data: equ $ - gdt64 ; new
|
|
||||||
dq (1<<44) | (1<<47) | (1<<41) ; data segment
|
|
||||||
.pointer:
|
.pointer:
|
||||||
dw $ - gdt64 - 1
|
dw $ - gdt64 - 1
|
||||||
dq gdt64
|
dq gdt64
|
||||||
|
|||||||
Reference in New Issue
Block a user