19 lines
348 B
C
19 lines
348 B
C
//
|
|
// Created by rick on 22-3-23.
|
|
//
|
|
#include <stdio.h>
|
|
#include <yak/platform/generic/platform.h>
|
|
#include <yak/platform/x86_64/cpu/cpu.h>
|
|
|
|
void platform_init() {
|
|
printf("Init X86_64\n");
|
|
__asm__("cli");
|
|
gdt_init();
|
|
idt_init();
|
|
}
|
|
|
|
void __attribute__((noreturn)) halt_forever() {
|
|
__asm__("cli");
|
|
while (1) __asm__("hlt");
|
|
}
|