Files
mango/kexts/drivers/bus/acpi/acpi.c

32 lines
680 B
C
Raw Normal View History

2023-02-09 19:09:07 +00:00
#include <arch/acpi.h>
#include <socks/printk.h>
2023-05-08 18:19:12 +01:00
#include <socks/device.h>
2023-06-09 21:25:53 +01:00
#include <socks/kext.h>
2023-05-08 18:19:12 +01:00
#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,
};
2023-02-09 19:09:07 +00:00
kern_status_t acpi_init(void)
{
apic_init();
smp_init();
2023-05-08 18:19:12 +01:00
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, system_driver(), root_device());
2023-05-08 18:19:12 +01:00
2023-02-09 19:09:07 +00:00
return KERN_OK;
}
2023-06-09 21:25:53 +01:00
DEFINE_KEXT("net.doorstuck.socks.acpi", NULL, NULL, KEXT_NO_DEPENDENCIES);