29 lines
563 B
C
29 lines
563 B
C
#include <arch/acpi.h>
|
|
#include <socks/printk.h>
|
|
#include <socks/device.h>
|
|
#include <socks/libc/stdio.h>
|
|
|
|
static kern_status_t acpi_bus_scan(struct device *dev)
|
|
{
|
|
return KERN_OK;
|
|
}
|
|
|
|
static struct bus_device_ops acpi_ops = {
|
|
.scan = acpi_bus_scan,
|
|
};
|
|
|
|
kern_status_t acpi_init(void)
|
|
{
|
|
apic_init();
|
|
smp_init();
|
|
|
|
struct bus_device *acpi_dev = bus_device_create();
|
|
struct device *base = bus_device_base(acpi_dev);
|
|
acpi_dev->b_ops = &acpi_ops;
|
|
snprintf(base->dev_name, sizeof base->dev_name, "acpi");
|
|
|
|
device_register(base, root_device());
|
|
|
|
return KERN_OK;
|
|
}
|