Implemented initial printk. Added multiboot support.

This commit is contained in:
2014-01-31 16:12:04 -05:00
parent 3b27d50edb
commit f23f3a8a8d
12 changed files with 257 additions and 38 deletions

View File

@ -0,0 +1,13 @@
#include <stdint.h>
#include <multiboot.h>
uint32_t multiboot_getAddress()
{
return 0;
}
uint32_t multiboot_getMagic()
{
return 0;
}

View File

@ -27,6 +27,9 @@ _start:
# Setup the stack
movl $stack_top, %esp
# Push the multiboot information onto the stack
push %ebx
push %eax
# Call the main kernel function
call brados_main

23
arch/i586-elf/multiboot.c Normal file
View File

@ -0,0 +1,23 @@
#include <stdint.h>
#include <multiboot.h>
uint32_t multiboot_getAddress()
{
uint32_t address = 0;
__asm__(
"movl %%ebx, %0;"
:"=r"(address)
);
return address;
}
uint32_t multiboot_getMagic()
{
uint32_t magic = 0;
__asm__(
"movl %%eax, %0;"
:"=r"(magic)
);
return magic;
}