diff --git a/.config b/.config index e95ca54c..76c64af0 100644 --- a/.config +++ b/.config @@ -1,3 +1,4 @@ # Size (in MB) of boot-time virtual address space coverage CONFIG_EARLY_VIRT_MEM=8 CONFIG_LIBPFM=n +CONFIG_ACPICA=y diff --git a/.gitignore b/.gitignore index 3dccf9ba..aefc5a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ cscope.* *.img Makeconf.local .DS_Store +drivers/acpi/acpica/source/ diff --git a/Makefile b/Makefile index bf9f2976..e438f5b5 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ PFMLIB_INCLUDE := ifeq ($(CONFIG_LIBPFM),y) KTF_PFMLIB_COMPILE := 1 export KTF_PFMLIB_COMPILE -TAR_CMD := tar --exclude=.git --exclude=.gitignore --strip-components=1 -xvf +TAR_CMD_PFMLIB := tar --exclude=.git --exclude=.gitignore --strip-components=1 -xvf PFMLIB_VER := 4.10.1 PFMLIB_NAME := libpfm PFMLIB_DIR := $(KTF_ROOT)/$(THIRD_PARTY)/$(PFMLIB_NAME) @@ -47,6 +47,27 @@ PFMLIB_LINKER_FLAGS += -L$(PFMLIB_DIR) -lpfm PFMLIB_INCLUDE += $(PFMLIB_DIR)/include endif +ACPICA_DEST_DIR := $(KTF_ROOT)/drivers/acpi/acpica +ifeq ($(CONFIG_ACPICA),y) +TAR_CMD_ACPICA := tar --exclude=.git --exclude=.gitignore --strip-components=1 -C $(ACPICA_DEST_DIR) -xf +ACPICA_VER := unix-20210730 +ACPICA_NAME := acpica +ACPICA_DIR := $(KTF_ROOT)/$(THIRD_PARTY)/$(ACPICA_NAME) +ACPICA_TARBALL := $(ACPICA_DIR)/$(ACPICA_NAME)-$(ACPICA_VER).tar.gz +ACPICA_PATCH := $(ACPICA_DIR)/acpica_ktf.patch +ACPICA_UNTAR_DIRS := $(ACPICA_NAME)-$(ACPICA_VER)/source/components/dispatcher +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/events +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/executer +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/hardware +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/namespace +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/parser +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/resources +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/tables +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/components/utilities +ACPICA_UNTAR_DIRS += $(ACPICA_NAME)-$(ACPICA_VER)/source/include +ACPICA_INCLUDE := $(ACPICA_DEST_DIR)/source/include +endif + ifeq ($(CC),cc) # overwrite on default, otherwise use whatever is in the CC env variable CC := gcc endif @@ -75,13 +96,20 @@ COMMON_INCLUDES := -I$(KTF_ROOT)/include -I$(KTF_ROOT)/include/arch/x86 ifeq ($(CONFIG_LIBPFM),y) COMMON_INCLUDES += -I$(PFMLIB_INCLUDE) endif +ifeq ($(CONFIG_ACPICA),y) +COMMON_INCLUDES += -I$(ACPICA_INCLUDE) +endif -COMMON_FLAGS := $(COMMON_INCLUDES) -pipe -MP -MMD -m64 -D__x86_64__ -DEARLY_VIRT_MEM=$(CONFIG_EARLY_VIRT_MEM) +COMMON_FLAGS := $(COMMON_INCLUDES) -pipe -MP -MMD -m64 -D__x86_64__ -D__KTF__ -DEARLY_VIRT_MEM=$(CONFIG_EARLY_VIRT_MEM) ifeq ($(CONFIG_LIBPFM),y) COMMON_FLAGS += -DKTF_PMU endif +ifeq ($(CONFIG_ACPICA),y) +COMMON_FLAGS += -DKTF_ACPICA +endif + AFLAGS := $(COMMON_FLAGS) -D__ASSEMBLY__ -nostdlib -nostdinc CFLAGS := $(COMMON_FLAGS) -std=gnu99 -O3 -g -Wall -Wextra -ffreestanding -nostdlib -nostdinc CFLAGS += -mno-red-zone -mno-mmx -mno-sse -mno-sse2 @@ -96,6 +124,13 @@ endif -include Makeconf.local +ifeq ($(CONFIG_ACPICA),y) +ACPICA_INSTALL := $(shell [ -d $(ACPICA_DEST_DIR)/source ] || \ + $(TAR_CMD_ACPICA) $(ACPICA_TARBALL) $(ACPICA_UNTAR_DIRS) && \ + $(PATCH) -p0 < $(ACPICA_PATCH) && \ + $(SYMLINK) $(ACPICA_DEST_DIR)/acktf.h $(ACPICA_DEST_DIR)/source/include/platform/acktf.h) +endif + SOURCES := $(shell find . -name \*.c) HEADERS := $(shell find . -name \*.h) ASM_SOURCES := $(shell find . -name \*.S) @@ -139,7 +174,7 @@ $(PFMLIB_ARCHIVE): $(PFMLIB_TARBALL) @echo "UNTAR pfmlib" # untar tarball and apply the patch cd $(PFMLIB_DIR) &&\ - $(TAR_CMD) $(PFMLIB_TARBALL) $(PFMLIB_UNTAR_FILES) -C ./ &&\ + $(TAR_CMD_PFMLIB) $(PFMLIB_TARBALL) $(PFMLIB_UNTAR_FILES) -C ./ &&\ $(PATCH) -p1 < $(PFMLIB_PATCH_FILE) &&\ cd - # invoke libpfm build @@ -171,6 +206,7 @@ ifeq ($(CONFIG_LIBPFM),y) $(MAKE) -C $(PFMLIB_DIR) cleanlib $(VERBOSE) find $(PFMLIB_DIR) -mindepth 1 ! -name $(PFMLIB_NAME)-$(PFMLIB_VER).tar.gz -delete endif + $(VERBOSE) $(RM) -rf $(ACPICA_DEST_DIR)/source # Check whether we can use kvm for qemu ifeq ($(SYSTEM),LINUX) @@ -265,7 +301,7 @@ dockerimage: .PHONY: docker% docker%: dockerimage @echo "running target '$(strip $(subst :,, $*))' in docker" - $(VERBOSE) docker run -t $(DOCKERUSERFLAGS) -e UNITTEST=$(UNITTEST) -e CONFIG_LIBPFM=$(CONFIG_LIBPFM) -v $(PWD):$(PWD)$(DOCKER_MOUNT_OPTS) -w $(PWD) $(DOCKERIMAGE) bash -c "make -j $(strip $(subst :,, $*))" + $(VERBOSE) docker run -t $(DOCKERUSERFLAGS) -e UNITTEST=$(UNITTEST) -e CONFIG_LIBPFM=$(CONFIG_LIBPFM) -e CONFIG_ACPICA=$(CONFIG_ACPICA) -v $(PWD):$(PWD)$(DOCKER_MOUNT_OPTS) -w $(PWD) $(DOCKERIMAGE) bash -c "make -j $(strip $(subst :,, $*))" .PHONY: onelinescan onelinescan: diff --git a/THIRD-PARTY-LICENSES b/THIRD-PARTY-LICENSES index 973f32a5..678b1273 100644 --- a/THIRD-PARTY-LICENSES +++ b/THIRD-PARTY-LICENSES @@ -19,3 +19,40 @@ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIG HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ACPI Component Architecture (ACPICA) -- https://acpica.org/ + 1. Copyright Notice + + Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. + All rights reserved. + + 2. License + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer, + without modification. + 2. Redistributions in binary form must reproduce at minimum a disclaimer + substantially similar to the "NO WARRANTY" disclaimer below + ("Disclaimer") and any redistribution must be conditioned upon + including a substantially similar Disclaimer requirement for further + binary redistribution. + 3. Neither the names of the above-listed copyright holders nor the names + of any contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/common/acpi.c b/common/acpi.c index 9497ed5d..174c804c 100644 --- a/common/acpi.c +++ b/common/acpi.c @@ -22,7 +22,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#ifndef KTF_ACPICA +#include #include #include #include @@ -439,3 +440,75 @@ int init_acpi(unsigned bsp_cpu_id) { return process_madt_entries(bsp_cpu_id); } +#else /* KTF_ACPICA */ +#include +#include +#include +#include + +#include "acpi.h" + +static unsigned nr_cpus; + +/* ACPI initialization and termination functions */ + +static ACPI_STATUS InitializeFullAcpi(void) { + ACPI_STATUS status; + + /* Initialize the ACPICA subsystem */ + status = AcpiInitializeSubsystem(); + if (ACPI_FAILURE(status)) + return status; + + /* Initialize the ACPICA Table Manager and get all ACPI tables */ + status = AcpiInitializeTables(NULL, 16, true); + if (ACPI_FAILURE(status)) + return status; + + /* Create the ACPI namespace from ACPI tables */ + status = AcpiLoadTables(); + if (ACPI_FAILURE(status)) + return status; + + /* Note: Local handlers should be installed here */ + /* Initialize the ACPI hardware */ + status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION); + if (ACPI_FAILURE(status)) + return status; + + /* Complete the ACPI namespace object initialization */ + status = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); + if (ACPI_FAILURE(status)) + return status; + + return AE_OK; +} + +unsigned acpi_get_nr_cpus(void) { return nr_cpus; } + +void *acpi_find_table(char *signature) { + ACPI_TABLE_HEADER *hdr; + + AcpiGetTable(signature, 1, &hdr); + return hdr; +} + +void acpi_walk_subtables(ACPI_SUBTABLE_HEADER *entry, uint32_t length, + acpi_subtable_parser_t parser, void *arg) { + ACPI_SUBTABLE_HEADER *stop = (void *) entry + length; + + while (entry < stop && entry->Length >= sizeof(*entry)) { + parser(entry, arg); + entry = ACPI_ADD_PTR(ACPI_SUBTABLE_HEADER, entry, entry->Length); + } +} + +ACPI_STATUS init_acpi(unsigned bsp_cpu_id) { + ACPI_STATUS status; + + printk("Initializing ACPI support\n"); + + status = InitializeFullAcpi(); + return status; +} +#endif /* KTF_ACPICA */ diff --git a/common/setup.c b/common/setup.c index c9295826..7c38ff27 100644 --- a/common/setup.c +++ b/common/setup.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include #include #include @@ -262,8 +262,15 @@ void __noreturn __text_init kernel_start(uint32_t multiboot_magic, init_slab(); - if (init_acpi(get_bsp_cpu_id()) < 0 && init_mptables() < 0) { - BUG(); + /* Try to initialize ACPI (and MADT) */ +#ifndef KTF_ACPICA + if (init_acpi(get_bsp_cpu_id()) < 0) { +#else + if (ACPI_FAILURE(init_acpi(get_bsp_cpu_id()))) { +#endif + /* Fallback to MP tables when no ACPI */ + if (init_mptables() < 0) + BUG(); } init_vga_console(); diff --git a/drivers/acpi/acpica/acktf.h b/drivers/acpi/acpica/acktf.h new file mode 100644 index 00000000..0913097d --- /dev/null +++ b/drivers/acpi/acpica/acktf.h @@ -0,0 +1,101 @@ +/****************************************************************************** + * + * Name: acktf.h - OS specific defines, etc. for KTF + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. + * All rights reserved. + * + * 2. License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#ifdef KTF_ACPICA + +#ifndef __ACKTF_H__ +#define __ACKTF_H__ + +/* Common (in-kernel/user-space) ACPICA configuration */ + +#define ACPI_USE_SYSTEM_CLIBRARY +#define ACPI_USE_DO_WHILE_0 +#define ACPI_USE_LOCAL_CACHE + +/* Kernel specific ACPICA configuration */ + +#define ACPI_DEBUG_OUTPUT + +#include +#include + +#include "acenv.h" + +#define ACPI_INIT_FUNCTION +#define ACPI_CACHE_T ACPI_MEMORY_LIST + +/* Host-dependent types and defines for in-kernel ACPICA */ + +#define ACPI_EXPORT_SYMBOL(symbol) + +#define ACPI_SPINLOCK spinlock_t * +#define ACPI_CPU_FLAGS unsigned long + +#define ACPI_MSG_ERROR "ACPI Error: " +#define ACPI_MSG_EXCEPTION "ACPI Exception: " +#define ACPI_MSG_WARNING "ACPI Warning: " +#define ACPI_MSG_INFO "ACPI: " + +#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): " +#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): " + +#ifndef __init +#define __init +#endif +#ifndef __iomem +#define __iomem +#endif + +#if defined(__x86_64__) +#define ACPI_MACHINE_WIDTH 64 +#define COMPILER_DEPENDENT_INT64 long +#define COMPILER_DEPENDENT_UINT64 unsigned long +#else +#define ACPI_MACHINE_WIDTH 32 +#define COMPILER_DEPENDENT_INT64 long long +#define COMPILER_DEPENDENT_UINT64 unsigned long long +#endif + +#endif /* __ACKTF_H__ */ +#endif /* KTF_ACPICA */ diff --git a/drivers/hpet.c b/drivers/hpet.c index 66b69a5f..828c2e00 100644 --- a/drivers/hpet.c +++ b/drivers/hpet.c @@ -23,33 +23,46 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include bool init_hpet(uint8_t dst_cpus) { +#ifndef KTF_ACPICA acpi_hpet_t *hpet; +#else + ACPI_TABLE_HPET *hpet; +#endif mfn_t hpet_base_mfn; volatile acpi_hpet_timer_t *config; volatile acpi_hpet_general_t *general; volatile uint64_t *main_counter; + uint64_t address; printk("Initializing HPET\n"); +#ifndef KTF_ACPICA hpet = (acpi_hpet_t *) acpi_find_table(HPET_SIGNATURE); +#else + hpet = (ACPI_TABLE_HPET *) acpi_find_table(ACPI_SIG_HPET); +#endif if (!hpet) { printk("HPET not initialized\n"); return false; } - hpet_base_mfn = paddr_to_mfn(hpet->address.address); - vmap_4k((uint64_t *) hpet->address.address, hpet_base_mfn, L1_PROT); - config = (acpi_hpet_timer_t *) (hpet->address.address + - HPET_OFFSET_TIMER_0_CONFIG_CAP_REG); - general = - (acpi_hpet_general_t *) (hpet->address.address + HPET_OFFSET_GENERAL_CAP_REG); - main_counter = - (uint64_t *) (hpet->address.address + HPET_OFFSET_GENERAL_MAIN_COUNTER_REG); +#ifndef KTF_ACPICA + address = hpet->address.address; +#else + address = hpet->Address.Address; +#endif + + hpet_base_mfn = paddr_to_mfn(address); + vmap_4k(_ptr(address), hpet_base_mfn, L1_PROT); + config = (acpi_hpet_timer_t *) (address + HPET_OFFSET_TIMER_0_CONFIG_CAP_REG); + general = (acpi_hpet_general_t *) (address + HPET_OFFSET_GENERAL_CAP_REG); + main_counter = (uint64_t *) (address + HPET_OFFSET_GENERAL_MAIN_COUNTER_REG); general->enabled = 0; diff --git a/include/acpi.h b/include/acpi_ktf.h similarity index 93% rename from include/acpi.h rename to include/acpi_ktf.h index 028f199b..852d67b4 100644 --- a/include/acpi.h +++ b/include/acpi_ktf.h @@ -25,6 +25,7 @@ #ifndef KTF_ACPI_H #define KTF_ACPI_H +#ifndef KTF_ACPICA #include #include #include @@ -268,4 +269,26 @@ extern acpi_table_t *acpi_find_table(uint32_t signature); extern unsigned acpi_get_nr_cpus(void); extern int init_acpi(unsigned bsp_cpu_id); +#else /* KTF_ACPICA */ + +#include +#include +#include +#include + +#include "acpi.h" + +typedef void (*acpi_subtable_parser_t)(ACPI_SUBTABLE_HEADER *entry, void *arg); + +/* External Declarations */ + +extern unsigned acpi_get_nr_cpus(void); + +extern void *acpi_find_table(char *signature); +extern void acpi_walk_subtables(ACPI_SUBTABLE_HEADER *entry, uint32_t length, + acpi_subtable_parser_t parser, void *arg); + +extern ACPI_STATUS init_acpi(unsigned bsp_cpu_id); + +#endif /* KTF_ACPICA */ #endif /* KTF_ACPI_H */ diff --git a/include/drivers/hpet.h b/include/drivers/hpet.h index 0c22f00a..aa9f122b 100644 --- a/include/drivers/hpet.h +++ b/include/drivers/hpet.h @@ -27,13 +27,19 @@ #ifndef KTF_HPET_H #define KTF_HPET_H +#ifndef KTF_ACPICA +#include +#else #include +#endif #include -#define HPET_SIGNATURE (('H') | ('P' << 8) | ('E' << 16) | ('T' << 24)) #define HPET_IRQ PIT_IRQ #define HPET_IRQ_OFFSET PIT_IRQ0_OFFSET +#ifndef KTF_ACPICA +#define HPET_SIGNATURE (('H') | ('P' << 8) | ('E' << 16) | ('T' << 24)) + struct acpi_hpet { acpi_table_hdr_t header; uint8_t hardware_rev_id; @@ -48,6 +54,7 @@ struct acpi_hpet { uint8_t page_protection; } __packed; typedef struct acpi_hpet acpi_hpet_t; +#endif struct acpi_hpet_timer { uint64_t resv0 : 1; diff --git a/lib/string.c b/lib/string.c index 22873084..d1b76fe7 100644 --- a/lib/string.c +++ b/lib/string.c @@ -193,6 +193,7 @@ long strtol(const char *nptr, char **endptr, int base) return (acc); } +#ifndef KTF_ACPICA static char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz"; /* @@ -506,3 +507,4 @@ int snprintf(char *buf, size_t size, const char *fmt, ...) { return retval; } /* clang-format on */ +#endif diff --git a/smp/smp.c b/smp/smp.c index e264d347..4f81e139 100644 --- a/smp/smp.c +++ b/smp/smp.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include #include #include diff --git a/third-party/acpica/acpica-unix-20210730.tar.gz b/third-party/acpica/acpica-unix-20210730.tar.gz new file mode 100644 index 00000000..d4341f8c Binary files /dev/null and b/third-party/acpica/acpica-unix-20210730.tar.gz differ diff --git a/third-party/acpica/acpica_ktf.patch b/third-party/acpica/acpica_ktf.patch new file mode 100644 index 00000000..dfac90fe --- /dev/null +++ b/third-party/acpica/acpica_ktf.patch @@ -0,0 +1,13 @@ +--- drivers/acpi/acpica/source/include/platform/acenv.h 2021-07-30 17:20:33.000000000 +0200 +@@ -305,7 +305,10 @@ + + #endif + +-#if defined(_LINUX) || defined(__linux__) ++#if defined(__KTF__) ++#include "acktf.h" ++ ++#elif defined(_LINUX) || defined(__linux__) + #include "aclinux.h" + + #elif defined(_APPLE) || defined(__APPLE__)