From 8ea3e244d44190e44a092ffb004e13ad94174c68 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 24 May 2015 23:30:12 +0200 Subject: porting ncurses... --- kernel/config.h | 15 +++++++++++---- kernel/kernel.c | 3 ++- kernel/syscalls.c | 1 + kernel/usermode.c | 4 +++- 4 files changed, 17 insertions(+), 6 deletions(-) (limited to 'kernel') 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 + #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}; -- cgit v1.2.3