Fixed passing of memory map from GRUB
This commit is contained in:
parent
6e481f72aa
commit
e3eac48353
@ -33,7 +33,8 @@ _start:
|
||||
1:
|
||||
cmp $(_kernel_start - 0xC0000000), %esi
|
||||
jl 2f
|
||||
cmp $(_kernel_end - 0xC0000000), %esi
|
||||
# + 0x1000 for the GRUB memory map
|
||||
cmp $(_kernel_end - 0xC0000000 + 0x1000), %esi
|
||||
jge 3f
|
||||
mov %esi, %edx
|
||||
or $0x003, %edx
|
||||
|
@ -23,13 +23,13 @@ proc memset*(dest: ByteAddress, value: char, count: int){.exportc.} =
|
||||
proc getMemoryMap(mbd: multiboot_info) =
|
||||
discard # Use this if we need to do anything with the GRUB memory map
|
||||
|
||||
#proc kernelMain(mbd: multiboot_info, magic: uint) {.exportc: "kernel_main"}=
|
||||
proc kernelMain() {.exportc: "kernel_main"}=
|
||||
proc kernelMain(mbd: multiboot_info, magic: uint) {.exportc: "kernel_main"}=
|
||||
#proc kernelMain() {.exportc: "kernel_main"}=
|
||||
getMemoryMap(mbd)
|
||||
paging.init()
|
||||
serial.init()
|
||||
serial.writeLine("Version:" & (version))
|
||||
serial.writeLine("Booting OS")
|
||||
#getMemoryMap(mbd)
|
||||
gdt.gdtInstall()
|
||||
serial.writeLine("GDT installed")
|
||||
interrupts.idtInstall()
|
||||
|
Loading…
Reference in New Issue
Block a user