diff options
Diffstat (limited to 'src/kernel.c')
-rw-r--r-- | src/kernel.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/kernel.c b/src/kernel.c index e8cfc88..c84d28c 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -11,6 +11,7 @@ #include "interrupts.h" #include "keyboard.h" #include "mouse.h" +#include "pci.h" #include "setjmp.h" #include "kernel.h" @@ -72,7 +73,11 @@ void entry( void ) puts( "Enabling interrupt handing now.." ); interrupts_enable( ); - + + puts( "Detecting devices via PCI.." ); + pci_controller_t pci_controller; + pci_controller_init( &pci_controller ); + puts( "Running.." ); // endless loop doing nothing, later we have to get events @@ -118,12 +123,21 @@ static void handle_keyboard_event( keyboard_event_t *event, void *context ) buf[pos] = '\0'; pos = 0; puts( "" ); - if( strcmp( buf, "quit" ) == 0 ) { + if( strcmp( buf, "help" ) == 0 ) { + puts( "quit - terminate os" ); + puts( "mem - show memory usage" ); + puts( "driver - show status of drivers" ); + puts( "proc - show process status" ); + } else if( strcmp( buf, "quit" ) == 0 ) { terminate = true; } else if( strcmp( buf, "mem" ) == 0 ) { // TODO: print memory usage } else if( strcmp( buf, "proc" ) == 0 ) { // TODO: print scheduler status + } else if( strcmp( buf, "driver" ) == 0 ) { + // TODO: print driver information + } else { + printf( "ERR: Unknown pre-boot command '%s'\n", buf ); } } else { printf( "%c", event->ascii_key ); |