X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=blobdiff_plain;f=kernel%2Fkernel%2Fkernel.c;h=b198fcf49e4fc6b034c5d7e987bd8e1729680b6a;hb=96b81920dce6c169f32fc4d5b724b4046ea9bfcd;hp=64e64ae45b01f0c805018aa51bac6bb868439a39;hpb=119dc631e1b417eec4f0eb2d8373d034b53d0f2e;p=nameless-os.git diff --git a/kernel/kernel/kernel.c b/kernel/kernel/kernel.c index 64e64ae..b198fcf 100644 --- a/kernel/kernel/kernel.c +++ b/kernel/kernel/kernel.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -92,6 +93,18 @@ void kmain(struct e820_map *mmap, int mmap_size) pic_init(0x20, 0x28); pic_mask_all(); asm volatile ("sti"); + kprint("Initializing PS/2...\n", VGA_LIGHT_GRAY, VGA_BLACK); + int ret = ps2_initialize(); + switch (ret) { + case -1: + kprint("No PS/2 devices found or something is faulty\n", VGA_LIGHT_GRAY, VGA_BLACK); + break; + case 0: + kprint("One PS/2 device found\n", VGA_LIGHT_GRAY, VGA_BLACK); + break; + case 1: + kprint("Two PS/2 devices found\n", VGA_LIGHT_GRAY, VGA_BLACK); + } kprint("All done\n", VGA_LIGHT_GRAY, VGA_BLACK); while(1); }