From b3ddd18e7ac798a21f4df7b65c432e33c262be39 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 12 Jan 2017 17:23:50 +0100 Subject: [PATCH] Data segments aren't needed for 64-bit mode (cherry picked from commit e179dadf70eb4c30d5d7290859a6ff110b7ed4ab) --- src/arch/x86_64/boot.asm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index a9d7a6bb..031c002b 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -29,12 +29,6 @@ start: ; load the 64-bit GDT lgdt [gdt64.pointer] - ; update selectors - mov ax, gdt64.data - mov ss, ax - mov ds, ax - mov es, ax - jmp gdt64.code:long_mode_start set_up_page_tables: @@ -203,8 +197,6 @@ gdt64: dq 0 ; zero entry .code: equ $ - gdt64 ; new dq (1<<44) | (1<<47) | (1<<41) | (1<<43) | (1<<53) ; code segment -.data: equ $ - gdt64 ; new - dq (1<<44) | (1<<47) | (1<<41) ; data segment .pointer: dw $ - gdt64 - 1 dq gdt64