x86_64: re-enable legacy PIC and PIT initialisation
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#include "arch/serial.h"
|
||||
|
||||
#include <arch/e820.h>
|
||||
#include <arch/pit.h>
|
||||
#include <socks/arg.h>
|
||||
#include <socks/clock.h>
|
||||
#include <socks/console.h>
|
||||
@@ -49,12 +52,15 @@ void early_console_init(void)
|
||||
{
|
||||
const char *dest = arg_value("kernel.early-console");
|
||||
if (!dest) {
|
||||
return;
|
||||
dest = "ttyS0";
|
||||
}
|
||||
}
|
||||
|
||||
static void init_bootfb(multiboot_info_t *mb)
|
||||
{
|
||||
if (!strcmp(dest, "tty0")) {
|
||||
/* show log messages on VGA */
|
||||
} else if (!strcmp(dest, "ttyS0")) {
|
||||
/* write log messages to serial port */
|
||||
early_serialcon_init(115200);
|
||||
}
|
||||
}
|
||||
|
||||
static void use_uniprocessor_topology(void)
|
||||
@@ -69,19 +75,14 @@ int ml_init(uintptr_t arg)
|
||||
|
||||
parse_cmdline(PTR32(mb->cmdline));
|
||||
|
||||
init_bootfb(mb);
|
||||
early_console_init();
|
||||
|
||||
bootstrap_cpu_init();
|
||||
clock_calibrate(500);
|
||||
|
||||
early_console_init();
|
||||
|
||||
print_kernel_banner();
|
||||
|
||||
early_vm_init();
|
||||
printk("video mode: %ux%u",
|
||||
mb->framebuffer_width,
|
||||
mb->framebuffer_height);
|
||||
|
||||
e820_scan(PTR32(mb->mmap_addr), mb->mmap_length);
|
||||
|
||||
@@ -118,6 +119,7 @@ int ml_init(uintptr_t arg)
|
||||
|
||||
sched_init();
|
||||
|
||||
pit_start(500);
|
||||
ml_int_enable();
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user