From 57260ebb621b1b5c29fc6d976ca781394d5be501 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Wed, 6 Mar 2019 09:05:24 +0100 Subject: [PATCH] Revert "LONG MODE MULTIBOOT WORKS gsp!" This reverts commit 995fda7c569a5996377275886183d5b15911ec2f. --- boot/loader/loader.asm | 1 - boot/loader/mem/management.inc | 7 ------- boot/loader/mem/structures.inc | 4 ++-- build/obj/boot/loader.bin | Bin 20612 -> 12649 bytes 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/boot/loader/loader.asm b/boot/loader/loader.asm index 2040668..09b565b 100644 --- a/boot/loader/loader.asm +++ b/boot/loader/loader.asm @@ -108,7 +108,6 @@ lnext: %include "boot/loader/mem/structures.inc" lnext2: call Setup_paging - call Go64 jmp lnext3 %include "boot/loader/mem/management.inc" diff --git a/boot/loader/mem/management.inc b/boot/loader/mem/management.inc index 48ff4cc..3634666 100644 --- a/boot/loader/mem/management.inc +++ b/boot/loader/mem/management.inc @@ -57,8 +57,6 @@ Setup_paging: ; Enable long mode and paging ; ; ---------------------------------------------------------------------------- ; Go64: - pusha - ;; Registering paging mov eax, PML4_table mov cr3, eax ; Load PML4 to cr3 @@ -80,10 +78,5 @@ Go64: ; | ; `------ Paging bit mov cr0, eax - jmp .end - nop - nop -.end: - popa ret diff --git a/boot/loader/mem/structures.inc b/boot/loader/mem/structures.inc index 4947b9d..31e98b4 100644 --- a/boot/loader/mem/structures.inc +++ b/boot/loader/mem/structures.inc @@ -26,7 +26,7 @@ [BITS 32] ;; GDT WITH DOC -ALIGN 4096 +ALIGN 4 GDT64: NULL_SELECTOR: ;; null selector within 64 bits dw GDT_LENGTH ; limit of GDT @@ -104,7 +104,7 @@ GDT64: GDT_LENGTH: ;; EMPTY PAGE TABLES (identity of the first 1GiB) -ALIGN 4096 +ALIGN 4 PML4_table: resb 4096 PDP_table: diff --git a/build/obj/boot/loader.bin b/build/obj/boot/loader.bin index 1b1f11896fe51199cc124b80b5c4c94d9415d1f8..faf31098a145ef011cb83636a3ffd826bcb67367 100644 GIT binary patch delta 140 zcmZo!$oMj8!YNfH0|tf(6Fx9pU;u&t|AEA;^ALJcKa{_IGo!+PeGdkP7fe9u*XcVx z2naAVpI~16fkA*_#|H%{2Pn7`WXKK%1_g%i4|$t`>`s=mAbH2epA0~~rB4p;_`opP UCqSL&@Nrg#25ts_eQ*840IWnXGXMYp literal 20612 zcmeI)&ntvM7{Kvo7ZGinQ~G>c|EUn^aoJiIm|rsyzk7s@8>p`XMQ8xyxFXI*H2556_NDOL1&Ys zNPKM}FAAeD*f(rMJA`Qmw->$+%>LWhj`Q~pIuvqn??phj&PS>O8A zb`6}ozqn7AS$oqXx>r;6BhQ7=a~#KRFwlJpraF|;VL2NlgQ>orY1Xdji+Q)VJ5xIC zPmZ3b?9NP92EruY=hmZp-5@&A?lJF+lxYYcfB*srAb1#1Tyk7(d2RR7h0vy%IjUGsBx+JGI>6__9khO)rb0QkSsE}8)I*a op*6YN{ETO8Eu-rSCRcOma(S-aC>iMYj`!BT05voAUH||9