From 1ac3551821fdb18bf7d3f8ae2f2f3a6b5bbb9431 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Tue, 10 Nov 2015 15:20:17 +0000 Subject: [PATCH] [ACPICA] - Update to version 20150410 CORE-10509 svn path=/trunk/; revision=69868 --- .../bus/acpi/acpica/dispatcher/dsargs.c | 2 +- .../bus/acpi/acpica/dispatcher/dscontrol.c | 2 +- .../bus/acpi/acpica/dispatcher/dsfield.c | 2 +- .../bus/acpi/acpica/dispatcher/dsinit.c | 2 +- .../bus/acpi/acpica/dispatcher/dsmethod.c | 2 +- .../bus/acpi/acpica/dispatcher/dsmthdat.c | 2 +- .../bus/acpi/acpica/dispatcher/dsobject.c | 2 +- .../bus/acpi/acpica/dispatcher/dsopcode.c | 8 +- .../bus/acpi/acpica/dispatcher/dsutils.c | 11 +- .../bus/acpi/acpica/dispatcher/dswexec.c | 2 +- .../bus/acpi/acpica/dispatcher/dswload.c | 2 +- .../bus/acpi/acpica/dispatcher/dswload2.c | 2 +- .../bus/acpi/acpica/dispatcher/dswscope.c | 2 +- .../bus/acpi/acpica/dispatcher/dswstate.c | 2 +- .../drivers/bus/acpi/acpica/events/evevent.c | 2 +- .../drivers/bus/acpi/acpica/events/evglock.c | 6 +- .../drivers/bus/acpi/acpica/events/evgpe.c | 158 +++++----- .../drivers/bus/acpi/acpica/events/evgpeblk.c | 7 +- .../bus/acpi/acpica/events/evgpeinit.c | 10 +- .../bus/acpi/acpica/events/evgpeutil.c | 64 +--- .../bus/acpi/acpica/events/evhandler.c | 2 +- .../drivers/bus/acpi/acpica/events/evmisc.c | 2 +- .../drivers/bus/acpi/acpica/events/evregion.c | 4 +- .../drivers/bus/acpi/acpica/events/evrgnini.c | 2 +- .../drivers/bus/acpi/acpica/events/evsci.c | 2 +- .../drivers/bus/acpi/acpica/events/evxface.c | 139 ++++++++- .../drivers/bus/acpi/acpica/events/evxfevnt.c | 7 +- .../drivers/bus/acpi/acpica/events/evxfgpe.c | 69 ++++- .../drivers/bus/acpi/acpica/events/evxfregn.c | 2 +- .../bus/acpi/acpica/executer/exconfig.c | 2 +- .../bus/acpi/acpica/executer/exconvrt.c | 2 +- .../bus/acpi/acpica/executer/excreate.c | 2 +- .../bus/acpi/acpica/executer/exdebug.c | 2 +- .../drivers/bus/acpi/acpica/executer/exdump.c | 4 +- .../bus/acpi/acpica/executer/exfield.c | 2 +- .../bus/acpi/acpica/executer/exfldio.c | 6 +- .../drivers/bus/acpi/acpica/executer/exmisc.c | 2 +- .../bus/acpi/acpica/executer/exmutex.c | 2 +- .../bus/acpi/acpica/executer/exnames.c | 2 +- .../bus/acpi/acpica/executer/exoparg1.c | 2 +- .../bus/acpi/acpica/executer/exoparg2.c | 2 +- .../bus/acpi/acpica/executer/exoparg3.c | 15 +- .../bus/acpi/acpica/executer/exoparg6.c | 2 +- .../drivers/bus/acpi/acpica/executer/exprep.c | 2 +- .../bus/acpi/acpica/executer/exregion.c | 15 +- .../bus/acpi/acpica/executer/exresnte.c | 2 +- .../bus/acpi/acpica/executer/exresolv.c | 2 +- .../bus/acpi/acpica/executer/exresop.c | 2 +- .../bus/acpi/acpica/executer/exstore.c | 2 +- .../bus/acpi/acpica/executer/exstoren.c | 2 +- .../bus/acpi/acpica/executer/exstorob.c | 2 +- .../bus/acpi/acpica/executer/exsystem.c | 2 +- .../bus/acpi/acpica/executer/exutils.c | 2 +- .../drivers/bus/acpi/acpica/hardware/hwacpi.c | 2 +- .../bus/acpi/acpica/hardware/hwesleep.c | 2 +- .../drivers/bus/acpi/acpica/hardware/hwgpe.c | 93 ++++-- .../drivers/bus/acpi/acpica/hardware/hwpci.c | 2 +- .../drivers/bus/acpi/acpica/hardware/hwregs.c | 2 +- .../bus/acpi/acpica/hardware/hwsleep.c | 2 +- .../bus/acpi/acpica/hardware/hwtimer.c | 2 +- .../bus/acpi/acpica/hardware/hwvalid.c | 14 +- .../bus/acpi/acpica/hardware/hwxface.c | 2 +- .../bus/acpi/acpica/hardware/hwxfsleep.c | 2 +- .../drivers/bus/acpi/acpica/include/acapps.h | 12 +- .../bus/acpi/acpica/include/acbuffer.h | 2 +- .../bus/acpi/acpica/include/accommon.h | 2 +- .../bus/acpi/acpica/include/acconfig.h | 2 +- .../drivers/bus/acpi/acpica/include/acdebug.h | 4 +- .../bus/acpi/acpica/include/acdisasm.h | 22 +- .../bus/acpi/acpica/include/acdispat.h | 2 +- .../bus/acpi/acpica/include/acevents.h | 6 +- .../drivers/bus/acpi/acpica/include/acexcep.h | 2 +- .../bus/acpi/acpica/include/acglobal.h | 11 +- .../drivers/bus/acpi/acpica/include/achware.h | 2 +- .../bus/acpi/acpica/include/acinterp.h | 2 +- .../drivers/bus/acpi/acpica/include/aclocal.h | 5 +- .../bus/acpi/acpica/include/acmacros.h | 15 +- .../drivers/bus/acpi/acpica/include/acnames.h | 2 +- .../bus/acpi/acpica/include/acnamesp.h | 2 +- .../bus/acpi/acpica/include/acobject.h | 2 +- .../bus/acpi/acpica/include/acopcode.h | 4 +- .../bus/acpi/acpica/include/acoutput.h | 2 +- .../bus/acpi/acpica/include/acparser.h | 2 +- .../drivers/bus/acpi/acpica/include/acpi.h | 2 +- .../bus/acpi/acpica/include/acpiosxf.h | 2 +- .../drivers/bus/acpi/acpica/include/acpixf.h | 20 +- .../bus/acpi/acpica/include/acpredef.h | 2 +- .../drivers/bus/acpi/acpica/include/acresrc.h | 6 +- .../bus/acpi/acpica/include/acrestyp.h | 56 ++-- .../bus/acpi/acpica/include/acstruct.h | 7 +- .../bus/acpi/acpica/include/actables.h | 15 +- .../drivers/bus/acpi/acpica/include/actbl.h | 2 +- .../drivers/bus/acpi/acpica/include/actbl1.h | 2 +- .../drivers/bus/acpi/acpica/include/actbl2.h | 85 ++---- .../drivers/bus/acpi/acpica/include/actbl3.h | 2 +- .../drivers/bus/acpi/acpica/include/actypes.h | 66 ++-- .../drivers/bus/acpi/acpica/include/acutils.h | 29 +- .../drivers/bus/acpi/acpica/include/amlcode.h | 4 +- .../bus/acpi/acpica/include/amlresrc.h | 2 +- .../acpi/acpica/include/platform/accygwin.h | 2 +- .../acpica/include/platform/acdragonfly.h | 202 +++++++++++++ .../acpica/include/platform/acdragonflyex.h | 156 ++++++++++ .../bus/acpi/acpica/include/platform/acefi.h | 2 +- .../bus/acpi/acpica/include/platform/acenv.h | 3 +- .../acpi/acpica/include/platform/acenvex.h | 2 +- .../acpi/acpica/include/platform/acfreebsd.h | 2 +- .../bus/acpi/acpica/include/platform/acgcc.h | 2 +- .../acpi/acpica/include/platform/achaiku.h | 2 +- .../acpi/acpica/include/platform/acintel.h | 2 +- .../acpi/acpica/include/platform/aclinux.h | 2 +- .../acpi/acpica/include/platform/aclinuxex.h | 2 +- .../acpi/acpica/include/platform/acmacosx.h | 2 +- .../bus/acpi/acpica/include/platform/acmsvc.h | 2 +- .../acpi/acpica/include/platform/acnetbsd.h | 25 +- .../bus/acpi/acpica/include/platform/acos2.h | 2 +- .../bus/acpi/acpica/include/platform/acwin.h | 2 +- .../acpi/acpica/include/platform/acwin64.h | 2 +- .../bus/acpi/acpica/namespace/nsaccess.c | 2 +- .../bus/acpi/acpica/namespace/nsalloc.c | 2 +- .../bus/acpi/acpica/namespace/nsarguments.c | 2 +- .../bus/acpi/acpica/namespace/nsconvert.c | 2 +- .../bus/acpi/acpica/namespace/nsdump.c | 8 +- .../bus/acpi/acpica/namespace/nsdumpdv.c | 2 +- .../bus/acpi/acpica/namespace/nseval.c | 2 +- .../bus/acpi/acpica/namespace/nsinit.c | 2 +- .../bus/acpi/acpica/namespace/nsload.c | 2 +- .../bus/acpi/acpica/namespace/nsnames.c | 2 +- .../bus/acpi/acpica/namespace/nsobject.c | 2 +- .../bus/acpi/acpica/namespace/nsparse.c | 2 +- .../bus/acpi/acpica/namespace/nspredef.c | 2 +- .../bus/acpi/acpica/namespace/nsprepkg.c | 2 +- .../bus/acpi/acpica/namespace/nsrepair.c | 2 +- .../bus/acpi/acpica/namespace/nsrepair2.c | 2 +- .../bus/acpi/acpica/namespace/nssearch.c | 2 +- .../bus/acpi/acpica/namespace/nsutils.c | 2 +- .../bus/acpi/acpica/namespace/nswalk.c | 2 +- .../bus/acpi/acpica/namespace/nsxfeval.c | 2 +- .../bus/acpi/acpica/namespace/nsxfname.c | 2 +- .../bus/acpi/acpica/namespace/nsxfobj.c | 2 +- .../drivers/bus/acpi/acpica/parser/psargs.c | 2 +- .../drivers/bus/acpi/acpica/parser/psloop.c | 2 +- .../drivers/bus/acpi/acpica/parser/psobject.c | 2 +- .../drivers/bus/acpi/acpica/parser/psopcode.c | 8 +- .../drivers/bus/acpi/acpica/parser/psopinfo.c | 4 +- .../drivers/bus/acpi/acpica/parser/psparse.c | 2 +- .../drivers/bus/acpi/acpica/parser/psscope.c | 2 +- .../drivers/bus/acpi/acpica/parser/pstree.c | 2 +- .../drivers/bus/acpi/acpica/parser/psutils.c | 2 +- .../drivers/bus/acpi/acpica/parser/pswalk.c | 2 +- .../drivers/bus/acpi/acpica/parser/psxface.c | 2 +- .../bus/acpi/acpica/resources/rsaddr.c | 10 +- .../bus/acpi/acpica/resources/rscalc.c | 2 +- .../bus/acpi/acpica/resources/rscreate.c | 2 +- .../bus/acpi/acpica/resources/rsdump.c | 281 +++++++++--------- .../bus/acpi/acpica/resources/rsdumpinfo.c | 47 +-- .../bus/acpi/acpica/resources/rsinfo.c | 2 +- .../drivers/bus/acpi/acpica/resources/rsio.c | 2 +- .../drivers/bus/acpi/acpica/resources/rsirq.c | 2 +- .../bus/acpi/acpica/resources/rslist.c | 2 +- .../bus/acpi/acpica/resources/rsmemory.c | 2 +- .../bus/acpi/acpica/resources/rsmisc.c | 2 +- .../bus/acpi/acpica/resources/rsserial.c | 2 +- .../bus/acpi/acpica/resources/rsutils.c | 2 +- .../bus/acpi/acpica/resources/rsxface.c | 12 +- .../drivers/bus/acpi/acpica/tables/tbdata.c | 35 ++- .../drivers/bus/acpi/acpica/tables/tbfadt.c | 2 +- .../drivers/bus/acpi/acpica/tables/tbfind.c | 2 +- .../drivers/bus/acpi/acpica/tables/tbinstal.c | 70 +---- .../drivers/bus/acpi/acpica/tables/tbprint.c | 20 +- .../drivers/bus/acpi/acpica/tables/tbutils.c | 2 +- .../drivers/bus/acpi/acpica/tables/tbxface.c | 2 +- .../drivers/bus/acpi/acpica/tables/tbxfload.c | 2 +- .../drivers/bus/acpi/acpica/tables/tbxfroot.c | 8 +- .../bus/acpi/acpica/utilities/utaddress.c | 24 +- .../bus/acpi/acpica/utilities/utalloc.c | 2 +- .../bus/acpi/acpica/utilities/utbuffer.c | 11 +- .../bus/acpi/acpica/utilities/utcache.c | 2 +- .../bus/acpi/acpica/utilities/utclib.c | 23 +- .../bus/acpi/acpica/utilities/utcopy.c | 2 +- .../bus/acpi/acpica/utilities/utdebug.c | 2 +- .../bus/acpi/acpica/utilities/utdecode.c | 2 +- .../bus/acpi/acpica/utilities/utdelete.c | 2 +- .../bus/acpi/acpica/utilities/uterror.c | 2 +- .../bus/acpi/acpica/utilities/uteval.c | 2 +- .../bus/acpi/acpica/utilities/utexcep.c | 2 +- .../bus/acpi/acpica/utilities/utfileio.c | 2 +- .../bus/acpi/acpica/utilities/utglobal.c | 15 +- .../drivers/bus/acpi/acpica/utilities/uthex.c | 2 +- .../drivers/bus/acpi/acpica/utilities/utids.c | 2 +- .../bus/acpi/acpica/utilities/utinit.c | 2 +- .../bus/acpi/acpica/utilities/utlock.c | 2 +- .../bus/acpi/acpica/utilities/utmath.c | 2 +- .../bus/acpi/acpica/utilities/utmisc.c | 4 +- .../bus/acpi/acpica/utilities/utmutex.c | 2 +- .../bus/acpi/acpica/utilities/utobject.c | 2 +- .../drivers/bus/acpi/acpica/utilities/utosi.c | 3 +- .../bus/acpi/acpica/utilities/utownerid.c | 2 +- .../bus/acpi/acpica/utilities/utpredef.c | 2 +- .../bus/acpi/acpica/utilities/utprint.c | 15 +- .../bus/acpi/acpica/utilities/utresrc.c | 2 +- .../bus/acpi/acpica/utilities/utstate.c | 40 +-- .../bus/acpi/acpica/utilities/utstring.c | 2 +- .../bus/acpi/acpica/utilities/uttrack.c | 2 +- .../bus/acpi/acpica/utilities/utuuid.c | 4 +- .../bus/acpi/acpica/utilities/utxface.c | 2 +- .../bus/acpi/acpica/utilities/utxferror.c | 2 +- .../bus/acpi/acpica/utilities/utxfinit.c | 2 +- .../bus/acpi/acpica/utilities/utxfmutex.c | 2 +- reactos/drivers/bus/acpi/buspdo.c | 120 ++++---- reactos/drivers/bus/acpi/osl.c | 12 +- 210 files changed, 1478 insertions(+), 979 deletions(-) create mode 100644 reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h create mode 100644 reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c index d70b6a97f29..8acb5dc75ce 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c index 85df0e3ebfe..218cbe98d4a 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c index d14434b2341..37d4cc14fac 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c index f68c66ebcab..585e127a66d 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c index d8d82301820..43ee55d76f9 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c index 7f943251be3..2b7fce243c0 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c index 59d465658db..b5cad384565 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c index c1f265daaf7..6a7a559ce75 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -549,7 +549,7 @@ AcpiDsEvalRegionOperands ( ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", ObjDesc, - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), ObjDesc->Region.Length)); /* Now the address and length are valid for this opregion */ @@ -651,12 +651,12 @@ AcpiDsEvalTableRegionOperands ( return_ACPI_STATUS (AE_NOT_EXIST); } - ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table); + ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table); ObjDesc->Region.Length = Table->Length; ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", ObjDesc, - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), ObjDesc->Region.Length)); /* Now the address and length are valid for this opregion */ diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c index 81d73cb8c80..0269916a6ca 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -671,6 +671,15 @@ AcpiDsCreateOperand ( ACPI_OPERAND_OBJECT, AcpiGbl_RootNode); Status = AE_OK; } + else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP) + { + /* TBD: May only be temporary */ + + ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength); + + ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength); + Status = AE_OK; + } else { /* diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c index 877d30f4ff5..f650cedf640 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c index de70dee40fe..be090fc455b 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c index 4fc14859101..312b2cd0ca8 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c index 7caa3010f5f..9865dcd9db0 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c b/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c index 4d24d2cfba6..e5ea5085f78 100644 --- a/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c +++ b/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evevent.c b/reactos/drivers/bus/acpi/acpica/events/evevent.c index f43eeff07a8..e4473561a54 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evevent.c +++ b/reactos/drivers/bus/acpi/acpica/events/evevent.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evglock.c b/reactos/drivers/bus/acpi/acpica/events/evglock.c index 6ddf32be5a3..e1ebf190f00 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evglock.c +++ b/reactos/drivers/bus/acpi/acpica/events/evglock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,9 +120,7 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evglock") -#if ACPI_REDUCED_HARDWARE -#error -#endif + #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ /* Local prototypes */ diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpe.c b/reactos/drivers/bus/acpi/acpica/events/evgpe.c index ea1a3a69d15..16428d6299f 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evgpe.c +++ b/reactos/drivers/bus/acpi/acpica/events/evgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -203,18 +203,6 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* - * We will only allow a GPE to be enabled if it has either an associated - * method (_Lxx/_Exx) or a handler, or is using the implicit notify - * feature. Otherwise, the GPE will be immediately disabled by - * AcpiEvGpeDispatch the first time it fires. - */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_NONE) - { - return_ACPI_STATUS (AE_NO_HANDLER); - } - /* Clear the GPE (of stale events) */ Status = AcpiHwClearGpe (GpeEventInfo); @@ -225,7 +213,7 @@ AcpiEvEnableGpe ( /* Enable the requested GPE */ - Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE); return_ACPI_STATUS (Status); } @@ -315,7 +303,7 @@ AcpiEvRemoveGpeReference ( Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo); if (ACPI_SUCCESS (Status)) { - Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE); } if (ACPI_FAILURE (Status)) @@ -455,7 +443,11 @@ AcpiEvGpeDetect ( { ACPI_STATUS Status; ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_NAMESPACE_NODE *GpeDevice; ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; + ACPI_GPE_EVENT_INFO *GpeEventInfo; + UINT32 GpeNumber; + ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; UINT8 EnabledStatusByte; UINT32 StatusReg; @@ -486,6 +478,8 @@ AcpiEvGpeDetect ( GpeBlock = GpeXruptList->GpeBlockListHead; while (GpeBlock) { + GpeDevice = GpeBlock->Node; + /* * Read all of the 8-bit GPE status and enable registers in this GPE * block, saving all of them. Find all currently active GP events. @@ -554,16 +548,55 @@ AcpiEvGpeDetect ( { /* Examine one GPE bit */ + GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * + ACPI_GPE_REGISTER_WIDTH) + j]; + GpeNumber = j + GpeRegisterInfo->BaseGpeNumber; + if (EnabledStatusByte & (1 << j)) { - /* - * Found an active GPE. Dispatch the event to a handler - * or method. - */ - IntStatus |= AcpiEvGpeDispatch (GpeBlock->Node, - &GpeBlock->EventInfo[((ACPI_SIZE) i * - ACPI_GPE_REGISTER_WIDTH) + j], - j + GpeRegisterInfo->BaseGpeNumber); + /* Invoke global event handler if present */ + + AcpiGpeCount++; + if (AcpiGbl_GlobalEventHandler) + { + AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, + GpeDevice, GpeNumber, + AcpiGbl_GlobalEventHandlerContext); + } + + /* Found an active GPE */ + + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER) + { + /* Dispatch the event to a raw handler */ + + GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; + + /* + * There is no protection around the namespace node + * and the GPE handler to ensure a safe destruction + * because: + * 1. The namespace node is expected to always + * exist after loading a table. + * 2. The GPE handler is expected to be flushed by + * AcpiOsWaitEventsComplete() before the + * destruction. + */ + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= GpeHandlerInfo->Address ( + GpeDevice, GpeNumber, GpeHandlerInfo->Context); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } + else + { + /* + * Dispatch the event to a standard handler or + * method. + */ + IntStatus |= AcpiEvGpeDispatch (GpeDevice, + GpeEventInfo, GpeNumber); + } } } } @@ -599,8 +632,7 @@ AcpiEvAsynchExecuteGpeMethod ( void *Context) { ACPI_GPE_EVENT_INFO *GpeEventInfo = Context; - ACPI_STATUS Status; - ACPI_GPE_EVENT_INFO *LocalGpeEventInfo; + ACPI_STATUS Status = AE_OK; ACPI_EVALUATE_INFO *Info; ACPI_GPE_NOTIFY_INFO *Notify; @@ -608,49 +640,9 @@ AcpiEvAsynchExecuteGpeMethod ( ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod); - /* Allocate a local GPE block */ - - LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO)); - if (!LocalGpeEventInfo) - { - ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, - "while handling a GPE")); - return_VOID; - } - - Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); - if (ACPI_FAILURE (Status)) - { - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - - /* Must revalidate the GpeNumber/GpeBlock */ - - if (!AcpiEvValidGpeEvent (GpeEventInfo)) - { - Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - - /* - * Take a snapshot of the GPE info for this level - we copy the info to - * prevent a race condition with RemoveHandler/RemoveBlock. - */ - ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo, - sizeof (ACPI_GPE_EVENT_INFO)); - - Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); - if (ACPI_FAILURE (Status)) - { - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - /* Do the correct dispatch - normal method or implicit notify */ - switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) + switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags)) { case ACPI_GPE_DISPATCH_NOTIFY: /* @@ -664,7 +656,7 @@ AcpiEvAsynchExecuteGpeMethod ( * June 2012: Expand implicit notify mechanism to support * notifies on multiple device objects. */ - Notify = LocalGpeEventInfo->Dispatch.NotifyList; + Notify = GpeEventInfo->Dispatch.NotifyList; while (ACPI_SUCCESS (Status) && Notify) { Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode, @@ -689,7 +681,7 @@ AcpiEvAsynchExecuteGpeMethod ( * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the * _Lxx/_Exx control method that corresponds to this GPE */ - Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode; + Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode; Info->Flags = ACPI_IGNORE_RETURN_VALUE; Status = AcpiNsEvaluate (Info); @@ -700,23 +692,26 @@ AcpiEvAsynchExecuteGpeMethod ( { ACPI_EXCEPTION ((AE_INFO, Status, "while evaluating GPE method [%4.4s]", - AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode))); + AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode))); } break; default: - return_VOID; /* Should never happen */ + goto ErrorExit; /* Should never happen */ } /* Defer enabling of GPE until all notify handlers are done */ Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, - AcpiEvAsynchEnableGpe, LocalGpeEventInfo); - if (ACPI_FAILURE (Status)) + AcpiEvAsynchEnableGpe, GpeEventInfo); + if (ACPI_SUCCESS (Status)) { - ACPI_FREE (LocalGpeEventInfo); + return_VOID; } + +ErrorExit: + AcpiEvAsynchEnableGpe (GpeEventInfo); return_VOID; } @@ -740,11 +735,13 @@ AcpiEvAsynchEnableGpe ( void *Context) { ACPI_GPE_EVENT_INFO *GpeEventInfo = Context; + ACPI_CPU_FLAGS Flags; + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); (void) AcpiEvFinishGpe (GpeEventInfo); + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); - ACPI_FREE (GpeEventInfo); return; } @@ -785,7 +782,7 @@ AcpiEvFinishGpe ( /* * Enable this GPE, conditionally. This means that the GPE will - * only be physically enabled if the EnableForRun bit is set + * only be physically enabled if the EnableMask bit is set * in the EventInfo. */ (void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE); @@ -823,15 +820,6 @@ AcpiEvGpeDispatch ( ACPI_FUNCTION_TRACE (EvGpeDispatch); - /* Invoke global event handler if present */ - - AcpiGpeCount++; - if (AcpiGbl_GlobalEventHandler) - { - AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, GpeDevice, - GpeNumber, AcpiGbl_GlobalEventHandlerContext); - } - /* * Always disable the GPE so that it does not keep firing before * any asynchronous activity completes (either from the execution @@ -874,7 +862,7 @@ AcpiEvGpeDispatch ( * If there is neither a handler nor a method, leave the GPE * disabled. */ - switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) + switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags)) { case ACPI_GPE_DISPATCH_HANDLER: diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c b/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c index 4de91c1c1f4..e067457c640 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c +++ b/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -590,8 +590,9 @@ AcpiEvInitializeGpeBlock ( * Ignore GPEs that have no corresponding _Lxx/_Exx method * and GPEs that are used to wake the system */ - if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_NONE) || - ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) || + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) || (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)) { continue; diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c b/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c index 237a96c5d2c..5848b7586e1 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c +++ b/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -491,15 +491,17 @@ AcpiEvMatchGpeMethod ( return_ACPI_STATUS (AE_OK); } - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER)) { /* If there is already a handler, ignore this GPE method */ return_ACPI_STATUS (AE_OK); } - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_METHOD) { /* diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c b/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c index 0410bae57f0..f204bbadc5e 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c +++ b/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -185,60 +185,6 @@ UnlockAndExit: } -/******************************************************************************* - * - * FUNCTION: AcpiEvValidGpeEvent - * - * PARAMETERS: GpeEventInfo - Info for this GPE - * - * RETURN: TRUE if the GpeEvent is valid - * - * DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL. - * Should be called only when the GPE lists are semaphore locked - * and not subject to change. - * - ******************************************************************************/ - -BOOLEAN -AcpiEvValidGpeEvent ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) -{ - ACPI_GPE_XRUPT_INFO *GpeXruptBlock; - ACPI_GPE_BLOCK_INFO *GpeBlock; - - - ACPI_FUNCTION_ENTRY (); - - - /* No need for spin lock since we are not changing any list elements */ - - /* Walk the GPE interrupt levels */ - - GpeXruptBlock = AcpiGbl_GpeXruptListHead; - while (GpeXruptBlock) - { - GpeBlock = GpeXruptBlock->GpeBlockListHead; - - /* Walk the GPE blocks on this interrupt level */ - - while (GpeBlock) - { - if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) && - (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo)) - { - return (TRUE); - } - - GpeBlock = GpeBlock->Next; - } - - GpeXruptBlock = GpeXruptBlock->Next; - } - - return (FALSE); -} - - /******************************************************************************* * * FUNCTION: AcpiEvGetGpeDevice @@ -488,8 +434,10 @@ AcpiEvDeleteGpeHandlers ( GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j]; - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER)) { /* Delete an installed handler block */ @@ -497,7 +445,7 @@ AcpiEvDeleteGpeHandlers ( GpeEventInfo->Dispatch.Handler = NULL; GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK; } - else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + else if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NOTIFY) { /* Delete the implicit notification device list */ diff --git a/reactos/drivers/bus/acpi/acpica/events/evhandler.c b/reactos/drivers/bus/acpi/acpica/events/evhandler.c index b67ba3e809b..d02ea5325f4 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evhandler.c +++ b/reactos/drivers/bus/acpi/acpica/events/evhandler.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evmisc.c b/reactos/drivers/bus/acpi/acpica/events/evmisc.c index 8b2c3ff46f5..1735038d4cd 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evmisc.c +++ b/reactos/drivers/bus/acpi/acpica/events/evmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evregion.c b/reactos/drivers/bus/acpi/acpica/events/evregion.c index ec681daa268..25a79001712 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evregion.c +++ b/reactos/drivers/bus/acpi/acpica/events/evregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -360,7 +360,7 @@ AcpiEvAddressSpaceDispatch ( ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION, "Handler %p (@%p) Address %8.8X%8.8X [%s]\n", &RegionObj->Region.Handler->AddressSpace, Handler, - ACPI_FORMAT_NATIVE_UINT (Address), + ACPI_FORMAT_UINT64 (Address), AcpiUtGetRegionName (RegionObj->Region.SpaceId))); if (!(HandlerDesc->AddressSpace.HandlerFlags & diff --git a/reactos/drivers/bus/acpi/acpica/events/evrgnini.c b/reactos/drivers/bus/acpi/acpica/events/evrgnini.c index d439c3198fc..405af2264e3 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evrgnini.c +++ b/reactos/drivers/bus/acpi/acpica/events/evrgnini.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evsci.c b/reactos/drivers/bus/acpi/acpica/events/evsci.c index ec6c1c1918a..987b03c19df 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evsci.c +++ b/reactos/drivers/bus/acpi/acpica/events/evsci.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/events/evxface.c b/reactos/drivers/bus/acpi/acpica/events/evxface.c index 9b8a1ceec1b..5e3391de8f0 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evxface.c +++ b/reactos/drivers/bus/acpi/acpica/events/evxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -124,6 +124,21 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evxface") +#if (!ACPI_REDUCED_HARDWARE) + +/* Local prototypes */ + +static ACPI_STATUS +AcpiEvInstallGpeHandler ( + ACPI_HANDLE GpeDevice, + UINT32 GpeNumber, + UINT32 Type, + BOOLEAN IsRawHandler, + ACPI_GPE_HANDLER Address, + void *Context); + +#endif + /******************************************************************************* * @@ -894,27 +909,31 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler) /******************************************************************************* * - * FUNCTION: AcpiInstallGpeHandler + * FUNCTION: AcpiEvInstallGpeHandler * * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT * defined GPEs) * GpeNumber - The GPE number within the GPE block * Type - Whether this GPE should be treated as an * edge- or level-triggered interrupt. + * IsRawHandler - Whether this GPE should be handled using + * the special GPE handler mode. * Address - Address of the handler * Context - Value passed to the handler on each GPE * * RETURN: Status * - * DESCRIPTION: Install a handler for a General Purpose Event. + * DESCRIPTION: Internal function to install a handler for a General Purpose + * Event. * ******************************************************************************/ -ACPI_STATUS -AcpiInstallGpeHandler ( +static ACPI_STATUS +AcpiEvInstallGpeHandler ( ACPI_HANDLE GpeDevice, UINT32 GpeNumber, UINT32 Type, + BOOLEAN IsRawHandler, ACPI_GPE_HANDLER Address, void *Context) { @@ -924,7 +943,7 @@ AcpiInstallGpeHandler ( ACPI_CPU_FLAGS Flags; - ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler); + ACPI_FUNCTION_TRACE (EvInstallGpeHandler); /* Parameter validation */ @@ -962,8 +981,10 @@ AcpiInstallGpeHandler ( /* Make sure that there isn't a handler there already */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER)) { Status = AE_ALREADY_EXISTS; goto FreeAndExit; @@ -980,8 +1001,10 @@ AcpiInstallGpeHandler ( * automatically during initialization, in which case it has to be * disabled now to avoid spurious execution of the handler. */ - if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) || - (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) && + if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_METHOD) || + (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_NOTIFY)) && GpeEventInfo->RuntimeCount) { Handler->OriginallyEnabled = TRUE; @@ -1002,7 +1025,8 @@ AcpiInstallGpeHandler ( /* Setup up dispatch flags to indicate handler (vs. method/notify) */ GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); - GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_HANDLER); + GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ? + ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER)); AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); @@ -1017,9 +1041,89 @@ FreeAndExit: goto UnlockAndExit; } + +/******************************************************************************* + * + * FUNCTION: AcpiInstallGpeHandler + * + * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT + * defined GPEs) + * GpeNumber - The GPE number within the GPE block + * Type - Whether this GPE should be treated as an + * edge- or level-triggered interrupt. + * Address - Address of the handler + * Context - Value passed to the handler on each GPE + * + * RETURN: Status + * + * DESCRIPTION: Install a handler for a General Purpose Event. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiInstallGpeHandler ( + ACPI_HANDLE GpeDevice, + UINT32 GpeNumber, + UINT32 Type, + ACPI_GPE_HANDLER Address, + void *Context) +{ + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler); + + + Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, FALSE, + Address, Context); + + return_ACPI_STATUS (Status); +} + ACPI_EXPORT_SYMBOL (AcpiInstallGpeHandler) +/******************************************************************************* + * + * FUNCTION: AcpiInstallGpeRawHandler + * + * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT + * defined GPEs) + * GpeNumber - The GPE number within the GPE block + * Type - Whether this GPE should be treated as an + * edge- or level-triggered interrupt. + * Address - Address of the handler + * Context - Value passed to the handler on each GPE + * + * RETURN: Status + * + * DESCRIPTION: Install a handler for a General Purpose Event. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiInstallGpeRawHandler ( + ACPI_HANDLE GpeDevice, + UINT32 GpeNumber, + UINT32 Type, + ACPI_GPE_HANDLER Address, + void *Context) +{ + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiInstallGpeRawHandler); + + + Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, TRUE, + Address, Context); + + return_ACPI_STATUS (Status); +} + +ACPI_EXPORT_SYMBOL (AcpiInstallGpeRawHandler) + + /******************************************************************************* * * FUNCTION: AcpiRemoveGpeHandler @@ -1076,8 +1180,10 @@ AcpiRemoveGpeHandler ( /* Make sure that a handler is indeed installed */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != + ACPI_GPE_DISPATCH_HANDLER) && + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != + ACPI_GPE_DISPATCH_RAW_HANDLER)) { Status = AE_NOT_EXIST; goto UnlockAndExit; @@ -1094,6 +1200,7 @@ AcpiRemoveGpeHandler ( /* Remove the handler */ Handler = GpeEventInfo->Dispatch.Handler; + GpeEventInfo->Dispatch.Handler = NULL; /* Restore Method node (if any), set dispatch flags */ @@ -1107,8 +1214,10 @@ AcpiRemoveGpeHandler ( * enabled, it should be enabled at this point to restore the * post-initialization configuration. */ - if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) || - (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) && + if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_METHOD) || + (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_NOTIFY)) && Handler->OriginallyEnabled) { (void) AcpiEvAddGpeReference (GpeEventInfo); diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c b/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c index caa38102c04..271aaccc88e 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c +++ b/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -473,7 +473,8 @@ AcpiGetEventStatus ( if (InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED; + LocalEventStatus |= + (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET); } /* Fixed event currently active? */ @@ -487,7 +488,7 @@ AcpiGetEventStatus ( if (InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_SET; + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET; } (*EventStatus) = LocalEventStatus; diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c b/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c index 5da1775bffb..f4f0da1379f 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c +++ b/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -219,7 +219,7 @@ AcpiEnableGpe ( GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber); if (GpeEventInfo) { - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { Status = AcpiEvAddGpeReference (GpeEventInfo); @@ -293,12 +293,21 @@ ACPI_EXPORT_SYMBOL (AcpiDisableGpe) * RETURN: Status * * DESCRIPTION: Enable or disable an individual GPE. This function bypasses - * the reference count mechanism used in the AcpiEnableGpe and - * AcpiDisableGpe interfaces -- and should be used with care. - * - * Note: Typically used to disable a runtime GPE for short period of time, - * then re-enable it, without disturbing the existing reference counts. This - * is useful, for example, in the Embedded Controller (EC) driver. + * the reference count mechanism used in the AcpiEnableGpe(), + * AcpiDisableGpe() interfaces. + * This API is typically used by the GPE raw handler mode driver + * to switch between the polling mode and the interrupt mode after + * the driver has enabled the GPE. + * The APIs should be invoked in this order: + * AcpiEnableGpe() <- Ensure the reference count > 0 + * AcpiSetGpe(ACPI_GPE_DISABLE) <- Enter polling mode + * AcpiSetGpe(ACPI_GPE_ENABLE) <- Leave polling mode + * AcpiDisableGpe() <- Decrease the reference count + * + * Note: If a GPE is shared by 2 silicon components, then both the drivers + * should support GPE polling mode or disabling the GPE for long period + * for one driver may break the other. So use it with care since all + * firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode. * ******************************************************************************/ @@ -333,7 +342,7 @@ AcpiSetGpe ( { case ACPI_GPE_ENABLE: - Status = AcpiEvEnableGpe (GpeEventInfo); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); break; case ACPI_GPE_DISABLE: @@ -502,7 +511,7 @@ AcpiSetupGpeForWake ( * known as an "implicit notify". Note: The GPE is assumed to be * level-triggered (for windows compatibility). */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) { /* @@ -517,7 +526,7 @@ AcpiSetupGpeForWake ( * If we already have an implicit notify on this GPE, add * this device to the notify list. */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NOTIFY) { /* Ensure that the device is not already in the list */ @@ -874,6 +883,44 @@ AcpiEnableAllRuntimeGpes ( ACPI_EXPORT_SYMBOL (AcpiEnableAllRuntimeGpes) +/****************************************************************************** + * + * FUNCTION: AcpiEnableAllWakeupGpes + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in + * all GPE blocks. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiEnableAllWakeupGpes ( + void) +{ + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiEnableAllWakeupGpes); + + + Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + Status = AcpiHwEnableAllWakeupGpes (); + (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); + + return_ACPI_STATUS (Status); +} + +ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes) + + /******************************************************************************* * * FUNCTION: AcpiInstallGpeBlock diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfregn.c b/reactos/drivers/bus/acpi/acpica/events/evxfregn.c index a305e3fc531..e2206764801 100644 --- a/reactos/drivers/bus/acpi/acpica/events/evxfregn.c +++ b/reactos/drivers/bus/acpi/acpica/events/evxfregn.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exconfig.c b/reactos/drivers/bus/acpi/acpica/executer/exconfig.c index 2fd6e36c7c3..c311a69fb04 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exconfig.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exconfig.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c b/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c index 00f0310ddfc..1cf54e20b1f 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/excreate.c b/reactos/drivers/bus/acpi/acpica/executer/excreate.c index 90a389a8e09..90a3632adb3 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/excreate.c +++ b/reactos/drivers/bus/acpi/acpica/executer/excreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exdebug.c b/reactos/drivers/bus/acpi/acpica/executer/exdebug.c index eb1daad19e9..64fef550ec1 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exdebug.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exdump.c b/reactos/drivers/bus/acpi/acpica/executer/exdump.c index 4d6a1867649..09930edd200 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exdump.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -856,7 +856,7 @@ AcpiExDumpOperand ( else { AcpiOsPrintf (" base %8.8X%8.8X Length %X\n", - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), ObjDesc->Region.Length); } break; diff --git a/reactos/drivers/bus/acpi/acpica/executer/exfield.c b/reactos/drivers/bus/acpi/acpica/executer/exfield.c index e33f82ce13a..3083985aedd 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exfield.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exfldio.c b/reactos/drivers/bus/acpi/acpica/executer/exfldio.c index e29ae665728..cd0233de051 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exfldio.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exfldio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -361,13 +361,13 @@ AcpiExAccessRegion ( } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD, - " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n", + " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n", AcpiUtGetRegionName (RgnDesc->Region.SpaceId), RgnDesc->Region.SpaceId, ObjDesc->CommonField.AccessByteWidth, ObjDesc->CommonField.BaseByteOffset, FieldDatumByteOffset, - ACPI_CAST_PTR (void, (RgnDesc->Region.Address + RegionOffset)))); + ACPI_FORMAT_UINT64 (RgnDesc->Region.Address + RegionOffset))); /* Invoke the appropriate AddressSpace/OpRegion handler */ diff --git a/reactos/drivers/bus/acpi/acpica/executer/exmisc.c b/reactos/drivers/bus/acpi/acpica/executer/exmisc.c index 94053d561b7..d92b271d9e3 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exmisc.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exmutex.c b/reactos/drivers/bus/acpi/acpica/executer/exmutex.c index 962b9c1cf73..c688a504e72 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exmutex.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exnames.c b/reactos/drivers/bus/acpi/acpica/executer/exnames.c index 67f79303ab6..b402d3b4fa2 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exnames.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c b/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c index 8ce761054d0..c7addbdbe52 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c b/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c index 2519dca42d8..399b2595579 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c b/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c index 4e6842b9f4c..b0928afbad4 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -198,7 +198,18 @@ AcpiExOpcode_3A_0T_0R ( /* Might return while OS is shutting down, just continue */ ACPI_FREE (Fatal); - break; + goto Cleanup; + + case AML_EXTERNAL_OP: + /* + * If the interpreter sees this opcode, just ignore it. The External + * op is intended for use by disassemblers in order to properly + * disassemble control method invocations. The opcode or group of + * opcodes should be surrounded by an "if (0)" clause to ensure that + * AML interpreters never see the opcode. + */ + Status = AE_OK; + goto Cleanup; default: diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c b/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c index 9cd26e0f052..a7d76d686ca 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exprep.c b/reactos/drivers/bus/acpi/acpica/executer/exprep.c index dc764bb6c57..d84ccc3efb4 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exprep.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exprep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exregion.c b/reactos/drivers/bus/acpi/acpica/executer/exregion.c index 544412ecad3..31bbb60b6aa 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exregion.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -247,8 +247,8 @@ AcpiExSystemMemorySpaceHandler ( * one page, which is similar to the original code that used a 4k * maximum window. */ - PageBoundaryMapLength = - ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address; + PageBoundaryMapLength = (ACPI_SIZE) + (ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address); if (PageBoundaryMapLength == 0) { PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE; @@ -261,13 +261,12 @@ AcpiExSystemMemorySpaceHandler ( /* Create a new mapping starting at the address given */ - MemInfo->MappedLogicalAddress = AcpiOsMapMemory ( - (ACPI_PHYSICAL_ADDRESS) Address, MapLength); + MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength); if (!MemInfo->MappedLogicalAddress) { ACPI_ERROR ((AE_INFO, "Could not map memory at 0x%8.8X%8.8X, size %u", - ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength)); + ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength)); MemInfo->MappedLength = 0; return_ACPI_STATUS (AE_NO_MEMORY); } @@ -287,7 +286,7 @@ AcpiExSystemMemorySpaceHandler ( ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", - BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address))); + BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); /* * Perform the memory read or write @@ -410,7 +409,7 @@ AcpiExSystemIoSpaceHandler ( ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", - BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address))); + BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); /* Decode the function parameter */ diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresnte.c b/reactos/drivers/bus/acpi/acpica/executer/exresnte.c index 7640a01dc66..d72ec55221a 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exresnte.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exresnte.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresolv.c b/reactos/drivers/bus/acpi/acpica/executer/exresolv.c index 35bb6bb8ac1..e874342430d 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exresolv.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exresolv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresop.c b/reactos/drivers/bus/acpi/acpica/executer/exresop.c index 6dc28aa6194..fab4993c1de 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exresop.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exresop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstore.c b/reactos/drivers/bus/acpi/acpica/executer/exstore.c index cf476214a2d..47c212ddecc 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exstore.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exstore.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstoren.c b/reactos/drivers/bus/acpi/acpica/executer/exstoren.c index 82944c5a56e..c1879b43d86 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exstoren.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exstoren.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstorob.c b/reactos/drivers/bus/acpi/acpica/executer/exstorob.c index f36e9fc017a..48c3440f9b1 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exstorob.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exstorob.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exsystem.c b/reactos/drivers/bus/acpi/acpica/executer/exsystem.c index 0bce72ac135..49ec2e987b7 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exsystem.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exsystem.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/executer/exutils.c b/reactos/drivers/bus/acpi/acpica/executer/exutils.c index 63bfb847c1a..b432cba2eda 100644 --- a/reactos/drivers/bus/acpi/acpica/executer/exutils.c +++ b/reactos/drivers/bus/acpi/acpica/executer/exutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c b/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c index 0dff876e230..05303835337 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c b/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c index 0dab77a721e..ba8acdcecc7 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwesleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c b/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c index 01256850518..c53268901ee 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -130,6 +130,11 @@ AcpiHwEnableWakeupGpeBlock ( ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context); +static ACPI_STATUS +AcpiHwGpeEnableWrite ( + UINT8 EnableMask, + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo); + /****************************************************************************** * @@ -200,13 +205,13 @@ AcpiHwLowSetGpe ( /* Set or clear just the bit that corresponds to this GPE */ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); - switch (Action) + switch (Action & ~ACPI_GPE_SAVE_MASK) { case ACPI_GPE_CONDITIONAL_ENABLE: - /* Only enable if the EnableForRun bit is set */ + /* Only enable if the corresponding EnableMask bit is set */ - if (!(RegisterBit & GpeRegisterInfo->EnableForRun)) + if (!(RegisterBit & GpeRegisterInfo->EnableMask)) { return (AE_BAD_PARAMETER); } @@ -232,6 +237,10 @@ AcpiHwLowSetGpe ( /* Write the updated enable mask */ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); + if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK)) + { + GpeRegisterInfo->EnableMask = (UINT8) EnableMask; + } return (Status); } @@ -315,7 +324,7 @@ AcpiHwGetGpeStatus ( /* GPE currently handled? */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER; @@ -343,6 +352,19 @@ AcpiHwGetGpeStatus ( LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED; } + /* GPE currently enabled (enable bit == 1)? */ + + Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + if (RegisterBit & InByte) + { + LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET; + } + /* GPE currently active (status bit == 1)? */ Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress); @@ -353,7 +375,7 @@ AcpiHwGetGpeStatus ( if (RegisterBit & InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_SET; + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET; } /* Set return value */ @@ -363,6 +385,37 @@ AcpiHwGetGpeStatus ( } +/****************************************************************************** + * + * FUNCTION: AcpiHwGpeEnableWrite + * + * PARAMETERS: EnableMask - Bit mask to write to the GPE register + * GpeRegisterInfo - Gpe Register info + * + * RETURN: Status + * + * DESCRIPTION: Write the enable mask byte to the given GPE register. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiHwGpeEnableWrite ( + UINT8 EnableMask, + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo) +{ + ACPI_STATUS Status; + + + Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); + if (ACPI_SUCCESS (Status)) + { + GpeRegisterInfo->EnableMask = EnableMask; + } + + return (Status); +} + + /****************************************************************************** * * FUNCTION: AcpiHwDisableGpeBlock @@ -392,7 +445,7 @@ AcpiHwDisableGpeBlock ( { /* Disable all GPEs in this register */ - Status = AcpiHwWrite (0x00, &GpeBlock->RegisterInfo[i].EnableAddress); + Status = AcpiHwGpeEnableWrite (0x00, &GpeBlock->RegisterInfo[i]); if (ACPI_FAILURE (Status)) { return (Status); @@ -465,6 +518,7 @@ AcpiHwEnableRuntimeGpeBlock ( { UINT32 i; ACPI_STATUS Status; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; /* NOTE: assumes that all GPEs are currently disabled */ @@ -473,15 +527,16 @@ AcpiHwEnableRuntimeGpeBlock ( for (i = 0; i < GpeBlock->RegisterCount; i++) { - if (!GpeBlock->RegisterInfo[i].EnableForRun) + GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; + if (!GpeRegisterInfo->EnableForRun) { continue; } /* Enable all "runtime" GPEs in this register */ - Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForRun, - &GpeBlock->RegisterInfo[i].EnableAddress); + Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun, + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); @@ -514,21 +569,21 @@ AcpiHwEnableWakeupGpeBlock ( { UINT32 i; ACPI_STATUS Status; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; /* Examine each GPE Register within the block */ for (i = 0; i < GpeBlock->RegisterCount; i++) { - if (!GpeBlock->RegisterInfo[i].EnableForWake) - { - continue; - } - - /* Enable all "wake" GPEs in this register */ - - Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForWake, - &GpeBlock->RegisterInfo[i].EnableAddress); + GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; + + /* + * Enable all "wake" GPEs in this register and disable the + * remaining ones. + */ + Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake, + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c b/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c index 4470b5ccc06..da7674c9eee 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c b/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c index 7df29fde7b6..492833e01d1 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c b/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c index 4501598e88d..6438ea7aba2 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c b/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c index 525a4e5a69e..ef9e591b05a 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c b/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c index dbbb3bb6517..47dd722cdcd 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -227,8 +227,8 @@ AcpiHwValidateIoRequest ( ByteWidth = ACPI_DIV_8 (BitWidth); LastAddress = Address + ByteWidth - 1; - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %p LastAddress %p Length %X", - ACPI_CAST_PTR (void, Address), ACPI_CAST_PTR (void, LastAddress), + ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", + ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress), ByteWidth)); /* Maximum 16-bit address in I/O space */ @@ -236,8 +236,8 @@ AcpiHwValidateIoRequest ( if (LastAddress > ACPI_UINT16_MAX) { ACPI_ERROR ((AE_INFO, - "Illegal I/O port address/length above 64K: %p/0x%X", - ACPI_CAST_PTR (void, Address), ByteWidth)); + "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", + ACPI_FORMAT_UINT64 (Address), ByteWidth)); return_ACPI_STATUS (AE_LIMIT); } @@ -268,8 +268,8 @@ AcpiHwValidateIoRequest ( if (AcpiGbl_OsiData >= PortInfo->OsiDependency) { ACPI_DEBUG_PRINT ((ACPI_DB_IO, - "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)", - ACPI_CAST_PTR (void, Address), ByteWidth, PortInfo->Name, + "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)", + ACPI_FORMAT_UINT64 (Address), ByteWidth, PortInfo->Name, PortInfo->Start, PortInfo->End)); return_ACPI_STATUS (AE_AML_ILLEGAL_ADDRESS); diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c b/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c index 4687ae1c419..12c4ffbfae6 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c b/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c index db64da61869..2c7066b6706 100644 --- a/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c +++ b/reactos/drivers/bus/acpi/acpica/hardware/hwxfsleep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acapps.h b/reactos/drivers/bus/acpi/acpica/include/acapps.h index 6536048d637..11536425dd4 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acapps.h +++ b/reactos/drivers/bus/acpi/acpica/include/acapps.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -124,7 +124,7 @@ /* Common info for tool signons */ #define ACPICA_NAME "Intel ACPI Component Architecture" -#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2014 Intel Corporation" +#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2015 Intel Corporation" #if ACPI_MACHINE_WIDTH == 64 #define ACPI_WIDTH "-64" @@ -141,15 +141,15 @@ /* Macros for signons and file headers */ #define ACPI_COMMON_SIGNON(UtilityName) \ - "\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \ + "\n%s\n%s version %8.8X%s\n%s\n\n", \ ACPICA_NAME, \ - UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \ + UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ ACPICA_COPYRIGHT #define ACPI_COMMON_HEADER(UtilityName, Prefix) \ - "%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \ + "%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \ Prefix, ACPICA_NAME, \ - Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \ + Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ Prefix, ACPICA_COPYRIGHT, \ Prefix diff --git a/reactos/drivers/bus/acpi/acpica/include/acbuffer.h b/reactos/drivers/bus/acpi/acpica/include/acbuffer.h index 9ccb3eafd82..bbcff578884 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acbuffer.h +++ b/reactos/drivers/bus/acpi/acpica/include/acbuffer.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/accommon.h b/reactos/drivers/bus/acpi/acpica/include/accommon.h index 57735c5decd..76dc38a1e44 100644 --- a/reactos/drivers/bus/acpi/acpica/include/accommon.h +++ b/reactos/drivers/bus/acpi/acpica/include/accommon.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acconfig.h b/reactos/drivers/bus/acpi/acpica/include/acconfig.h index 3c7a3bd1df0..41fa33d6011 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acconfig.h +++ b/reactos/drivers/bus/acpi/acpica/include/acconfig.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acdebug.h b/reactos/drivers/bus/acpi/acpica/include/acdebug.h index b6105c2f7b8..3c823e8198f 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acdebug.h +++ b/reactos/drivers/bus/acpi/acpica/include/acdebug.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,7 +149,7 @@ typedef struct acpi_db_execute_walk #define PARAM_LIST(pl) pl -#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_verbose) +#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_Verbose) #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ AcpiOsPrintf PARAM_LIST(fp);} diff --git a/reactos/drivers/bus/acpi/acpica/include/acdisasm.h b/reactos/drivers/bus/acpi/acpica/include/acdisasm.h index f0cadef9e33..5776d5d779e 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acdisasm.h +++ b/reactos/drivers/bus/acpi/acpica/include/acdisasm.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -201,6 +201,7 @@ typedef enum /* Types used only for the Data Table Compiler */ ACPI_DMT_BUFFER, + ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */ ACPI_DMT_DEVICE_PATH, ACPI_DMT_LABEL, ACPI_DMT_PCI_PATH, @@ -423,9 +424,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[]; @@ -494,6 +493,15 @@ AcpiDmLineHeader2 ( * dmtbdump */ void +AcpiDmDumpBuffer ( + void *Table, + UINT32 BufferOffset, + UINT32 Length, + UINT32 AbsoluteOffset, + char *Header, + BOOLEAN MultiLine); + +void AcpiDmDumpAsf ( ACPI_TABLE_HEADER *Table); @@ -1068,6 +1076,10 @@ AcpiDmCloseOperator ( */ void AdDisassemblerHeader ( - char *Filename); + char *Filename, + UINT8 TableType); + +#define ACPI_IS_AML_TABLE 0 +#define ACPI_IS_DATA_TABLE 1 #endif /* __ACDISASM_H__ */ diff --git a/reactos/drivers/bus/acpi/acpica/include/acdispat.h b/reactos/drivers/bus/acpi/acpica/include/acdispat.h index 2a47c52b189..238cdde32c4 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acdispat.h +++ b/reactos/drivers/bus/acpi/acpica/include/acdispat.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acevents.h b/reactos/drivers/bus/acpi/acpica/include/acevents.h index 8ca726cfce6..467e14f997d 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acevents.h +++ b/reactos/drivers/bus/acpi/acpica/include/acevents.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -269,10 +269,6 @@ AcpiEvWalkGpeList ( ACPI_GPE_CALLBACK GpeWalkCallback, void *Context); -BOOLEAN -AcpiEvValidGpeEvent ( - ACPI_GPE_EVENT_INFO *GpeEventInfo); - ACPI_STATUS AcpiEvGetGpeDevice ( ACPI_GPE_XRUPT_INFO *GpeXruptInfo, diff --git a/reactos/drivers/bus/acpi/acpica/include/acexcep.h b/reactos/drivers/bus/acpi/acpica/include/acexcep.h index 89d98523beb..90511b23146 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acexcep.h +++ b/reactos/drivers/bus/acpi/acpica/include/acexcep.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acglobal.h b/reactos/drivers/bus/acpi/acpica/include/acglobal.h index 91712b47da9..161079952c8 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acglobal.h +++ b/reactos/drivers/bus/acpi/acpica/include/acglobal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -382,9 +382,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DbOutputFlags, ACPI_DB_CONSOLE_O ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_disasm); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_verbose); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Disasm); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Verbose); ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods); ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods); ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList); @@ -397,9 +398,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateThreads, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_tables); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_stats); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_ini_methods); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOutputToFile); ACPI_GLOBAL (char *, AcpiGbl_DbBuffer); diff --git a/reactos/drivers/bus/acpi/acpica/include/achware.h b/reactos/drivers/bus/acpi/acpica/include/achware.h index ed39a36e252..6134bdac211 100644 --- a/reactos/drivers/bus/acpi/acpica/include/achware.h +++ b/reactos/drivers/bus/acpi/acpica/include/achware.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acinterp.h b/reactos/drivers/bus/acpi/acpica/include/acinterp.h index 739a0de40c1..f0edcb192ea 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acinterp.h +++ b/reactos/drivers/bus/acpi/acpica/include/acinterp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/aclocal.h b/reactos/drivers/bus/acpi/acpica/include/aclocal.h index f55c00a7d66..9e0d08de175 100644 --- a/reactos/drivers/bus/acpi/acpica/include/aclocal.h +++ b/reactos/drivers/bus/acpi/acpica/include/aclocal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -126,7 +126,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE; /* Total number of aml opcodes defined */ -#define AML_NUM_OPCODES 0x81 +#define AML_NUM_OPCODES 0x82 /* Forward declarations */ @@ -592,6 +592,7 @@ typedef struct acpi_gpe_register_info UINT16 BaseGpeNumber; /* Base GPE number for this register */ UINT8 EnableForWake; /* GPEs to keep enabled when sleeping */ UINT8 EnableForRun; /* GPEs to keep enabled when running */ + UINT8 EnableMask; /* Current mask of enabled GPEs */ } ACPI_GPE_REGISTER_INFO; diff --git a/reactos/drivers/bus/acpi/acpica/include/acmacros.h b/reactos/drivers/bus/acpi/acpica/include/acmacros.h index aa8bd563c63..c1f5f810fa1 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acmacros.h +++ b/reactos/drivers/bus/acpi/acpica/include/acmacros.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -136,23 +136,12 @@ #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (UINT64) (val)) /* - * printf() format helpers. These macros are workarounds for the difficulties + * printf() format helper. This macros is a workaround for the difficulties * with emitting 64-bit integers and 64-bit pointers with the same code * for both 32-bit and 64-bit hosts. */ #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) -#if ACPI_MACHINE_WIDTH == 64 -#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) -#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i) -#define ACPI_PRINTF_UINT "0x%8.8X%8.8X" - -#else -#define ACPI_FORMAT_NATIVE_UINT(i) 0, (UINT32) (i) -#define ACPI_FORMAT_TO_UINT(i) (UINT32) (i) -#define ACPI_PRINTF_UINT "0x%8.8X" -#endif - /* * Macros for moving data around to/from buffers that are possibly unaligned. diff --git a/reactos/drivers/bus/acpi/acpica/include/acnames.h b/reactos/drivers/bus/acpi/acpica/include/acnames.h index b4fed5e1867..e87f9271fb1 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acnames.h +++ b/reactos/drivers/bus/acpi/acpica/include/acnames.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acnamesp.h b/reactos/drivers/bus/acpi/acpica/include/acnamesp.h index 883e9c41c28..b66d3e4d649 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acnamesp.h +++ b/reactos/drivers/bus/acpi/acpica/include/acnamesp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acobject.h b/reactos/drivers/bus/acpi/acpica/include/acobject.h index 6e3d0de9ca8..0712e75ffa2 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acobject.h +++ b/reactos/drivers/bus/acpi/acpica/include/acobject.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acopcode.h b/reactos/drivers/bus/acpi/acpica/include/acopcode.h index 4ee04975e4d..133e1347d0d 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acopcode.h +++ b/reactos/drivers/bus/acpi/acpica/include/acopcode.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -184,6 +184,7 @@ #define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA) #define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST) #define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME) +#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA) #define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG) #define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST) #define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) @@ -317,6 +318,7 @@ #define ARGI_DWORD_OP ARGI_INVALID_OPCODE #define ARGI_ELSE_OP ARGI_INVALID_OPCODE #define ARGI_EVENT_OP ARGI_INVALID_OPCODE +#define ARGI_EXTERNAL_OP ARGI_LIST3 (ARGI_STRING, ARGI_INTEGER, ARGI_INTEGER) #define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) #define ARGI_FIELD_OP ARGI_INVALID_OPCODE #define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) diff --git a/reactos/drivers/bus/acpi/acpica/include/acoutput.h b/reactos/drivers/bus/acpi/acpica/include/acoutput.h index 2311c441c96..f0cd27a64e1 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acoutput.h +++ b/reactos/drivers/bus/acpi/acpica/include/acoutput.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acparser.h b/reactos/drivers/bus/acpi/acpica/include/acparser.h index 0899969ddc3..abbde504f9f 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acparser.h +++ b/reactos/drivers/bus/acpi/acpica/include/acparser.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acpi.h b/reactos/drivers/bus/acpi/acpica/include/acpi.h index 5466affae04..9547ceaa10c 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acpi.h +++ b/reactos/drivers/bus/acpi/acpica/include/acpi.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h b/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h index 21e6ed916ae..68d79c7a012 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h +++ b/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acpixf.h b/reactos/drivers/bus/acpi/acpica/include/acpixf.h index 23f965fdcdc..74de05ee695 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acpixf.h +++ b/reactos/drivers/bus/acpi/acpica/include/acpixf.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -118,7 +118,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20141107 +#define ACPI_CA_VERSION 0x20150410 #include "acconfig.h" #include "actypes.h" @@ -575,7 +575,7 @@ AcpiReallocateRootTable ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS AcpiFindRootPointer ( - ACPI_SIZE *RsdpAddress)) + ACPI_PHYSICAL_ADDRESS *RsdpAddress)) ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS @@ -774,6 +774,15 @@ AcpiInstallGpeHandler ( ACPI_GPE_HANDLER Address, void *Context)) +ACPI_HW_DEPENDENT_RETURN_STATUS ( +ACPI_STATUS +AcpiInstallGpeRawHandler ( + ACPI_HANDLE GpeDevice, + UINT32 GpeNumber, + UINT32 Type, + ACPI_GPE_HANDLER Address, + void *Context)) + ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_STATUS AcpiRemoveGpeHandler ( @@ -958,6 +967,11 @@ ACPI_STATUS AcpiEnableAllRuntimeGpes ( void)) +ACPI_HW_DEPENDENT_RETURN_STATUS ( +ACPI_STATUS +AcpiEnableAllWakeupGpes ( + void)) + ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_STATUS AcpiGetGpeDevice ( diff --git a/reactos/drivers/bus/acpi/acpica/include/acpredef.h b/reactos/drivers/bus/acpi/acpica/include/acpredef.h index 1c1776a9f62..b03f64bf020 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acpredef.h +++ b/reactos/drivers/bus/acpi/acpica/include/acpredef.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/acresrc.h b/reactos/drivers/bus/acpi/acpica/include/acresrc.h index d1366f0814c..b2596185fb9 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acresrc.h +++ b/reactos/drivers/bus/acpi/acpica/include/acresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -425,8 +425,9 @@ AcpiRsSetResourceLength ( /* - * rsdump + * rsdump - Debugger support */ +#ifdef ACPI_DEBUGGER void AcpiRsDumpResourceList ( ACPI_RESOURCE *Resource); @@ -434,6 +435,7 @@ AcpiRsDumpResourceList ( void AcpiRsDumpIrqList ( UINT8 *RouteTable); +#endif /* diff --git a/reactos/drivers/bus/acpi/acpica/include/acrestyp.h b/reactos/drivers/bus/acpi/acpica/include/acrestyp.h index 9cf948bc72f..f81b5cde56e 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acrestyp.h +++ b/reactos/drivers/bus/acpi/acpica/include/acrestyp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -417,6 +417,36 @@ typedef struct acpi_resource_source UINT8 MaxAddressFixed; \ ACPI_RESOURCE_ATTRIBUTE Info; +typedef struct acpi_address16_attribute +{ + UINT16 Granularity; + UINT16 Minimum; + UINT16 Maximum; + UINT16 TranslationOffset; + UINT16 AddressLength; + +} ACPI_ADDRESS16_ATTRIBUTE; + +typedef struct acpi_address32_attribute +{ + UINT32 Granularity; + UINT32 Minimum; + UINT32 Maximum; + UINT32 TranslationOffset; + UINT32 AddressLength; + +} ACPI_ADDRESS32_ATTRIBUTE; + +typedef struct acpi_address64_attribute +{ + UINT64 Granularity; + UINT64 Minimum; + UINT64 Maximum; + UINT64 TranslationOffset; + UINT64 AddressLength; + +} ACPI_ADDRESS64_ATTRIBUTE; + typedef struct acpi_resource_address { ACPI_RESOURCE_ADDRESS_COMMON @@ -426,11 +456,7 @@ typedef struct acpi_resource_address typedef struct acpi_resource_address16 { ACPI_RESOURCE_ADDRESS_COMMON - UINT16 Granularity; - UINT16 Minimum; - UINT16 Maximum; - UINT16 TranslationOffset; - UINT16 AddressLength; + ACPI_ADDRESS16_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS16; @@ -438,11 +464,7 @@ typedef struct acpi_resource_address16 typedef struct acpi_resource_address32 { ACPI_RESOURCE_ADDRESS_COMMON - UINT32 Granularity; - UINT32 Minimum; - UINT32 Maximum; - UINT32 TranslationOffset; - UINT32 AddressLength; + ACPI_ADDRESS32_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS32; @@ -450,11 +472,7 @@ typedef struct acpi_resource_address32 typedef struct acpi_resource_address64 { ACPI_RESOURCE_ADDRESS_COMMON - UINT64 Granularity; - UINT64 Minimum; - UINT64 Maximum; - UINT64 TranslationOffset; - UINT64 AddressLength; + ACPI_ADDRESS64_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS64; @@ -463,11 +481,7 @@ typedef struct acpi_resource_extended_address64 { ACPI_RESOURCE_ADDRESS_COMMON UINT8 RevisionID; - UINT64 Granularity; - UINT64 Minimum; - UINT64 Maximum; - UINT64 TranslationOffset; - UINT64 AddressLength; + ACPI_ADDRESS64_ATTRIBUTE Address; UINT64 TypeSpecific; } ACPI_RESOURCE_EXTENDED_ADDRESS64; diff --git a/reactos/drivers/bus/acpi/acpica/include/acstruct.h b/reactos/drivers/bus/acpi/acpica/include/acstruct.h index fd8eab016d1..ad43d6cec8d 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acstruct.h +++ b/reactos/drivers/bus/acpi/acpica/include/acstruct.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -141,11 +141,6 @@ #define ACPI_WALK_METHOD 0x01 #define ACPI_WALK_METHOD_RESTART 0x02 -/* Flags for iASL compiler only */ - -#define ACPI_WALK_CONST_REQUIRED 0x10 -#define ACPI_WALK_CONST_OPTIONAL 0x20 - typedef struct acpi_walk_state { diff --git a/reactos/drivers/bus/acpi/acpica/include/actables.h b/reactos/drivers/bus/acpi/acpica/include/actables.h index bb2a4f31c1c..5a79540aa53 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actables.h +++ b/reactos/drivers/bus/acpi/acpica/include/actables.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -142,8 +142,9 @@ AcpiTbScanMemoryForRsdp ( * tbdata - table data structure management */ ACPI_STATUS -AcpiTbGetNextRootIndex ( - UINT32 *TableIndex); +AcpiTbGetNextTableDescriptor ( + UINT32 *TableIndex, + ACPI_TABLE_DESC **TableDesc); void AcpiTbInitTableDescriptor ( @@ -245,14 +246,6 @@ AcpiTbInstallStandardTable ( BOOLEAN Override, UINT32 *TableIndex); -ACPI_STATUS -AcpiTbStoreTable ( - ACPI_PHYSICAL_ADDRESS Address, - ACPI_TABLE_HEADER *Table, - UINT32 Length, - UINT8 Flags, - UINT32 *TableIndex); - void AcpiTbUninstallTable ( ACPI_TABLE_DESC *TableDesc); diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl.h b/reactos/drivers/bus/acpi/acpica/include/actbl.h index ea9fc589873..68bbed4c2cd 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actbl.h +++ b/reactos/drivers/bus/acpi/acpica/include/actbl.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl1.h b/reactos/drivers/bus/acpi/acpica/include/actbl1.h index 4c5ffee1653..2c8b0edd765 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actbl1.h +++ b/reactos/drivers/bus/acpi/acpica/include/actbl1.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl2.h b/reactos/drivers/bus/acpi/acpica/include/actbl2.h index 7d628624fff..df0cfb1423c 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actbl2.h +++ b/reactos/drivers/bus/acpi/acpica/include/actbl2.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -147,6 +147,7 @@ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ +#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ @@ -1051,7 +1052,8 @@ typedef struct acpi_lpit_header enum AcpiLpitType { ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00, - ACPI_LPIT_TYPE_SIMPLE_IO = 0x01 + ACPI_LPIT_TYPE_SIMPLE_IO = 0x01, + ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */ }; /* Masks for Flags field above */ @@ -1154,6 +1156,24 @@ typedef struct acpi_table_mchi } ACPI_TABLE_MCHI; +/******************************************************************************* + * + * MSDM - Microsoft Data Management table + * + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", + * November 29, 2011. Copyright 2011 Microsoft + * + ******************************************************************************/ + +/* Basic MSDM table is only the common ACPI header */ + +typedef struct acpi_table_msdm +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + +} ACPI_TABLE_MSDM; + + /******************************************************************************* * * MTMR - MID Timer Table @@ -1185,10 +1205,9 @@ typedef struct acpi_mtmr_entry /******************************************************************************* * * SLIC - Software Licensing Description Table - * Version 1 * - * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems", - * Copyright 2006 + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", + * November 29, 2011. Copyright 2011 Microsoft * ******************************************************************************/ @@ -1201,62 +1220,6 @@ typedef struct acpi_table_slic } ACPI_TABLE_SLIC; -/* Common SLIC subtable header */ - -typedef struct acpi_slic_header -{ - UINT32 Type; - UINT32 Length; - -} ACPI_SLIC_HEADER; - -/* Values for Type field above */ - -enum AcpiSlicType -{ - ACPI_SLIC_TYPE_PUBLIC_KEY = 0, - ACPI_SLIC_TYPE_WINDOWS_MARKER = 1, - ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */ -}; - - -/* - * SLIC Subtables, correspond to Type in ACPI_SLIC_HEADER - */ - -/* 0: Public Key Structure */ - -typedef struct acpi_slic_key -{ - ACPI_SLIC_HEADER Header; - UINT8 KeyType; - UINT8 Version; - UINT16 Reserved; - UINT32 Algorithm; - char Magic[4]; - UINT32 BitLength; - UINT32 Exponent; - UINT8 Modulus[128]; - -} ACPI_SLIC_KEY; - - -/* 1: Windows Marker Structure */ - -typedef struct acpi_slic_marker -{ - ACPI_SLIC_HEADER Header; - UINT32 Version; - char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ - char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ - char WindowsFlag[8]; - UINT32 SlicVersion; - UINT8 Reserved[16]; - UINT8 Signature[128]; - -} ACPI_SLIC_MARKER; - - /******************************************************************************* * * SPCR - Serial Port Console Redirection table diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl3.h b/reactos/drivers/bus/acpi/acpica/include/actbl3.h index 4e3b77a6127..b4ce8af85ef 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actbl3.h +++ b/reactos/drivers/bus/acpi/acpica/include/actbl3.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/actypes.h b/reactos/drivers/bus/acpi/acpica/include/actypes.h index 3b154417815..2c7d1bb8fac 100644 --- a/reactos/drivers/bus/acpi/acpica/include/actypes.h +++ b/reactos/drivers/bus/acpi/acpica/include/actypes.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -232,7 +232,6 @@ typedef int INT32; #endif /* ACPI_USE_SYSTEM_INTTYPES */ - typedef INT64 ACPI_NATIVE_INT; typedef UINT64 ACPI_SIZE; typedef UINT64 ACPI_IO_ADDRESS; @@ -272,12 +271,31 @@ typedef int INT32; #endif /* ACPI_USE_SYSTEM_INTTYPES */ - typedef INT32 ACPI_NATIVE_INT; typedef UINT32 ACPI_SIZE; + +#ifdef ACPI_32BIT_PHYSICAL_ADDRESS + +/* + * OSPMs can define this to shrink the size of the structures for 32-bit + * none PAE environment. ASL compiler may always define this to generate + * 32-bit OSPM compliant tables. + */ typedef UINT32 ACPI_IO_ADDRESS; typedef UINT32 ACPI_PHYSICAL_ADDRESS; +#else /* ACPI_32BIT_PHYSICAL_ADDRESS */ + +/* + * It is reported that, after some calculations, the physical addresses can + * wrap over the 32-bit boundary on 32-bit PAE environment. + * https://bugzilla.kernel.org/show_bug.cgi?id=87971 + */ +typedef UINT64 ACPI_IO_ADDRESS; +typedef UINT64 ACPI_PHYSICAL_ADDRESS; + +#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */ + #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX @@ -794,34 +812,41 @@ typedef UINT32 ACPI_EVENT_TYPE; * The encoding of ACPI_EVENT_STATUS is illustrated below. * Note that a set bit (1) indicates the property is TRUE * (e.g. if bit 0 is set then the event is enabled). - * +-------------+-+-+-+-+ - * | Bits 31:4 |3|2|1|0| - * +-------------+-+-+-+-+ - * | | | | | - * | | | | +- Enabled? - * | | | +--- Enabled for wake? - * | | +----- Set? - * | +------- Has a handler? - * +------------- + * +-------------+-+-+-+-+-+ + * | Bits 31:5 |4|3|2|1|0| + * +-------------+-+-+-+-+-+ + * | | | | | | + * | | | | | +- Enabled? + * | | | | +--- Enabled for wake? + * | | | +----- Status bit set? + * | | +------- Enable bit set? + * | +--------- Has a handler? + * +--------------- */ typedef UINT32 ACPI_EVENT_STATUS; #define ACPI_EVENT_FLAG_DISABLED (ACPI_EVENT_STATUS) 0x00 #define ACPI_EVENT_FLAG_ENABLED (ACPI_EVENT_STATUS) 0x01 #define ACPI_EVENT_FLAG_WAKE_ENABLED (ACPI_EVENT_STATUS) 0x02 -#define ACPI_EVENT_FLAG_SET (ACPI_EVENT_STATUS) 0x04 -#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x08 +#define ACPI_EVENT_FLAG_STATUS_SET (ACPI_EVENT_STATUS) 0x04 +#define ACPI_EVENT_FLAG_ENABLE_SET (ACPI_EVENT_STATUS) 0x08 +#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x10 +#define ACPI_EVENT_FLAG_SET ACPI_EVENT_FLAG_STATUS_SET /* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */ #define ACPI_GPE_ENABLE 0 #define ACPI_GPE_DISABLE 1 #define ACPI_GPE_CONDITIONAL_ENABLE 2 +#define ACPI_GPE_SAVE_MASK 4 + +#define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK) +#define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK) /* * GPE info flags - Per GPE * +-------+-+-+---+ - * | 7:4 |3|2|1:0| + * | 7:5 |4|3|2:0| * +-------+-+-+---+ * | | | | * | | | +-- Type of dispatch:to method, handler, notify, or none @@ -833,13 +858,15 @@ typedef UINT32 ACPI_EVENT_STATUS; #define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x01 #define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x02 #define ACPI_GPE_DISPATCH_NOTIFY (UINT8) 0x03 -#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x03 +#define ACPI_GPE_DISPATCH_RAW_HANDLER (UINT8) 0x04 +#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x07 +#define ACPI_GPE_DISPATCH_TYPE(flags) ((UINT8) ((flags) & ACPI_GPE_DISPATCH_MASK)) -#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x04 +#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x08 #define ACPI_GPE_EDGE_TRIGGERED (UINT8) 0x00 -#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x04 +#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x08 -#define ACPI_GPE_CAN_WAKE (UINT8) 0x08 +#define ACPI_GPE_CAN_WAKE (UINT8) 0x10 /* * Flags for GPE and Lock interfaces @@ -1412,6 +1439,7 @@ typedef struct acpi_memory_list #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 /* Definitions of file IO */ diff --git a/reactos/drivers/bus/acpi/acpica/include/acutils.h b/reactos/drivers/bus/acpi/acpica/include/acutils.h index 2aea248ade3..2b3dad46fc3 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acutils.h +++ b/reactos/drivers/bus/acpi/acpica/include/acutils.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -795,6 +795,12 @@ const ACPI_PREDEFINED_INFO * AcpiUtMatchPredefinedMethod ( char *Name); +void +AcpiUtGetExpectedReturnTypes ( + char *Buffer, + UINT32 ExpectedBtypes); + +#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP) const ACPI_PREDEFINED_INFO * AcpiUtMatchResourceName ( char *Name); @@ -805,15 +811,11 @@ AcpiUtDisplayPredefinedMethod ( const ACPI_PREDEFINED_INFO *ThisName, BOOLEAN MultiLine); -void -AcpiUtGetExpectedReturnTypes ( - char *Buffer, - UINT32 ExpectedBtypes); - UINT32 AcpiUtGetResourceBitWidth ( char *Buffer, UINT16 Types); +#endif /* @@ -854,13 +856,6 @@ AcpiUtCreateUpdateStateAndPush ( UINT16 Action, ACPI_GENERIC_STATE **StateList); -ACPI_STATUS -AcpiUtCreatePkgStateAndPush ( - void *InternalObject, - void *ExternalObject, - UINT16 Index, - ACPI_GENERIC_STATE **StateList); - ACPI_GENERIC_STATE * AcpiUtCreateControlState ( void); @@ -899,9 +894,11 @@ BOOLEAN AcpiUtIsPciRootBridge ( char *Id); +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP) BOOLEAN AcpiUtIsAmlTable ( ACPI_TABLE_HEADER *Table); +#endif ACPI_STATUS AcpiUtWalkPackageTree ( @@ -990,6 +987,7 @@ void AcpiUtStrupr ( char *SrcString); +#ifdef ACPI_ASL_COMPILER void AcpiUtStrlwr ( char *SrcString); @@ -998,6 +996,7 @@ int AcpiUtStricmp ( char *String1, char *String2); +#endif ACPI_STATUS AcpiUtStrtoul64 ( @@ -1010,9 +1009,11 @@ AcpiUtPrintString ( char *String, UINT16 MaxLength); +#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP void UtConvertBackslashes ( char *Pathname); +#endif BOOLEAN AcpiUtValidAcpiName ( @@ -1259,9 +1260,11 @@ AcpiUtFilePrintf ( /* * utuuid -- UUID support functions */ +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP) void AcpiUtConvertStringToUuid ( char *InString, UINT8 *UuidBuffer); +#endif #endif /* _ACUTILS_H */ diff --git a/reactos/drivers/bus/acpi/acpica/include/amlcode.h b/reactos/drivers/bus/acpi/acpica/include/amlcode.h index 5eaf30c6033..34ac9876295 100644 --- a/reactos/drivers/bus/acpi/acpica/include/amlcode.h +++ b/reactos/drivers/bus/acpi/acpica/include/amlcode.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -137,6 +137,7 @@ #define AML_PACKAGE_OP (UINT16) 0x12 #define AML_VAR_PACKAGE_OP (UINT16) 0x13 /* ACPI 2.0 */ #define AML_METHOD_OP (UINT16) 0x14 +#define AML_EXTERNAL_OP (UINT16) 0x15 /* ACPI 6.0 */ #define AML_DUAL_NAME_PREFIX (UINT16) 0x2e #define AML_MULTI_NAME_PREFIX_OP (UINT16) 0x2f #define AML_NAME_CHAR_SUBSEQ (UINT16) 0x30 @@ -281,7 +282,6 @@ #define AML_INT_RESERVEDFIELD_OP (UINT16) 0x0031 #define AML_INT_ACCESSFIELD_OP (UINT16) 0x0032 #define AML_INT_BYTELIST_OP (UINT16) 0x0033 -#define AML_INT_STATICSTRING_OP (UINT16) 0x0034 #define AML_INT_METHODCALL_OP (UINT16) 0x0035 #define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036 #define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037 diff --git a/reactos/drivers/bus/acpi/acpica/include/amlresrc.h b/reactos/drivers/bus/acpi/acpica/include/amlresrc.h index e54f567e2df..87f52c5ae3a 100644 --- a/reactos/drivers/bus/acpi/acpica/include/amlresrc.h +++ b/reactos/drivers/bus/acpi/acpica/include/amlresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h b/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h index 4065d32b369..fde43ffe2d2 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h b/reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h new file mode 100644 index 00000000000..b02b92b2f3e --- /dev/null +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acdragonfly.h @@ -0,0 +1,202 @@ +/****************************************************************************** + * + * Name: acdragonfly.h - OS specific for DragonFly BSD + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#ifndef __ACDRAGONFLY_H_ +#define __ACDRAGONFLY_H_ + +#include /* DragonFly uses GCC */ +#include + +#ifdef __LP64__ +#define ACPI_MACHINE_WIDTH 64 +#else +#define ACPI_MACHINE_WIDTH 32 +#define ACPI_USE_NATIVE_DIVIDE +#endif + +#define ACPI_UINTPTR_T uintptr_t +#define COMPILER_DEPENDENT_INT64 int64_t +#define COMPILER_DEPENDENT_UINT64 uint64_t + +#define ACPI_USE_DO_WHILE_0 +#define ACPI_USE_SYSTEM_CLIBRARY + +#ifdef _KERNEL + +#include "opt_acpi.h" +#include +#include +#include +#include + +#ifdef ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT /* enable debug output */ +#ifdef DEBUGGER_THREADING +#undef DEBUGGER_THREADING +#endif /* DEBUGGER_THREADING */ +#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED /* integrated with DDB */ +#if 0 /* XXX */ +#include "opt_ddb.h" +#ifdef DDB +#define ACPI_DEBUGGER +#endif /* DDB */ +#define ACPI_DISASSEMBLER +#endif +#endif + +#ifdef ACPI_DEBUG_CACHE +#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject +#define AcpiOsReleaseObject(Cache, Object) \ + _AcpiOsReleaseObject((Cache), (Object), __func__, __LINE__) +#endif + +#ifdef ACPI_DEBUG_LOCKS +#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock +#define AcpiOsAcquireLock(Handle) \ + _AcpiOsAcquireLock((Handle), __func__, __LINE__) +#endif + +#ifdef ACPI_DEBUG_MEMMAP +#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory +#define AcpiOsMapMemory(Where, Length) \ + _AcpiOsMapMemory((Where), (Length), __func__, __LINE__) + +#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory +#define AcpiOsUnmapMemory(LogicalAddress, Size) \ + _AcpiOsUnmapMemory((LogicalAddress), (Size), __func__, __LINE__) +#endif + +/* XXX TBI */ +#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete +#define AcpiOsWaitEventsComplete() + +#define USE_NATIVE_ALLOCATE_ZEROED + +#define ACPI_SPINLOCK struct acpi_spinlock * +struct acpi_spinlock; + +#define ACPI_CACHE_T struct acpicache +struct acpicache; + +#else /* _KERNEL */ + +#define ACPI_USE_STANDARD_HEADERS + +#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread)) +#define ACPI_FLUSH_CPU_CACHE() + +#endif /* _KERNEL */ + +#endif /* __ACDRAGONFLY_H_ */ diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h b/reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h new file mode 100644 index 00000000000..a48c56fb885 --- /dev/null +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acdragonflyex.h @@ -0,0 +1,156 @@ +/****************************************************************************** + * + * Name: acdragonflyex.h - Extra OS specific defines, etc. for DragonFly BSD + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#ifndef __ACDRAGONFLYEX_H__ +#define __ACDRAGONFLYEX_H__ + +#ifdef _KERNEL + +#ifdef ACPI_DEBUG_CACHE +ACPI_STATUS +_AcpiOsReleaseObject ( + ACPI_CACHE_T *Cache, + void *Object, + const char *func, + int line); +#endif + +#ifdef ACPI_DEBUG_LOCKS +ACPI_CPU_FLAGS +_AcpiOsAcquireLock ( + ACPI_SPINLOCK Spin, + const char *func, + int line); +#endif + +#ifdef ACPI_DEBUG_MEMMAP +void * +_AcpiOsMapMemory ( + ACPI_PHYSICAL_ADDRESS Where, + ACPI_SIZE Length, + const char *caller, + int line); + +void +_AcpiOsUnmapMemory ( + void *LogicalAddress, + ACPI_SIZE Length, + const char *caller, + int line); +#endif + +#endif /* _KERNEL */ + +#endif /* __ACDRAGONFLYEX_H__ */ diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h b/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h index 9266e9636bc..c2c5bd52088 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h b/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h index ed65b2889c3..361bd80eaea 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,6 +149,7 @@ #define ACPI_LARGE_NAMESPACE_NODE #define ACPI_DATA_TABLE_DISASSEMBLY #define ACPI_SINGLE_THREADED +#define ACPI_32BIT_PHYSICAL_ADDRESS #endif /* AcpiExec configuration. Multithreaded with full AML debugger */ diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h b/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h index 2c50162b65a..6c593372aae 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acenvex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h b/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h index 2c5ae95b51b..c8d1873bfc3 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h b/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h index fda74d4449f..2f499121f26 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h b/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h index 5a90c7109cd..638b7f94401 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/achaiku.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h b/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h index b64146712bd..b9bd615029a 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h b/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h index e7df0b76bab..668f2374060 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h b/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h index d4111a1350c..52352ce8f4e 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/aclinuxex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h b/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h index e82d08bd2f2..f1fa714daf3 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acmacosx.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h b/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h index 2433a4290db..9285c8aef6f 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h b/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h index 376d1157d0f..258383a8ff6 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,6 +120,10 @@ #include "acgcc.h" +#define ACPI_UINTPTR_T uintptr_t +#define ACPI_USE_LOCAL_CACHE +#define ACPI_CAST_PTHREAD_T(x) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x)) + #ifdef _LP64 #define ACPI_MACHINE_WIDTH 64 #else @@ -129,8 +133,10 @@ #define COMPILER_DEPENDENT_INT64 int64_t #define COMPILER_DEPENDENT_UINT64 uint64_t -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_STANDALONE) +#ifdef _KERNEL_OPT #include "opt_acpi.h" /* collect build-time options here */ +#endif /* _KERNEL_OPT */ #include #include @@ -160,26 +166,19 @@ #endif /* DDB */ #endif /* ACPI_DEBUG */ -static __inline int -isprint(int ch) -{ - return(isspace(ch) || isascii(ch)); -} - -#else /* _KERNEL */ +#else /* defined(_KERNEL) || defined(_STANDALONE) */ #include +#include /* Not building kernel code, so use libc */ #define ACPI_USE_STANDARD_HEADERS #define __cli() #define __sti() +#define __cdecl -/* XXX */ -#define __inline inline - -#endif /* _KERNEL */ +#endif /* defined(_KERNEL) || defined(_STANDALONE) */ /* Always use NetBSD code over our local versions */ #define ACPI_USE_SYSTEM_CLIBRARY diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h b/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h index 5ddd22cf73b..4383d91097e 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h b/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h index 1be7c6d64df..76c2ce56be1 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h b/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h index 575134bde8e..da485f7a425 100644 --- a/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h +++ b/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c b/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c index 37f69138e2c..58d56e507f9 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c b/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c index c4a08cd8785..293bf266976 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c b/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c index 792cd596a3c..08e0716fa1d 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsarguments.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c b/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c index 72269173814..be20f43ce51 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsconvert.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c b/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c index 5631cabd3df..8b6c8cec456 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -386,9 +386,9 @@ AcpiNsDumpOneObject ( { case ACPI_TYPE_PROCESSOR: - AcpiOsPrintf ("ID %02X Len %02X Addr %p\n", + AcpiOsPrintf ("ID %02X Len %02X Addr %8.8X%8.8X\n", ObjDesc->Processor.ProcId, ObjDesc->Processor.Length, - ACPI_CAST_PTR (void, ObjDesc->Processor.Address)); + ACPI_FORMAT_UINT64 (ObjDesc->Processor.Address)); break; case ACPI_TYPE_DEVICE: @@ -461,7 +461,7 @@ AcpiNsDumpOneObject ( if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID) { AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n", - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), ObjDesc->Region.Length); } else diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c b/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c index 8510eb2e41e..8e570d1f73d 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nseval.c b/reactos/drivers/bus/acpi/acpica/namespace/nseval.c index 2f32e5e7e9d..b6d662b24e6 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nseval.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nseval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c b/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c index 2c4db995ac5..279b4095abd 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsload.c b/reactos/drivers/bus/acpi/acpica/namespace/nsload.c index e15e6a4df98..590be03ab21 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsload.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c b/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c index 2dc5d7b5f5a..2c7d9b93b77 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c b/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c index 7a0d8ef36f8..50b1d653795 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c b/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c index f8802079ce3..da137e892a2 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c b/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c index 820710d99d7..8a522d2d2e3 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c b/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c index b44d12bbc47..085ccd23acf 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c b/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c index cf3c4117900..736933ad6ab 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c b/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c index ffba45773bc..3300819d272 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c b/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c index 91698660741..81cac9540dd 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c b/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c index b2373904fcf..220c447635f 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c b/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c index bcbed650ea5..aa23760ff16 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c b/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c index 5425a54df4b..7e23365ee57 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c b/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c index f45a2bd1cdd..4c71e373e54 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c b/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c index 763e044a4db..2ca409fcad4 100644 --- a/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c +++ b/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psargs.c b/reactos/drivers/bus/acpi/acpica/parser/psargs.c index ad86a1fc398..2453ab1e882 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psargs.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psargs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psloop.c b/reactos/drivers/bus/acpi/acpica/parser/psloop.c index cf52d5fa57c..d75ac832166 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psloop.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psloop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psobject.c b/reactos/drivers/bus/acpi/acpica/parser/psobject.c index 705aa6ce7e1..a236ff5b2e3 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psobject.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psopcode.c b/reactos/drivers/bus/acpi/acpica/parser/psopcode.c index 40243a54e90..41181c61b07 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psopcode.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -405,7 +405,11 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] = /* ACPI 5.0 opcodes */ /* 7F */ ACPI_OP ("-ConnectField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS), -/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0) +/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), + +/* ACPI 6.0 opcodes */ + +/* 81 */ ACPI_OP ("External", ARGP_EXTERNAL_OP, ARGI_EXTERNAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE,/* ? */ AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R) /*! [End] no source code translation !*/ }; diff --git a/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c b/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c index 198d9a3cd5b..e0fbd89a4be 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psopinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -298,7 +298,7 @@ const UINT8 AcpiGbl_ShortOpIndex[256] = /* 8 9 A B C D E F */ /* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, /* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK, -/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK, +/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, 0x81, _UNK, _UNK, /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, diff --git a/reactos/drivers/bus/acpi/acpica/parser/psparse.c b/reactos/drivers/bus/acpi/acpica/parser/psparse.c index afbcc6217e9..71c3fa057f7 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psparse.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psscope.c b/reactos/drivers/bus/acpi/acpica/parser/psscope.c index 3c0fb904cf5..f44ea48897d 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psscope.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/pstree.c b/reactos/drivers/bus/acpi/acpica/parser/pstree.c index fc2477b02f6..392204e1dee 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/pstree.c +++ b/reactos/drivers/bus/acpi/acpica/parser/pstree.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psutils.c b/reactos/drivers/bus/acpi/acpica/parser/psutils.c index bce401091b2..328ff5b3b63 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psutils.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/pswalk.c b/reactos/drivers/bus/acpi/acpica/parser/pswalk.c index 1605428c219..a447970c4bb 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/pswalk.c +++ b/reactos/drivers/bus/acpi/acpica/parser/pswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/parser/psxface.c b/reactos/drivers/bus/acpi/acpica/parser/psxface.c index 8930af00e56..09833b62642 100644 --- a/reactos/drivers/bus/acpi/acpica/parser/psxface.c +++ b/reactos/drivers/bus/acpi/acpica/parser/psxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c b/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c index 9c7f2aa5c32..9d1d4d73907 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,7 +149,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[5] = * Address Translation Offset * Address Length */ - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Granularity), + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Address.Granularity), AML_OFFSET (Address16.Granularity), 5}, @@ -189,7 +189,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress32[5] = * Address Translation Offset * Address Length */ - {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Granularity), + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Address.Granularity), AML_OFFSET (Address32.Granularity), 5}, @@ -229,7 +229,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[5] = * Address Translation Offset * Address Length */ - {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Granularity), + {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Address.Granularity), AML_OFFSET (Address64.Granularity), 5}, @@ -275,7 +275,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[5] = * Address Length * Type-Specific Attribute */ - {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Granularity), + {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Address.Granularity), AML_OFFSET (ExtAddress64.Granularity), 6} }; diff --git a/reactos/drivers/bus/acpi/acpica/resources/rscalc.c b/reactos/drivers/bus/acpi/acpica/resources/rscalc.c index 2b6a4f9d056..33a438ea6f7 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rscalc.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rscalc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rscreate.c b/reactos/drivers/bus/acpi/acpica/resources/rscreate.c index deaaba52e02..dd430ef42dd 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rscreate.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rscreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsdump.c b/reactos/drivers/bus/acpi/acpica/resources/rsdump.c index 34b4abf38bf..6237118590e 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsdump.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsdump.c @@ -1,6 +1,6 @@ /******************************************************************************* * - * Module Name: rsdump - Functions to display the resource structures. + * Module Name: rsdump - AML debugger support for resource structures. * ******************************************************************************/ @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,8 +120,10 @@ #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME ("rsdump") - -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) +/* + * All functions in this module are used by the AML Debugger only + */ +#if defined(ACPI_DEBUGGER) /* Local prototypes */ @@ -161,8 +163,8 @@ AcpiRsDumpByteList ( static void AcpiRsDumpWordList ( - UINT16 Length, - UINT16 *Data); + UINT16 Length, + UINT16 *Data); static void AcpiRsDumpDwordList ( @@ -171,8 +173,8 @@ AcpiRsDumpDwordList ( static void AcpiRsDumpShortByteList ( - UINT8 Length, - UINT8 *Data); + UINT8 Length, + UINT8 *Data); static void AcpiRsDumpResourceSource ( @@ -185,7 +187,133 @@ AcpiRsDumpAddressCommon ( static void AcpiRsDumpDescriptor ( void *Resource, - ACPI_RSDUMP_INFO *Table); + ACPI_RSDUMP_INFO *Table); + + +/******************************************************************************* + * + * FUNCTION: AcpiRsDumpResourceList + * + * PARAMETERS: ResourceList - Pointer to a resource descriptor list + * + * RETURN: None + * + * DESCRIPTION: Dispatches the structure to the correct dump routine. + * + ******************************************************************************/ + +void +AcpiRsDumpResourceList ( + ACPI_RESOURCE *ResourceList) +{ + UINT32 Count = 0; + UINT32 Type; + + + ACPI_FUNCTION_ENTRY (); + + + /* Check if debug output enabled */ + + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT)) + { + return; + } + + /* Walk list and dump all resource descriptors (END_TAG terminates) */ + + do + { + AcpiOsPrintf ("\n[%02X] ", Count); + Count++; + + /* Validate Type before dispatch */ + + Type = ResourceList->Type; + if (Type > ACPI_RESOURCE_TYPE_MAX) + { + AcpiOsPrintf ( + "Invalid descriptor type (%X) in resource list\n", + ResourceList->Type); + return; + } + + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!ResourceList->Length) + { + AcpiOsPrintf ( + "Invalid zero length descriptor in resource list\n"); + return; + } + + /* Dump the resource descriptor */ + + if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS) + { + AcpiRsDumpDescriptor (&ResourceList->Data, + AcpiGbl_DumpSerialBusDispatch[ + ResourceList->Data.CommonSerialBus.Type]); + } + else + { + AcpiRsDumpDescriptor (&ResourceList->Data, + AcpiGbl_DumpResourceDispatch[Type]); + } + + /* Point to the next resource structure */ + + ResourceList = ACPI_NEXT_RESOURCE (ResourceList); + + /* Exit when END_TAG descriptor is reached */ + + } while (Type != ACPI_RESOURCE_TYPE_END_TAG); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiRsDumpIrqList + * + * PARAMETERS: RouteTable - Pointer to the routing table to dump. + * + * RETURN: None + * + * DESCRIPTION: Print IRQ routing table + * + ******************************************************************************/ + +void +AcpiRsDumpIrqList ( + UINT8 *RouteTable) +{ + ACPI_PCI_ROUTING_TABLE *PrtElement; + UINT8 Count; + + + ACPI_FUNCTION_ENTRY (); + + + /* Check if debug output enabled */ + + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT)) + { + return; + } + + PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable); + + /* Dump all table elements, Exit on zero length element */ + + for (Count = 0; PrtElement->Length; Count++) + { + AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count); + AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt); + + PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE, + PrtElement, PrtElement->Length); + } +} /******************************************************************************* @@ -360,14 +488,16 @@ AcpiRsDumpDescriptor ( /* * Common flags for all Address resources */ - AcpiRsDumpAddressCommon (ACPI_CAST_PTR (ACPI_RESOURCE_DATA, Target)); + AcpiRsDumpAddressCommon (ACPI_CAST_PTR ( + ACPI_RESOURCE_DATA, Target)); break; case ACPI_RSD_SOURCE: /* * Optional ResourceSource for Address resources */ - AcpiRsDumpResourceSource (ACPI_CAST_PTR (ACPI_RESOURCE_SOURCE, Target)); + AcpiRsDumpResourceSource (ACPI_CAST_PTR ( + ACPI_RESOURCE_SOURCE, Target)); break; default: @@ -469,131 +599,6 @@ AcpiRsDumpAddressCommon ( } -/******************************************************************************* - * - * FUNCTION: AcpiRsDumpResourceList - * - * PARAMETERS: ResourceList - Pointer to a resource descriptor list - * - * RETURN: None - * - * DESCRIPTION: Dispatches the structure to the correct dump routine. - * - ******************************************************************************/ - -void -AcpiRsDumpResourceList ( - ACPI_RESOURCE *ResourceList) -{ - UINT32 Count = 0; - UINT32 Type; - - - ACPI_FUNCTION_ENTRY (); - - - /* Check if debug output enabled */ - - if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT)) - { - return; - } - - /* Walk list and dump all resource descriptors (END_TAG terminates) */ - - do - { - AcpiOsPrintf ("\n[%02X] ", Count); - Count++; - - /* Validate Type before dispatch */ - - Type = ResourceList->Type; - if (Type > ACPI_RESOURCE_TYPE_MAX) - { - AcpiOsPrintf ( - "Invalid descriptor type (%X) in resource list\n", - ResourceList->Type); - return; - } - - /* Sanity check the length. It must not be zero, or we loop forever */ - - if (!ResourceList->Length) - { - AcpiOsPrintf ( - "Invalid zero length descriptor in resource list\n"); - return; - } - - /* Dump the resource descriptor */ - - if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS) - { - AcpiRsDumpDescriptor (&ResourceList->Data, - AcpiGbl_DumpSerialBusDispatch[ResourceList->Data.CommonSerialBus.Type]); - } - else - { - AcpiRsDumpDescriptor (&ResourceList->Data, - AcpiGbl_DumpResourceDispatch[Type]); - } - - /* Point to the next resource structure */ - - ResourceList = ACPI_NEXT_RESOURCE (ResourceList); - - /* Exit when END_TAG descriptor is reached */ - - } while (Type != ACPI_RESOURCE_TYPE_END_TAG); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiRsDumpIrqList - * - * PARAMETERS: RouteTable - Pointer to the routing table to dump. - * - * RETURN: None - * - * DESCRIPTION: Print IRQ routing table - * - ******************************************************************************/ - -void -AcpiRsDumpIrqList ( - UINT8 *RouteTable) -{ - ACPI_PCI_ROUTING_TABLE *PrtElement; - UINT8 Count; - - - ACPI_FUNCTION_ENTRY (); - - - /* Check if debug output enabled */ - - if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT)) - { - return; - } - - PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable); - - /* Dump all table elements, Exit on zero length element */ - - for (Count = 0; PrtElement->Length; Count++) - { - AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count); - AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt); - - PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE, - PrtElement, PrtElement->Length); - } -} - - /******************************************************************************* * * FUNCTION: AcpiRsOut* @@ -692,8 +697,8 @@ AcpiRsDumpByteList ( static void AcpiRsDumpShortByteList ( - UINT8 Length, - UINT8 *Data) + UINT8 Length, + UINT8 *Data) { UINT8 i; diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c b/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c index bb41c71c1a2..0f15187e518 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -233,11 +233,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress16[8] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress16), "16-Bit WORD Address Space",NULL}, {ACPI_RSD_ADDRESS, 0, NULL, NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Granularity), "Granularity", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Minimum), "Address Minimum", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Maximum), "Address Maximum", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.TranslationOffset), "Translation Offset", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.AddressLength), "Address Length", NULL}, + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Granularity), "Granularity", NULL}, + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Minimum), "Address Minimum", NULL}, + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Maximum), "Address Maximum", NULL}, + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.TranslationOffset), + "Translation Offset", NULL}, + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.AddressLength), "Address Length", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address16.ResourceSource), NULL, NULL} }; @@ -245,11 +246,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress32[8] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress32), "32-Bit DWORD Address Space", NULL}, {ACPI_RSD_ADDRESS, 0, NULL, NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Granularity), "Granularity", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Minimum), "Address Minimum", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Maximum), "Address Maximum", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.TranslationOffset), "Translation Offset", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.AddressLength), "Address Length", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Granularity), "Granularity", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Minimum), "Address Minimum", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Maximum), "Address Maximum", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.TranslationOffset), + "Translation Offset", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.AddressLength), "Address Length", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address32.ResourceSource), NULL, NULL} }; @@ -257,11 +259,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress64[8] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress64), "64-Bit QWORD Address Space", NULL}, {ACPI_RSD_ADDRESS, 0, NULL, NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Granularity), "Granularity", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Minimum), "Address Minimum", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Maximum), "Address Maximum", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.TranslationOffset), "Translation Offset", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.AddressLength), "Address Length", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Granularity), "Granularity", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Minimum), "Address Minimum", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Maximum), "Address Maximum", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.TranslationOffset), + "Translation Offset", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.AddressLength), "Address Length", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address64.ResourceSource), NULL, NULL} }; @@ -269,11 +272,13 @@ ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[8] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpExtAddress64), "64-Bit Extended Address Space", NULL}, {ACPI_RSD_ADDRESS, 0, NULL, NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Granularity), "Granularity", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Minimum), "Address Minimum", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Maximum), "Address Maximum", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TranslationOffset), "Translation Offset", NULL}, - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.AddressLength), "Address Length", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Granularity), "Granularity", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Minimum), "Address Minimum", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Maximum), "Address Maximum", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.TranslationOffset), + "Translation Offset", NULL}, + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.AddressLength), + "Address Length", NULL}, {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TypeSpecific), "Type-Specific Attribute", NULL} }; diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c b/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c index da2cb5d9a07..bf19c390df5 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsio.c b/reactos/drivers/bus/acpi/acpica/resources/rsio.c index a641c0c372d..8f39d145304 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsio.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsirq.c b/reactos/drivers/bus/acpi/acpica/resources/rsirq.c index 33f400f6232..0ce5dfd7492 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsirq.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsirq.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rslist.c b/reactos/drivers/bus/acpi/acpica/resources/rslist.c index ea2d1d53196..4fda294ce59 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rslist.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rslist.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c b/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c index ae94a1feff7..07d7225e5ef 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c b/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c index 8de7ca5f1ff..7871715f43c 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsserial.c b/reactos/drivers/bus/acpi/acpica/resources/rsserial.c index b71dcadea02..acec6fbbc50 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsserial.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsutils.c b/reactos/drivers/bus/acpi/acpica/resources/rsutils.c index 42ff2a3e002..55445b019e1 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsutils.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsxface.c b/reactos/drivers/bus/acpi/acpica/resources/rsxface.c index 9e9af3a24a8..834ae9c5d12 100644 --- a/reactos/drivers/bus/acpi/acpica/resources/rsxface.c +++ b/reactos/drivers/bus/acpi/acpica/resources/rsxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -133,11 +133,11 @@ ACPI_COPY_FIELD(Out, In, MinAddressFixed); \ ACPI_COPY_FIELD(Out, In, MaxAddressFixed); \ ACPI_COPY_FIELD(Out, In, Info); \ - ACPI_COPY_FIELD(Out, In, Granularity); \ - ACPI_COPY_FIELD(Out, In, Minimum); \ - ACPI_COPY_FIELD(Out, In, Maximum); \ - ACPI_COPY_FIELD(Out, In, TranslationOffset); \ - ACPI_COPY_FIELD(Out, In, AddressLength); \ + ACPI_COPY_FIELD(Out, In, Address.Granularity); \ + ACPI_COPY_FIELD(Out, In, Address.Minimum); \ + ACPI_COPY_FIELD(Out, In, Address.Maximum); \ + ACPI_COPY_FIELD(Out, In, Address.TranslationOffset); \ + ACPI_COPY_FIELD(Out, In, Address.AddressLength); \ ACPI_COPY_FIELD(Out, In, ResourceSource); diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbdata.c b/reactos/drivers/bus/acpi/acpica/tables/tbdata.c index 10924aba186..b89f6e87f1d 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbdata.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbdata.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -193,7 +193,8 @@ AcpiTbAcquireTable ( case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: - Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, TableDesc->Address); + Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, + ACPI_PHYSADDR_TO_PTR (TableDesc->Address)); break; default: @@ -299,7 +300,8 @@ AcpiTbAcquireTempTable ( case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: - TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Address); + TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, + ACPI_PHYSADDR_TO_PTR (Address)); if (!TableHeader) { return (AE_NO_MEMORY); @@ -509,11 +511,11 @@ AcpiTbVerifyTempTable ( if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, - "%4.4s " ACPI_PRINTF_UINT + "%4.4s 0x%8.8X%8.8X" " Attempted table install failed", AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ? TableDesc->Signature.Ascii : "????", - ACPI_FORMAT_TO_UINT (TableDesc->Address))); + ACPI_FORMAT_UINT64 (TableDesc->Address))); goto InvalidateAndExit; } } @@ -601,21 +603,24 @@ AcpiTbResizeRootTableList ( /******************************************************************************* * - * FUNCTION: AcpiTbGetNextRootIndex + * FUNCTION: AcpiTbGetNextTableDescriptor * * PARAMETERS: TableIndex - Where table index is returned + * TableDesc - Where table descriptor is returned * - * RETURN: Status and table index. + * RETURN: Status and table index/descriptor. * * DESCRIPTION: Allocate a new ACPI table entry to the global table list * ******************************************************************************/ ACPI_STATUS -AcpiTbGetNextRootIndex ( - UINT32 *TableIndex) +AcpiTbGetNextTableDescriptor ( + UINT32 *TableIndex, + ACPI_TABLE_DESC **TableDesc) { ACPI_STATUS Status; + UINT32 i; /* Ensure that there is room for the table in the Root Table List */ @@ -630,8 +635,18 @@ AcpiTbGetNextRootIndex ( } } - *TableIndex = AcpiGbl_RootTableList.CurrentTableCount; + i = AcpiGbl_RootTableList.CurrentTableCount; AcpiGbl_RootTableList.CurrentTableCount++; + + if (TableIndex) + { + *TableIndex = i; + } + if (TableDesc) + { + *TableDesc = &AcpiGbl_RootTableList.Tables[i]; + } + return (AE_OK); } diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c b/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c index f3f27cd638e..93d76dadbea 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbfind.c b/reactos/drivers/bus/acpi/acpica/tables/tbfind.c index 56b4e8a39e7..c7acd1c87ae 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbfind.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbfind.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c b/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c index 38de06c4fed..8833ef3fbe1 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -273,8 +273,8 @@ AcpiTbInstallFixedTable ( ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); if (ACPI_FAILURE (Status)) { - ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p", - ACPI_CAST_PTR (void, Address))); + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X", + ACPI_FORMAT_UINT64 (Address))); return_ACPI_STATUS (Status); } @@ -340,8 +340,8 @@ AcpiTbInstallStandardTable ( Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags); if (ACPI_FAILURE (Status)) { - ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p", - ACPI_CAST_PTR (void, Address))); + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X", + ACPI_FORMAT_UINT64 (Address))); return_ACPI_STATUS (Status); } @@ -353,8 +353,8 @@ AcpiTbInstallStandardTable ( AcpiGbl_DisableSsdtTableInstall && ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) { - ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %p", - NewTableDesc.Signature.Ascii, ACPI_CAST_PTR (void, Address))); + ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %8.8X%8.8X", + NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address))); goto ReleaseAndExit; } @@ -440,7 +440,6 @@ AcpiTbInstallStandardTable ( */ AcpiTbUninstallTable (&NewTableDesc); *TableIndex = i; - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_ACPI_STATUS (AE_OK); } } @@ -448,7 +447,7 @@ AcpiTbInstallStandardTable ( /* Add the table to the global root table list */ - Status = AcpiTbGetNextRootIndex (&i); + Status = AcpiTbGetNextTableDescriptor (&i, NULL); if (ACPI_FAILURE (Status)) { goto ReleaseAndExit; @@ -531,11 +530,11 @@ FinishOverride: return; } - ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT - " %s table override, new table: " ACPI_PRINTF_UINT, + ACPI_INFO ((AE_INFO, "%4.4s 0x%8.8X%8.8X" + " %s table override, new table: 0x%8.8X%8.8X", OldTableDesc->Signature.Ascii, - ACPI_FORMAT_TO_UINT (OldTableDesc->Address), - OverrideType, ACPI_FORMAT_TO_UINT (NewTableDesc.Address))); + ACPI_FORMAT_UINT64 (OldTableDesc->Address), + OverrideType, ACPI_FORMAT_UINT64 (NewTableDesc.Address))); /* We can now uninstall the original table */ @@ -555,49 +554,6 @@ FinishOverride: } -/******************************************************************************* - * - * FUNCTION: AcpiTbStoreTable - * - * PARAMETERS: Address - Table address - * Table - Table header - * Length - Table length - * Flags - Install flags - * TableIndex - Where the table index is returned - * - * RETURN: Status and table index. - * - * DESCRIPTION: Add an ACPI table to the global table list - * - ******************************************************************************/ - -ACPI_STATUS -AcpiTbStoreTable ( - ACPI_PHYSICAL_ADDRESS Address, - ACPI_TABLE_HEADER *Table, - UINT32 Length, - UINT8 Flags, - UINT32 *TableIndex) -{ - ACPI_STATUS Status; - ACPI_TABLE_DESC *TableDesc; - - - Status = AcpiTbGetNextRootIndex (TableIndex); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - /* Initialize added table */ - - TableDesc = &AcpiGbl_RootTableList.Tables[*TableIndex]; - AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table); - TableDesc->Pointer = Table; - return (AE_OK); -} - - /******************************************************************************* * * FUNCTION: AcpiTbUninstallTable @@ -630,7 +586,7 @@ AcpiTbUninstallTable ( if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) == ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) { - ACPI_FREE (ACPI_CAST_PTR (void, TableDesc->Address)); + ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address)); } TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL); diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbprint.c b/reactos/drivers/bus/acpi/acpica/tables/tbprint.c index d4bba4526cd..105925bb785 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbprint.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -216,18 +216,12 @@ AcpiTbPrintTableHeader ( ACPI_TABLE_HEADER LocalHeader; - /* - * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to - * support both 32-bit and 64-bit hosts/addresses in a consistent manner. - * The %p specifier does not emit uniform output on all hosts. On some, - * leading zeros are not supported. - */ if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS)) { /* FACS only has signature and length fields */ - ACPI_INFO ((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X", - Header->Signature, ACPI_FORMAT_TO_UINT (Address), + ACPI_INFO ((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X", + Header->Signature, ACPI_FORMAT_UINT64 (Address), Header->Length)); } else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature)) @@ -238,8 +232,8 @@ AcpiTbPrintTableHeader ( ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId, ACPI_OEM_ID_SIZE); AcpiTbFixString (LocalHeader.OemId, ACPI_OEM_ID_SIZE); - ACPI_INFO ((AE_INFO, "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)", - ACPI_FORMAT_TO_UINT (Address), + ACPI_INFO ((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)", + ACPI_FORMAT_UINT64 (Address), (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ? ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20, ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision, @@ -252,9 +246,9 @@ AcpiTbPrintTableHeader ( AcpiTbCleanupTableHeader (&LocalHeader, Header); ACPI_INFO ((AE_INFO, - "%-4.4s " ACPI_PRINTF_UINT + "%-4.4s 0x%8.8X%8.8X" " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", - LocalHeader.Signature, ACPI_FORMAT_TO_UINT (Address), + LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address), LocalHeader.Length, LocalHeader.Revision, LocalHeader.OemId, LocalHeader.OemTableId, LocalHeader.OemRevision, LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbutils.c b/reactos/drivers/bus/acpi/acpica/tables/tbutils.c index ec1843cf752..b2fdb911c13 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbutils.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbxface.c b/reactos/drivers/bus/acpi/acpica/tables/tbxface.c index df4e4026107..d2351d36366 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbxface.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c b/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c index 88834db4a43..83f64202964 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbxfload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c b/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c index 8354e943f95..45d7d546752 100644 --- a/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c +++ b/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -230,7 +230,7 @@ AcpiTbValidateRsdp ( ACPI_STATUS AcpiFindRootPointer ( - ACPI_SIZE *TableAddress) + ACPI_PHYSICAL_ADDRESS *TableAddress) { UINT8 *TablePtr; UINT8 *MemRover; @@ -290,7 +290,7 @@ AcpiFindRootPointer ( PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr); - *TableAddress = PhysicalAddress; + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress; return_ACPI_STATUS (AE_OK); } } @@ -321,7 +321,7 @@ AcpiFindRootPointer ( PhysicalAddress = (UINT32) (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr)); - *TableAddress = PhysicalAddress; + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress; return_ACPI_STATUS (AE_OK); } diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c b/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c index 864c0c3dd1d..9d65019b426 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utaddress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -189,10 +189,10 @@ AcpiUtAddAddressRange ( AcpiGbl_AddressRangeList[SpaceId] = RangeInfo; ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "\nAdded [%4.4s] address range: 0x%p-0x%p\n", + "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", AcpiUtGetNodeName (RangeInfo->RegionNode), - ACPI_CAST_PTR (void, Address), - ACPI_CAST_PTR (void, RangeInfo->EndAddress))); + ACPI_FORMAT_UINT64 (Address), + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress))); (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return_ACPI_STATUS (AE_OK); @@ -251,10 +251,10 @@ AcpiUtRemoveAddressRange ( } ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "\nRemoved [%4.4s] address range: 0x%p-0x%p\n", + "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", AcpiUtGetNodeName (RangeInfo->RegionNode), - ACPI_CAST_PTR (void, RangeInfo->StartAddress), - ACPI_CAST_PTR (void, RangeInfo->EndAddress))); + ACPI_FORMAT_UINT64 (RangeInfo->StartAddress), + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress))); ACPI_FREE (RangeInfo); return_VOID; @@ -338,12 +338,12 @@ AcpiUtCheckAddressRange ( Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode); ACPI_WARNING ((AE_INFO, - "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)", + "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)", AcpiUtGetRegionName (SpaceId), - ACPI_CAST_PTR (void, Address), - ACPI_CAST_PTR (void, EndAddress), - ACPI_CAST_PTR (void, RangeInfo->StartAddress), - ACPI_CAST_PTR (void, RangeInfo->EndAddress), + ACPI_FORMAT_UINT64 (Address), + ACPI_FORMAT_UINT64 (EndAddress), + ACPI_FORMAT_UINT64 (RangeInfo->StartAddress), + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress), Pathname)); ACPI_FREE (Pathname); } diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c b/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c index dd7c8d670fc..0c8c928b65a 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c b/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c index cc2d769d2a0..65110fb74ec 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -230,6 +230,15 @@ AcpiUtDumpBuffer ( return; } + /* + * Add comment characters so rest of line is ignored when + * compiled + */ + if (j == 0) + { + AcpiOsPrintf ("// "); + } + BufChar = Buffer[(ACPI_SIZE) i + j]; if (ACPI_IS_PRINT (BufChar)) { diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utcache.c b/reactos/drivers/bus/acpi/acpica/utilities/utcache.c index cb8116eeb1d..25c8e0e06af 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utcache.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utclib.c b/reactos/drivers/bus/acpi/acpica/utilities/utclib.c index 13f33dcd7f9..009332f1050 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utclib.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utclib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -547,28 +547,25 @@ AcpiUtStrstr ( char *String1, char *String2) { - char *String; + UINT32 Length; - if (AcpiUtStrlen (String2) > AcpiUtStrlen (String1)) + Length = AcpiUtStrlen (String2); + if (!Length) { - return (NULL); + return (String1); } - /* Walk entire string, comparing the letters */ - - for (String = String1; *String2; ) + while (AcpiUtStrlen (String1) >= Length) { - if (*String2 != *String) + if (AcpiUtMemcmp (String1, String2, Length) == 0) { - return (NULL); + return (String1); } - - String2++; - String++; + String1++; } - return (String1); + return (NULL); } diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c b/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c index ea70d137f54..7dfc104e11e 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c b/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c index 5c86223ca6f..60c6067e4f5 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c b/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c index fcd6393dfc3..eb0dc9f27d8 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c b/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c index e6825cacdbb..80b8f9823ed 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uterror.c b/reactos/drivers/bus/acpi/acpica/utilities/uterror.c index 5d7dfcae94b..52b9ae064f8 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/uterror.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/uterror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uteval.c b/reactos/drivers/bus/acpi/acpica/utilities/uteval.c index 00f14834879..dd754c09740 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/uteval.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/uteval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c b/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c index 2c046c4c2a9..dd63a12afb9 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utexcep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utfileio.c b/reactos/drivers/bus/acpi/acpica/utilities/utfileio.c index 956f3004605..e24e81fee82 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utfileio.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utfileio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c b/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c index 34438c8ba78..b4b48ba1c89 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -183,12 +183,19 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = {"_SB_", ACPI_TYPE_DEVICE, NULL}, {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, {"_TZ_", ACPI_TYPE_DEVICE, NULL}, - {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL}, + /* + * March, 2015: + * The _REV object is in the process of being deprecated, because + * other ACPI implementations permanently return 2. Thus, it + * has little or no value. Return 2 for compatibility with + * other ACPI implementations. + */ + {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)}, {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, - {"_GL_", ACPI_TYPE_MUTEX, (char *) 1}, + {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)}, #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) - {"_OSI", ACPI_TYPE_METHOD, (char *) 1}, + {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)}, #endif /* Table terminator */ diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uthex.c b/reactos/drivers/bus/acpi/acpica/utilities/uthex.c index 80ad2bac99b..500ab40d410 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/uthex.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/uthex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utids.c b/reactos/drivers/bus/acpi/acpica/utilities/utids.c index 5f15f628039..f61199734b4 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utids.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utinit.c b/reactos/drivers/bus/acpi/acpica/utilities/utinit.c index 7c0b67b54ca..6f701ad266d 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utinit.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utlock.c b/reactos/drivers/bus/acpi/acpica/utilities/utlock.c index 1d7dadc155b..7ce13ef3691 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utlock.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utlock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmath.c b/reactos/drivers/bus/acpi/acpica/utilities/utmath.c index 95a9d728b7c..dafba6d8e39 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utmath.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utmath.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c b/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c index 5e86e0a814c..32ce271136c 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -156,6 +156,7 @@ AcpiUtIsPciRootBridge ( } +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP) /******************************************************************************* * * FUNCTION: AcpiUtIsAmlTable @@ -186,6 +187,7 @@ AcpiUtIsAmlTable ( return (FALSE); } +#endif /******************************************************************************* diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c b/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c index 1537422d72a..f5b864f707e 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utobject.c b/reactos/drivers/bus/acpi/acpica/utilities/utobject.c index 4c64061c03d..fb4efaf3608 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utobject.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utosi.c b/reactos/drivers/bus/acpi/acpica/utilities/utosi.c index 3b49ded6a92..d88fe8f12ad 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utosi.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utosi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -177,6 +177,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] = {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ + {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ /* Feature Group Strings */ diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c b/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c index 1ae13982947..bf391e11f1e 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utownerid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c b/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c index ab275ee6f03..19561be7737 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utprint.c b/reactos/drivers/bus/acpi/acpica/utilities/utprint.c index 543bad8fcea..13bf94a8d7c 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utprint.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -514,11 +514,11 @@ AcpiUtVsnprintf ( const char *Format, va_list Args) { - UINT8 Base = 10; - UINT8 Type = 0; - INT32 Width = -1; - INT32 Precision = -1; - char Qualifier = 0; + UINT8 Base; + UINT8 Type; + INT32 Width; + INT32 Precision; + char Qualifier; UINT64 Number; char *Pos; char *End; @@ -540,6 +540,9 @@ AcpiUtVsnprintf ( continue; } + Type = 0; + Base = 10; + /* Process sign */ do diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c b/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c index 3569fcf9b8e..44a4c663381 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utstate.c b/reactos/drivers/bus/acpi/acpica/utilities/utstate.c index cf96d8e3e9d..1e6418662d5 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utstate.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,44 +120,6 @@ ACPI_MODULE_NAME ("utstate") -/******************************************************************************* - * - * FUNCTION: AcpiUtCreatePkgStateAndPush - * - * PARAMETERS: Object - Object to be added to the new state - * Action - Increment/Decrement - * StateList - List the state will be added to - * - * RETURN: Status - * - * DESCRIPTION: Create a new state and push it - * - ******************************************************************************/ - -ACPI_STATUS -AcpiUtCreatePkgStateAndPush ( - void *InternalObject, - void *ExternalObject, - UINT16 Index, - ACPI_GENERIC_STATE **StateList) -{ - ACPI_GENERIC_STATE *State; - - - ACPI_FUNCTION_ENTRY (); - - - State = AcpiUtCreatePkgState (InternalObject, ExternalObject, Index); - if (!State) - { - return (AE_NO_MEMORY); - } - - AcpiUtPushGenericState (StateList, State); - return (AE_OK); -} - - /******************************************************************************* * * FUNCTION: AcpiUtPushGenericState diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utstring.c b/reactos/drivers/bus/acpi/acpica/utilities/utstring.c index 2d218c374d3..953f304b0fd 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utstring.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utstring.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c b/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c index 43a993acab5..284bee04672 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c b/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c index 65338cca178..71fa0bc8749 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utuuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,6 +120,7 @@ ACPI_MODULE_NAME ("utuuid") +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP) /* * UUID support functions. * @@ -171,3 +172,4 @@ AcpiUtConvertStringToUuid ( AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]); } } +#endif diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxface.c b/reactos/drivers/bus/acpi/acpica/utilities/utxface.c index 7f2752c387f..e01c4d5f8a2 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utxface.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c b/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c index 7b11f4c0599..bdbab999fd7 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c b/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c index a50cc55e417..91feda774f3 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utxfinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c b/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c index 5fc2b32c782..2b6342d5fb4 100644 --- a/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c +++ b/reactos/drivers/bus/acpi/acpica/utilities/utxfmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License diff --git a/reactos/drivers/bus/acpi/buspdo.c b/reactos/drivers/bus/acpi/buspdo.c index 9c911abf546..87e7e3f9082 100644 --- a/reactos/drivers/bus/acpi/buspdo.c +++ b/reactos/drivers/bus/acpi/buspdo.c @@ -1058,8 +1058,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Type = CmResourceTypeBusNumber; ResourceDescriptor->ShareDisposition = CmResourceShareShared; ResourceDescriptor->Flags = 0; - ResourceDescriptor->u.BusNumber.Start = addr16_data->Minimum; - ResourceDescriptor->u.BusNumber.Length = addr16_data->AddressLength; + ResourceDescriptor->u.BusNumber.Start = addr16_data->Address.Minimum; + ResourceDescriptor->u.BusNumber.Length = addr16_data->Address.AddressLength; } else if (addr16_data->ResourceType == ACPI_IO_RANGE) { @@ -1068,8 +1068,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr16_data->Decode == ACPI_POS_DECODE) ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - ResourceDescriptor->u.Port.Start.QuadPart = addr16_data->Minimum; - ResourceDescriptor->u.Port.Length = addr16_data->AddressLength; + ResourceDescriptor->u.Port.Start.QuadPart = addr16_data->Address.Minimum; + ResourceDescriptor->u.Port.Length = addr16_data->Address.AddressLength; } else { @@ -1086,8 +1086,8 @@ Bus_PDO_QueryResources( case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - ResourceDescriptor->u.Memory.Start.QuadPart = addr16_data->Minimum; - ResourceDescriptor->u.Memory.Length = addr16_data->AddressLength; + ResourceDescriptor->u.Memory.Start.QuadPart = addr16_data->Address.Minimum; + ResourceDescriptor->u.Memory.Length = addr16_data->Address.AddressLength; } ResourceDescriptor++; break; @@ -1102,8 +1102,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Type = CmResourceTypeBusNumber; ResourceDescriptor->ShareDisposition = CmResourceShareShared; ResourceDescriptor->Flags = 0; - ResourceDescriptor->u.BusNumber.Start = addr32_data->Minimum; - ResourceDescriptor->u.BusNumber.Length = addr32_data->AddressLength; + ResourceDescriptor->u.BusNumber.Start = addr32_data->Address.Minimum; + ResourceDescriptor->u.BusNumber.Length = addr32_data->Address.AddressLength; } else if (addr32_data->ResourceType == ACPI_IO_RANGE) { @@ -1112,8 +1112,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr32_data->Decode == ACPI_POS_DECODE) ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - ResourceDescriptor->u.Port.Start.QuadPart = addr32_data->Minimum; - ResourceDescriptor->u.Port.Length = addr32_data->AddressLength; + ResourceDescriptor->u.Port.Start.QuadPart = addr32_data->Address.Minimum; + ResourceDescriptor->u.Port.Length = addr32_data->Address.AddressLength; } else { @@ -1130,8 +1130,8 @@ Bus_PDO_QueryResources( case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - ResourceDescriptor->u.Memory.Start.QuadPart = addr32_data->Minimum; - ResourceDescriptor->u.Memory.Length = addr32_data->AddressLength; + ResourceDescriptor->u.Memory.Start.QuadPart = addr32_data->Address.Minimum; + ResourceDescriptor->u.Memory.Length = addr32_data->Address.AddressLength; } ResourceDescriptor++; break; @@ -1147,8 +1147,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Type = CmResourceTypeBusNumber; ResourceDescriptor->ShareDisposition = CmResourceShareShared; ResourceDescriptor->Flags = 0; - ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Minimum; - ResourceDescriptor->u.BusNumber.Length = addr64_data->AddressLength; + ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Address.Minimum; + ResourceDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength; } else if (addr64_data->ResourceType == ACPI_IO_RANGE) { @@ -1157,8 +1157,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr64_data->Decode == ACPI_POS_DECODE) ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Minimum; - ResourceDescriptor->u.Port.Length = addr64_data->AddressLength; + ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Address.Minimum; + ResourceDescriptor->u.Port.Length = addr64_data->Address.AddressLength; } else { @@ -1175,8 +1175,8 @@ Bus_PDO_QueryResources( case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Minimum; - ResourceDescriptor->u.Memory.Length = addr64_data->AddressLength; + ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Address.Minimum; + ResourceDescriptor->u.Memory.Length = addr64_data->Address.AddressLength; } ResourceDescriptor++; break; @@ -1192,8 +1192,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Type = CmResourceTypeBusNumber; ResourceDescriptor->ShareDisposition = CmResourceShareShared; ResourceDescriptor->Flags = 0; - ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Minimum; - ResourceDescriptor->u.BusNumber.Length = addr64_data->AddressLength; + ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Address.Minimum; + ResourceDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength; } else if (addr64_data->ResourceType == ACPI_IO_RANGE) { @@ -1202,8 +1202,8 @@ Bus_PDO_QueryResources( ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr64_data->Decode == ACPI_POS_DECODE) ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Minimum; - ResourceDescriptor->u.Port.Length = addr64_data->AddressLength; + ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Address.Minimum; + ResourceDescriptor->u.Port.Length = addr64_data->Address.AddressLength; } else { @@ -1220,8 +1220,8 @@ Bus_PDO_QueryResources( case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Minimum; - ResourceDescriptor->u.Memory.Length = addr64_data->AddressLength; + ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Address.Minimum; + ResourceDescriptor->u.Memory.Length = addr64_data->Address.AddressLength; } ResourceDescriptor++; break; @@ -1537,9 +1537,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Type = CmResourceTypeBusNumber; RequirementDescriptor->ShareDisposition = CmResourceShareShared; RequirementDescriptor->Flags = 0; - RequirementDescriptor->u.BusNumber.MinBusNumber = addr16_data->Minimum; - RequirementDescriptor->u.BusNumber.MaxBusNumber = addr16_data->Maximum + addr16_data->AddressLength - 1; - RequirementDescriptor->u.BusNumber.Length = addr16_data->AddressLength; + RequirementDescriptor->u.BusNumber.MinBusNumber = addr16_data->Address.Minimum; + RequirementDescriptor->u.BusNumber.MaxBusNumber = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1; + RequirementDescriptor->u.BusNumber.Length = addr16_data->Address.AddressLength; } else if (addr16_data->ResourceType == ACPI_IO_RANGE) { @@ -1548,9 +1548,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr16_data->Decode == ACPI_POS_DECODE) RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr16_data->Minimum; - RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr16_data->Maximum + addr16_data->AddressLength - 1; - RequirementDescriptor->u.Port.Length = addr16_data->AddressLength; + RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr16_data->Address.Minimum; + RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1; + RequirementDescriptor->u.Port.Length = addr16_data->Address.AddressLength; } else { @@ -1567,9 +1567,9 @@ Bus_PDO_QueryResourceRequirements( case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr16_data->Minimum; - RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr16_data->Maximum + addr16_data->AddressLength - 1; - RequirementDescriptor->u.Memory.Length = addr16_data->AddressLength; + RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr16_data->Address.Minimum; + RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1; + RequirementDescriptor->u.Memory.Length = addr16_data->Address.AddressLength; } RequirementDescriptor++; break; @@ -1585,9 +1585,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Type = CmResourceTypeBusNumber; RequirementDescriptor->ShareDisposition = CmResourceShareShared; RequirementDescriptor->Flags = 0; - RequirementDescriptor->u.BusNumber.MinBusNumber = addr32_data->Minimum; - RequirementDescriptor->u.BusNumber.MaxBusNumber = addr32_data->Maximum + addr32_data->AddressLength - 1; - RequirementDescriptor->u.BusNumber.Length = addr32_data->AddressLength; + RequirementDescriptor->u.BusNumber.MinBusNumber = addr32_data->Address.Minimum; + RequirementDescriptor->u.BusNumber.MaxBusNumber = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1; + RequirementDescriptor->u.BusNumber.Length = addr32_data->Address.AddressLength; } else if (addr32_data->ResourceType == ACPI_IO_RANGE) { @@ -1596,9 +1596,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr32_data->Decode == ACPI_POS_DECODE) RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr32_data->Minimum; - RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr32_data->Maximum + addr32_data->AddressLength - 1; - RequirementDescriptor->u.Port.Length = addr32_data->AddressLength; + RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr32_data->Address.Minimum; + RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1; + RequirementDescriptor->u.Port.Length = addr32_data->Address.AddressLength; } else { @@ -1615,9 +1615,9 @@ Bus_PDO_QueryResourceRequirements( case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr32_data->Minimum; - RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr32_data->Maximum + addr32_data->AddressLength - 1; - RequirementDescriptor->u.Memory.Length = addr32_data->AddressLength; + RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr32_data->Address.Minimum; + RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1; + RequirementDescriptor->u.Memory.Length = addr32_data->Address.AddressLength; } RequirementDescriptor++; break; @@ -1634,9 +1634,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Type = CmResourceTypeBusNumber; RequirementDescriptor->ShareDisposition = CmResourceShareShared; RequirementDescriptor->Flags = 0; - RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Minimum; - RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.BusNumber.Length = addr64_data->AddressLength; + RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Address.Minimum; + RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength; } else if (addr64_data->ResourceType == ACPI_IO_RANGE) { @@ -1645,9 +1645,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr64_data->Decode == ACPI_POS_DECODE) RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Minimum; - RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.Port.Length = addr64_data->AddressLength; + RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Address.Minimum; + RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.Port.Length = addr64_data->Address.AddressLength; } else { @@ -1664,9 +1664,9 @@ Bus_PDO_QueryResourceRequirements( case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Minimum; - RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.Memory.Length = addr64_data->AddressLength; + RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Address.Minimum; + RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.Memory.Length = addr64_data->Address.AddressLength; } RequirementDescriptor++; break; @@ -1683,9 +1683,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Type = CmResourceTypeBusNumber; RequirementDescriptor->ShareDisposition = CmResourceShareShared; RequirementDescriptor->Flags = 0; - RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Minimum; - RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.BusNumber.Length = addr64_data->AddressLength; + RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Address.Minimum; + RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength; } else if (addr64_data->ResourceType == ACPI_IO_RANGE) { @@ -1694,9 +1694,9 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO; if (addr64_data->Decode == ACPI_POS_DECODE) RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE; - RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Minimum; - RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.Port.Length = addr64_data->AddressLength; + RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Address.Minimum; + RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.Port.Length = addr64_data->Address.AddressLength; } else { @@ -1713,9 +1713,9 @@ Bus_PDO_QueryResourceRequirements( case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break; case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break; } - RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Minimum; - RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1; - RequirementDescriptor->u.Memory.Length = addr64_data->AddressLength; + RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Address.Minimum; + RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1; + RequirementDescriptor->u.Memory.Length = addr64_data->Address.AddressLength; } RequirementDescriptor++; break; diff --git a/reactos/drivers/bus/acpi/osl.c b/reactos/drivers/bus/acpi/osl.c index ec662d3d3b4..f9269738085 100644 --- a/reactos/drivers/bus/acpi/osl.c +++ b/reactos/drivers/bus/acpi/osl.c @@ -710,15 +710,15 @@ AcpiOsReadPort ( switch (Width) { case 8: - *Value = READ_PORT_UCHAR((PUCHAR)Address); + *Value = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Address); break; case 16: - *Value = READ_PORT_USHORT((PUSHORT)Address); + *Value = READ_PORT_USHORT((PUSHORT)(ULONG_PTR)Address); break; case 32: - *Value = READ_PORT_ULONG((PULONG)Address); + *Value = READ_PORT_ULONG((PULONG)(ULONG_PTR)Address); break; default: @@ -739,15 +739,15 @@ AcpiOsWritePort ( switch (Width) { case 8: - WRITE_PORT_UCHAR((PUCHAR)Address, Value); + WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Address, Value); break; case 16: - WRITE_PORT_USHORT((PUSHORT)Address, Value); + WRITE_PORT_USHORT((PUSHORT)(ULONG_PTR)Address, Value); break; case 32: - WRITE_PORT_ULONG((PULONG)Address, Value); + WRITE_PORT_ULONG((PULONG)(ULONG_PTR)Address, Value); break; default: -- 2.17.1