diff options
author | Damien Zammit <damien@zamaudio.com> | 2020-04-24 16:02:20 +1000 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2020-04-24 16:02:20 +1000 |
commit | 62502d9f692fd9801022404cd6c14d172398887c (patch) | |
tree | b770d480084ec8b7f1dddfeea36e21d818b5dba5 | |
parent | 28dc986f26f1ab15a345beaf14172e375a846dd9 (diff) |
acpica: Init tables in model_dep.c
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | acpica/Makefrag.am | 2 | ||||
-rw-r--r-- | acpica/acpi_init.c | 10 | ||||
-rw-r--r-- | acpica/acpi_init.h | 8 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 7 |
5 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 2bfdcee9..b78adea9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,7 +49,8 @@ AM_CPPFLAGS += \ -I. \ -I$(top_srcdir)/$(systype) \ -I$(top_srcdir)/$(systype)/include/mach/sa \ - -I$(top_srcdir)/include + -I$(top_srcdir)/include \ + -I$(top_srcdir)/acpica/src/include AM_CFLAGS += \ -fno-builtin-log diff --git a/acpica/Makefrag.am b/acpica/Makefrag.am index d5a0a42e..8b5e3c06 100644 --- a/acpica/Makefrag.am +++ b/acpica/Makefrag.am @@ -40,9 +40,11 @@ libacpica_a_CPPFLAGS = $(AM_CPPFLAGS) \ # Optimize for small size libacpica_a_CFLAGS = -Os -D__KERNEL__ $(AM_CFLAGS) +# FIXME: Missing headers for this? # acpica/src/acpi/dsdebug.c libacpica_a_SOURCES = \ + acpica/acpi_init.c \ acpica/src/acpi/dsargs.c \ acpica/src/acpi/dscontrol.c \ acpica/src/acpi/dsfield.c \ diff --git a/acpica/acpi_init.c b/acpica/acpi_init.c new file mode 100644 index 00000000..3899983d --- /dev/null +++ b/acpica/acpi_init.c @@ -0,0 +1,10 @@ +#include "acpi_init.h" + +#define ACPI_MAX_TABLES 128 + +static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES]; + +void acpi_init(void) +{ + acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); +} diff --git a/acpica/acpi_init.h b/acpica/acpi_init.h new file mode 100644 index 00000000..f20c216c --- /dev/null +++ b/acpica/acpi_init.h @@ -0,0 +1,8 @@ +#ifndef ACPI_INIT_H +#define ACPI_INIT_H + +#include <acpi/acpi.h> + +void acpi_init(void); + +#endif diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index aaeed807..403e273c 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -137,6 +137,8 @@ vm_offset_t int_stack_top, int_stack_base; extern void linux_init(void); #endif +extern void acpi_init(void); + /* * Find devices. The system is alive. */ @@ -171,6 +173,11 @@ void machine_init(void) #endif /* + * ACPICA init + */ + acpi_init(); + + /* * Find the devices */ probeio(); |