summaryrefslogtreecommitdiffhomepage
path: root/src/loader/main.c
blob: aa8e62d2637c7b05b5166d4fc0a31808090b0ee8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// MIT License, Copyright (c) 2021 Marvin Borner

#include <acpi.h>
#include <cfg.h>
#include <def.h>
#include <dev.h>
#include <ide.h>
#include <int.h>
#include <log.h>
#include <pci.h>
#include <pic.h>
#include <sel.h>

/**
 * Entry
 */

int start(void);
int start(void)
{
	vga_clear();
	serial_install();

	pic_install();
	idt_install();

	// acpi_probe(); // TODO: Fix slow ACPI probing
	pci_probe();
	dev_print();

	cfg_read();
	sel_draw();

	// Sleep and wait for interrupts
	while (1)
		__asm__ volatile("hlt");

	return 0;
}