Implemented initial printk. Added multiboot support.
This commit is contained in:
13
arch/arm-none-eabi/multiboot.c
Normal file
13
arch/arm-none-eabi/multiboot.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <multiboot.h>
|
||||
|
||||
uint32_t multiboot_getAddress()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t multiboot_getMagic()
|
||||
{
|
||||
return 0;
|
||||
}
|
@ -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
23
arch/i586-elf/multiboot.c
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user