diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kernel.c b/src/kernel.c index ffa8814..b9a6bdf 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -8,6 +8,9 @@ #include "devices/uart_16550.h" #include "devices/vga.h" +#include <conf.h> +#include <sys/cpuid.h> + void kmain() { pic_init(); @@ -16,6 +19,15 @@ void kmain() { if (uart_init(COM1) != 0) printf("UART self-test failed.\r\n"); + printf("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); + printf("hello %s world\n", "kernel"); printf("we are number %d\n", 1); printf("a negative %d as hex %x\n", -1, -1); |