x86_64: move ACPI driver to kext
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
#include <socks/libc/stdio.h>
|
||||
#include <arch/vgacon.h>
|
||||
#include <arch/serial.h>
|
||||
|
||||
#ifdef KEXT_NET_DOORSTUCK_SOCKS_ACPI
|
||||
#include <arch/acpi.h>
|
||||
#endif
|
||||
|
||||
#define PTR32(x) ((void *)((uintptr_t)(x)))
|
||||
|
||||
@@ -85,6 +88,12 @@ static void init_bootfb(multiboot_info_t *mb)
|
||||
__bootfb_fixedinfo.fb_baseptr = mb->framebuffer_addr;
|
||||
}
|
||||
|
||||
static void use_uniprocessor_topology(void)
|
||||
{
|
||||
cpu_set_available(0);
|
||||
cpu_set_online(0);
|
||||
}
|
||||
|
||||
int ml_init(uintptr_t arg)
|
||||
{
|
||||
multiboot_info_t *mb = (multiboot_info_t *)arg;
|
||||
@@ -105,7 +114,12 @@ int ml_init(uintptr_t arg)
|
||||
|
||||
pmap_bootstrap();
|
||||
|
||||
#ifdef KEXT_NET_DOORSTUCK_SOCKS_ACPI
|
||||
acpi_scan_cpu_topology();
|
||||
#else
|
||||
use_uniprocessor_topology();
|
||||
#endif
|
||||
|
||||
init_per_cpu_areas();
|
||||
|
||||
struct cpu_data *this_cpu = get_this_cpu();
|
||||
@@ -129,7 +143,10 @@ int ml_init(uintptr_t arg)
|
||||
sched_init();
|
||||
|
||||
device_init();
|
||||
|
||||
#ifdef KEXT_NET_DOORSTUCK_SOCKS_ACPI
|
||||
acpi_init();
|
||||
#endif
|
||||
|
||||
ml_int_enable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user