aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.c
blob: b84d7ee0fc969ff582021d0d91aaeeaa56c080a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "mem.h"

#include <gdt.h>
#include <stdio.h>

#include "devices/uart_16550.h"
#include "devices/vga.h"

void kmain() {
  gdt_install();

  if (uart_init(COM1) != 0) printf("UART self-test failed.\r\n");

  printf("hello %s world\n", "kernel");

  vga_init(vmm_map(0xb8000, 0xc03ff000));

  alloc4M();
  char *c = (char *)0xc0700000;
  if (*c == 0) printf("c is 0\r\n");

  while (1)
    ;
}