Verified Commit 78e3318d authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Remove old memory map code

parent bade94e9
;Generate a memory map at 0x500 to 0x5000 (available memory not used for kernel or bootloader)
.start equ 0x0500
.end equ 0x5000
.length equ .end - .start
xor eax, eax
mov di, .start
mov ecx, .length / 4 ; moving 4 Bytes at once
rep stosd
mov di, .start
mov edx, 0x534D4150
xor ebx, ebx
mov eax, 0xE820
mov ecx, 24
int 0x15
jc .done ; Error or finished
cmp ebx, 0
je .done ; Finished
add di, 24
cmp di, .end
jb .lp ; Still have buffer space
......@@ -10,17 +10,12 @@ stage2.entry:
or al, 2
out 0x92, al
; load memory map
;TODO: rewrite this in Rust
call memory_map
mov dword [protected_mode.func], stage3.entry
jmp protected_mode.entry
%include "cpuid.asm"
%include "gdt.asm"
%include "long_mode.asm"
%include "memory_map.asm"
%include "protected_mode.asm"
%include "thunk.asm"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment