summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-24 23:30:12 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-24 23:30:12 +0200
commit8ea3e244d44190e44a092ffb004e13ad94174c68 (patch)
tree2365b0ec35b4fbdc82d49bcefc014fc8af59b251 /kernel
parent1b64f1e69bfbffc0e70ba3a1baff00ed3fd8cb51 (diff)
porting ncurses...
Diffstat (limited to 'kernel')
-rw-r--r--kernel/config.h15
-rw-r--r--kernel/kernel.c3
-rw-r--r--kernel/syscalls.c1
-rw-r--r--kernel/usermode.c4
4 files changed, 17 insertions, 6 deletions
diff --git a/kernel/config.h b/kernel/config.h
index 0a6fd3c..5c58245 100644
--- a/kernel/config.h
+++ b/kernel/config.h
@@ -1,14 +1,21 @@
+
/********************************************
- *
- * Fool OS Central Configuration File
- *
+ * *
+ * Fool OS Central Configuration File *
+ * *
********************************************/
+#include <lib/logger/log.h>
+
#ifndef FOOLOS_CONFIG_H
#define FOOLOS_CONFIG_H
#define FOOLOS_CONSOLE_AUTOBREAK // add newline automatically at end of line
-#define FOOLOS_LOG_OFF // do not log anything
+
+#define FOOLOS_LOG_OFF // do not log anything
+#define FOOLOS_LOG_WHITELIST "elf","ext2","" // make exceptions for these modules. wmpty string marks the end
+#define FOOLOS_LOG_LEVEL FOOLOS_LOG_FINE // minimal severity level to log
+
#define FOOLOS_CONSOLE // otherwise VESA will be used!
#define FOOLSOS_SHOW_VESAMODES
#define MEM_PRINT_MEMORYMAP
diff --git a/kernel/kernel.c b/kernel/kernel.c
index d54baf6..cea1056 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -102,7 +102,6 @@ void kernel_main(uint32_t eax,uint32_t ebx)
//
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%s - compiled on %s at %s",KERNEL_VERSION,__DATE__,__TIME__);
-
//
// Configuring the PIT timer.
//
@@ -167,11 +166,13 @@ void kernel_main(uint32_t eax,uint32_t ebx)
// Its driver will be hopefully implemented one day ;) TODO
//
//pci_init();
+ //
//empty stdin!
while(fifo_has(&get_fool()->std_in))
fifo_get(&get_fool()->std_in);
+
//
// Initialize Multitasking
//
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index c935ecd..3a898fc 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -191,6 +191,7 @@ int syscall_execve(char *name, char **argv, char **env)
asm volatile ("push %0" :: "r" (argv1));
asm volatile ("push %0" :: "r" (arg_count));
+ asm volatile ("push %0" :: "r" (kballoc(1)));
asm volatile ("push %0" :: "r" (env1));
// push addr and return to it
diff --git a/kernel/usermode.c b/kernel/usermode.c
index 1c7a726..e6568a4 100644
--- a/kernel/usermode.c
+++ b/kernel/usermode.c
@@ -56,7 +56,9 @@ void install_tss(int cpu_no){
void switch_to_user_mode()
{
- asm_usermode();
+ asm_usermode();
+ // userfunc();
+
}
char *argv_init[]={"/bin/init",NULL};