summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-12-02 08:28:18 +0100
committerMichal Idziorek <m.i@gmx.at>2014-12-02 08:28:18 +0100
commitb4e8da9b6e43366eaa7198f349ce30421c1d7bf1 (patch)
treea0378243e934002e9b4a74fc8321ba46da1dbf38 /kernel/kernel.c
parentde8c758de78cd7091f80b582cf706fc441f6ca72 (diff)
little cleanup
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c27
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)