1# Copyright (c) 2023 Intel Corporation 2# SPDX-License-Identifier: Apache-2.0 3 4if(CONFIG_ACPI) 5 set(ACPI_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/) 6 set(INC_DIR ${ACPI_DIR}/source/include/) 7 set(SRC_DIR ${ACPI_DIR}/source) 8 set(COMP_DIR ${ACPI_DIR}/source/components) 9 set(PARENT_SRC_DIR ${ACPI_DIR}../../zephyr) 10 set(ACPI_PARENT_DIR ${ACPI_DIR}/../) 11 12 zephyr_include_directories( 13 ${PARENT_SRC_DIR}/include/ 14 ${ACPI_PARENT_DIR}/ 15 ${INC_DIR}/ 16 ${INC_DIR}/platform/ 17 ${SRC_DIR}/compiler/ 18 ${ZEPHYR_CURRENT_MODULE_DIR}/generate/zephyr/ 19 ${SRC_DIR}/tools/acpiexec/ 20 ${SRC_DIR}/tools/acpidump/ 21 ) 22 23 zephyr_library() 24 25 add_compile_definitions(__ZEPHYR__) 26 add_compile_definitions(ACPI_DEBUG_OUTPUT) 27 add_compile_definitions(ACPI_EXAMPLE_APP) 28 add_compile_definitions(CONFIG_EXTERNAL_LIBC) 29 30 get_filename_component(libname "${SRC_DIR}/common/" NAME) 31 32 if(CONFIG_ACPI_DSDT_SUPPORT) 33 zephyr_library_sources( 34 ${COMP_DIR}/dispatcher/dsargs.c 35 ${COMP_DIR}/dispatcher/dscontrol.c 36 ${COMP_DIR}/dispatcher/dsdebug.c 37 ${COMP_DIR}/dispatcher/dsfield.c 38 ${COMP_DIR}/dispatcher/dsinit.c 39 ${COMP_DIR}/dispatcher/dsmethod.c 40 ${COMP_DIR}/dispatcher/dsmthdat.c 41 ${COMP_DIR}/dispatcher/dsobject.c 42 ${COMP_DIR}/dispatcher/dsopcode.c 43 ${COMP_DIR}/dispatcher/dspkginit.c 44 ${COMP_DIR}/dispatcher/dsutils.c 45 ${COMP_DIR}/dispatcher/dswexec.c 46 ${COMP_DIR}/dispatcher/dswload.c 47 ${COMP_DIR}/dispatcher/dswload2.c 48 ${COMP_DIR}/dispatcher/dswscope.c 49 ${COMP_DIR}/dispatcher/dswstate.c 50 ${COMP_DIR}/events/evhandler.c 51 ${COMP_DIR}/events/evmisc.c 52 ${COMP_DIR}/events/evregion.c 53 ${COMP_DIR}/events/evrgnini.c 54 ${COMP_DIR}/events/evxface.c 55 ${COMP_DIR}/events/evxfregn.c 56 ${COMP_DIR}/executer/exconcat.c 57 ${COMP_DIR}/executer/exconfig.c 58 ${COMP_DIR}/executer/exconvrt.c 59 ${COMP_DIR}/executer/excreate.c 60 ${COMP_DIR}/executer/exdebug.c 61 ${COMP_DIR}/executer/exdump.c 62 ${COMP_DIR}/executer/exfield.c 63 ${COMP_DIR}/executer/exfldio.c 64 ${COMP_DIR}/executer/exmisc.c 65 ${COMP_DIR}/executer/exmutex.c 66 ${COMP_DIR}/executer/exnames.c 67 ${COMP_DIR}/executer/exoparg1.c 68 ${COMP_DIR}/executer/exoparg2.c 69 ${COMP_DIR}/executer/exoparg3.c 70 ${COMP_DIR}/executer/exoparg6.c 71 ${COMP_DIR}/executer/exprep.c 72 ${COMP_DIR}/executer/exregion.c 73 ${COMP_DIR}/executer/exresnte.c 74 ${COMP_DIR}/executer/exresolv.c 75 ${COMP_DIR}/executer/exresop.c 76 ${COMP_DIR}/executer/exserial.c 77 ${COMP_DIR}/executer/exstore.c 78 ${COMP_DIR}/executer/exstoren.c 79 ${COMP_DIR}/executer/exstorob.c 80 ${COMP_DIR}/executer/exsystem.c 81 ${COMP_DIR}/executer/extrace.c 82 ${COMP_DIR}/executer/exutils.c 83 ${COMP_DIR}/hardware/hwpci.c 84 ${COMP_DIR}/namespace/nsaccess.c 85 ${COMP_DIR}/namespace/nsalloc.c 86 ${COMP_DIR}/namespace/nsarguments.c 87 ${COMP_DIR}/namespace/nsconvert.c 88 ${COMP_DIR}/namespace/nsdump.c 89 ${COMP_DIR}/namespace/nseval.c 90 ${COMP_DIR}/namespace/nsinit.c 91 ${COMP_DIR}/namespace/nsload.c 92 ${COMP_DIR}/namespace/nsnames.c 93 ${COMP_DIR}/namespace/nsobject.c 94 ${COMP_DIR}/namespace/nsparse.c 95 ${COMP_DIR}/namespace/nspredef.c 96 ${COMP_DIR}/namespace/nsprepkg.c 97 ${COMP_DIR}/namespace/nsrepair.c 98 ${COMP_DIR}/namespace/nsrepair2.c 99 ${COMP_DIR}/namespace/nssearch.c 100 ${COMP_DIR}/namespace/nsutils.c 101 ${COMP_DIR}/namespace/nswalk.c 102 ${COMP_DIR}/namespace/nsxfeval.c 103 ${COMP_DIR}/namespace/nsxfname.c 104 ${COMP_DIR}/namespace/nsxfobj.c 105 ${COMP_DIR}/parser/psargs.c 106 ${COMP_DIR}/parser/psloop.c 107 ${COMP_DIR}/parser/psobject.c 108 ${COMP_DIR}/parser/psopcode.c 109 ${COMP_DIR}/parser/psopinfo.c 110 ${COMP_DIR}/parser/psparse.c 111 ${COMP_DIR}/parser/psscope.c 112 ${COMP_DIR}/parser/pstree.c 113 ${COMP_DIR}/parser/psutils.c 114 ${COMP_DIR}/parser/pswalk.c 115 ${COMP_DIR}/parser/psxface.c 116 ${COMP_DIR}/resources/rsxface.c 117 ${COMP_DIR}/resources/rsutils.c 118 ${COMP_DIR}/resources/rsaddr.c 119 ${COMP_DIR}/resources/rscalc.c 120 ${COMP_DIR}/resources/rscreate.c 121 ${COMP_DIR}/resources/rsdumpinfo.c 122 ${COMP_DIR}/resources/rsinfo.c 123 ${COMP_DIR}/resources/rsio.c 124 ${COMP_DIR}/resources/rsirq.c 125 ${COMP_DIR}/resources/rslist.c 126 ${COMP_DIR}/resources/rsmemory.c 127 ${COMP_DIR}/resources/rsmisc.c 128 ${COMP_DIR}/resources/rsserial.c 129 ) 130 endif() 131 zephyr_library_sources( 132 ${COMP_DIR}/tables/tbdata.c 133 ${COMP_DIR}/tables/tbfadt.c 134 ${COMP_DIR}/tables/tbfind.c 135 ${COMP_DIR}/tables/tbinstal.c 136 ${COMP_DIR}/tables/tbprint.c 137 ${COMP_DIR}/tables/tbutils.c 138 ${COMP_DIR}/tables/tbxface.c 139 ${COMP_DIR}/tables/tbxfload.c 140 ${COMP_DIR}/tables/tbxfroot.c 141 ${COMP_DIR}/utilities/utaddress.c 142 ${COMP_DIR}/utilities/utalloc.c 143 ${COMP_DIR}/utilities/utascii.c 144 ${COMP_DIR}/utilities/utbuffer.c 145 ${COMP_DIR}/utilities/utcache.c 146 ${COMP_DIR}/utilities/utcksum.c 147 ${COMP_DIR}/utilities/utcopy.c 148 ${COMP_DIR}/utilities/utdebug.c 149 ${COMP_DIR}/utilities/utdecode.c 150 ${COMP_DIR}/utilities/utdelete.c 151 ${COMP_DIR}/utilities/uterror.c 152 ${COMP_DIR}/utilities/uteval.c 153 ${COMP_DIR}/utilities/utexcep.c 154 ${COMP_DIR}/utilities/utglobal.c 155 ${COMP_DIR}/utilities/uthex.c 156 ${COMP_DIR}/utilities/utids.c 157 ${COMP_DIR}/utilities/utinit.c 158 ${COMP_DIR}/utilities/utlock.c 159 ${COMP_DIR}/utilities/utmath.c 160 ${COMP_DIR}/utilities/utmisc.c 161 ${COMP_DIR}/utilities/utmutex.c 162 ${COMP_DIR}/utilities/utobject.c 163 ${COMP_DIR}/utilities/utosi.c 164 ${COMP_DIR}/utilities/utownerid.c 165 ${COMP_DIR}/utilities/utnonansi.c 166 ${COMP_DIR}/utilities/utpredef.c 167 ${COMP_DIR}/utilities/utresrc.c 168 ${COMP_DIR}/utilities/utstate.c 169 ${COMP_DIR}/utilities/utstring.c 170 ${COMP_DIR}/utilities/utstrsuppt.c 171 ${COMP_DIR}/utilities/utstrtoul64.c 172 ${COMP_DIR}/utilities/utxface.c 173 ${COMP_DIR}/utilities/utxferror.c 174 ${COMP_DIR}/utilities/utxfinit.c 175 ${COMP_DIR}/utilities/utresdecode.c 176 ${COMP_DIR}/hardware/hwvalid.c 177 ${SRC_DIR}/os_specific/service_layers/oszephyr.c 178 ) 179endif() 180