28 lines
388 B
C
28 lines
388 B
C
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "hal/hal.h"
|
|
#include "kprintf.h"
|
|
#include "gdt.h"
|
|
#include "intr.h"
|
|
#include "pic.h"
|
|
#include "pit.h"
|
|
|
|
void hal_init(void) {
|
|
gdt_init();
|
|
intr_init();
|
|
pic_init();
|
|
pit_init();
|
|
hal_intr_disable();
|
|
}
|
|
|
|
__attribute__((noreturn)) void hal_hang(void) {
|
|
for(;;) {
|
|
asm("hlt");
|
|
}
|
|
}
|
|
|
|
void hal_wait(uint32_t ms) {
|
|
pit_wait(ms);
|
|
}
|
|
|