diff --git a/ports/acpica/build.sh b/ports/acpica/build.sh index 64005cb..6ad0b20 100755 --- a/ports/acpica/build.sh +++ b/ports/acpica/build.sh @@ -1,165 +1,182 @@ -CC=x86_64-elf-gcc -CFLAGS=-I. -O0 -D_ACPICA_ESSENCE -D_GNU_SOURCE -std=c99 -Wall -Wextra -ffreestanding -mcmodel=large -g -Wno-unused-parameter -mno-red-zone +set -e -$CC -c dsargs.c $CFLAGS -$CC -c dscontrol.c $CFLAGS -$CC -c dsdebug.c $CFLAGS -$CC -c dsfield.c $CFLAGS -$CC -c dsinit.c $CFLAGS -$CC -c dsmethod.c $CFLAGS -$CC -c dsmthdat.c $CFLAGS -$CC -c dsobject.c $CFLAGS -$CC -c dsopcode.c $CFLAGS -$CC -c dspkginit.c $CFLAGS -$CC -c dsutils.c $CFLAGS -$CC -c dswexec.c $CFLAGS -$CC -c dswload.c $CFLAGS -$CC -c dswload2.c $CFLAGS -$CC -c dswscope.c $CFLAGS -$CC -c dswstate.c $CFLAGS -$CC -c evevent.c $CFLAGS -$CC -c evglock.c $CFLAGS -$CC -c evgpe.c $CFLAGS -$CC -c evgpeblk.c $CFLAGS -$CC -c evgpeinit.c $CFLAGS -$CC -c evgpeutil.c $CFLAGS -$CC -c evhandler.c $CFLAGS -$CC -c evmisc.c $CFLAGS -$CC -c evregion.c $CFLAGS -$CC -c evrgnini.c $CFLAGS -$CC -c evsci.c $CFLAGS -$CC -c evxface.c $CFLAGS -$CC -c evxfevnt.c $CFLAGS -$CC -c evxfgpe.c $CFLAGS -$CC -c evxfregn.c $CFLAGS -$CC -c exconcat.c $CFLAGS -$CC -c exconfig.c $CFLAGS -$CC -c exconvrt.c $CFLAGS -$CC -c excreate.c $CFLAGS -$CC -c exdebug.c $CFLAGS -$CC -c exdump.c $CFLAGS -$CC -c exfield.c $CFLAGS -$CC -c exfldio.c $CFLAGS -$CC -c exmisc.c $CFLAGS -$CC -c exmutex.c $CFLAGS -$CC -c exnames.c $CFLAGS -$CC -c exoparg1.c $CFLAGS -$CC -c exoparg2.c $CFLAGS -$CC -c exoparg3.c $CFLAGS -$CC -c exoparg6.c $CFLAGS -$CC -c exprep.c $CFLAGS -$CC -c exregion.c $CFLAGS -$CC -c exresnte.c $CFLAGS -$CC -c exresolv.c $CFLAGS -$CC -c exresop.c $CFLAGS -$CC -c exstore.c $CFLAGS -$CC -c exstoren.c $CFLAGS -$CC -c exstorob.c $CFLAGS -$CC -c exsystem.c $CFLAGS -$CC -c extrace.c $CFLAGS -$CC -c exutils.c $CFLAGS -$CC -c hwacpi.c $CFLAGS -$CC -c hwesleep.c $CFLAGS -$CC -c hwgpe.c $CFLAGS -$CC -c hwpci.c $CFLAGS -$CC -c hwregs.c $CFLAGS -$CC -c hwsleep.c $CFLAGS -$CC -c hwtimer.c $CFLAGS -$CC -c hwvalid.c $CFLAGS -$CC -c hwxface.c $CFLAGS -$CC -c hwxfsleep.c $CFLAGS -$CC -c nsaccess.c $CFLAGS -$CC -c nsalloc.c $CFLAGS -$CC -c nsarguments.c $CFLAGS -$CC -c nsconvert.c $CFLAGS -$CC -c nsdump.c $CFLAGS -$CC -c nsdumpdv.c $CFLAGS -$CC -c nseval.c $CFLAGS -$CC -c nsinit.c $CFLAGS -$CC -c nsload.c $CFLAGS -$CC -c nsnames.c $CFLAGS -$CC -c nsobject.c $CFLAGS -$CC -c nsparse.c $CFLAGS -$CC -c nspredef.c $CFLAGS -$CC -c nsprepkg.c $CFLAGS -$CC -c nsrepair.c $CFLAGS -$CC -c nsrepair2.c $CFLAGS -$CC -c nssearch.c $CFLAGS -$CC -c nsutils.c $CFLAGS -$CC -c nswalk.c $CFLAGS -$CC -c nsxfeval.c $CFLAGS -$CC -c nsxfname.c $CFLAGS -$CC -c nsxfobj.c $CFLAGS -$CC -c psargs.c $CFLAGS -$CC -c psloop.c $CFLAGS -$CC -c psobject.c $CFLAGS -$CC -c psopcode.c $CFLAGS -$CC -c psopinfo.c $CFLAGS -$CC -c psparse.c $CFLAGS -$CC -c psscope.c $CFLAGS -$CC -c pstree.c $CFLAGS -$CC -c psutils.c $CFLAGS -$CC -c pswalk.c $CFLAGS -$CC -c psxface.c $CFLAGS -$CC -c rsaddr.c $CFLAGS -$CC -c rscalc.c $CFLAGS -$CC -c rscreate.c $CFLAGS -$CC -c rsinfo.c $CFLAGS -$CC -c rsio.c $CFLAGS -$CC -c rsirq.c $CFLAGS -$CC -c rslist.c $CFLAGS -$CC -c rsmemory.c $CFLAGS -$CC -c rsmisc.c $CFLAGS -$CC -c rsserial.c $CFLAGS -$CC -c rsutils.c $CFLAGS -$CC -c rsxface.c $CFLAGS -$CC -c tbdata.c $CFLAGS -$CC -c tbfadt.c $CFLAGS -$CC -c tbfind.c $CFLAGS -$CC -c tbinstal.c $CFLAGS -$CC -c tbprint.c $CFLAGS -$CC -c tbutils.c $CFLAGS -$CC -c tbxface.c $CFLAGS -$CC -c tbxfload.c $CFLAGS -$CC -c tbxfroot.c $CFLAGS -$CC -c utaddress.c $CFLAGS -$CC -c utalloc.c $CFLAGS -$CC -c utascii.c $CFLAGS -$CC -c utbuffer.c $CFLAGS -$CC -c utcache.c $CFLAGS -$CC -c utclib.c $CFLAGS -$CC -c utcopy.c $CFLAGS -$CC -c utdebug.c $CFLAGS -$CC -c utdecode.c $CFLAGS -$CC -c utdelete.c $CFLAGS -$CC -c uterror.c $CFLAGS -$CC -c uteval.c $CFLAGS -$CC -c utexcep.c $CFLAGS -$CC -c utglobal.c $CFLAGS -$CC -c uthex.c $CFLAGS -$CC -c utids.c $CFLAGS -$CC -c utinit.c $CFLAGS -$CC -c utlock.c $CFLAGS -$CC -c utmath.c $CFLAGS -$CC -c utmisc.c $CFLAGS -$CC -c utmutex.c $CFLAGS -$CC -c utnonansi.c $CFLAGS -$CC -c utobject.c $CFLAGS -$CC -c utosi.c $CFLAGS -$CC -c utownerid.c $CFLAGS -$CC -c utpredef.c $CFLAGS -$CC -c utprint.c $CFLAGS -$CC -c utresdecode.c $CFLAGS -$CC -c utresrc.c $CFLAGS -$CC -c utstate.c $CFLAGS -$CC -c utstring.c $CFLAGS -$CC -c utstrsuppt.c $CFLAGS -$CC -c utstrtoul64.c $CFLAGS -$CC -c uttrack.c $CFLAGS -$CC -c utuuid.c $CFLAGS -$CC -c utxface.c $CFLAGS -$CC -c utxferror.c $CFLAGS -$CC -c utxfinit.c $CFLAGS -$CC -c utxfmutex.c $CFLAGS +CC=x86_64-essence-gcc +CFLAGS="-I../../../ports/acpica/include -O0 -D_ACPICA_ESSENCE -D_GNU_SOURCE -std=c99 -Wall -Wextra -ffreestanding -mcmodel=kernel -g -Wno-unused-parameter -mno-red-zone" -x86_64-elf-ar -rcs libacpica.a dsargs.o dscontrol.o dsdebug.o dsfield.o dsinit.o dsmethod.o dsmthdat.o dsobject.o dsopcode.o dspkginit.o dsutils.o dswexec.o dswload.o dswload2.o dswscope.o dswstate.o evevent.o evglock.o evgpe.o evgpeblk.o evgpeinit.o evgpeutil.o evhandler.o evmisc.o evregion.o evrgnini.o evsci.o evxface.o evxfevnt.o evxfgpe.o evxfregn.o exconcat.o exconfig.o exconvrt.o excreate.o exdebug.o exdump.o exfield.o exfldio.o exmisc.o exmutex.o exnames.o exoparg1.o exoparg2.o exoparg3.o exoparg6.o exprep.o exregion.o exresnte.o exresolv.o exresop.o exstore.o exstoren.o exstorob.o exsystem.o extrace.o exutils.o hwacpi.o hwesleep.o hwgpe.o hwpci.o hwregs.o hwsleep.o hwtimer.o hwvalid.o hwxface.o hwxfsleep.o nsaccess.o nsalloc.o nsarguments.o nsconvert.o nsdump.o nsdumpdv.o nseval.o nsinit.o nsload.o nsnames.o nsobject.o nsparse.o nspredef.o nsprepkg.o nsrepair.o nsrepair2.o nssearch.o nsutils.o nswalk.o nsxfeval.o nsxfname.o nsxfobj.o psargs.o psloop.o psobject.o psopcode.o psopinfo.o psparse.o psscope.o pstree.o psutils.o pswalk.o psxface.o rsaddr.o rscalc.o rscreate.o rsinfo.o rsio.o rsirq.o rslist.o rsmemory.o rsmisc.o rsserial.o rsutils.o rsxface.o tbdata.o tbfadt.o tbfind.o tbinstal.o tbprint.o tbutils.o tbxface.o tbxfload.o tbxfroot.o utaddress.o utalloc.o utascii.o utbuffer.o utcache.o utclib.o utcopy.o utdebug.o utdecode.o utdelete.o uterror.o uteval.o utexcep.o utglobal.o uthex.o utids.o utinit.o utlock.o utmath.o utmisc.o utmutex.o utnonansi.o utobject.o utosi.o utownerid.o utpredef.o utprint.o utresdecode.o utresrc.o utstate.o utstring.o utstrsuppt.o utstrtoul64.o uttrack.o utuuid.o utxface.o utxferror.o utxfinit.o utxfmutex.o +# mkdir essrc +# cp source/components/dispatcher/* essrc +# cp source/components/events/* essrc +# cp source/components/executer/* essrc +# cp source/components/hardware/* essrc +# cp source/components/namespace/* essrc +# cp source/components/parser/* essrc +# cp source/components/resources/* essrc +# cp source/components/tables/* essrc +# cp source/components/utilities/* essrc +# cd essrc + +$CC -c dsargs.c $CFLAGS +$CC -c dscontrol.c $CFLAGS +$CC -c dsdebug.c $CFLAGS +$CC -c dsfield.c $CFLAGS +$CC -c dsinit.c $CFLAGS +$CC -c dsmethod.c $CFLAGS +$CC -c dsmthdat.c $CFLAGS +$CC -c dsobject.c $CFLAGS +$CC -c dsopcode.c $CFLAGS +$CC -c dspkginit.c $CFLAGS +$CC -c dsutils.c $CFLAGS +$CC -c dswexec.c $CFLAGS +$CC -c dswload2.c $CFLAGS +$CC -c dswload.c $CFLAGS +$CC -c dswscope.c $CFLAGS +$CC -c dswstate.c $CFLAGS +$CC -c evevent.c $CFLAGS +$CC -c evglock.c $CFLAGS +$CC -c evgpeblk.c $CFLAGS +$CC -c evgpe.c $CFLAGS +$CC -c evgpeinit.c $CFLAGS +$CC -c evgpeutil.c $CFLAGS +$CC -c evhandler.c $CFLAGS +$CC -c evmisc.c $CFLAGS +$CC -c evregion.c $CFLAGS +$CC -c evrgnini.c $CFLAGS +$CC -c evsci.c $CFLAGS +$CC -c evxface.c $CFLAGS +$CC -c evxfevnt.c $CFLAGS +$CC -c evxfgpe.c $CFLAGS +$CC -c evxfregn.c $CFLAGS +$CC -c exconcat.c $CFLAGS +$CC -c exconfig.c $CFLAGS +$CC -c exconvrt.c $CFLAGS +$CC -c excreate.c $CFLAGS +$CC -c exdebug.c $CFLAGS +$CC -c exdump.c $CFLAGS +$CC -c exfield.c $CFLAGS +$CC -c exfldio.c $CFLAGS +$CC -c exmisc.c $CFLAGS +$CC -c exmutex.c $CFLAGS +$CC -c exnames.c $CFLAGS +$CC -c exoparg1.c $CFLAGS +$CC -c exoparg2.c $CFLAGS +$CC -c exoparg3.c $CFLAGS +$CC -c exoparg6.c $CFLAGS +$CC -c exprep.c $CFLAGS +$CC -c exregion.c $CFLAGS +$CC -c exresnte.c $CFLAGS +$CC -c exresolv.c $CFLAGS +$CC -c exresop.c $CFLAGS +$CC -c exserial.c $CFLAGS +$CC -c exstore.c $CFLAGS +$CC -c exstoren.c $CFLAGS +$CC -c exstorob.c $CFLAGS +$CC -c exsystem.c $CFLAGS +$CC -c extrace.c $CFLAGS +$CC -c exutils.c $CFLAGS +$CC -c hwacpi.c $CFLAGS +$CC -c hwesleep.c $CFLAGS +$CC -c hwgpe.c $CFLAGS +$CC -c hwpci.c $CFLAGS +$CC -c hwregs.c $CFLAGS +$CC -c hwsleep.c $CFLAGS +$CC -c hwtimer.c $CFLAGS +$CC -c hwvalid.c $CFLAGS +$CC -c hwxface.c $CFLAGS +$CC -c hwxfsleep.c $CFLAGS +$CC -c nsaccess.c $CFLAGS +$CC -c nsalloc.c $CFLAGS +$CC -c nsarguments.c $CFLAGS +$CC -c nsconvert.c $CFLAGS +$CC -c nsdump.c $CFLAGS +$CC -c nsdumpdv.c $CFLAGS +$CC -c nseval.c $CFLAGS +$CC -c nsinit.c $CFLAGS +$CC -c nsload.c $CFLAGS +$CC -c nsnames.c $CFLAGS +$CC -c nsobject.c $CFLAGS +$CC -c nsparse.c $CFLAGS +$CC -c nspredef.c $CFLAGS +$CC -c nsprepkg.c $CFLAGS +$CC -c nsrepair2.c $CFLAGS +$CC -c nsrepair.c $CFLAGS +$CC -c nssearch.c $CFLAGS +$CC -c nsutils.c $CFLAGS +$CC -c nswalk.c $CFLAGS +$CC -c nsxfeval.c $CFLAGS +$CC -c nsxfname.c $CFLAGS +$CC -c nsxfobj.c $CFLAGS +$CC -c psargs.c $CFLAGS +$CC -c psloop.c $CFLAGS +$CC -c psobject.c $CFLAGS +$CC -c psopcode.c $CFLAGS +$CC -c psopinfo.c $CFLAGS +$CC -c psparse.c $CFLAGS +$CC -c psscope.c $CFLAGS +$CC -c pstree.c $CFLAGS +$CC -c psutils.c $CFLAGS +$CC -c pswalk.c $CFLAGS +$CC -c psxface.c $CFLAGS +$CC -c rsaddr.c $CFLAGS +$CC -c rscalc.c $CFLAGS +$CC -c rscreate.c $CFLAGS +$CC -c rsinfo.c $CFLAGS +$CC -c rsio.c $CFLAGS +$CC -c rsirq.c $CFLAGS +$CC -c rslist.c $CFLAGS +$CC -c rsmemory.c $CFLAGS +$CC -c rsmisc.c $CFLAGS +$CC -c rsserial.c $CFLAGS +$CC -c rsutils.c $CFLAGS +$CC -c rsxface.c $CFLAGS +$CC -c tbdata.c $CFLAGS +$CC -c tbfadt.c $CFLAGS +$CC -c tbfind.c $CFLAGS +$CC -c tbinstal.c $CFLAGS +$CC -c tbprint.c $CFLAGS +$CC -c tbutils.c $CFLAGS +$CC -c tbxface.c $CFLAGS +$CC -c tbxfload.c $CFLAGS +$CC -c tbxfroot.c $CFLAGS +$CC -c utaddress.c $CFLAGS +$CC -c utalloc.c $CFLAGS +$CC -c utascii.c $CFLAGS +$CC -c utbuffer.c $CFLAGS +$CC -c utcache.c $CFLAGS +$CC -c utclib.c $CFLAGS +$CC -c utcopy.c $CFLAGS +$CC -c utdebug.c $CFLAGS +$CC -c utdecode.c $CFLAGS +$CC -c utdelete.c $CFLAGS +$CC -c uterror.c $CFLAGS +$CC -c uteval.c $CFLAGS +$CC -c utexcep.c $CFLAGS +$CC -c utglobal.c $CFLAGS +$CC -c uthex.c $CFLAGS +$CC -c utids.c $CFLAGS +$CC -c utinit.c $CFLAGS +$CC -c utlock.c $CFLAGS +$CC -c utmath.c $CFLAGS +$CC -c utmisc.c $CFLAGS +$CC -c utmutex.c $CFLAGS +$CC -c utnonansi.c $CFLAGS +$CC -c utobject.c $CFLAGS +$CC -c utosi.c $CFLAGS +$CC -c utownerid.c $CFLAGS +$CC -c utpredef.c $CFLAGS +$CC -c utprint.c $CFLAGS +$CC -c utresdecode.c $CFLAGS +$CC -c utresrc.c $CFLAGS +$CC -c utstate.c $CFLAGS +$CC -c utstring.c $CFLAGS +$CC -c utstrsuppt.c $CFLAGS +$CC -c utstrtoul64.c $CFLAGS +$CC -c uttrack.c $CFLAGS +$CC -c utuuid.c $CFLAGS +$CC -c utxface.c $CFLAGS +$CC -c utxferror.c $CFLAGS +$CC -c utxfinit.c $CFLAGS +$CC -c utxfmutex.c $CFLAGS + +x86_64-essence-ar -rcs libacpica.a dsargs.o dscontrol.o dsdebug.o dsfield.o dsinit.o dsmethod.o dsmthdat.o dsobject.o dsopcode.o dspkginit.o dsutils.o dswexec.o dswload2.o dswload.o dswscope.o dswstate.o evevent.o evglock.o evgpeblk.o evgpe.o evgpeinit.o evgpeutil.o evhandler.o evmisc.o evregion.o evrgnini.o evsci.o evxface.o evxfevnt.o evxfgpe.o evxfregn.o exconcat.o exconfig.o exconvrt.o excreate.o exdebug.o exdump.o exfield.o exfldio.o exmisc.o exmutex.o exnames.o exoparg1.o exoparg2.o exoparg3.o exoparg6.o exprep.o exregion.o exresnte.o exresolv.o exresop.o exserial.o exstore.o exstoren.o exstorob.o exsystem.o extrace.o exutils.o hwacpi.o hwesleep.o hwgpe.o hwpci.o hwregs.o hwsleep.o hwtimer.o hwvalid.o hwxface.o hwxfsleep.o nsaccess.o nsalloc.o nsarguments.o nsconvert.o nsdump.o nsdumpdv.o nseval.o nsinit.o nsload.o nsnames.o nsobject.o nsparse.o nspredef.o nsprepkg.o nsrepair2.o nsrepair.o nssearch.o nsutils.o nswalk.o nsxfeval.o nsxfname.o nsxfobj.o psargs.o psloop.o psobject.o psopcode.o psopinfo.o psparse.o psscope.o pstree.o psutils.o pswalk.o psxface.o rsaddr.o rscalc.o rscreate.o rsinfo.o rsio.o rsirq.o rslist.o rsmemory.o rsmisc.o rsserial.o rsutils.o rsxface.o tbdata.o tbfadt.o tbfind.o tbinstal.o tbprint.o tbutils.o tbxface.o tbxfload.o tbxfroot.o utaddress.o utalloc.o utascii.o utbuffer.o utcache.o utclib.o utcopy.o utdebug.o utdecode.o utdelete.o uterror.o uteval.o utexcep.o utglobal.o uthex.o utids.o utinit.o utlock.o utmath.o utmisc.o utmutex.o utnonansi.o utobject.o utosi.o utownerid.o utpredef.o utprint.o utresdecode.o utresrc.o utstate.o utstring.o utstrsuppt.o utstrtoul64.o uttrack.o utuuid.o utxface.o utxferror.o utxfinit.o utxfmutex.c + +cp libacpica.a ../../../ports/acpica diff --git a/ports/acpica/include/acapps.h b/ports/acpica/include/acapps.h index dcaebd7..3f1833c 100644 --- a/ports/acpica/include/acapps.h +++ b/ports/acpica/include/acapps.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -159,7 +159,7 @@ /* Common info for tool signons */ #define ACPICA_NAME "Intel ACPI Component Architecture" -#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2018 Intel Corporation" +#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2021 Intel Corporation" #if ACPI_MACHINE_WIDTH == 64 #define ACPI_WIDTH " (64-bit version)" diff --git a/ports/acpica/include/acbuffer.h b/ports/acpica/include/acbuffer.h index 857d8bc..1576afa 100644 --- a/ports/acpica/include/acbuffer.h +++ b/ports/acpica/include/acbuffer.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -359,5 +359,14 @@ typedef struct acpi_pld_info #define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK) #define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ +/* Panel position defined in _PLD section of ACPI Specification 6.3 */ + +#define ACPI_PLD_PANEL_TOP 0 +#define ACPI_PLD_PANEL_BOTTOM 1 +#define ACPI_PLD_PANEL_LEFT 2 +#define ACPI_PLD_PANEL_RIGHT 3 +#define ACPI_PLD_PANEL_FRONT 4 +#define ACPI_PLD_PANEL_BACK 5 +#define ACPI_PLD_PANEL_UNKNOWN 6 #endif /* ACBUFFER_H */ diff --git a/ports/acpica/include/acclib.h b/ports/acpica/include/acclib.h index 7c4c9a2..c91b1ed 100644 --- a/ports/acpica/include/acclib.h +++ b/ports/acpica/include/acclib.h @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -345,7 +345,7 @@ sprintf ( /* * NOTE: Currently we only need to update errno for file IOs. Other - * Clibrary invocations in ACPICA do not make descisions according to + * Clibrary invocations in ACPICA do not make decisions according to * the errno. */ extern int errno; diff --git a/ports/acpica/include/accommon.h b/ports/acpica/include/accommon.h index 357df16..4ef3f5b 100644 --- a/ports/acpica/include/accommon.h +++ b/ports/acpica/include/accommon.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -155,7 +155,7 @@ /* * Common set of includes for all ACPICA source files. * We put them here because we don't want to duplicate them - * in the the source code again and again. + * in the source code again and again. * * Note: The order of these include files is important. */ diff --git a/ports/acpica/include/acconfig.h b/ports/acpica/include/acconfig.h index c5a67ca..a580852 100644 --- a/ports/acpica/include/acconfig.h +++ b/ports/acpica/include/acconfig.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -233,15 +233,15 @@ /* Maximum object reference count (detects object deletion issues) */ -#define ACPI_MAX_REFERENCE_COUNT 0x800 +#define ACPI_MAX_REFERENCE_COUNT 0x4000 /* Default page size for use in mapping memory for operation regions */ #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ -/* OwnerId tracking. 8 entries allows for 255 OwnerIds */ +/* OwnerId tracking. 128 entries allows for 4095 OwnerIds */ -#define ACPI_NUM_OWNERID_MASKS 8 +#define ACPI_NUM_OWNERID_MASKS 128 /* Size of the root table array is increased by this increment */ @@ -266,7 +266,7 @@ * *****************************************************************************/ -/* Method info (in WALK_STATE), containing local variables and argumetns */ +/* Method info (in WALK_STATE), containing local variables and arguments */ #define ACPI_METHOD_NUM_LOCALS 8 #define ACPI_METHOD_MAX_LOCAL 7 @@ -286,7 +286,7 @@ /* * Maximal number of elements the Result Stack can contain, - * it may be an arbitray value not exceeding the types of + * it may be an arbitrary value not exceeding the types of * ResultSize and ResultCount (now UINT8). */ #define ACPI_RESULTS_OBJ_NUM_MAX 255 @@ -318,11 +318,22 @@ #define ACPI_RSDP_CHECKSUM_LENGTH 20 #define ACPI_RSDP_XCHECKSUM_LENGTH 36 -/* SMBus, GSBus and IPMI bidirectional buffer size */ +/* + * SMBus, GSBus and IPMI buffer sizes. All have a 2-byte header, + * containing both Status and Length. + */ +#define ACPI_SERIAL_HEADER_SIZE 2 /* Common for below. Status and Length fields */ -#define ACPI_SMBUS_BUFFER_SIZE 34 -#define ACPI_GSBUS_BUFFER_SIZE 34 -#define ACPI_IPMI_BUFFER_SIZE 66 +#define ACPI_SMBUS_DATA_SIZE 32 +#define ACPI_SMBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_SMBUS_DATA_SIZE + +#define ACPI_IPMI_DATA_SIZE 64 +#define ACPI_IPMI_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_IPMI_DATA_SIZE + +#define ACPI_MAX_GSBUS_DATA_SIZE 255 +#define ACPI_MAX_GSBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE + +#define ACPI_PRM_INPUT_BUFFER_SIZE 26 /* _SxD and _SxW control methods */ diff --git a/ports/acpica/include/acconvert.h b/ports/acpica/include/acconvert.h index cdefc68..b654b18 100644 --- a/ports/acpica/include/acconvert.h +++ b/ports/acpica/include/acconvert.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -237,8 +237,7 @@ CgWriteAmlComment ( void CvInitFileTree ( ACPI_TABLE_HEADER *Table, - UINT8 *AmlStart, - UINT32 AmlLength); + FILE *RootFile); void CvClearOpComments ( diff --git a/ports/acpica/include/acdebug.h b/ports/acpica/include/acdebug.h index 51a85f3..434745d 100644 --- a/ports/acpica/include/acdebug.h +++ b/ports/acpica/include/acdebug.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -159,7 +159,8 @@ #endif -#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ +#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ +#define ACPI_DEBUG_LENGTH_FORMAT " (%.4X bits, %.3X bytes)" typedef struct acpi_db_command_info { @@ -186,6 +187,7 @@ typedef struct acpi_db_execute_walk { UINT32 Count; UINT32 MaxCount; + char NameSeg[ACPI_NAMESEG_SIZE + 1]; } ACPI_DB_EXECUTE_WALK; @@ -194,6 +196,7 @@ typedef struct acpi_db_execute_walk #define EX_NO_SINGLE_STEP 1 #define EX_SINGLE_STEP 2 +#define EX_ALL 4 /* @@ -344,6 +347,10 @@ void AcpiDbEvaluatePredefinedNames ( void); +void +AcpiDbEvaluateAll ( + char *NameSeg); + /* * dbnames - namespace commands @@ -391,6 +398,10 @@ void AcpiDbGetBusInfo ( void); +ACPI_STATUS +AcpiDbDisplayFields ( + UINT32 AddressSpaceId); + /* * dbdisply - debug display commands diff --git a/ports/acpica/include/acdisasm.h b/ports/acpica/include/acdisasm.h index 7f7f7bf..6e162d6 100644 --- a/ports/acpica/include/acdisasm.h +++ b/ports/acpica/include/acdisasm.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -224,6 +224,7 @@ typedef enum ACPI_DMT_BUF10, ACPI_DMT_BUF12, ACPI_DMT_BUF16, + ACPI_DMT_BUF18, ACPI_DMT_BUF128, ACPI_DMT_SIG, ACPI_DMT_STRING, @@ -250,7 +251,14 @@ typedef enum /* Types that are specific to particular ACPI tables */ + ACPI_DMT_AEST, + ACPI_DMT_AEST_CACHE, + ACPI_DMT_AEST_GIC, + ACPI_DMT_AEST_RES, + ACPI_DMT_AEST_XFACE, + ACPI_DMT_AEST_XRUPT, ACPI_DMT_ASF, + ACPI_DMT_CEDT, ACPI_DMT_DMAR, ACPI_DMT_DMAR_SCOPE, ACPI_DMT_EINJACT, @@ -265,17 +273,26 @@ typedef enum ACPI_DMT_HMAT, ACPI_DMT_IORTMEM, ACPI_DMT_IVRS, + ACPI_DMT_IVRS_DE, + ACPI_DMT_IVRS_UNTERMINATED_STRING, ACPI_DMT_LPIT, ACPI_DMT_MADT, ACPI_DMT_NFIT, + ACPI_DMT_NHLT1, + ACPI_DMT_NHLT1a, ACPI_DMT_PCCT, + ACPI_DMT_PHAT, ACPI_DMT_PMTT, + ACPI_DMT_PMTT_VENDOR, ACPI_DMT_PPTT, + ACPI_DMT_RGRT, ACPI_DMT_SDEI, ACPI_DMT_SDEV, ACPI_DMT_SLIC, ACPI_DMT_SRAT, ACPI_DMT_TPM2, + ACPI_DMT_VIOT, + ACPI_DMT_WPBT_UNICODE, /* Special opcodes */ @@ -353,6 +370,17 @@ extern const char *AcpiGbl_AccessTypes[]; extern const char *AcpiGbl_UpdateRules[]; extern const char *AcpiGbl_MatchOps[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestProcError[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestCacheRsrc[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestTlbRsrc[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGenRsrc[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestMemError[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestSmmuError[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[]; @@ -361,9 +389,12 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt0[]; @@ -409,6 +440,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtEl2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt1[]; @@ -449,18 +481,29 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3b[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort6[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort6a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortPad[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHware23[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsMemory[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs4[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8b[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8c[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidString[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsCidInteger[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHid[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidString[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsUidInteger[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidString[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHidInteger[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt1[]; @@ -478,6 +521,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt12[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt13[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt14[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt15[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt16[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[]; @@ -490,8 +534,6 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfitHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit0[]; @@ -505,12 +547,32 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit5[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt8[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1b[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttVendor[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[]; @@ -519,13 +581,21 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct5[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPpttHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtModule[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoRgrt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[]; @@ -538,6 +608,10 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0a[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev0b[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompId[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdevSecCompMem[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdev1b[]; @@ -552,17 +626,27 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat6[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm211[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23a[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViotHeader[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot3[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoViot4[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[]; @@ -579,7 +663,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2]; * dmtable and ahtable */ extern const ACPI_DMTABLE_DATA AcpiDmTableData[]; -extern const AH_TABLE Gbl_AcpiSupportedTables[]; +extern const AH_TABLE AcpiGbl_SupportedTables[]; UINT8 AcpiDmGenerateChecksum ( @@ -634,10 +718,18 @@ AcpiDmDumpUnicode ( UINT32 BufferOffset, UINT32 ByteLength); +void +AcpiDmDumpAest ( + ACPI_TABLE_HEADER *Table); + void AcpiDmDumpAsf ( ACPI_TABLE_HEADER *Table); +void +AcpiDmDumpCedt ( + ACPI_TABLE_HEADER *Table); + void AcpiDmDumpCpep ( ACPI_TABLE_HEADER *Table); @@ -715,11 +807,11 @@ AcpiDmDumpMsct ( ACPI_TABLE_HEADER *Table); void -AcpiDmDumpMtmr ( +AcpiDmDumpNfit ( ACPI_TABLE_HEADER *Table); void -AcpiDmDumpNfit ( +AcpiDmDumpNhlt ( ACPI_TABLE_HEADER *Table); void @@ -730,6 +822,10 @@ void AcpiDmDumpPdtt ( ACPI_TABLE_HEADER *Table); +void +AcpiDmDumpPhat ( + ACPI_TABLE_HEADER *Table); + void AcpiDmDumpPmtt ( ACPI_TABLE_HEADER *Table); @@ -738,6 +834,14 @@ void AcpiDmDumpPptt ( ACPI_TABLE_HEADER *Table); +void +AcpiDmDumpPrmt ( + ACPI_TABLE_HEADER *Table); + +void +AcpiDmDumpRgrt ( + ACPI_TABLE_HEADER *Table); + UINT32 AcpiDmDumpRsdp ( ACPI_TABLE_HEADER *Table); @@ -770,6 +874,10 @@ void AcpiDmDumpStao ( ACPI_TABLE_HEADER *Table); +void +AcpiDmDumpSvkl ( + ACPI_TABLE_HEADER *Table); + void AcpiDmDumpTcpa ( ACPI_TABLE_HEADER *Table); @@ -779,7 +887,7 @@ AcpiDmDumpTpm2 ( ACPI_TABLE_HEADER *Table); void -AcpiDmDumpVrtc ( +AcpiDmDumpViot ( ACPI_TABLE_HEADER *Table); void diff --git a/ports/acpica/include/acdispat.h b/ports/acpica/include/acdispat.h index fd6a1e8..2047779 100644 --- a/ports/acpica/include/acdispat.h +++ b/ports/acpica/include/acdispat.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/acevents.h b/ports/acpica/include/acevents.h index 3dc3660..77475ac 100644 --- a/ports/acpica/include/acevents.h +++ b/ports/acpica/include/acevents.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -245,7 +245,8 @@ AcpiEvMaskGpe ( ACPI_STATUS AcpiEvAddGpeReference ( - ACPI_GPE_EVENT_INFO *GpeEventInfo); + ACPI_GPE_EVENT_INFO *GpeEventInfo, + BOOLEAN ClearOnEnable); ACPI_STATUS AcpiEvRemoveGpeReference ( @@ -467,6 +468,10 @@ ACPI_STATUS AcpiEvInitializeRegion ( ACPI_OPERAND_OBJECT *RegionObj); +BOOLEAN +AcpiEvIsPciRootBridge ( + ACPI_NAMESPACE_NODE *Node); + /* * evsci - SCI (System Control Interrupt) handling/dispatch diff --git a/ports/acpica/include/acexcep.h b/ports/acpica/include/acexcep.h index 828f9fb..6312602 100644 --- a/ports/acpica/include/acexcep.h +++ b/ports/acpica/include/acexcep.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -184,12 +184,12 @@ typedef struct acpi_exception_info { char *Name; -#ifdef ACPI_HELP_APP +#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER) char *Description; #endif } ACPI_EXCEPTION_INFO; -#ifdef ACPI_HELP_APP +#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER) #define EXCEP_TXT(Name,Description) {Name, Description} #else #define EXCEP_TXT(Name,Description) {Name} @@ -204,6 +204,13 @@ typedef struct acpi_exception_info #define AE_OK (ACPI_STATUS) 0x0000 +#define ACPI_ENV_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL) +#define ACPI_AML_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_AML) +#define ACPI_PROG_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER) +#define ACPI_TABLE_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES) +#define ACPI_CNTL_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_CONTROL) + + /* * Environmental exceptions */ @@ -313,8 +320,10 @@ typedef struct acpi_exception_info #define AE_AML_LOOP_TIMEOUT EXCEP_AML (0x0021) #define AE_AML_UNINITIALIZED_NODE EXCEP_AML (0x0022) #define AE_AML_TARGET_TYPE EXCEP_AML (0x0023) +#define AE_AML_PROTOCOL EXCEP_AML (0x0024) +#define AE_AML_BUFFER_LENGTH EXCEP_AML (0x0025) -#define AE_CODE_AML_MAX 0x0023 +#define AE_CODE_AML_MAX 0x0025 /* @@ -425,7 +434,7 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] = EXCEP_TXT ("AE_AML_DIVIDE_BY_ZERO", "During execution of AML Divide operator"), EXCEP_TXT ("AE_AML_BAD_NAME", "An ACPI name contains invalid character(s)"), EXCEP_TXT ("AE_AML_NAME_NOT_FOUND", "Could not resolve a named reference"), - EXCEP_TXT ("AE_AML_INTERNAL", "An internal error within the interprete"), + EXCEP_TXT ("AE_AML_INTERNAL", "An internal error within the interpreter"), EXCEP_TXT ("AE_AML_INVALID_SPACE_ID", "An Operation Region SpaceID is invalid"), EXCEP_TXT ("AE_AML_STRING_LIMIT", "String is longer than 200 characters"), EXCEP_TXT ("AE_AML_NO_RETURN_VALUE", "A method did not return a required value"), @@ -445,7 +454,9 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] = EXCEP_TXT ("AE_AML_ILLEGAL_ADDRESS", "A memory, I/O, or PCI configuration address is invalid"), EXCEP_TXT ("AE_AML_LOOP_TIMEOUT", "An AML While loop exceeded the maximum execution time"), EXCEP_TXT ("AE_AML_UNINITIALIZED_NODE", "A namespace node is uninitialized or unresolved"), - EXCEP_TXT ("AE_AML_TARGET_TYPE", "A target operand of an incorrect type was encountered") + EXCEP_TXT ("AE_AML_TARGET_TYPE", "A target operand of an incorrect type was encountered"), + EXCEP_TXT ("AE_AML_PROTOCOL", "Violation of a fixed ACPI protocol"), + EXCEP_TXT ("AE_AML_BUFFER_LENGTH", "The length of the buffer is invalid/incorrect") }; static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] = diff --git a/ports/acpica/include/acglobal.h b/ports/acpica/include/acglobal.h index 3c2a4ed..3542686 100644 --- a/ports/acpica/include/acglobal.h +++ b/ports/acpica/include/acglobal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -308,6 +308,7 @@ ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_GlobalList); ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_NsNodeList); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisplayFinalMemStats); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisableMemTracking); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_VerboseLeakDump); #endif @@ -317,16 +318,11 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisableMemTracking); * ****************************************************************************/ -#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) #define NUM_PREDEFINED_NAMES 10 -#else -#define NUM_PREDEFINED_NAMES 9 -#endif ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct); ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode); ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_FadtGpeDevice); -ACPI_GLOBAL (ACPI_OPERAND_OBJECT *, AcpiGbl_ModuleCodeList); extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES]; extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES]; @@ -369,6 +365,8 @@ ACPI_INIT_GLOBAL (ACPI_COMMENT_NODE, *AcpiGbl_LastListHead, NULL); extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]; ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeA); ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeB); +ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeAS0); +ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeBS0); /***************************************************************************** @@ -440,6 +438,7 @@ ACPI_GLOBAL (ACPI_EXTERNAL_FILE *, AcpiGbl_ExternalFileList); #ifdef ACPI_DEBUGGER ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE); ACPI_INIT_GLOBAL (ACPI_THREAD_ID, AcpiGbl_DbThreadId, ACPI_INVALID_THREAD_ID); +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NextCmdNum, 1); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport); diff --git a/ports/acpica/include/achware.h b/ports/acpica/include/achware.h index 1c43926..994e976 100644 --- a/ports/acpica/include/achware.h +++ b/ports/acpica/include/achware.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -315,6 +315,10 @@ ACPI_STATUS AcpiHwEnableAllWakeupGpes ( void); +UINT8 +AcpiHwCheckAllGpes ( + void); + ACPI_STATUS AcpiHwEnableRuntimeGpeBlock ( ACPI_GPE_XRUPT_INFO *GpeXruptInfo, diff --git a/ports/acpica/include/acinterp.h b/ports/acpica/include/acinterp.h index fde066d..c6e27cc 100644 --- a/ports/acpica/include/acinterp.h +++ b/ports/acpica/include/acinterp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -285,6 +285,11 @@ AcpiExTracePoint ( * exfield - ACPI AML (p-code) execution - field manipulation */ ACPI_STATUS +AcpiExGetProtocolBufferLength ( + UINT32 ProtocolId, + UINT32 *ReturnLength); + +ACPI_STATUS AcpiExCommonBufferSetup ( ACPI_OPERAND_OBJECT *ObjDesc, UINT32 BufferLength, @@ -494,6 +499,32 @@ AcpiExPrepFieldValue ( ACPI_CREATE_FIELD_INFO *Info); +/* + * exserial - FieldUnit support for serial address spaces + */ +ACPI_STATUS +AcpiExReadSerialBus ( + ACPI_OPERAND_OBJECT *ObjDesc, + ACPI_OPERAND_OBJECT **ReturnBuffer); + +ACPI_STATUS +AcpiExWriteSerialBus ( + ACPI_OPERAND_OBJECT *SourceDesc, + ACPI_OPERAND_OBJECT *ObjDesc, + ACPI_OPERAND_OBJECT **ReturnBuffer); + +ACPI_STATUS +AcpiExReadGpio ( + ACPI_OPERAND_OBJECT *ObjDesc, + void *Buffer); + +ACPI_STATUS +AcpiExWriteGpio ( + ACPI_OPERAND_OBJECT *SourceDesc, + ACPI_OPERAND_OBJECT *ObjDesc, + ACPI_OPERAND_OBJECT **ReturnBuffer); + + /* * exsystem - Interface to OS services */ diff --git a/ports/acpica/include/aclocal.h b/ports/acpica/include/aclocal.h index f487a4e..e4f46b8 100644 --- a/ports/acpica/include/aclocal.h +++ b/ports/acpica/include/aclocal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -295,12 +295,12 @@ typedef struct acpi_namespace_node union acpi_operand_object *Object; /* Interpreter object */ UINT8 DescriptorType; /* Differentiate object descriptor types */ UINT8 Type; /* ACPI Type associated with this name */ - UINT8 Flags; /* Miscellaneous flags */ - ACPI_OWNER_ID OwnerId; /* Node creator */ + UINT16 Flags; /* Miscellaneous flags */ ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */ struct acpi_namespace_node *Parent; /* Parent node */ struct acpi_namespace_node *Child; /* First child */ struct acpi_namespace_node *Peer; /* First peer */ + ACPI_OWNER_ID OwnerId; /* Node creator */ /* * The following fields are used by the ASL compiler and disassembler only @@ -327,8 +327,8 @@ typedef struct acpi_namespace_node #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */ +#define ANOBJ_NODE_EARLY_INIT 0x80 /* AcpiExec only: Node was create via init file (-fi) */ -#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */ #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */ @@ -480,7 +480,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( */ typedef struct acpi_name_info { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; UINT16 ArgumentList; UINT8 ExpectedBtypes; @@ -568,7 +568,7 @@ typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) ( typedef struct acpi_simple_repair_info { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; UINT32 UnexpectedBtypes; UINT32 PackageIndex; ACPI_OBJECT_CONVERTER ObjectConverter; @@ -597,9 +597,9 @@ typedef struct acpi_simple_repair_info typedef struct acpi_reg_walk_info { - ACPI_ADR_SPACE_TYPE SpaceId; UINT32 Function; UINT32 RegRunCount; + ACPI_ADR_SPACE_TYPE SpaceId; } ACPI_REG_WALK_INFO; @@ -1105,7 +1105,7 @@ typedef struct acpi_comment_addr_node /* * File node - used for "Include" operator file stack and - * depdendency tree for the -ca option + * dependency tree for the -ca option */ typedef struct acpi_file_node { diff --git a/ports/acpica/include/acmacros.h b/ports/acpica/include/acmacros.h index f13523a..a7a79fc 100644 --- a/ports/acpica/include/acmacros.h +++ b/ports/acpica/include/acmacros.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -610,7 +610,7 @@ /* - * Macors used for the ASL-/ASL+ converter utility + * Macros used for the ASL-/ASL+ converter utility */ #ifdef ACPI_ASL_COMPILER @@ -625,7 +625,7 @@ #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) CvPrintOneCommentType (a,b,c,d); #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) CvPrintOneCommentList (a,b); #define ASL_CV_FILE_HAS_SWITCHED(a) CvFileHasSwitched(a) -#define ASL_CV_INIT_FILETREE(a,b,c) CvInitFileTree(a,b,c); +#define ASL_CV_INIT_FILETREE(a,b) CvInitFileTree(a,b); #else @@ -640,7 +640,7 @@ #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) #define ASL_CV_FILE_HAS_SWITCHED(a) 0 -#define ASL_CV_INIT_FILETREE(a,b,c) +#define ASL_CV_INIT_FILETREE(a,b) #endif diff --git a/ports/acpica/include/acnames.h b/ports/acpica/include/acnames.h index 506ff62..9075ca7 100644 --- a/ports/acpica/include/acnames.h +++ b/ports/acpica/include/acnames.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -162,6 +162,7 @@ #define METHOD_NAME__CLS "_CLS" #define METHOD_NAME__CRS "_CRS" #define METHOD_NAME__DDN "_DDN" +#define METHOD_NAME__DIS "_DIS" #define METHOD_NAME__DMA "_DMA" #define METHOD_NAME__HID "_HID" #define METHOD_NAME__INI "_INI" diff --git a/ports/acpica/include/acnamesp.h b/ports/acpica/include/acnamesp.h index 529fc6e..2edd99d 100644 --- a/ports/acpica/include/acnamesp.h +++ b/ports/acpica/include/acnamesp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -168,14 +168,16 @@ /* Flags for AcpiNsLookup, AcpiNsSearchAndEnter */ #define ACPI_NS_NO_UPSEARCH 0 -#define ACPI_NS_SEARCH_PARENT 0x01 -#define ACPI_NS_DONT_OPEN_SCOPE 0x02 -#define ACPI_NS_NO_PEER_SEARCH 0x04 -#define ACPI_NS_ERROR_IF_FOUND 0x08 -#define ACPI_NS_PREFIX_IS_SCOPE 0x10 -#define ACPI_NS_EXTERNAL 0x20 -#define ACPI_NS_TEMPORARY 0x40 -#define ACPI_NS_OVERRIDE_IF_FOUND 0x80 +#define ACPI_NS_SEARCH_PARENT 0x0001 +#define ACPI_NS_DONT_OPEN_SCOPE 0x0002 +#define ACPI_NS_NO_PEER_SEARCH 0x0004 +#define ACPI_NS_ERROR_IF_FOUND 0x0008 +#define ACPI_NS_PREFIX_IS_SCOPE 0x0010 +#define ACPI_NS_EXTERNAL 0x0020 +#define ACPI_NS_TEMPORARY 0x0040 +#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080 +#define ACPI_NS_EARLY_INIT 0x0100 +#define ACPI_NS_PREFIX_MUST_EXIST 0x0200 /* Flags for AcpiNsWalkNamespace */ @@ -417,10 +419,6 @@ ACPI_STATUS AcpiNsEvaluate ( ACPI_EVALUATE_INFO *Info); -void -AcpiNsExecModuleCodeList ( - void); - /* * nsarguments - Argument count/type checking for predefined/reserved names @@ -489,6 +487,10 @@ AcpiNsBuildNormalizedPath ( UINT32 PathSize, BOOLEAN NoTrailing); +void +AcpiNsNormalizePathname ( + char *OriginalPath); + char * AcpiNsGetNormalizedPathname ( ACPI_NAMESPACE_NODE *Node, diff --git a/ports/acpica/include/acobject.h b/ports/acpica/include/acobject.h index 824d208..e7d9f1c 100644 --- a/ports/acpica/include/acobject.h +++ b/ports/acpica/include/acobject.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -333,8 +333,8 @@ typedef struct acpi_object_method } Dispatch; UINT32 AmlLength; - UINT8 ThreadCount; ACPI_OWNER_ID OwnerId; + UINT8 ThreadCount; } ACPI_OBJECT_METHOD; @@ -453,6 +453,7 @@ typedef struct acpi_object_region_field union acpi_operand_object *RegionObj; /* Containing OpRegion object */ UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */ UINT16 PinNumberIndex; /* Index relative to previous Connection/Template */ + UINT8 *InternalPccBuffer; /* Internal buffer for fields associated with PCC */ } ACPI_OBJECT_REGION_FIELD; @@ -488,6 +489,7 @@ typedef struct acpi_object_buffer_field { ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO + BOOLEAN IsCreateField; /* Special case for objects created by CreateField() */ union acpi_operand_object *BufferObj; /* Containing Buffer object */ } ACPI_OBJECT_BUFFER_FIELD; @@ -519,6 +521,7 @@ typedef struct acpi_object_addr_handler ACPI_ADR_SPACE_HANDLER Handler; ACPI_NAMESPACE_NODE *Node; /* Parent device */ void *Context; + ACPI_MUTEX ContextMutex; ACPI_ADR_SPACE_SETUP Setup; union acpi_operand_object *RegionList; /* Regions using this handler */ union acpi_operand_object *Next; diff --git a/ports/acpica/include/acopcode.h b/ports/acpica/include/acopcode.h index 6dbeac6..91cce05 100644 --- a/ports/acpica/include/acopcode.h +++ b/ports/acpica/include/acopcode.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/acoutput.h b/ports/acpica/include/acoutput.h index 49b8505..b72c9a9 100644 --- a/ports/acpica/include/acoutput.h +++ b/ports/acpica/include/acoutput.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -216,14 +216,16 @@ #define ACPI_LV_RESOURCES 0x00010000 #define ACPI_LV_USER_REQUESTS 0x00020000 #define ACPI_LV_PACKAGE 0x00040000 -#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS +#define ACPI_LV_EVALUATION 0x00080000 +#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS /* Trace verbosity level 2 [Function tracing and memory allocation] */ #define ACPI_LV_ALLOCATIONS 0x00100000 #define ACPI_LV_FUNCTIONS 0x00200000 #define ACPI_LV_OPTIMIZATIONS 0x00400000 -#define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1 +#define ACPI_LV_PARSE_TREES 0x00800000 +#define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1 #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ @@ -275,6 +277,7 @@ #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) +#define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES) #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) @@ -283,6 +286,7 @@ #define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS) #define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) #define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) +#define ACPI_DB_EVALUATION ACPI_DEBUG_LEVEL (ACPI_LV_EVALUATION) #define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) #define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS) @@ -290,7 +294,7 @@ /* Defaults for DebugLevel, debug and normal */ -#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_EVALUATION | ACPI_LV_REPAIR) #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) @@ -343,6 +347,7 @@ #define ACPI_EXCEPTION(plist) AcpiException plist #define ACPI_ERROR(plist) AcpiError plist #define ACPI_BIOS_WARNING(plist) AcpiBiosWarning plist +#define ACPI_BIOS_EXCEPTION(plist) AcpiBiosException plist #define ACPI_BIOS_ERROR(plist) AcpiBiosError plist #define ACPI_DEBUG_OBJECT(obj,l,i) AcpiExDoDebugObject(obj,l,i) @@ -355,6 +360,7 @@ #define ACPI_EXCEPTION(plist) #define ACPI_ERROR(plist) #define ACPI_BIOS_WARNING(plist) +#define ACPI_BIOS_EXCEPTION(plist) #define ACPI_BIOS_ERROR(plist) #define ACPI_DEBUG_OBJECT(obj,l,i) @@ -502,7 +508,7 @@ * * A less-safe version of the macros is provided for optional use if the * compiler uses excessive CPU stack (for example, this may happen in the - * debug case if code optimzation is disabled.) + * debug case if code optimization is disabled.) */ /* Exit trace helper macro */ @@ -555,7 +561,7 @@ /* Conditional execution */ #define ACPI_DEBUG_EXEC(a) a -#define ACPI_DEBUG_ONLY_MEMBERS(a) a; +#define ACPI_DEBUG_ONLY_MEMBERS(a) a #define _VERBOSE_STRUCTURES diff --git a/ports/acpica/include/acparser.h b/ports/acpica/include/acparser.h index 8acea23..94674d8 100644 --- a/ports/acpica/include/acparser.h +++ b/ports/acpica/include/acparser.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/acpi.h b/ports/acpica/include/acpi.h index 69dbedf..0a50a44 100644 --- a/ports/acpica/include/acpi.h +++ b/ports/acpica/include/acpi.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/acpiosxf.h b/ports/acpica/include/acpiosxf.h index c5bbddf..af90cb9 100644 --- a/ports/acpica/include/acpiosxf.h +++ b/ports/acpica/include/acpiosxf.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -577,6 +577,7 @@ AcpiOsEnterSleep ( * Debug print routines */ #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPrintf +ACPI_PRINTF_LIKE (1) void ACPI_INTERNAL_VAR_XFACE AcpiOsPrintf ( const char *Format, diff --git a/ports/acpica/include/acpixf.h b/ports/acpica/include/acpixf.h index 6e10c85..7f4b31e 100644 --- a/ports/acpica/include/acpixf.h +++ b/ports/acpica/include/acpixf.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180508 +#define ACPI_CA_VERSION 0x20210930 #include "acconfig.h" #include "actypes.h" @@ -300,21 +300,6 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE); */ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE); -/* - * Optionally support group module level code. - * NOTE, this is essentially obsolete and will be removed soon - * (01/2018). - */ -ACPI_INIT_GLOBAL (UINT8, AcpiGbl_GroupModuleLevelCode, FALSE); - -/* - * Optionally support module level code by parsing an entire table as - * a method as it is loaded. Default is TRUE. - * NOTE, this is essentially obsolete and will be removed soon - * (01/2018). - */ -ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ExecuteTablesAsMethods, TRUE); - /* * Optionally use 32-bit FADT addresses if and when there is a conflict * (address mismatch) between the 32-bit and 64-bit versions of the @@ -461,6 +446,9 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ ACPI_EXTERNAL_RETURN_OK(Prototype) +#define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ + ACPI_EXTERNAL_RETURN_UINT32(prototype) + #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ ACPI_EXTERNAL_RETURN_VOID(Prototype) @@ -471,6 +459,9 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ static ACPI_INLINE Prototype {return(AE_OK);} +#define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ + static ACPI_INLINE prototype {return(0);} + #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ static ACPI_INLINE Prototype {return;} @@ -673,7 +664,13 @@ AcpiInstallTable ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS AcpiLoadTable ( - ACPI_TABLE_HEADER *Table)) + ACPI_TABLE_HEADER *Table, + UINT32 *TableIdx)) + +ACPI_EXTERNAL_RETURN_STATUS ( +ACPI_STATUS +AcpiUnloadTable ( + UINT32 TableIndex)) ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS @@ -1091,6 +1088,12 @@ AcpiGetGpeStatus ( UINT32 GpeNumber, ACPI_EVENT_STATUS *EventStatus)) +ACPI_HW_DEPENDENT_RETURN_UINT32 ( +UINT32 +AcpiDispatchGpe ( + ACPI_HANDLE GpeDevice, + UINT32 GpeNumber)) + ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_STATUS AcpiDisableAllGpes ( @@ -1106,6 +1109,10 @@ ACPI_STATUS AcpiEnableAllWakeupGpes ( void)) +ACPI_HW_DEPENDENT_RETURN_UINT32 ( + UINT32 AcpiAnyGpeStatusSet ( + void)) + ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_STATUS AcpiGetGpeDevice ( @@ -1344,6 +1351,16 @@ AcpiBiosError ( const char *Format, ...)) +ACPI_MSG_DEPENDENT_RETURN_VOID ( +ACPI_PRINTF_LIKE(4) +void ACPI_INTERNAL_VAR_XFACE +AcpiBiosException ( + const char *ModuleName, + UINT32 LineNumber, + ACPI_STATUS Status, + const char *Format, + ...)) + ACPI_MSG_DEPENDENT_RETURN_VOID ( ACPI_PRINTF_LIKE(3) void ACPI_INTERNAL_VAR_XFACE diff --git a/ports/acpica/include/acpredef.h b/ports/acpica/include/acpredef.h index cd674d2..bc55155 100644 --- a/ports/acpica/include/acpredef.h +++ b/ports/acpica/include/acpredef.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -246,7 +246,7 @@ enum AcpiReturnPackageTypes /* Support macros for users of the predefined info table */ -#define METHOD_PREDEF_ARGS_MAX 4 +#define METHOD_PREDEF_ARGS_MAX 5 #define METHOD_ARG_BIT_WIDTH 3 #define METHOD_ARG_MASK 0x0007 #define ARG_COUNT_IS_MINIMUM 0x8000 @@ -262,6 +262,7 @@ enum AcpiReturnPackageTypes #define METHOD_2ARGS(a1,a2) (2 | (a1 << 3) | (a2 << 6)) #define METHOD_3ARGS(a1,a2,a3) (3 | (a1 << 3) | (a2 << 6) | (a3 << 9)) #define METHOD_4ARGS(a1,a2,a3,a4) (4 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12)) +#define METHOD_5ARGS(a1,a2,a3,a4,a5) (5 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12) | (a5 << 15)) #define METHOD_RETURNS(type) (type) #define METHOD_NO_RETURN_VALUE 0 @@ -471,6 +472,17 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] = {{"_BMS", METHOD_1ARGS (ACPI_TYPE_INTEGER), METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, + {{"_BPC", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4,0,0,0), + + {{"_BPS", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (5 Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5,0,0,0), + + {{"_BPT", METHOD_1ARGS (ACPI_TYPE_PACKAGE), + METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, + {{"_BQC", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, @@ -490,6 +502,10 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] = {{"_CBA", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* See PCI firmware spec 3.0 */ + {{"_CBR", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3,0,0,0), + {{"_CCA", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, /* ACPI 5.1 */ @@ -760,6 +776,21 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] = {{"_MTL", METHOD_0ARGS, /* ACPI 6.0 */ METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, + {{"_NBS", METHOD_0ARGS, /* ACPI 6.3 */ + METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, + + {{"_NCH", METHOD_0ARGS, /* ACPI 6.3 */ + METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, + + {{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */ + METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, + + {{"_NIG", METHOD_0ARGS, /* ACPI 6.3 */ + METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, + + {{"_NIH", METHOD_1ARGS (ACPI_TYPE_BUFFER), /* ACPI 6.3 */ + METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, + {{"_NTT", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, @@ -1008,9 +1039,29 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] = {{"_S4W", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, + {{"_SBA", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4,0,0,0), + + {{"_SBI", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int, 1 Buf) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1, ACPI_RTYPE_BUFFER,1,0), + + {{"_SBR", METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER), + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0), + {{"_SBS", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_INTEGER)}}, + {{"_SBT", METHOD_4ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_ANY), + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int, 1 Buf | Int) */ + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0), + + {{"_SBW", METHOD_5ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_ANY), + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, + PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1, 0,0,0), + {{"_SCP", METHOD_1ARGS (ACPI_TYPE_INTEGER) | ARG_COUNT_IS_MINIMUM, METHOD_NO_RETURN_VALUE}}, /* Acpi 1.0 allowed 1 integer arg. Acpi 3.0 expanded to 3 args. Allow both. */ diff --git a/ports/acpica/include/acresrc.h b/ports/acpica/include/acresrc.h index ebcc110..816d4fa 100644 --- a/ports/acpica/include/acresrc.h +++ b/ports/acpica/include/acresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -192,6 +192,7 @@ typedef enum ACPI_RSC_1BITFLAG, ACPI_RSC_2BITFLAG, ACPI_RSC_3BITFLAG, + ACPI_RSC_6BITFLAG, ACPI_RSC_ADDRESS, ACPI_RSC_BITMASK, ACPI_RSC_BITMASK16, @@ -252,6 +253,7 @@ typedef enum ACPI_RSD_1BITFLAG, ACPI_RSD_2BITFLAG, ACPI_RSD_3BITFLAG, + ACPI_RSD_6BITFLAG, ACPI_RSD_ADDRESS, ACPI_RSD_DWORDLIST, ACPI_RSD_LITERAL, @@ -495,6 +497,7 @@ extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertGpio[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedDma[]; +extern ACPI_RSCONVERT_INFO AcpiRsConvertCsi2SerialBus[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[]; extern ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[]; @@ -550,6 +553,7 @@ extern ACPI_RSDUMP_INFO AcpiRsDumpGpio[]; extern ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[]; extern ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[]; extern ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[]; +extern ACPI_RSDUMP_INFO AcpiRsDumpCsi2SerialBus[]; extern ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[]; extern ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[]; extern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[]; diff --git a/ports/acpica/include/acrestyp.h b/ports/acpica/include/acrestyp.h index 2d485f7..3c258de 100644 --- a/ports/acpica/include/acrestyp.h +++ b/ports/acpica/include/acrestyp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -287,7 +287,7 @@ typedef struct acpi_resource_irq UINT8 DescriptorLength; UINT8 Triggering; UINT8 Polarity; - UINT8 Sharable; + UINT8 Shareable; UINT8 WakeCapable; UINT8 InterruptCount; UINT8 Interrupts[1]; @@ -534,7 +534,7 @@ typedef struct acpi_resource_extended_irq UINT8 ProducerConsumer; UINT8 Triggering; UINT8 Polarity; - UINT8 Sharable; + UINT8 Shareable; UINT8 WakeCapable; UINT8 InterruptCount; ACPI_RESOURCE_SOURCE ResourceSource; @@ -558,7 +558,7 @@ typedef struct acpi_resource_gpio UINT8 ConnectionType; UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */ UINT8 PinConfig; - UINT8 Sharable; /* For values, see Interrupt Attributes above */ + UINT8 Shareable; /* For values, see Interrupt Attributes above */ UINT8 WakeCapable; /* For values, see Interrupt Attributes above */ UINT8 IoRestriction; UINT8 Triggering; /* For values, see Interrupt Attributes above */ @@ -593,7 +593,7 @@ typedef struct acpi_resource_gpio #define ACPI_IO_RESTRICT_NONE_PRESERVE 3 -/* Common structure for I2C, SPI, and UART serial descriptors */ +/* Common structure for I2C, SPI, UART, CSI2 serial descriptors */ #define ACPI_RESOURCE_SERIAL_COMMON \ UINT8 RevisionId; \ @@ -618,6 +618,7 @@ typedef struct acpi_resource_common_serialbus #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1 #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2 #define ACPI_RESOURCE_SERIAL_TYPE_UART 3 +#define ACPI_RESOURCE_SERIAL_TYPE_CSI2 4 /* Values for SlaveMode field above */ @@ -732,11 +733,19 @@ typedef struct acpi_resource_uart_serialbus #define ACPI_UART_CLEAR_TO_SEND (1<<6) #define ACPI_UART_REQUEST_TO_SEND (1<<7) +typedef struct acpi_resource_csi2_serialbus +{ + ACPI_RESOURCE_SERIAL_COMMON + UINT8 LocalPortInstance; + UINT8 PhyType; + +} ACPI_RESOURCE_CSI2_SERIALBUS; + typedef struct acpi_resource_pin_function { UINT8 RevisionId; UINT8 PinConfig; - UINT8 Sharable; /* For values, see Interrupt Attributes above */ + UINT8 Shareable; /* For values, see Interrupt Attributes above */ UINT16 FunctionNumber; UINT16 PinTableLength; UINT16 VendorLength; @@ -750,7 +759,7 @@ typedef struct acpi_resource_pin_config { UINT8 RevisionId; UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */ - UINT8 Sharable; /* For values, see Interrupt Attributes above */ + UINT8 Shareable; /* For values, see Interrupt Attributes above */ UINT8 PinConfigType; UINT32 PinConfigValue; UINT16 PinTableLength; @@ -794,7 +803,7 @@ typedef struct acpi_resource_pin_group_function { UINT8 RevisionId; UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */ - UINT8 Sharable; /* For values, see Interrupt Attributes above */ + UINT8 Shareable; /* For values, see Interrupt Attributes above */ UINT16 FunctionNumber; UINT16 VendorLength; ACPI_RESOURCE_SOURCE ResourceSource; @@ -807,7 +816,7 @@ typedef struct acpi_resource_pin_group_config { UINT8 RevisionId; UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */ - UINT8 Sharable; /* For values, see Interrupt Attributes above */ + UINT8 Shareable; /* For values, see Interrupt Attributes above */ UINT8 PinConfigType; /* For values, see PinConfigType above */ UINT32 PinConfigValue; UINT16 VendorLength; @@ -872,6 +881,7 @@ typedef union acpi_resource_data ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus; ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus; ACPI_RESOURCE_UART_SERIALBUS UartSerialBus; + ACPI_RESOURCE_CSI2_SERIALBUS Csi2SerialBus; ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus; ACPI_RESOURCE_PIN_FUNCTION PinFunction; ACPI_RESOURCE_PIN_CONFIG PinConfig; diff --git a/ports/acpica/include/acstruct.h b/ports/acpica/include/acstruct.h index 9c55d35..c07a319 100644 --- a/ports/acpica/include/acstruct.h +++ b/ports/acpica/include/acstruct.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -205,6 +205,8 @@ typedef struct acpi_walk_state ACPI_PARSE_STATE ParserState; /* Current state of parser */ UINT32 PrevArgTypes; UINT32 ArgCount; /* push for fixed or var args */ + UINT16 MethodNestingDepth; + UINT8 MethodIsNested; struct acpi_namespace_node Arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ struct acpi_namespace_node LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */ @@ -219,7 +221,8 @@ typedef struct acpi_walk_state struct acpi_namespace_node *MethodCallNode; /* Called method Node*/ ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */ union acpi_operand_object *MethodDesc; /* Method descriptor if running a method */ - struct acpi_namespace_node *MethodNode; /* Method node if running a method. */ + struct acpi_namespace_node *MethodNode; /* Method node if running a method */ + char *MethodPathname; /* Full pathname of running method */ ACPI_PARSE_OBJECT *Op; /* Current parser op */ const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */ ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */ @@ -324,9 +327,9 @@ typedef struct acpi_evaluate_info UINT32 ReturnFlags; /* Used for return value analysis */ UINT32 ReturnBtype; /* Bitmapped type of the returned object */ UINT16 ParamCount; /* Count of the input argument list */ + UINT16 NodeFlags; /* Same as Node->Flags */ UINT8 PassNumber; /* Parser pass number */ UINT8 ReturnObjectType; /* Object type of the returned object */ - UINT8 NodeFlags; /* Same as Node->Flags */ UINT8 Flags; /* General flags */ } ACPI_EVALUATE_INFO; @@ -354,6 +357,19 @@ typedef struct acpi_device_walk_info } ACPI_DEVICE_WALK_INFO; +/* Info used by Acpi AcpiDbDisplayFields */ + +typedef struct acpi_region_walk_info +{ + UINT32 DebugLevel; + UINT32 Count; + ACPI_OWNER_ID OwnerId; + UINT8 DisplayType; + UINT32 AddressSpaceId; + +} ACPI_REGION_WALK_INFO; + + /* TBD: [Restructure] Merge with struct above */ typedef struct acpi_walk_info diff --git a/ports/acpica/include/actables.h b/ports/acpica/include/actables.h index 59a9a39..038085c 100644 --- a/ports/acpica/include/actables.h +++ b/ports/acpica/include/actables.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/actbinfo.h b/ports/acpica/include/actbinfo.h index 5a84f35..8a9ff73 100644 --- a/ports/acpica/include/actbinfo.h +++ b/ports/acpica/include/actbinfo.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -156,6 +156,7 @@ #define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f) #define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f) #define ACPI_RSDP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f) +#define ACPI_BDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BDAT,f) #define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f) #define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f) #define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f) @@ -179,10 +180,12 @@ #define ACPI_MPST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f) #define ACPI_MSCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f) #define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f) +#define ACPI_NHLT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NHLT,f) #define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f) #define ACPI_PDTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PDTT,f) #define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f) #define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f) +#define ACPI_RGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RGRT,f) #define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f) #define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f) #define ACPI_SDEI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SDEI,f) @@ -192,19 +195,34 @@ #define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f) #define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f) #define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f) +#define ACPI_SVKL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SVKL,f) #define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f) #define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f) +#define ACPI_TPM23_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f) #define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f) +#define ACPI_VIOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_VIOT,f) #define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f) #define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f) #define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f) #define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f) #define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f) +#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f) #define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f) #define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f) /* Subtables */ +#define ACPI_AESTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_HEADER,f) +#define ACPI_AEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR,f) +#define ACPI_AEST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_CACHE,f) +#define ACPI_AEST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_TLB,f) +#define ACPI_AEST0C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_GENERIC,f) +#define ACPI_AEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_MEMORY,f) +#define ACPI_AEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_SMMU,f) +#define ACPI_AEST3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_VENDOR,f) +#define ACPI_AEST4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_GIC,f) +#define ACPI_AEST0D_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERFACE,f) +#define ACPI_AEST0E_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERRUPT,f) #define ACPI_ASF0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f) #define ACPI_ASF1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f) #define ACPI_ASF1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f) @@ -212,6 +230,8 @@ #define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f) #define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f) #define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f) +#define ACPI_CEDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_HEADER, f) +#define ACPI_CEDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CHBS, f) #define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f) #define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f) #define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f) @@ -236,6 +256,7 @@ #define ACPI_GTDT0a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_ENTRY,f) #define ACPI_GTDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_WATCHDOG,f) #define ACPI_GTDTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_HEADER,f) +#define ACPI_GTDT_EL2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_EL2,f) #define ACPI_HEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f) #define ACPI_HEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f) #define ACPI_HEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_NMI,f) @@ -247,7 +268,7 @@ #define ACPI_HEST11_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_DEFERRED_CHECK,f) #define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f) #define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f) -#define ACPI_HMAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f) +#define ACPI_HMAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_PROXIMITY_DOMAIN,f) #define ACPI_HMAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_LOCALITY,f) #define ACPI_HMAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_CACHE,f) #define ACPI_HMATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_STRUCTURE,f) @@ -257,16 +278,21 @@ #define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f) #define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f) #define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f) +#define ACPI_IORT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_PMCG,f) +#define ACPI_IORT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_RMR,f) +#define ACPI_IORT6A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_RMR_DESC,f) #define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f) #define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f) #define ACPI_IORTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f) #define ACPI_IVRSH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HEADER,f) -#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f) +#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE1,f) +#define ACPI_IVRS01_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE2,f) #define ACPI_IVRS1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_MEMORY,f) #define ACPI_IVRSD_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f) #define ACPI_IVRS8A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f) #define ACPI_IVRS8B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f) #define ACPI_IVRS8C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f) +#define ACPI_IVRSHID_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE_HID,f) #define ACPI_LPITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_HEADER,f) #define ACPI_LPIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_NATIVE,f) #define ACPI_MADT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f) @@ -285,6 +311,7 @@ #define ACPI_MADT13_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_MSI_FRAME,f) #define ACPI_MADT14_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_REDISTRIBUTOR,f) #define ACPI_MADT15_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_TRANSLATOR,f) +#define ACPI_MADT16_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_MULTIPROC_WAKEUP,f) #define ACPI_MADTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) #define ACPI_MCFG0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f) #define ACPI_MPST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f) @@ -293,7 +320,6 @@ #define ACPI_MPST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f) #define ACPI_MPST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f) #define ACPI_MSCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f) -#define ACPI_MTMR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MTMR_ENTRY,f) #define ACPI_NFITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_HEADER,f) #define ACPI_NFIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f) #define ACPI_NFIT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_MEMORY_MAP,f) @@ -303,26 +329,52 @@ #define ACPI_NFIT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f) #define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f) #define ACPI_NFIT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f) +#define ACPI_NHLT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_ENDPOINT,f) +#define ACPI_NHLT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f) +#define ACPI_NHLT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_WAVE_EXTENSIBLE,f) +#define ACPI_NHLT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMAT_CONFIG,f) +#define ACPI_NHLT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMATS_CONFIG,f) +#define ACPI_NHLT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f) +#define ACPI_NHLT5A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A,f) +#define ACPI_NHLT5B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B,f) +#define ACPI_NHLT5C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C,f) +#define ACPI_NHLT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_CONFIG,f) +#define ACPI_NHLT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_COUNT,f) +#define ACPI_NHLT7A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_DATA,f) +#define ACPI_NHLT8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_TABLE_TERMINATOR,f) #define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f) #define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f) #define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f) #define ACPI_PCCT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f) #define ACPI_PCCT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f) +#define ACPI_PCCT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REG,f) #define ACPI_PDTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PDTT_CHANNEL,f) +#define ACPI_PHATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_HEADER,f) +#define ACPI_PHAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_VERSION_DATA,f) +#define ACPI_PHAT0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_VERSION_ELEMENT,f) +#define ACPI_PHAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PHAT_HEALTH_DATA,f) #define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f) #define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f) -#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f) #define ACPI_PMTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f) +#define ACPI_PMTT_VENDOR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_VENDOR_SPECIFIC,f) #define ACPI_PMTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f) #define ACPI_PPTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) #define ACPI_PPTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_PROCESSOR,f) #define ACPI_PPTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE,f) +#define ACPI_PPTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE_V1,f) #define ACPI_PPTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_ID,f) +#define ACPI_PRMTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PRMT_HEADER,f) +#define ACPI_PRMT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_MODULE_INFO,f) +#define ACPI_PRMT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PRMT_HANDLER_INFO,f) #define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f) #define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f) #define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f) #define ACPI_SDEVH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_HEADER,f) #define ACPI_SDEV0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_NAMESPACE,f) +#define ACPI_SDEV0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_SECURE_COMPONENT,f) +#define ACPI_SDEVCH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_HEADER,f) +#define ACPI_SDEVC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_ID_COMPONENT, f) +#define ACPI_SDEVC1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_MEM_COMPONENT, f) #define ACPI_SDEV1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE,f) #define ACPI_SDEV1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE_PATH,f) #define ACPI_SLIC_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f) @@ -332,11 +384,18 @@ #define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f) #define ACPI_SRAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GICC_AFFINITY,f) #define ACPI_SRAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GIC_ITS_AFFINITY,f) +#define ACPI_SRAT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GENERIC_AFFINITY,f) +#define ACPI_SVKL0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SVKL_KEY,f) #define ACPI_TCPA_CLIENT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_CLIENT,f) #define ACPI_TCPA_SERVER_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f) #define ACPI_TPM2A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_TRAILER,f) #define ACPI_TPM211_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_ARM_SMC,f) -#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f) +#define ACPI_TPM23A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM23_TRAILER,f) +#define ACPI_VIOTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_HEADER,f) +#define ACPI_VIOT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_PCI_RANGE,f) +#define ACPI_VIOT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_MMIO,f) +#define ACPI_VIOT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_VIRTIO_IOMMU_PCI,f) +#define ACPI_VIOT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VIOT_VIRTIO_IOMMU_MMIO,f) #define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f) /* @@ -346,6 +405,9 @@ /* Flags */ +#define ACPI_AEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_PROCESSOR,f,o) +#define ACPI_AEST0D_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERFACE,f,o) +#define ACPI_AEST0E_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERRUPT,f,o) #define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o) #define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o) #define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o) @@ -354,21 +416,26 @@ #define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_HPET,f,o) #define ACPI_PPTT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_PROCESSOR,f,o) #define ACPI_PPTT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE,f,o) +#define ACPI_PPTT1A_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE_V1,f,o) #define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o) #define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o) #define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o) #define ACPI_SRAT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_GICC_AFFINITY,f,o) +#define ACPI_SRAT5_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_GENERIC_AFFINITY,f,o) #define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o) #define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o) #define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o) -#define ACPI_HMAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f,o) +#define ACPI_HMAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_PROXIMITY_DOMAIN,f,o) #define ACPI_HMAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_LOCALITY,f,o) #define ACPI_HMAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_CACHE,f,o) #define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o) #define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o) #define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o) +#define ACPI_IORT6_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_RMR,f,o) #define ACPI_IORTA_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o) #define ACPI_IORTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o) +#define ACPI_IVRS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IVRS_HEADER,f,o) +#define ACPI_IVRSDE_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IVRS_DE_HEADER,f,o) #define ACPI_LPITH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o) #define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o) #define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o) diff --git a/ports/acpica/include/actbl.h b/ports/acpica/include/actbl.h index 58a9b73..f70f1b5 100644 --- a/ports/acpica/include/actbl.h +++ b/ports/acpica/include/actbl.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -182,6 +182,7 @@ #define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */ #define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */ #define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */ +#define ACPI_OEM_NAME "OEM" /* Short name for OEM, not signature */ /* @@ -212,14 +213,14 @@ typedef struct acpi_table_header { - char Signature[ACPI_NAME_SIZE]; /* ASCII table signature */ + char Signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */ UINT32 Length; /* Length of table in bytes, including this header */ UINT8 Revision; /* ACPI Specification minor version number */ UINT8 Checksum; /* To make sum of entire table == 0 */ char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ UINT32 OemRevision; /* OEM revision number */ - char AslCompilerId[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ + char AslCompilerId[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */ UINT32 AslCompilerRevision; /* ASL compiler version */ } ACPI_TABLE_HEADER; diff --git a/ports/acpica/include/actbl1.h b/ports/acpica/include/actbl1.h index 4f03ab0..09e6829 100644 --- a/ports/acpica/include/actbl1.h +++ b/ports/acpica/include/actbl1.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -168,10 +168,12 @@ * file. Useful because they make it more difficult to inadvertently type in * the wrong signature. */ +#define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */ #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ +#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */ #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */ #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */ @@ -492,6 +494,99 @@ typedef struct acpi_table_boot } ACPI_TABLE_BOOT; +/******************************************************************************* + * + * CEDT - CXL Early Discovery Table + * Version 1 + * + * Conforms to the "CXL Early Discovery Table" (CXL 2.0) + * + ******************************************************************************/ + +typedef struct acpi_table_cedt +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_CEDT; + +/* CEDT subtable header (Performance Record Structure) */ + +typedef struct acpi_cedt_header +{ + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + +} ACPI_CEDT_HEADER; + +/* Values for Type field above */ + +enum AcpiCedtType +{ + ACPI_CEDT_TYPE_CHBS = 0, + ACPI_CEDT_TYPE_CFMWS = 1, + ACPI_CEDT_TYPE_RESERVED = 2, +}; + +/* Values for version field above */ + +#define ACPI_CEDT_CHBS_VERSION_CXL11 (0) +#define ACPI_CEDT_CHBS_VERSION_CXL20 (1) + +/* Values for length field above */ + +#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000) +#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000) + +/* + * CEDT subtables + */ + +/* 0: CXL Host Bridge Structure */ + +typedef struct acpi_cedt_chbs +{ + ACPI_CEDT_HEADER Header; + UINT32 Uid; + UINT32 CxlVersion; + UINT32 Reserved; + UINT64 Base; + UINT64 Length; + +} ACPI_CEDT_CHBS; + + +/* 1: CXL Fixed Memory Window Structure */ + +typedef struct acpi_cedt_cfmws +{ + ACPI_CEDT_HEADER Header; + UINT32 Reserved1; + UINT64 BaseHpa; + UINT64 WindowSize; + UINT8 InterleaveWays; + UINT8 InterleaveArithmetic; + UINT16 Reserved2; + UINT32 Granularity; + UINT16 Restrictions; + UINT16 QtgId; + UINT32 InterleaveTargets[]; + +} ACPI_CEDT_CFMWS; + +/* Values for Interleave Arithmetic field above */ + +#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) + +/* Values for Restrictions field above */ + +#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1) +#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1) +#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2) +#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) +#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) + + /******************************************************************************* * * CPEP - Corrected Platform Error Polling table (ACPI 4.0) @@ -607,7 +702,7 @@ typedef struct acpi_csrt_descriptor * DBG2 - Debug Port Table 2 * Version 0 (Both main table and subtables) * - * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015 + * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020 * ******************************************************************************/ @@ -664,11 +759,24 @@ typedef struct acpi_dbg2_device #define ACPI_DBG2_16550_COMPATIBLE 0x0000 #define ACPI_DBG2_16550_SUBSET 0x0001 +#define ACPI_DBG2_MAX311XE_SPI 0x0002 #define ACPI_DBG2_ARM_PL011 0x0003 +#define ACPI_DBG2_MSM8X60 0x0004 +#define ACPI_DBG2_16550_NVIDIA 0x0005 +#define ACPI_DBG2_TI_OMAP 0x0006 +#define ACPI_DBG2_APM88XXXX 0x0008 +#define ACPI_DBG2_MSM8974 0x0009 +#define ACPI_DBG2_SAM5250 0x000A +#define ACPI_DBG2_INTEL_USIF 0x000B +#define ACPI_DBG2_IMX6 0x000C #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E #define ACPI_DBG2_ARM_DCC 0x000F #define ACPI_DBG2_BCM2835 0x0010 +#define ACPI_DBG2_SDM845_1_8432MHZ 0x0011 +#define ACPI_DBG2_16550_WITH_GAS 0x0012 +#define ACPI_DBG2_SDM845_7_372MHZ 0x0013 +#define ACPI_DBG2_INTEL_LPSS 0x0014 #define ACPI_DBG2_1394_STANDARD 0x0000 @@ -797,7 +905,7 @@ typedef struct acpi_dmar_hardware_unit #define ACPI_DMAR_INCLUDE_ALL (1) -/* 1: Reserved Memory Defininition */ +/* 1: Reserved Memory Definition */ typedef struct acpi_dmar_reserved_memory { @@ -1149,7 +1257,7 @@ enum AcpiErstInstructions enum AcpiErstCommandStatus { - ACPI_ERST_SUCESS = 0, + ACPI_ERST_SUCCESS = 0, ACPI_ERST_NO_SPACE = 1, ACPI_ERST_NOT_AVAILABLE = 2, ACPI_ERST_FAILURE = 3, @@ -1319,6 +1427,12 @@ typedef struct acpi_table_gtdt #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) #define ACPI_GTDT_ALWAYS_ON (1<<2) +typedef struct acpi_gtdt_el2 +{ + UINT32 VirtualEL2TimerGsiv; + UINT32 VirtualEL2TimerFlags; +} ACPI_GTDT_EL2; + /* Common GTDT subtable header */ @@ -1761,8 +1875,7 @@ typedef struct acpi_hest_ia_deferred_check /******************************************************************************* * - * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2) - * Version 1 + * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3) * ******************************************************************************/ @@ -1778,7 +1891,7 @@ typedef struct acpi_table_hmat enum AcpiHmatType { - ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */ + ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */ ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */ ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */ ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ @@ -1797,26 +1910,24 @@ typedef struct acpi_hmat_structure * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE */ -/* 0: Memory subystem address range */ +/* 0: Memory proximity domain attributes */ -typedef struct acpi_hmat_address_range +typedef struct acpi_hmat_proximity_domain { ACPI_HMAT_STRUCTURE Header; UINT16 Flags; UINT16 Reserved1; - UINT32 ProcessorPD; /* Processor proximity domain */ + UINT32 InitiatorPD; /* Attached Initiator proximity domain */ UINT32 MemoryPD; /* Memory proximity domain */ UINT32 Reserved2; - UINT64 PhysicalAddressBase; /* Physical address range base */ - UINT64 PhysicalAddressLength; /* Physical address range length */ + UINT64 Reserved3; + UINT64 Reserved4; -} ACPI_HMAT_ADDRESS_RANGE; +} ACPI_HMAT_PROXIMITY_DOMAIN; /* Masks for Flags field above */ -#define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: ProcessorPD field is valid */ -#define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: MemoryPD field is valid */ -#define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */ +#define ACPI_HMAT_INITIATOR_PD_VALID (1) /* 1: InitiatorPD field is valid */ /* 1: System locality latency and bandwidth information */ @@ -1826,7 +1937,8 @@ typedef struct acpi_hmat_locality ACPI_HMAT_STRUCTURE Header; UINT8 Flags; UINT8 DataType; - UINT16 Reserved1; + UINT8 MinTransferSize; + UINT8 Reserved1; UINT32 NumberOfInitiatorPDs; UINT32 NumberOfTargetPDs; UINT32 Reserved2; @@ -1836,15 +1948,17 @@ typedef struct acpi_hmat_locality /* Masks for Flags field above */ -#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) +#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */ -/* Values for Memory Hierarchy flag */ +/* Values for Memory Hierarchy flags */ #define ACPI_HMAT_MEMORY 0 -#define ACPI_HMAT_LAST_LEVEL_CACHE 1 -#define ACPI_HMAT_1ST_LEVEL_CACHE 2 -#define ACPI_HMAT_2ND_LEVEL_CACHE 3 -#define ACPI_HMAT_3RD_LEVEL_CACHE 4 +#define ACPI_HMAT_1ST_LEVEL_CACHE 1 +#define ACPI_HMAT_2ND_LEVEL_CACHE 2 +#define ACPI_HMAT_3RD_LEVEL_CACHE 3 +#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */ +#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */ + /* Values for DataType field above */ diff --git a/ports/acpica/include/actbl2.h b/ports/acpica/include/actbl2.h index 4b3d460..0c80aae 100644 --- a/ports/acpica/include/actbl2.h +++ b/ports/acpica/include/actbl2.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -168,6 +168,7 @@ * file. Useful because they make it more difficult to inadvertently type in * the wrong signature. */ +#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ @@ -177,16 +178,20 @@ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ -#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ +#define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */ #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */ +#define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */ #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */ +#define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ +#define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ +#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */ /* @@ -208,12 +213,216 @@ */ +/******************************************************************************* + * + * AEST - Arm Error Source Table + * + * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document + * September 2020. + * + ******************************************************************************/ + +typedef struct acpi_table_aest +{ + ACPI_TABLE_HEADER Header; + void *NodeArray[]; + +} ACPI_TABLE_AEST; + +/* Common Subtable header - one per Node Structure (Subtable) */ + +typedef struct acpi_aest_hdr +{ + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT32 NodeSpecificOffset; + UINT32 NodeInterfaceOffset; + UINT32 NodeInterruptOffset; + UINT32 NodeInterruptCount; + UINT64 TimestampRate; + UINT64 Reserved1; + UINT64 ErrorInjectionRate; + +} ACPI_AEST_HEADER; + +/* Values for Type above */ + +#define ACPI_AEST_PROCESSOR_ERROR_NODE 0 +#define ACPI_AEST_MEMORY_ERROR_NODE 1 +#define ACPI_AEST_SMMU_ERROR_NODE 2 +#define ACPI_AEST_VENDOR_ERROR_NODE 3 +#define ACPI_AEST_GIC_ERROR_NODE 4 +#define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */ + + +/* + * AEST subtables (Error nodes) + */ + +/* 0: Processor Error */ + +typedef struct acpi_aest_processor +{ + UINT32 ProcessorId; + UINT8 ResourceType; + UINT8 Reserved; + UINT8 Flags; + UINT8 Revision; + UINT64 ProcessorAffinity; + +} ACPI_AEST_PROCESSOR; + +/* Values for ResourceType above, related structs below */ + +#define ACPI_AEST_CACHE_RESOURCE 0 +#define ACPI_AEST_TLB_RESOURCE 1 +#define ACPI_AEST_GENERIC_RESOURCE 2 +#define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */ + +/* 0R: Processor Cache Resource Substructure */ + +typedef struct acpi_aest_processor_cache +{ + UINT32 CacheReference; + UINT32 Reserved; + +} ACPI_AEST_PROCESSOR_CACHE; + +/* Values for CacheType above */ + +#define ACPI_AEST_CACHE_DATA 0 +#define ACPI_AEST_CACHE_INSTRUCTION 1 +#define ACPI_AEST_CACHE_UNIFIED 2 +#define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */ + +/* 1R: Processor TLB Resource Substructure */ + +typedef struct acpi_aest_processor_tlb +{ + UINT32 TlbLevel; + UINT32 Reserved; + +} ACPI_AEST_PROCESSOR_TLB; + +/* 2R: Processor Generic Resource Substructure */ + +typedef struct acpi_aest_processor_generic +{ + UINT8 *Resource; + +} ACPI_AEST_PROCESSOR_GENERIC; + +/* 1: Memory Error */ + +typedef struct acpi_aest_memory +{ + UINT32 SratProximityDomain; + +} ACPI_AEST_MEMORY; + +/* 2: Smmu Error */ + +typedef struct acpi_aest_smmu +{ + UINT32 IortNodeReference; + UINT32 SubcomponentReference; + +} ACPI_AEST_SMMU; + +/* 3: Vendor Defined */ + +typedef struct acpi_aest_vendor +{ + UINT32 AcpiHid; + UINT32 AcpiUid; + UINT8 VendorSpecificData[16]; + +} ACPI_AEST_VENDOR; + +/* 4: Gic Error */ + +typedef struct acpi_aest_gic +{ + UINT32 InterfaceType; + UINT32 InstanceId; + +} ACPI_AEST_GIC; + +/* Values for InterfaceType above */ + +#define ACPI_AEST_GIC_CPU 0 +#define ACPI_AEST_GIC_DISTRIBUTOR 1 +#define ACPI_AEST_GIC_REDISTRIBUTOR 2 +#define ACPI_AEST_GIC_ITS 3 +#define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */ + + +/* Node Interface Structure */ + +typedef struct acpi_aest_node_interface +{ + UINT8 Type; + UINT8 Reserved[3]; + UINT32 Flags; + UINT64 Address; + UINT32 ErrorRecordIndex; + UINT32 ErrorRecordCount; + UINT64 ErrorRecordImplemented; + UINT64 ErrorStatusReporting; + UINT64 AddressingMode; + +} ACPI_AEST_NODE_INTERFACE; + +/* Values for Type field above */ + +#define ACPI_AEST_NODE_SYSTEM_REGISTER 0 +#define ACPI_AEST_NODE_MEMORY_MAPPED 1 +#define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */ + +/* Node Interrupt Structure */ + +typedef struct acpi_aest_node_interrupt +{ + UINT8 Type; + UINT8 Reserved[2]; + UINT8 Flags; + UINT32 Gsiv; + UINT8 IortId; + UINT8 Reserved1[3]; + +} ACPI_AEST_NODE_INTERRUPT; + +/* Values for Type field above */ + +#define ACPI_AEST_NODE_FAULT_HANDLING 0 +#define ACPI_AEST_NODE_ERROR_RECOVERY 1 +#define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */ + + +/******************************************************************************* + * + * BDAT - BIOS Data ACPI Table + * + * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5 + * Nov 2020 + * + ******************************************************************************/ + +typedef struct acpi_table_bdat +{ + ACPI_TABLE_HEADER Header; + ACPI_GENERIC_ADDRESS Gas; + +} ACPI_TABLE_BDAT; + + /******************************************************************************* * * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049C, May 2017 + * Document number: ARM DEN 0049E.b, Feb 2021 * ******************************************************************************/ @@ -235,7 +444,7 @@ typedef struct acpi_iort_node UINT8 Type; UINT16 Length; UINT8 Revision; - UINT32 Reserved; + UINT32 Identifier; UINT32 MappingCount; UINT32 MappingOffset; char NodeData[1]; @@ -250,7 +459,9 @@ enum AcpiIortNodeType ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, ACPI_IORT_NODE_SMMU = 0x03, - ACPI_IORT_NODE_SMMU_V3 = 0x04 + ACPI_IORT_NODE_SMMU_V3 = 0x04, + ACPI_IORT_NODE_PMCG = 0x05, + ACPI_IORT_NODE_RMR = 0x06, }; @@ -302,7 +513,7 @@ typedef struct acpi_iort_memory_access typedef struct acpi_iort_its_group { UINT32 ItsCount; - UINT32 Identifiers[1]; /* GIC ITS identifier arrary */ + UINT32 Identifiers[1]; /* GIC ITS identifier array */ } ACPI_IORT_ITS_GROUP; @@ -316,19 +527,26 @@ typedef struct acpi_iort_named_component } ACPI_IORT_NAMED_COMPONENT; +/* Masks for Flags field above */ + +#define ACPI_IORT_NC_STALL_SUPPORTED (1) +#define ACPI_IORT_NC_PASID_BITS (31<<1) typedef struct acpi_iort_root_complex { UINT64 MemoryProperties; /* Memory access properties */ UINT32 AtsAttribute; UINT32 PciSegmentNumber; + UINT8 MemoryAddressLimit; /* Memory address size limit */ + UINT8 Reserved[3]; /* Reserved, must be zero */ } ACPI_IORT_ROOT_COMPLEX; -/* Values for AtsAttribute field above */ +/* Masks for AtsAttribute field above */ -#define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */ -#define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */ +#define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */ +#define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */ +#define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */ typedef struct acpi_iort_smmu @@ -383,9 +601,7 @@ typedef struct acpi_iort_smmu_v3 UINT32 PriGsiv; UINT32 GerrGsiv; UINT32 SyncGsiv; - UINT8 Pxm; - UINT8 Reserved1; - UINT16 Reserved2; + UINT32 Pxm; UINT32 IdMappingIndex; } ACPI_IORT_SMMU_V3; @@ -399,9 +615,31 @@ typedef struct acpi_iort_smmu_v3 /* Masks for Flags field above */ #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) -#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) +#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) +typedef struct acpi_iort_pmcg +{ + UINT64 Page0BaseAddress; + UINT32 OverflowGsiv; + UINT32 NodeReference; + UINT64 Page1BaseAddress; + +} ACPI_IORT_PMCG; + +typedef struct acpi_iort_rmr { + UINT32 Flags; + UINT32 RmrCount; + UINT32 RmrOffset; + +} ACPI_IORT_RMR; + +typedef struct acpi_iort_rmr_desc { + UINT64 BaseAddress; + UINT64 Length; + UINT32 Reserved; + +} ACPI_IORT_RMR_DESC; /******************************************************************************* * @@ -443,7 +681,9 @@ typedef struct acpi_ivrs_header enum AcpiIvrsType { - ACPI_IVRS_TYPE_HARDWARE = 0x10, + ACPI_IVRS_TYPE_HARDWARE1 = 0x10, + ACPI_IVRS_TYPE_HARDWARE2 = 0x11, + ACPI_IVRS_TYPE_HARDWARE3 = 0x40, ACPI_IVRS_TYPE_MEMORY1 = 0x20, ACPI_IVRS_TYPE_MEMORY2 = 0x21, ACPI_IVRS_TYPE_MEMORY3 = 0x22 @@ -471,16 +711,30 @@ enum AcpiIvrsType /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ -typedef struct acpi_ivrs_hardware +typedef struct acpi_ivrs_hardware_10 { ACPI_IVRS_HEADER Header; UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ UINT64 BaseAddress; /* IOMMU control registers */ UINT16 PciSegmentGroup; UINT16 Info; /* MSI number and unit ID */ - UINT32 Reserved; + UINT32 FeatureReporting; -} ACPI_IVRS_HARDWARE; +} ACPI_IVRS_HARDWARE1; + +/* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */ + +typedef struct acpi_ivrs_hardware_11 +{ + ACPI_IVRS_HEADER Header; + UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ + UINT64 BaseAddress; /* IOMMU control registers */ + UINT16 PciSegmentGroup; + UINT16 Info; /* MSI number and unit ID */ + UINT32 Attributes; + UINT64 EfrRegisterImage; + UINT64 Reserved; +} ACPI_IVRS_HARDWARE2; /* Masks for Info field above */ @@ -526,7 +780,11 @@ enum AcpiIvrsDeviceEntryType ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */ ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */ ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */ - ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */ + ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses ACPI_IVRS_DEVICE8C */ + + /* Variable-length device entries */ + + ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */ }; /* Values for Data field above */ @@ -587,6 +845,23 @@ typedef struct acpi_ivrs_device8c #define ACPI_IVHD_IOAPIC 1 #define ACPI_IVHD_HPET 2 +/* Type 240: variable-length device entry */ + +typedef struct acpi_ivrs_device_hid +{ + ACPI_IVRS_DE_HEADER Header; + UINT64 AcpiHid; + UINT64 AcpiCid; + UINT8 UidType; + UINT8 UidLength; + +} ACPI_IVRS_DEVICE_HID; + +/* Values for UidType above */ + +#define ACPI_IVRS_UID_NOT_PRESENT 0 +#define ACPI_IVRS_UID_IS_INTEGER 1 +#define ACPI_IVRS_UID_IS_STRING 2 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ @@ -704,7 +979,8 @@ enum AcpiMadtType ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, - ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */ + ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16, + ACPI_MADT_TYPE_RESERVED = 17 /* 17 and greater are reserved */ }; @@ -859,7 +1135,7 @@ typedef struct acpi_madt_local_x2apic_nmi } ACPI_MADT_LOCAL_X2APIC_NMI; -/* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ +/* 11: Generic Interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ typedef struct acpi_madt_generic_interrupt { @@ -878,7 +1154,8 @@ typedef struct acpi_madt_generic_interrupt UINT64 GicrBaseAddress; UINT64 ArmMpidr; UINT8 EfficiencyClass; - UINT8 Reserved2[3]; + UINT8 Reserved2[1]; + UINT16 SpeInterrupt; /* ACPI 6.3 */ } ACPI_MADT_GENERIC_INTERRUPT; @@ -959,6 +1236,33 @@ typedef struct acpi_madt_generic_translator } ACPI_MADT_GENERIC_TRANSLATOR; +/* 16: Multiprocessor wakeup (ACPI 6.4) */ + +typedef struct acpi_madt_multiproc_wakeup +{ + ACPI_SUBTABLE_HEADER Header; + UINT16 MailboxVersion; + UINT32 Reserved; /* reserved - must be zero */ + UINT64 BaseAddress; + +} ACPI_MADT_MULTIPROC_WAKEUP; + +#define ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE 2032 +#define ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE 2048 + +typedef struct acpi_madt_multiproc_wakeup_mailbox +{ + UINT16 Command; + UINT16 Reserved; /* reserved - must be zero */ + UINT32 ApicId; + UINT64 WakeupVector; + UINT8 ReservedOs[ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE]; /* reserved for OS use */ + UINT8 ReservedFirmware[ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE]; /* reserved for firmware use */ + +} ACPI_MADT_MULTIPROC_WAKEUP_MAILBOX; + +#define ACPI_MP_WAKE_COMMAND_WAKEUP 1 + /* * Common flags fields for MADT subtables @@ -967,6 +1271,7 @@ typedef struct acpi_madt_generic_translator /* MADT Local APIC flags */ #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ +#define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */ /* MADT MPS INTI flags (IntiFlags) */ @@ -1213,34 +1518,6 @@ typedef struct acpi_table_msdm } ACPI_TABLE_MSDM; -/******************************************************************************* - * - * MTMR - MID Timer Table - * Version 1 - * - * Conforms to "Simple Firmware Interface Specification", - * Draft 0.8.2, Oct 19, 2010 - * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. - * - ******************************************************************************/ - -typedef struct acpi_table_mtmr -{ - ACPI_TABLE_HEADER Header; /* Common ACPI table header */ - -} ACPI_TABLE_MTMR; - -/* MTMR entry */ - -typedef struct acpi_mtmr_entry -{ - ACPI_GENERIC_ADDRESS PhysicalAddress; - UINT32 Frequency; - UINT32 Irq; - -} ACPI_MTMR_ENTRY; - - /******************************************************************************* * * NFIT - NVDIMM Interface Table (ACPI 6.0+) @@ -1297,6 +1574,7 @@ typedef struct acpi_nfit_system_address UINT64 Address; UINT64 Length; UINT64 MemoryMapping; + UINT64 LocationCookie; /* ACPI 6.4 */ } ACPI_NFIT_SYSTEM_ADDRESS; @@ -1304,6 +1582,7 @@ typedef struct acpi_nfit_system_address #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */ #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */ +#define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */ /* Range Type GUIDs appear in the include/acuuid.h file */ @@ -1499,6 +1778,292 @@ typedef struct nfit_device_handle (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET) +/******************************************************************************* + * + * NHLT - Non HD Audio Link Table + * + * Conforms to: Intel Smart Sound Technology NHLT Specification + * Version 0.8.1, January 2020. + * + ******************************************************************************/ + +/* Main table */ + +typedef struct acpi_table_nhlt +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT8 EndpointCount; + +} ACPI_TABLE_NHLT; + +typedef struct acpi_nhlt_endpoint +{ + UINT32 DescriptorLength; + UINT8 LinkType; + UINT8 InstanceId; + UINT16 VendorId; + UINT16 DeviceId; + UINT16 RevisionId; + UINT32 SubsystemId; + UINT8 DeviceType; + UINT8 Direction; + UINT8 VirtualBusId; + +} ACPI_NHLT_ENDPOINT; + +/* Types for LinkType field above */ + +#define ACPI_NHLT_RESERVED_HD_AUDIO 0 +#define ACPI_NHLT_RESERVED_DSP 1 +#define ACPI_NHLT_PDM 2 +#define ACPI_NHLT_SSP 3 +#define ACPI_NHLT_RESERVED_SLIMBUS 4 +#define ACPI_NHLT_RESERVED_SOUNDWIRE 5 +#define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */ + +/* All other values above are reserved */ + +/* Values for DeviceId field above */ + +#define ACPI_NHLT_PDM_DMIC 0xAE20 +#define ACPI_NHLT_BT_SIDEBAND 0xAE30 +#define ACPI_NHLT_I2S_TDM_CODECS 0xAE23 + +/* Values for DeviceType field above */ + +/* SSP Link */ + +#define ACPI_NHLT_LINK_BT_SIDEBAND 0 +#define ACPI_NHLT_LINK_FM 1 +#define ACPI_NHLT_LINK_MODEM 2 +/* 3 is reserved */ +#define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4 + +/* PDM Link */ + +#define ACPI_NHLT_PDM_ON_CAVS_1P8 0 +#define ACPI_NHLT_PDM_ON_CAVS_1P5 1 + +/* Values for Direction field above */ + +#define ACPI_NHLT_DIR_RENDER 0 +#define ACPI_NHLT_DIR_CAPTURE 1 +#define ACPI_NHLT_DIR_RENDER_LOOPBACK 2 +#define ACPI_NHLT_DIR_RENDER_FEEDBACK 3 +#define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */ + +typedef struct acpi_nhlt_device_specific_config +{ + UINT32 CapabilitiesSize; + UINT8 VirtualSlot; + UINT8 ConfigType; + +} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG; + +typedef struct acpi_nhlt_device_specific_config_a +{ + UINT32 CapabilitiesSize; + UINT8 VirtualSlot; + UINT8 ConfigType; + UINT8 ArrayType; + +} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A; + +/* Values for Config Type above */ + +#define ACPI_NHLT_TYPE_MIC_ARRAY 0x01 +#define ACPI_NHLT_TYPE_GENERIC 0x00 + +/* Mask for Extension field of ArrayType */ + +#define ACPI_NHLT_ARRAY_TYPE_MASK 0x10 + +typedef struct acpi_nhlt_device_specific_config_b +{ + UINT32 CapabilitiesSize; + +} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B; + +typedef struct acpi_nhlt_device_specific_config_c +{ + UINT32 CapabilitiesSize; + UINT8 VirtualSlot; + +} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C; + +typedef struct acpi_nhlt_wave_extensible +{ + UINT16 FormatTag; + UINT16 ChannelCount; + UINT32 SamplesPerSec; + UINT32 AvgBytesPerSec; + UINT16 BlockAlign; + UINT16 BitsPerSample; + UINT16 ExtraFormatSize; + UINT16 ValidBitsPerSample; + UINT32 ChannelMask; + UINT8 SubFormatGuid[16]; + +} ACPI_NHLT_WAVE_EXTENSIBLE; + +/* Values for ChannelMask above */ + +#define ACPI_NHLT_SPKR_FRONT_LEFT 0x1 +#define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2 +#define ACPI_NHLT_SPKR_FRONT_CENTER 0x4 +#define ACPI_NHLT_SPKR_LOW_FREQ 0x8 +#define ACPI_NHLT_SPKR_BACK_LEFT 0x10 +#define ACPI_NHLT_SPKR_BACK_RIGHT 0x20 +#define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40 +#define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80 +#define ACPI_NHLT_SPKR_BACK_CENTER 0x100 +#define ACPI_NHLT_SPKR_SIDE_LEFT 0x200 +#define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400 +#define ACPI_NHLT_SPKR_TOP_CENTER 0x800 +#define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000 +#define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000 +#define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000 +#define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000 +#define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000 +#define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000 + +typedef struct acpi_nhlt_format_config +{ + ACPI_NHLT_WAVE_EXTENSIBLE Format; + UINT32 CapabilitySize; + UINT8 Capabilities[]; + +} ACPI_NHLT_FORMAT_CONFIG; + +typedef struct acpi_nhlt_formats_config +{ + UINT8 FormatsCount; + +} ACPI_NHLT_FORMATS_CONFIG; + +typedef struct acpi_nhlt_device_specific_hdr +{ + UINT8 VirtualSlot; + UINT8 ConfigType; + +} ACPI_NHLT_DEVICE_SPECIFIC_HDR; + +/* Types for ConfigType above */ + +#define ACPI_NHLT_GENERIC 0 +#define ACPI_NHLT_MIC 1 +#define ACPI_NHLT_RENDER 3 + +typedef struct acpi_nhlt_mic_device_specific_config +{ + ACPI_NHLT_DEVICE_SPECIFIC_HDR DeviceConfig; + UINT8 ArrayTypeExt; + +} ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG; + +/* Values for ArrayTypeExt above */ + +#define SMALL_LINEAR_2ELEMENT 0x0A +#define BIG_LINEAR_2ELEMENT 0x0B +#define FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C +#define PLANAR_LSHAPED_4ELEMENT 0x0D +#define SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E +#define VENDOR_DEFINED 0x0F +#define ARRAY_TYPE_MASK 0x0F +#define ARRAY_TYPE_EXT_MASK 0x10 + +#define NO_EXTENSION 0x0 +#define MIC_SNR_SENSITIVITY_EXT 0x1 + + +typedef struct acpi_nhlt_vendor_mic_config +{ + UINT8 Type; + UINT8 Panel; + UINT16 SpeakerPositionDistance; // mm + UINT16 HorizontalOffset; // mm + UINT16 VerticalOffset; // mm + UINT8 FrequencyLowBand; // 5*Hz + UINT8 FrequencyHighBand; // 500*Hz + UINT16 DirectionAngle; // -180 - + 180 + UINT16 ElevationAngle; // -180 - + 180 + UINT16 WorkVerticalAngleBegin; // -180 - + 180 with 2 deg step + UINT16 WorkVerticalAngleEnd; // -180 - + 180 with 2 deg step + UINT16 WorkHorizontalAngleBegin; // -180 - + 180 with 2 deg step + UINT16 WorkHorizontalAngleEnd; // -180 - + 180 with 2 deg step + +} ACPI_NHLT_VENDOR_MIC_CONFIG; + +/* Values for Type field above */ + +#define MIC_OMNIDIRECTIONAL 0 +#define MIC_SUBCARDIOID 1 +#define MIC_CARDIOID 2 +#define MIC_SUPER_CARDIOID 3 +#define MIC_HYPER_CARDIOID 4 +#define MIC_8_SHAPED 5 +#define MIC_VENDOR_DEFINED 7 + +/* Values for Panel field above */ + +#define MIC_TOP 0 +#define MIC_BOTTOM 1 +#define MIC_LEFT 2 +#define MIC_RIGHT 3 +#define MIC_FRONT 4 +#define MIC_REAR 5 + +typedef struct acpi_nhlt_vendor_mic_device_specific_config +{ + ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG MicArrayDeviceConfig; + UINT8 NumberOfMicrophones; + ACPI_NHLT_VENDOR_MIC_CONFIG MicConfig[]; // Indexed by NumberOfMicrophones + +} ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG; + +/* Microphone SNR and Sensitivity extension */ + +typedef struct acpi_nhlt_mic_snr_sensitivity_extension +{ + UINT32 SNR; + UINT32 Sensitivity; + +} ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION; + +typedef struct acpi_nhlt_render_feedback_device_specific_config +{ + ACPI_NHLT_DEVICE_SPECIFIC_CONFIG DeviceConfig; + UINT8 FeedbackVirtualSlot; // Render slot in case of capture + UINT16 FeedbackChannels; // Informative only + UINT16 FeedbackValidBitsPerSample; + +} ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG; + +/* Linux-specific structures */ + +typedef struct acpi_nhlt_linux_specific_count +{ + UINT8 StructureCount; + +} ACPI_NHLT_LINUX_SPECIFIC_COUNT; + +typedef struct acpi_nhlt_linux_specific_data +{ + UINT8 DeviceId[16]; + UINT8 DeviceInstanceId; + UINT8 DevicePortId; + UINT8 Filler[18]; + +} ACPI_NHLT_LINUX_SPECIFIC_DATA; + +typedef struct acpi_nhlt_table_terminator +{ + UINT32 TerminatorValue; + UINT32 TerminatorSignature; + +} ACPI_NHLT_TABLE_TERMINATOR; + + /******************************************************************************* * * PCCT - Platform Communications Channel Table (ACPI 5.0) @@ -1527,7 +2092,8 @@ enum AcpiPcctType ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */ ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */ ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */ - ACPI_PCCT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ + ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */ + ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ }; /* @@ -1656,6 +2222,26 @@ typedef struct acpi_pcct_ext_pcc_slave } ACPI_PCCT_EXT_PCC_SLAVE; +/* 5: HW Registers based Communications Subspace */ + +typedef struct acpi_pcct_hw_reg +{ + ACPI_SUBTABLE_HEADER Header; + UINT16 Version; + UINT64 BaseAddress; + UINT64 Length; + ACPI_GENERIC_ADDRESS DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + ACPI_GENERIC_ADDRESS CmdCompleteRegister; + UINT64 CmdCompleteMask; + ACPI_GENERIC_ADDRESS ErrorStatusRegister; + UINT64 ErrorStatusMask; + UINT32 NominalLatency; + UINT32 MinTurnaroundTime; + +} ACPI_PCCT_HW_REG; + /* Values for doorbell flags above */ @@ -1723,6 +2309,80 @@ typedef struct acpi_pdtt_channel #define ACPI_PDTT_RUNTIME_TRIGGER (1) #define ACPI_PDTT_WAIT_COMPLETION (1<<1) +#define ACPI_PDTT_TRIGGER_ORDER (1<<2) + + +/******************************************************************************* + * + * PHAT - Platform Health Assessment Table (ACPI 6.4) + * Version 1 + * + ******************************************************************************/ + +typedef struct acpi_table_phat +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_PHAT; + +/* Common header for PHAT subtables that follow main table */ + +typedef struct acpi_phat_header +{ + UINT16 Type; + UINT16 Length; + UINT8 Revision; + +} ACPI_PHAT_HEADER; + + +/* Values for Type field above */ + +#define ACPI_PHAT_TYPE_FW_VERSION_DATA 0 +#define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1 +#define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */ + +/* + * PHAT subtables, correspond to Type in ACPI_PHAT_HEADER + */ + +/* 0: Firmware Version Data Record */ + +typedef struct acpi_phat_version_data +{ + ACPI_PHAT_HEADER Header; + UINT8 Reserved[3]; + UINT32 ElementCount; + +} ACPI_PHAT_VERSION_DATA; + +typedef struct acpi_phat_version_element +{ + UINT8 Guid[16]; + UINT64 VersionValue; + UINT32 ProducerId; + +} ACPI_PHAT_VERSION_ELEMENT; + + +/* 1: Firmware Health Data Record */ + +typedef struct acpi_phat_health_data +{ + ACPI_PHAT_HEADER Header; + UINT8 Reserved[2]; + UINT8 Health; + UINT8 DeviceGuid[16]; + UINT32 DeviceSpecificOffset; /* Zero if no Device-specific data */ + +} ACPI_PHAT_HEALTH_DATA; + +/* Values for Health field above */ + +#define ACPI_PHAT_ERRORS_FOUND 0 +#define ACPI_PHAT_NO_ERRORS 1 +#define ACPI_PHAT_UNKNOWN_ERRORS 2 +#define ACPI_PHAT_ADVISORY 3 /******************************************************************************* @@ -1735,7 +2395,11 @@ typedef struct acpi_pdtt_channel typedef struct acpi_table_pmtt { ACPI_TABLE_HEADER Header; /* Common ACPI table header */ - UINT32 Reserved; + UINT32 MemoryDeviceCount; + /* + * Immediately followed by: + * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount]; + */ } ACPI_TABLE_PMTT; @@ -1749,6 +2413,12 @@ typedef struct acpi_pmtt_header UINT16 Length; UINT16 Flags; UINT16 Reserved2; + UINT32 MemoryDeviceCount; /* Zero means no memory device structs follow */ + /* + * Immediately followed by: + * UINT8 TypeSpecificData[] + * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount]; + */ } ACPI_PMTT_HEADER; @@ -1757,7 +2427,8 @@ typedef struct acpi_pmtt_header #define ACPI_PMTT_TYPE_SOCKET 0 #define ACPI_PMTT_TYPE_CONTROLLER 1 #define ACPI_PMTT_TYPE_DIMM 2 -#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ +#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */ +#define ACPI_PMTT_TYPE_VENDOR 0xFF /* Values for Flags field above */ @@ -1780,6 +2451,10 @@ typedef struct acpi_pmtt_socket UINT16 Reserved; } ACPI_PMTT_SOCKET; + /* + * Immediately followed by: + * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount]; + */ /* 1: Memory Controller subtable */ @@ -1787,24 +2462,14 @@ typedef struct acpi_pmtt_socket typedef struct acpi_pmtt_controller { ACPI_PMTT_HEADER Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 AccessWidth; - UINT16 Alignment; + UINT16 ControllerId; UINT16 Reserved; - UINT16 DomainCount; } ACPI_PMTT_CONTROLLER; - -/* 1a: Proximity Domain substructure */ - -typedef struct acpi_pmtt_domain -{ - UINT32 ProximityDomain; - -} ACPI_PMTT_DOMAIN; + /* + * Immediately followed by: + * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount]; + */ /* 2: Physical Component Identifier (DIMM) */ @@ -1812,14 +2477,27 @@ typedef struct acpi_pmtt_domain typedef struct acpi_pmtt_physical_component { ACPI_PMTT_HEADER Header; - UINT16 ComponentId; - UINT16 Reserved; - UINT32 MemorySize; UINT32 BiosHandle; } ACPI_PMTT_PHYSICAL_COMPONENT; +/* 0xFF: Vendor Specific Data */ + +typedef struct acpi_pmtt_vendor_specific +{ + ACPI_PMTT_HEADER Header; + UINT8 TypeUuid[16]; + UINT8 Specific[]; + /* + * Immediately followed by: + * UINT8 VendorSpecificData[]; + * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount]; + */ + +} ACPI_PMTT_VENDOR_SPECIFIC; + + /******************************************************************************* * * PPTT - Processor Properties Topology Table (ACPI 6.2) @@ -1859,8 +2537,11 @@ typedef struct acpi_pptt_processor /* Flags */ -#define ACPI_PPTT_PHYSICAL_PACKAGE (1) /* Physical package */ -#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (2) /* ACPI Processor ID valid */ +#define ACPI_PPTT_PHYSICAL_PACKAGE (1) +#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1) +#define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */ /* 1: Cache Type Structure */ @@ -1879,6 +2560,15 @@ typedef struct acpi_pptt_cache } ACPI_PPTT_CACHE; +/* 1: Cache Type Structure for PPTT version 3 */ + +typedef struct acpi_pptt_cache_v1 +{ + UINT32 CacheId; + +} ACPI_PPTT_CACHE_V1; + + /* Flags */ #define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */ @@ -1888,6 +2578,7 @@ typedef struct acpi_pptt_cache #define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */ #define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */ #define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */ +#define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */ /* Masks for Attributes */ @@ -1925,6 +2616,59 @@ typedef struct acpi_pptt_id } ACPI_PPTT_ID; +/******************************************************************************* + * + * PRMT - Platform Runtime Mechanism Table + * Version 1 + * + ******************************************************************************/ + +typedef struct acpi_table_prmt +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_PRMT; + +typedef struct acpi_table_prmt_header +{ + UINT8 PlatformGuid[16]; + UINT32 ModuleInfoOffset; + UINT32 ModuleInfoCount; + +} ACPI_TABLE_PRMT_HEADER; + +typedef struct acpi_prmt_module_header +{ + UINT16 Revision; + UINT16 Length; + +} ACPI_PRMT_MODULE_HEADER; + +typedef struct acpi_prmt_module_info +{ + UINT16 Revision; + UINT16 Length; + UINT8 ModuleGuid[16]; + UINT16 MajorRev; + UINT16 MinorRev; + UINT16 HandlerInfoCount; + UINT32 HandlerInfoOffset; + UINT64 MmioListPointer; + +} ACPI_PRMT_MODULE_INFO; + +typedef struct acpi_prmt_handler_info +{ + UINT16 Revision; + UINT16 Length; + UINT8 HandlerGuid[16]; + UINT64 HandlerAddress; + UINT64 StaticDataBufferAddress; + UINT64 AcpiParamBufferAddress; + +} ACPI_PRMT_HANDLER_INFO; + + /******************************************************************************* * * RASF - RAS Feature Table (ACPI 5.0) @@ -2034,6 +2778,36 @@ enum AcpiRasfStatus #define ACPI_RASF_STATUS (0x1F<<3) +/******************************************************************************* + * + * RGRT - Regulatory Graphics Resource Table + * Version 1 + * + * Conforms to "ACPI RGRT" available at: + * https://microsoft.github.io/mu/dyn/mu_plus/MsCorePkg/AcpiRGRT/feature_acpi_rgrt/ + * + ******************************************************************************/ + +typedef struct acpi_table_rgrt +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT16 Version; + UINT8 ImageType; + UINT8 Reserved; + UINT8 Image[0]; + +} ACPI_TABLE_RGRT; + +/* ImageType values */ + +enum AcpiRgrtImageType +{ + ACPI_RGRT_TYPE_RESERVED0 = 0, + ACPI_RGRT_IMAGE_TYPE_PNG = 1, + ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ +}; + + /******************************************************************************* * * SBST - Smart Battery Specification Table @@ -2102,6 +2876,7 @@ enum AcpiSdevType /* Values for flags above */ #define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1) +#define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1) /* * SDEV subtables @@ -2119,6 +2894,58 @@ typedef struct acpi_sdev_namespace } ACPI_SDEV_NAMESPACE; +typedef struct acpi_sdev_secure_component +{ + UINT16 SecureComponentOffset; + UINT16 SecureComponentLength; + +} ACPI_SDEV_SECURE_COMPONENT; + + +/* + * SDEV sub-subtables ("Components") for above + */ +typedef struct acpi_sdev_component +{ + ACPI_SDEV_HEADER Header; + +} ACPI_SDEV_COMPONENT; + + +/* Values for sub-subtable type above */ + +enum AcpiSacType +{ + ACPI_SDEV_TYPE_ID_COMPONENT = 0, + ACPI_SDEV_TYPE_MEM_COMPONENT = 1 +}; + +typedef struct acpi_sdev_id_component +{ + ACPI_SDEV_HEADER Header; + UINT16 HardwareIdOffset; + UINT16 HardwareIdLength; + UINT16 SubsystemIdOffset; + UINT16 SubsystemIdLength; + UINT16 HardwareRevision; + UINT8 HardwareRevPresent; + UINT8 ClassCodePresent; + UINT8 PciBaseClass; + UINT8 PciSubClass; + UINT8 PciProgrammingXface; + +} ACPI_SDEV_ID_COMPONENT; + +typedef struct acpi_sdev_mem_component +{ + ACPI_SDEV_HEADER Header; + UINT32 Reserved; + UINT64 MemoryBaseAddress; + UINT64 MemoryLength; + +} ACPI_SDEV_MEM_COMPONENT; + + /* 1: PCIe Endpoint Device Based Device Structure */ typedef struct acpi_sdev_pcie @@ -2143,6 +2970,44 @@ typedef struct acpi_sdev_pcie_path } ACPI_SDEV_PCIE_PATH; +/******************************************************************************* + * + * SVKL - Storage Volume Key Location Table (ACPI 6.4) + * From: "Guest-Host-Communication Interface (GHCI) for Intel + * Trust Domain Extensions (Intel TDX)". + * Version 1 + * + ******************************************************************************/ + +typedef struct acpi_table_svkl +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT32 Count; + +} ACPI_TABLE_SVKL; + +typedef struct acpi_svkl_key +{ + UINT16 Type; + UINT16 Format; + UINT32 Size; + UINT64 Address; + +} ACPI_SVKL_KEY; + +enum acpi_svkl_type +{ + ACPI_SVKL_TYPE_MAIN_STORAGE = 0, + ACPI_SVKL_TYPE_RESERVED = 1 /* 1 and greater are reserved */ +}; + +enum acpi_svkl_format +{ + ACPI_SVKL_FORMAT_RAW_BINARY = 0, + ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */ +}; + + /* Reset to default packing */ #pragma pack() diff --git a/ports/acpica/include/actbl3.h b/ports/acpica/include/actbl3.h index d4c1583..40cf713 100644 --- a/ports/acpica/include/actbl3.h +++ b/ports/acpica/include/actbl3.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -177,13 +177,13 @@ #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ -#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ +#define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */ #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ -#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */ +#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */ #define ACPI_SIG_XENV "XENV" /* Xen Environment table */ #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ @@ -350,8 +350,10 @@ enum AcpiSratType ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, ACPI_SRAT_TYPE_GICC_AFFINITY = 3, - ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ - ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ + ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ + ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */ + ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */ + ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */ }; /* @@ -446,6 +448,28 @@ typedef struct acpi_srat_gic_its_affinity } ACPI_SRAT_GIC_ITS_AFFINITY; +/* + * Common structure for SRAT subtable types: + * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY + * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY + */ + +typedef struct acpi_srat_generic_affinity +{ + ACPI_SUBTABLE_HEADER Header; + UINT8 Reserved; + UINT8 DeviceHandleType; + UINT32 ProximityDomain; + UINT8 DeviceHandle[16]; + UINT32 Flags; + UINT32 Reserved1; + +} ACPI_SRAT_GENERIC_AFFINITY; + +/* Flags for ACPI_SRAT_GENERIC_AFFINITY */ + +#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */ +#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */ /******************************************************************************* * @@ -552,6 +576,34 @@ typedef struct acpi_table_tcpa_server * ******************************************************************************/ +/* Revision 3 */ + +typedef struct acpi_table_tpm23 +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT32 Reserved; + UINT64 ControlAddress; + UINT32 StartMethod; + +} ACPI_TABLE_TPM23; + +/* Value for StartMethod above */ + +#define ACPI_TPM23_ACPI_START_METHOD 2 + +/* + * Optional trailer for revision 3. If start method is 2, there is a 4 byte + * reserved area of all zeros. + */ +typedef struct acpi_tmp23_trailer +{ + UINT32 Reserved; + +} ACPI_TPM23_TRAILER; + + +/* Revision 4 */ + typedef struct acpi_table_tpm2 { ACPI_TABLE_HEADER Header; /* Common ACPI table header */ @@ -638,29 +690,82 @@ typedef struct acpi_table_uefi /******************************************************************************* * - * VRTC - Virtual Real Time Clock Table + * VIOT - Virtual I/O Translation Table * Version 1 * - * Conforms to "Simple Firmware Interface Specification", - * Draft 0.8.2, Oct 19, 2010 - * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. - * ******************************************************************************/ -typedef struct acpi_table_vrtc +typedef struct acpi_table_viot { ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT16 NodeCount; + UINT16 NodeOffset; + UINT8 Reserved[8]; -} ACPI_TABLE_VRTC; +} ACPI_TABLE_VIOT; -/* VRTC entry */ +/* VIOT subtable header */ -typedef struct acpi_vrtc_entry +typedef struct acpi_viot_header { - ACPI_GENERIC_ADDRESS PhysicalAddress; - UINT32 Irq; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; -} ACPI_VRTC_ENTRY; +} ACPI_VIOT_HEADER; + +/* Values for Type field above */ + +enum AcpiViotNodeType +{ + ACPI_VIOT_NODE_PCI_RANGE = 0x01, + ACPI_VIOT_NODE_MMIO = 0x02, + ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03, + ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04, + ACPI_VIOT_RESERVED = 0x05 +}; + +/* VIOT subtables */ + +typedef struct acpi_viot_pci_range +{ + ACPI_VIOT_HEADER Header; + UINT32 EndpointStart; + UINT16 SegmentStart; + UINT16 SegmentEnd; + UINT16 BdfStart; + UINT16 BdfEnd; + UINT16 OutputNode; + UINT8 Reserved[6]; + +} ACPI_VIOT_PCI_RANGE; + +typedef struct acpi_viot_mmio +{ + ACPI_VIOT_HEADER Header; + UINT32 Endpoint; + UINT64 BaseAddress; + UINT16 OutputNode; + UINT8 Reserved[6]; + +} ACPI_VIOT_MMIO; + +typedef struct acpi_viot_virtio_iommu_pci +{ + ACPI_VIOT_HEADER Header; + UINT16 Segment; + UINT16 Bdf; + UINT8 Reserved[8]; + +} ACPI_VIOT_VIRTIO_IOMMU_PCI; + +typedef struct acpi_viot_virtio_iommu_mmio +{ + ACPI_VIOT_HEADER Header; + UINT8 Reserved[4]; + UINT64 BaseAddress; + +} ACPI_VIOT_VIRTIO_IOMMU_MMIO; /******************************************************************************* @@ -854,13 +959,19 @@ typedef struct acpi_table_wpbt } ACPI_TABLE_WPBT; +typedef struct acpi_wpbt_unicode +{ + UINT16 *UnicodeString; + +} ACPI_WPBT_UNICODE; + /******************************************************************************* * - * WSMT - Windows SMM Security Migrations Table + * WSMT - Windows SMM Security Mitigations Table * Version 1 * - * Conforms to "Windows SMM Security Migrations Table", + * Conforms to "Windows SMM Security Mitigations Table", * Version 1.0, April 18, 2016 * ******************************************************************************/ diff --git a/ports/acpica/include/actypes.h b/ports/acpica/include/actypes.h index 4d2438c..5138342 100644 --- a/ports/acpica/include/actypes.h +++ b/ports/acpica/include/actypes.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -520,7 +520,7 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS; /* Names within the namespace are 4 bytes long */ -#define ACPI_NAME_SIZE 4 +#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */ #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ #define ACPI_PATH_SEPARATOR '.' @@ -591,8 +591,8 @@ typedef void * ACPI_HANDLE; /* Actually a ptr to a N /* Owner IDs are used to track namespace nodes for selective deletion */ -typedef UINT8 ACPI_OWNER_ID; -#define ACPI_OWNER_ID_MAX 0xFF +typedef UINT16 ACPI_OWNER_ID; +#define ACPI_OWNER_ID_MAX 0xFFF /* 4095 possible owner IDs */ #define ACPI_INTEGER_BIT_SIZE 64 @@ -657,7 +657,7 @@ typedef UINT64 ACPI_INTEGER; /* Pointer/Integer type conversions */ -#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) 0, (ACPI_SIZE) (i)) +#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i)) #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) @@ -666,11 +666,11 @@ typedef UINT64 ACPI_INTEGER; /* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) -#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) +#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) +#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) #else -#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) -#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) +#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) +#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) #endif /* Support for the special RSDP signature (8 characters) */ @@ -678,12 +678,17 @@ typedef UINT64 ACPI_INTEGER; #define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8)) #define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8)) +/* Support for OEMx signature (x can be any character) */ +#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ + strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE) + /* - * Algorithm to obtain access bit width. - * Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of + * Algorithm to obtain access bit or byte width. + * Can be used with AccessSize field of ACPI_GENERIC_ADDRESS and * ACPI_RESOURCE_GENERIC_REGISTER. */ -#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2)) +#define ACPI_ACCESS_BIT_WIDTH(AccessSize) (1 << ((AccessSize) + 2)) +#define ACPI_ACCESS_BYTE_WIDTH(AccessSize) (1 << ((AccessSize) - 1)) /******************************************************************************* @@ -763,8 +768,9 @@ typedef UINT64 ACPI_INTEGER; #define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C #define ACPI_NOTIFY_AFFINITY_UPDATE (UINT8) 0x0D #define ACPI_NOTIFY_MEMORY_UPDATE (UINT8) 0x0E +#define ACPI_NOTIFY_DISCONNECT_RECOVER (UINT8) 0x0F -#define ACPI_GENERIC_NOTIFY_MAX 0x0E +#define ACPI_GENERIC_NOTIFY_MAX 0x0F #define ACPI_SPECIFIC_NOTIFY_MAX 0x84 /* @@ -962,15 +968,16 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE; #define ACPI_ADR_SPACE_GPIO (ACPI_ADR_SPACE_TYPE) 8 #define ACPI_ADR_SPACE_GSBUS (ACPI_ADR_SPACE_TYPE) 9 #define ACPI_ADR_SPACE_PLATFORM_COMM (ACPI_ADR_SPACE_TYPE) 10 +#define ACPI_ADR_SPACE_PLATFORM_RT (ACPI_ADR_SPACE_TYPE) 11 -#define ACPI_NUM_PREDEFINED_REGIONS 11 +#define ACPI_NUM_PREDEFINED_REGIONS 12 /* * Special Address Spaces * * Note: A Data Table region is a special type of operation region * that has its own AML opcode. However, internally, the AML - * interpreter simply creates an operation region with an an address + * interpreter simply creates an operation region with an address * space type of ACPI_ADR_SPACE_DATA_TABLE. */ #define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 0x7E /* Internal to ACPICA only */ @@ -1372,7 +1379,7 @@ typedef struct acpi_pnp_device_id_list { UINT32 Count; /* Number of IDs in Ids array */ UINT32 ListSize; /* Size of list, including ID strings */ - ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */ + ACPI_PNP_DEVICE_ID Ids[]; /* ID array */ } ACPI_PNP_DEVICE_ID_LIST; @@ -1433,13 +1440,21 @@ typedef struct acpi_pci_id } ACPI_PCI_ID; +typedef struct acpi_mem_mapping +{ + ACPI_PHYSICAL_ADDRESS PhysicalAddress; + UINT8 *LogicalAddress; + ACPI_SIZE Length; + struct acpi_mem_mapping *NextMm; + +} ACPI_MEM_MAPPING; + typedef struct acpi_mem_space_context { UINT32 Length; ACPI_PHYSICAL_ADDRESS Address; - ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress; - UINT8 *MappedLogicalAddress; - ACPI_SIZE MappedLength; + ACPI_MEM_MAPPING *CurMm; + ACPI_MEM_MAPPING *FirstMm; } ACPI_MEM_SPACE_CONTEXT; @@ -1508,15 +1523,25 @@ typedef enum #define ACPI_OSI_WIN_VISTA_SP2 0x0A #define ACPI_OSI_WIN_7 0x0B #define ACPI_OSI_WIN_8 0x0C -#define ACPI_OSI_WIN_10 0x0D -#define ACPI_OSI_WIN_10_RS1 0x0E -#define ACPI_OSI_WIN_10_RS2 0x0F -#define ACPI_OSI_WIN_10_RS3 0x10 +#define ACPI_OSI_WIN_8_1 0x0D +#define ACPI_OSI_WIN_10 0x0E +#define ACPI_OSI_WIN_10_RS1 0x0F +#define ACPI_OSI_WIN_10_RS2 0x10 +#define ACPI_OSI_WIN_10_RS3 0x11 +#define ACPI_OSI_WIN_10_RS4 0x12 +#define ACPI_OSI_WIN_10_RS5 0x13 +#define ACPI_OSI_WIN_10_19H1 0x14 +#define ACPI_OSI_WIN_10_20H1 0x15 /* Definitions of getopt */ #define ACPI_OPT_END -1 +/* Definitions for explicit fallthrough */ + +#ifndef ACPI_FALLTHROUGH +#define ACPI_FALLTHROUGH do {} while(0) +#endif #endif /* __ACTYPES_H__ */ diff --git a/ports/acpica/include/acutils.h b/ports/acpica/include/acutils.h index 8dfce90..791b7d9 100644 --- a/ports/acpica/include/acutils.h +++ b/ports/acpica/include/acutils.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -171,6 +171,7 @@ extern const char *AcpiGbl_MaxDecode[]; extern const char *AcpiGbl_MemDecode[]; extern const char *AcpiGbl_MinDecode[]; extern const char *AcpiGbl_MtpDecode[]; +extern const char *AcpiGbl_PhyDecode[]; extern const char *AcpiGbl_RngDecode[]; extern const char *AcpiGbl_RwDecode[]; extern const char *AcpiGbl_ShrDecode[]; @@ -290,10 +291,11 @@ typedef struct acpi_pkg_info /* AcpiUtDumpBuffer */ -#define DB_BYTE_DISPLAY 1 -#define DB_WORD_DISPLAY 2 -#define DB_DWORD_DISPLAY 4 -#define DB_QWORD_DISPLAY 8 +#define DB_BYTE_DISPLAY 0x01 +#define DB_WORD_DISPLAY 0x02 +#define DB_DWORD_DISPLAY 0x04 +#define DB_QWORD_DISPLAY 0x08 +#define DB_DISPLAY_DATA_ONLY 0x10 /* @@ -362,6 +364,10 @@ BOOLEAN AcpiUtDetectHexPrefix ( char **String); +void +AcpiUtRemoveHexPrefix ( + char **String); + BOOLEAN AcpiUtDetectOctalPrefix ( char **String); @@ -1190,30 +1196,33 @@ AcpiUtDeleteAddressLists ( /* * utxferror - various error/warning output functions */ +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedWarning ( const char *ModuleName, UINT32 LineNumber, char *Pathname, - UINT8 NodeFlags, + UINT16 NodeFlags, const char *Format, ...); +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedInfo ( const char *ModuleName, UINT32 LineNumber, char *Pathname, - UINT8 NodeFlags, + UINT16 NodeFlags, const char *Format, ...); +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedBiosError ( const char *ModuleName, UINT32 LineNumber, char *Pathname, - UINT8 NodeFlags, + UINT16 NodeFlags, const char *Format, ...); @@ -1259,6 +1268,11 @@ void AcpiUtConvertStringToUuid ( char *InString, UINT8 *UuidBuffer); + +ACPI_STATUS +AcpiUtConvertUuidToString ( + char *UuidBuffer, + char *OutString); #endif #endif /* _ACUTILS_H */ diff --git a/ports/acpica/include/acuuid.h b/ports/acpica/include/acuuid.h index 9b8ba69..48f4c9a 100644 --- a/ports/acpica/include/acuuid.h +++ b/ports/acpica/include/acuuid.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -169,6 +169,10 @@ #define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766" #define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de" #define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c" +#define UUID_MEMORY_DEVICE "03b19910-f473-11dd-87af-0800200c9a66" +#define UUID_GENERIC_BUTTONS_DEVICE "fa6bd625-9ce8-470d-a2c7-b3ca36c4282e" +#define UUID_NVDIMM_ROOT_DEVICE "2f10e7a4-9e91-11e4-89d3-123b93f75cba" +#define UUID_CONTROL_METHOD_BATTERY "f18fc78b-0f15-4978-b793-53f833a1d35b" /* Interfaces */ @@ -177,6 +181,7 @@ /* NVDIMM - NFIT table */ +#define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66" #define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0" #define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb" #define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c" @@ -185,6 +190,10 @@ #define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb" #define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9" #define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d" +#define UUID_NFIT_DIMM_N_MSFT "1ee68b36-d4bd-4a1a-9a16-4f8e53d46e05" +#define UUID_NFIT_DIMM_N_HPE1 "9002c334-acf3-4c0e-9642-a235f0d53bc6" +#define UUID_NFIT_DIMM_N_HPE2 "5008664b-b758-41a0-a03c-27c2f2d04f7e" +#define UUID_NFIT_DIMM_N_HYPERV "5746c5f2-a9a2-4264-ad0e-e4ddc9e09e80" /* Processor Properties (ACPI 6.2) */ @@ -198,6 +207,9 @@ #define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e" #define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500" #define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301" +#define UUID_DEVICE_GRAPHS "ab02a46b-74c7-45a2-bd68-f7d344ef2153" +#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b" +#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd" +#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a" - -#endif /* __AUUID_H__ */ +#endif /* __ACUUID_H__ */ diff --git a/ports/acpica/include/amlcode.h b/ports/acpica/include/amlcode.h index 6507ae6..f7ad22a 100644 --- a/ports/acpica/include/amlcode.h +++ b/ports/acpica/include/amlcode.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -594,16 +594,16 @@ typedef enum */ typedef enum { - AML_FIELD_ATTRIB_QUICK = 0x02, - AML_FIELD_ATTRIB_SEND_RCV = 0x04, - AML_FIELD_ATTRIB_BYTE = 0x06, - AML_FIELD_ATTRIB_WORD = 0x08, - AML_FIELD_ATTRIB_BLOCK = 0x0A, - AML_FIELD_ATTRIB_MULTIBYTE = 0x0B, - AML_FIELD_ATTRIB_WORD_CALL = 0x0C, - AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D, - AML_FIELD_ATTRIB_RAW_BYTES = 0x0E, - AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F + AML_FIELD_ATTRIB_QUICK = 0x02, + AML_FIELD_ATTRIB_SEND_RECEIVE = 0x04, + AML_FIELD_ATTRIB_BYTE = 0x06, + AML_FIELD_ATTRIB_WORD = 0x08, + AML_FIELD_ATTRIB_BLOCK = 0x0A, + AML_FIELD_ATTRIB_BYTES = 0x0B, + AML_FIELD_ATTRIB_PROCESS_CALL = 0x0C, + AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL = 0x0D, + AML_FIELD_ATTRIB_RAW_BYTES = 0x0E, + AML_FIELD_ATTRIB_RAW_PROCESS_BYTES = 0x0F } AML_ACCESS_ATTRIBUTE; diff --git a/ports/acpica/include/amlresrc.h b/ports/acpica/include/amlresrc.h index e9ee794..a97a1c6 100644 --- a/ports/acpica/include/amlresrc.h +++ b/ports/acpica/include/amlresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -183,6 +183,7 @@ #define ACPI_RESTAG_IORESTRICTION "_IOR" #define ACPI_RESTAG_LENGTH "_LEN" #define ACPI_RESTAG_LINE "_LIN" +#define ACPI_RESTAG_LOCALPORT "_PRT" #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ #define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ #define ACPI_RESTAG_MAXADDR "_MAX" @@ -192,6 +193,7 @@ #define ACPI_RESTAG_MODE "_MOD" #define ACPI_RESTAG_PARITY "_PAR" #define ACPI_RESTAG_PHASE "_PHA" +#define ACPI_RESTAG_PHYTYPE "_PHY" #define ACPI_RESTAG_PIN "_PIN" #define ACPI_RESTAG_PINCONFIG "_PPI" #define ACPI_RESTAG_PINCONFIG_TYPE "_TYP" @@ -568,7 +570,8 @@ typedef struct aml_resource_gpio #define AML_RESOURCE_I2C_SERIALBUSTYPE 1 #define AML_RESOURCE_SPI_SERIALBUSTYPE 2 #define AML_RESOURCE_UART_SERIALBUSTYPE 3 -#define AML_RESOURCE_MAX_SERIALBUSTYPE 3 +#define AML_RESOURCE_CSI2_SERIALBUSTYPE 4 +#define AML_RESOURCE_MAX_SERIALBUSTYPE 4 #define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */ typedef struct aml_resource_common_serialbus @@ -578,6 +581,24 @@ typedef struct aml_resource_common_serialbus } AML_RESOURCE_COMMON_SERIALBUS; + +typedef struct aml_resource_csi2_serialbus +{ + AML_RESOURCE_LARGE_HEADER_COMMON + AML_RESOURCE_SERIAL_COMMON + + /* + * Optional fields follow immediately: + * 1) Vendor Data bytes + * 2) Resource Source String + */ + +} AML_RESOURCE_CSI2_SERIALBUS; + +#define AML_RESOURCE_CSI2_REVISION 1 /* ACPI 6.4 */ +#define AML_RESOURCE_CSI2_TYPE_REVISION 1 /* ACPI 6.4 */ +#define AML_RESOURCE_CSI2_MIN_DATA_LEN 0 /* ACPI 6.4 */ + typedef struct aml_resource_i2c_serialbus { AML_RESOURCE_LARGE_HEADER_COMMON @@ -617,7 +638,6 @@ typedef struct aml_resource_spi_serialbus #define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */ #define AML_RESOURCE_SPI_MIN_DATA_LEN 9 - typedef struct aml_resource_uart_serialbus { AML_RESOURCE_LARGE_HEADER_COMMON @@ -792,6 +812,7 @@ typedef union aml_resource AML_RESOURCE_I2C_SERIALBUS I2cSerialBus; AML_RESOURCE_SPI_SERIALBUS SpiSerialBus; AML_RESOURCE_UART_SERIALBUS UartSerialBus; + AML_RESOURCE_CSI2_SERIALBUS Csi2SerialBus; AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; AML_RESOURCE_PIN_FUNCTION PinFunction; AML_RESOURCE_PIN_CONFIG PinConfig; diff --git a/ports/acpica/include/platform/acenv.h b/ports/acpica/include/platform/acenv.h index 09f74fb..7e7ea74 100644 --- a/ports/acpica/include/platform/acenv.h +++ b/ports/acpica/include/platform/acenv.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -270,6 +270,21 @@ #define ACPI_DISASSEMBLER 1 #endif +/* + * acpisrc CR\LF support + * Unix file line endings do not include the carriage return. + * If the acpisrc utility is being built using a microsoft compiler, it means + * that it will be running on a windows machine which means that the output is + * expected to have CR/LF newlines. If the acpisrc utility is built with + * anything else, it will likely run on a system with LF newlines. This flag + * tells the acpisrc utility that newlines will be in the LF format. + */ +#if defined(ACPI_SRC_APP) && !defined(_MSC_VER) +#define ACPI_SRC_OS_LF_ONLY 1 +#else +#define ACPI_SRC_OS_LF_ONLY 0 +#endif + /*! [Begin] no source code translation */ /****************************************************************************** @@ -290,11 +305,12 @@ #endif -#include "acessence.h" - #if defined(_LINUX) || defined(__linux__) #include "aclinux.h" +#elif defined(OS_ESSENCE) +#include "acessence.h" + #elif defined(_APPLE) || defined(__APPLE__) #include "acmacosx.h" @@ -349,7 +365,7 @@ /* Unknown environment */ -/*#error Unknown target environment*/ +#error Unknown target environment #endif /*! [End] no source code translation !*/ diff --git a/ports/acpica/include/platform/acenvex.h b/ports/acpica/include/platform/acenvex.h index 65573d7..42bb490 100644 --- a/ports/acpica/include/platform/acenvex.h +++ b/ports/acpica/include/platform/acenvex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/include/platform/acgcc.h b/ports/acpica/include/platform/acgcc.h index 7de4a66..148190a 100644 --- a/ports/acpica/include/platform/acgcc.h +++ b/ports/acpica/include/platform/acgcc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License @@ -196,4 +196,19 @@ typedef __builtin_va_list va_list; #define ACPI_USE_NATIVE_MATH64 +/* GCC did not support __has_attribute until 5.1. */ + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +/* + * Explicitly mark intentional explicit fallthrough to silence + * -Wimplicit-fallthrough in GCC 7.1+. + */ + +#if __has_attribute(__fallthrough__) +#define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) +#endif + #endif /* __ACGCC_H__ */ diff --git a/ports/acpica/include/platform/acgccex.h b/ports/acpica/include/platform/acgccex.h index f262c72..61d4285 100644 --- a/ports/acpica/include/platform/acgccex.h +++ b/ports/acpica/include/platform/acgccex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp. * All rights reserved. * * 2. License diff --git a/ports/acpica/libacpica.a b/ports/acpica/libacpica.a index 1fb5b21..4000be5 100644 Binary files a/ports/acpica/libacpica.a and b/ports/acpica/libacpica.a differ