33 lines
815 B
C
33 lines
815 B
C
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "uacpi/uacpi.h"
|
|
#include "uacpi/utilities.h"
|
|
#include "hal/hal.h"
|
|
#include "kprintf.h"
|
|
#include "dlmalloc/malloc.h"
|
|
|
|
#define PREINIT_BUFFER_SIZE 0x1000
|
|
|
|
void acpi_init(void) {
|
|
uacpi_status ret;
|
|
|
|
void *preinit_buffer = dlmalloc(PREINIT_BUFFER_SIZE);
|
|
ret = uacpi_setup_early_table_access(preinit_buffer, PREINIT_BUFFER_SIZE);
|
|
if (uacpi_unlikely_error(ret)) {
|
|
ERR("acpi", "init err %s\n", uacpi_status_to_string(ret));
|
|
hal_hang();
|
|
}
|
|
|
|
/* if (uacpi_unlikely_error(ret)) { */
|
|
/* ERR("acpi", "init err %s\n", uacpi_status_to_string(ret)); */
|
|
/* hal_hang(); */
|
|
/* } */
|
|
|
|
/* if (uacpi_unlikely_error(ret)) { */
|
|
/* ERR("acpi", "init err %s\n", uacpi_status_to_string(ret)); */
|
|
/* hal_hang(); */
|
|
/* } */
|
|
|
|
LOG("hal", "acpi init\n");
|
|
}
|