aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.c
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-12-10 20:56:57 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-12-11 11:32:51 +0200
commit9b2a78fa52249ab481493550490aa5f37872dcf6 (patch)
tree127031268b9b42b0fbdae3d87684d9c045983677 /src/kernel.c
parentRename CCFLAGS to CFLAGS (diff)
downloadkernel-9b2a78fa52249ab481493550490aa5f37872dcf6.tar.xz
Rewrite drivers/uart and drivers/vga in cpp
Diffstat (limited to 'src/kernel.c')
-rw-r--r--src/kernel.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/kernel.c b/src/kernel.c
deleted file mode 100644
index b8432a8..0000000
--- a/src/kernel.c
+++ /dev/null
@@ -1,54 +0,0 @@
-//=====================================================================
-// glitch kernel
-// spdx-license-identifier: ISC
-// description: kernel entry point
-//=====================================================================
-
-#include "conf.h"
-#include "devices/keyboard.h"
-#include "devices/mouse.h"
-#include "devices/pic.h"
-#include "devices/ps2_controller.h"
-#include "devices/uart.h"
-#include "devices/vga.h"
-#include "mem.h"
-#include <stdio.h>
-#include <sys/cpuid.h>
-
-FILE *stdin;
-FILE *stdout;
-FILE *stderr;
-
-void kmain() {
- stderr = uart_init(COM1);
- stdout = vga_init(vmm_map(0xb8000, 0xc03ff000));
-
- printf("glitch [version " VERSION "] [" CC "]\n");
- fprintf(stderr, "glitch [version " VERSION "] [" CC "]\n");
- {
- char vendor[13] = {'\0'};
- unsigned int eax;
- __get_cpuid(0, &eax, (unsigned int *)vendor, (unsigned int *)(vendor + 8), (unsigned int *)(vendor + 4));
- struct CPUVersion v;
- __get_cpuid(1, (unsigned int *)&v, &eax, &eax, &eax);
- printf("CPU: %s family %u model %u stepping %u\n", vendor, family(v), model(v), v.stepping);
- fprintf(stderr, "CPU: %s family %u model %u stepping %u\n", vendor, family(v), model(v), v.stepping);
- }
-
- pic_init();
-
- ps2_ctrl_init();
- ps2_keyboard_init();
- mouse_init();
-
- pic_enable();
- printf("interrupts enabled\n");
-
- /*
- alloc4M();
- char *c = (char *)0xc0700000;
- if (*c == 0) printf("c is 0\r\n");
- */
-
- while (1) {}
-}