mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Revert "stuff"
This reverts commit 38bd7d6bd399ff0d1cd64332d26eb365c3de2944.
This commit is contained in:
parent
2a88a0e66f
commit
502a4c4b72
2
Makefile
2
Makefile
@ -84,7 +84,7 @@ make_disk:
|
||||
@echo ${CL2}[make_disk]${CL} OK${CL3}
|
||||
|
||||
testloader: loader
|
||||
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log &
|
||||
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall -s -S -enable-kvm 2> qemu.log &
|
||||
@ndisasm $(OBJDIR)/boot/loader.bin -b 32 > loader_dism.asm
|
||||
|
||||
|
||||
|
@ -86,28 +86,7 @@ main:
|
||||
call Is64Bits
|
||||
|
||||
call Setup_paging
|
||||
|
||||
;; Registering paging
|
||||
mov eax, PML4_table
|
||||
mov cr3, eax ; Load PML4 to cr3
|
||||
|
||||
mov eax, cr4
|
||||
or eax, 1 << 5
|
||||
mov cr4, eax ; Enable PAE
|
||||
|
||||
;; Activate long mode
|
||||
mov ecx, 0xC0000080 ; address of MSR
|
||||
rdmsr ; read MSR
|
||||
or eax, 1 << 8 ; LME = 1. (Long Mode Enable)
|
||||
wrmsr ; write MSR
|
||||
|
||||
;; Enable paging
|
||||
mov eax, cr0
|
||||
or eax, 1 << 31 ; make MSR bit 31 (PG = Paging) to 1 :
|
||||
; |1|000000000000000000000000000000
|
||||
; |
|
||||
; `------ Paging bit
|
||||
mov cr0, eax
|
||||
call Go64
|
||||
|
||||
mov dword [0xb8000], 0x2f4b2f4f
|
||||
ret
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user