diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index 641c442..8adbf37 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -5,9 +5,8 @@ #endif #include <stdint.h> - #include "config.h" - +#include "types.h" #include "lib/logger/log.h" #include "timer.h" @@ -15,9 +14,6 @@ #include "vmem.h" #include "interrupts.h" -#include "syscalls.h" // for syscall_execve - - #include "console.h" @@ -26,25 +22,6 @@ #include "task.h" -// CODE FOR Stack Smashing Protector, TODO: MOVE / and do not duplicate -// with sys.c -// http://wiki.osdev.org/Stack_Smashing_Protector - -#if UINT32_MAX == UINTPTR_MAX -#define STACK_CHK_GUARD 0xe2dee396 -#else -#define STACK_CHK_GUARD 0x595e9fbd94fda766 -#endif - -uintptr_t __stack_chk_guard = STACK_CHK_GUARD; - -__attribute__((noreturn)) -void __stack_chk_fail(void) -{ - panic(FOOLOS_MODULE_NAME,"Stack smashing detected"); -} -// - // mp informs us if this if this is the main processor void kernel_main(uint32_t initial_stack, int mp) { @@ -63,7 +40,7 @@ void kernel_main(uint32_t initial_stack, int mp) // we know that here, the bootloader placed the memory map and // the number of entries. // - mem_init(0xa001,*((uint16_t *)(0xa000))); + mem_init((physical_address)0xa001,(int)(*((uint16_t *)(0xa000)))); // // Activate Virtual Memory (paging) |
