Prechádzať zdrojové kódy

style: remove TODOs

greatbridf 2 rokov pred
rodič
commit
f2dab67f6e
3 zmenil súbory, kde vykonal 5 pridanie a 8 odobranie
  1. 0 1
      src/boot.s
  2. 2 3
      src/kernel/event/event.cpp
  3. 3 4
      src/kernel_main.c

+ 0 - 1
src/boot.s

@@ -164,7 +164,6 @@ start_32bit:
     movl $0x03fffff0, %ebp
     movl $0x03fffff0, %esp
 
-# TODO: move REAL KERNEL to 0x100000
     movl $__loader_end, %eax
     movl $__real_kernel_start, %ebx
 

+ 2 - 3
src/kernel/event/event.cpp

@@ -1,4 +1,4 @@
-#include "kernel/vga.h"
+#include <kernel/tty.h>
 #include <asm/port_io.h>
 #include <kernel/event/event.h>
 #include <kernel/input/input_event.h>
@@ -31,8 +31,7 @@ void dispatch_event(void)
         for (auto iter = input_event_queue.begin(); iter != input_event_queue.end(); ++iter) {
             const auto& item = *iter;
             snprintf(buf, 1024, "\rinput event: type%x, data%x, code%x\r", item.type, item.data, item.code);
-            // TODO: change to tty
-            vga_print(buf, 0x0fu);
+            tty_print(console, buf);
             input_event_queue.erase(iter);
         }
     }

+ 3 - 4
src/kernel_main.c

@@ -43,9 +43,9 @@ static inline void check_a20_status(void)
     result = check_a20_on();
 
     if (result) {
-        // TODO: change to tty
+        tty_print(console, "a20 is on");
     } else {
-        // TODO: change to tty
+        tty_print(console, "a20 is NOT on");
     }
 }
 
@@ -174,8 +174,7 @@ void kernel_main(void)
     printkf("Testing k_malloc...\n");
     char* k_malloc_buf = (char*)k_malloc(sizeof(char) * 128);
     snprintf(k_malloc_buf, 128, "This text is printed on the heap!\n");
-    // TODO: change to tty
-    // vga_printk(k_malloc_buf, 0x0fu);
+    tty_print(console, k_malloc_buf);
     k_free(k_malloc_buf);
 
     void* kernel_stack = k_malloc(KERNEL_STACK_SIZE);