From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 2 19:01:24 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8EAD3D86; Wed, 2 Jan 2013 19:01:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6F96F1DCA; Wed, 2 Jan 2013 19:01:24 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r02J1O23044333; Wed, 2 Jan 2013 19:01:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r02J1LZM044314; Wed, 2 Jan 2013 19:01:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301021901.r02J1LZM044314@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 2 Jan 2013 19:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r244971 - in vendor-sys/acpica/dist: . generate/unix/acpibin generate/unix/acpiexec generate/unix/acpinames generate/unix/iasl source/common source/compiler source/components/debugger s... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 19:01:24 -0000 Author: jkim Date: Wed Jan 2 19:01:21 2013 New Revision: 244971 URL: http://svnweb.freebsd.org/changeset/base/244971 Log: Import ACPICA 20121220. Added: vendor-sys/acpica/dist/source/compiler/aslfileio.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslhex.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslmethod.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslnamesp.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslxref.c (contents, props changed) vendor-sys/acpica/dist/source/components/debugger/dbconvert.c (contents, props changed) vendor-sys/acpica/dist/source/components/events/evhandler.c (contents, props changed) vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c (contents, props changed) vendor-sys/acpica/dist/source/components/parser/psobject.c (contents, props changed) vendor-sys/acpica/dist/source/components/parser/psopinfo.c (contents, props changed) vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utownerid.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utstring.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpibin/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpinames/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.y vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/changes.txt Wed Jan 2 19:01:21 2013 (r244971) @@ -1,4 +1,91 @@ ---------------------------------------- +20 December 2012. Summary of changes for version 20121220: + +This release is available at https://www.acpica.org/downloads +The ACPI 5.0 specification is available at www.acpi.info + +1) ACPICA Kernel-resident Subsystem: + +Implemented a new interface, AcpiWalkResourceBuffer. This interface is an +alternate entry point for AcpiWalkResources and improves the usability of +the resource manager by accepting as input a buffer containing the output +of either a _CRS, _PRS, or _AEI method. The key functionality is that the +input buffer is not deleted by this interface so that it can be used by +the host later. See the ACPICA reference for details. + +Interpreter: Add a warning if a 64-bit constant appears in a 32-bit table +(DSDT version < 2). The constant will be truncated and this warning +reflects that behavior. + +Resource Manager: Add support for the new ACPI 5.0 wake bit in the IRQ, +ExtendedInterrupt, and GpioInt descriptors. This change adds support to +both get and set the new wake bit in these descriptors, separately from +the existing share bit. Reported by Aaron Lu. + +Interpreter: Fix Store() when an implicit conversion is not possible. For +example, in the cases such as a store of a string to an existing package +object, implement the store as a CopyObject(). This is a small departure +from the ACPI specification which states that the control method should be +aborted in this case. However, the ASLTS suite depends on this behavior. + +Performance improvement for the various FUNCTION_TRACE and DEBUG_PRINT +macros: check if debug output is currently enabled as soon as possible to +minimize performance impact if debug is in fact not enabled. + +Source code restructuring: Cleanup to improve modularity. The following +new files have been added: dbconvert.c, evhandler.c, nsprepkg.c, +psopinfo.c, psobject.c, rsdumpinfo.c, utstring.c, and utownerid.c. +Associated makefiles and project files have been updated. + +Changed an exception code for LoadTable operator. For the case where one +of the input strings is too long, change the returned exception code from +AE_BAD_PARAMETER to AE_AML_STRING_LIMIT. + +Fixed a possible memory leak in dispatcher error path. On error, delete +the mutex object created during method mutex creation. Reported by +tim.gardner@canonical.com. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.3K Code, 25.3K Data, 119.6K Total + Debug Version: 175.5K Code, 74.5K Data, 250.0K Total + Current Release: + Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total + Debug Version: 182.2K Code, 74.9K Data, 257.1K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Disallow a method call as argument to the ObjectType ASL operator. +This change tracks an errata to the ACPI 5.0 document. The AML grammar +will not allow the interpreter to differentiate between a method and a +method invocation when these are used as an argument to the ObjectType +operator. The ACPI specification change is to disallow a method invocation +(UserTerm) for the ObjectType operator. + +Finish support for the TPM2 and CSRT tables in the headers, table +compiler, and disassembler. + +Unix user-space OSL: Fix a problem with WaitSemaphore where the timeout +always expires immediately if the semaphore is not available. The original +code was using a relative-time timeout, but sem_timedwait requires the use +of an absolute time. + +iASL: Added a remark if the Timer() operator is used within a 32-bit +table. This operator returns a 64-bit time value that will be truncated +within a 32-bit table. + +iASL Source code restructuring: Cleanup to improve modularity. The +following new files have been added: aslhex.c, aslxref.c, aslnamesp.c, +aslmethod.c, and aslfileio.c. Associated makefiles and project files have +been updated. + + +---------------------------------------- 14 November 2012. Summary of changes for version 20121114: This release is available at https://www.acpica.org/downloads Modified: vendor-sys/acpica/dist/generate/unix/acpibin/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpibin/Makefile Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/generate/unix/acpibin/Makefile Wed Jan 2 19:01:21 2013 (r244971) @@ -40,6 +40,7 @@ OBJECTS = \ $(OBJDIR)/utmisc.o \ $(OBJDIR)/utmutex.o \ $(OBJDIR)/utstate.o \ + $(OBJDIR)/utstring.o \ $(OBJDIR)/utxferror.o \ $(OBJDIR)/osunixxf.o \ $(OBJDIR)/getopt.o Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Jan 2 19:01:21 2013 (r244971) @@ -44,6 +44,7 @@ OBJECTS = \ $(OBJDIR)/aemain.o \ $(OBJDIR)/aetables.o \ $(OBJDIR)/dbcmds.o \ + $(OBJDIR)/dbconvert.o \ $(OBJDIR)/dbdisply.o \ $(OBJDIR)/dbexec.o \ $(OBJDIR)/dbfileio.o \ @@ -85,6 +86,7 @@ OBJECTS = \ $(OBJDIR)/evgpeblk.o \ $(OBJDIR)/evgpeinit.o \ $(OBJDIR)/evgpeutil.o \ + $(OBJDIR)/evhandler.o \ $(OBJDIR)/evmisc.o \ $(OBJDIR)/evregion.o \ $(OBJDIR)/evrgnini.o \ @@ -138,6 +140,7 @@ OBJECTS = \ $(OBJDIR)/nsobject.o \ $(OBJDIR)/nsparse.o \ $(OBJDIR)/nspredef.o \ + $(OBJDIR)/nsprepkg.o \ $(OBJDIR)/nsrepair.o \ $(OBJDIR)/nsrepair2.o \ $(OBJDIR)/nssearch.o \ @@ -149,7 +152,9 @@ OBJECTS = \ $(OBJDIR)/osunixxf.o \ $(OBJDIR)/psargs.o \ $(OBJDIR)/psloop.o \ + $(OBJDIR)/psobject.o \ $(OBJDIR)/psopcode.o \ + $(OBJDIR)/psopinfo.o \ $(OBJDIR)/psparse.o \ $(OBJDIR)/psscope.o \ $(OBJDIR)/pstree.o \ @@ -160,6 +165,7 @@ OBJECTS = \ $(OBJDIR)/rscalc.o \ $(OBJDIR)/rscreate.o \ $(OBJDIR)/rsdump.o \ + $(OBJDIR)/rsdumpinfo.o \ $(OBJDIR)/rsinfo.o \ $(OBJDIR)/rsio.o \ $(OBJDIR)/rsirq.o \ @@ -194,8 +200,10 @@ OBJECTS = \ $(OBJDIR)/utmutex.o \ $(OBJDIR)/utobject.o \ $(OBJDIR)/utosi.o \ + $(OBJDIR)/utownerid.o \ $(OBJDIR)/utresrc.o \ $(OBJDIR)/utstate.o \ + $(OBJDIR)/utstring.o \ $(OBJDIR)/uttrack.o \ $(OBJDIR)/utxface.o \ $(OBJDIR)/utxferror.o \ Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Wed Jan 2 19:01:21 2013 (r244971) @@ -70,7 +70,9 @@ OBJECTS = \ $(OBJDIR)/osunixxf.o \ $(OBJDIR)/psargs.o \ $(OBJDIR)/psloop.o \ + $(OBJDIR)/psobject.o \ $(OBJDIR)/psopcode.o \ + $(OBJDIR)/psopinfo.o \ $(OBJDIR)/psparse.o \ $(OBJDIR)/psscope.o \ $(OBJDIR)/pstree.o \ @@ -98,7 +100,9 @@ OBJECTS = \ $(OBJDIR)/utmutex.o \ $(OBJDIR)/utobject.o \ $(OBJDIR)/utosi.o \ + $(OBJDIR)/utownerid.o \ $(OBJDIR)/utstate.o \ + $(OBJDIR)/utstring.o \ $(OBJDIR)/utxface.o \ $(OBJDIR)/utxferror.o \ $(OBJDIR)/utxfinit.o Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Jan 2 19:01:21 2013 (r244971) @@ -53,13 +53,17 @@ OBJECTS = \ $(OBJDIR)/aslcompile.o \ $(OBJDIR)/aslerror.o \ $(OBJDIR)/aslfiles.o \ + $(OBJDIR)/aslfileio.o \ $(OBJDIR)/aslfold.o \ + $(OBJDIR)/aslhex.o \ $(OBJDIR)/asllength.o \ $(OBJDIR)/asllisting.o \ $(OBJDIR)/aslload.o \ $(OBJDIR)/asllookup.o \ $(OBJDIR)/aslmain.o \ $(OBJDIR)/aslmap.o \ + $(OBJDIR)/aslmethod.o \ + $(OBJDIR)/aslnamesp.o \ $(OBJDIR)/aslopcodes.o \ $(OBJDIR)/asloperands.o \ $(OBJDIR)/aslopt.o \ @@ -80,6 +84,7 @@ OBJECTS = \ $(OBJDIR)/aslutils.o \ $(OBJDIR)/asluuid.o \ $(OBJDIR)/aslwalks.o \ + $(OBJDIR)/aslxref.o \ $(OBJDIR)/dtcompile.o \ $(OBJDIR)/dtexpress.o \ $(OBJDIR)/dtfield.o \ @@ -154,7 +159,9 @@ OBJECTS = \ $(OBJDIR)/prutils.o \ $(OBJDIR)/psargs.o \ $(OBJDIR)/psloop.o \ + $(OBJDIR)/psobject.o \ $(OBJDIR)/psopcode.o \ + $(OBJDIR)/psopinfo.o \ $(OBJDIR)/psparse.o \ $(OBJDIR)/psscope.o \ $(OBJDIR)/pstree.o \ @@ -179,8 +186,10 @@ OBJECTS = \ $(OBJDIR)/utmisc.o \ $(OBJDIR)/utmutex.o \ $(OBJDIR)/utobject.o \ + $(OBJDIR)/utownerid.o \ $(OBJDIR)/utresrc.o \ $(OBJDIR)/utstate.o \ + $(OBJDIR)/utstring.o \ $(OBJDIR)/utxface.o \ $(OBJDIR)/utxferror.o Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/common/adisasm.c Wed Jan 2 19:01:21 2013 (r244971) @@ -69,11 +69,11 @@ extern int AslCompilerd #endif ACPI_STATUS -LsDisplayNamespace ( +NsDisplayNamespace ( void); void -LsSetupNsList ( +NsSetupNamespaceListing ( void *Handle); @@ -429,8 +429,8 @@ AdAmlDisassemble ( { AcpiOsPrintf ("/**** Before second load\n"); - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); AcpiOsPrintf ("*****/\n"); } @@ -498,8 +498,8 @@ AdAmlDisassemble ( if (AslCompilerdebug) { AcpiOsPrintf ("/**** After second load and resource conversion\n"); - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); AcpiOsPrintf ("*****/\n"); AcpiDmDumpTree (AcpiGbl_ParseOpRoot); @@ -549,8 +549,8 @@ Cleanup: { if (AslCompilerdebug) /* Display final namespace, with transforms */ { - LsSetupNsList (File); - LsDisplayNamespace (); + NsSetupNamespaceListing (File); + NsDisplayNamespace (); } fclose (File); Modified: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Wed Jan 2 19:01:21 2013 (r244971) @@ -89,7 +89,7 @@ AcpiDmAddResourceToNamespace ( UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, - void *Context); + void **Context); static void AcpiDmAddResourcesToNamespace ( @@ -993,7 +993,7 @@ AcpiDmAddResourcesToNamespace ( */ AcpiUtWalkAmlResources (NULL, (UINT8 *) NextOp->Named.Data, (ACPI_SIZE) NextOp->Common.Value.Integer, - AcpiDmAddResourceToNamespace, BufferNode); + AcpiDmAddResourceToNamespace, (void **) BufferNode); } @@ -1019,7 +1019,7 @@ AcpiDmAddResourceToNamespace ( UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, - void *Context) + void **Context) { ACPI_STATUS Status; ACPI_GENERIC_STATE ScopeInfo; Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/common/dmtable.c Wed Jan 2 19:01:21 2013 (r244971) @@ -281,7 +281,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt, "Boot Graphics Resource Table"}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"}, {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"}, - {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, NULL, NULL, "Core System Resource Table"}, + {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt, "Core System Resource Table"}, {ACPI_SIG_DBG2, NULL, AcpiDmDumpDbg2, NULL, NULL, "Debug Port table type 2"}, {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"}, {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"}, @@ -310,6 +310,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi, "Server Platform Management Interface table"}, {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat, "System Resource Affinity Table"}, {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"}, + {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2, "Trusted Platform Module hardware interface table"}, {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi, "UEFI Boot Optimization Table"}, {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet, "Windows ACPI Emulated Devices Table"}, {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat, "Watchdog Action Table"}, Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Wed Jan 2 19:01:21 2013 (r244971) @@ -614,6 +614,7 @@ AcpiDmDumpCsrt ( { ACPI_STATUS Status; ACPI_CSRT_GROUP *SubTable; + ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubTable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_CSRT); @@ -629,6 +630,8 @@ AcpiDmDumpCsrt ( SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); while (Offset < Table->Length) { + /* Resource group subtable */ + AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset, SubTable, SubTable->Length, AcpiDmTableInfoCsrt0); @@ -637,15 +640,23 @@ AcpiDmDumpCsrt ( return; } + /* Shared info subtable (One per resource group) */ + SubOffset = sizeof (ACPI_CSRT_GROUP); + SharedInfoTable = ACPI_ADD_PTR (ACPI_CSRT_SHARED_INFO, Table, + Offset + SubOffset); - /* Shared resource group info buffer */ + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset + SubOffset, SharedInfoTable, + sizeof (ACPI_CSRT_SHARED_INFO), AcpiDmTableInfoCsrt1); + if (ACPI_FAILURE (Status)) + { + return; + } - AcpiDmDumpBuffer (SubTable, SubOffset, SubTable->InfoLength, - Offset+SubOffset, "Shared Data"); - SubOffset += SubTable->InfoLength; + SubOffset += SubTable->SharedInfoLength; - /* Sub-Sub-tables (Resource Descriptors) */ + /* Sub-Subtables (Resource Descriptors) */ SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, Offset + SubOffset); @@ -655,7 +666,7 @@ AcpiDmDumpCsrt ( { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubTable, - SubSubTable->Length, AcpiDmTableInfoCsrt1); + SubSubTable->Length, AcpiDmTableInfoCsrt2); if (ACPI_FAILURE (Status)) { return; @@ -671,7 +682,7 @@ AcpiDmDumpCsrt ( Offset + SubOffset + SubSubOffset, "ResourceInfo"); SubSubOffset += InfoLength; - /* Point to next sub-sub-table */ + /* Point to next sub-subtable */ SubOffset += SubSubTable->Length; SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubTable, Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Wed Jan 2 19:01:21 2013 (r244971) @@ -111,6 +111,7 @@ #define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f) #define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f) #define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA,f) +#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f) #define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f) #define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f) #define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f) @@ -128,7 +129,8 @@ #define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f) #define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f) #define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f) -#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f) +#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f) +#define ACPI_CSRT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f) #define ACPI_DBG20_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DBG2_DEVICE,f) #define ACPI_DMARS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f) #define ACPI_DMAR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f) @@ -662,18 +664,38 @@ ACPI_DMTABLE_INFO AcpiDmTableI {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (SubdeviceId), "Subdevice ID", 0}, {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (Revision), "Revision", 0}, {ACPI_DMT_UINT16, ACPI_CSRT0_OFFSET (Reserved), "Reserved", 0}, - {ACPI_DMT_UINT32, ACPI_CSRT0_OFFSET (InfoLength), "InfoLength", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT0_OFFSET (SharedInfoLength), "Shared Info Length", 0}, ACPI_DMT_TERMINATOR }; -/* Resource Descriptor subtable */ +/* Shared Info subtable */ ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt1[] = { - {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (Length), "Length", 0}, - {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (Type), "Type", 0}, - {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (Subtype), "Subtype", 0}, - {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (Uid), "UID", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (MajorVersion), "Major Version", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (MinorVersion), "Minor Version", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MmioBaseLow), "MMIO Base Address Low", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MmioBaseHigh), "MMIO Base Address High", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (GsiInterrupt), "GSI Interrupt", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (InterruptPolarity), "Interrupt Polarity", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (InterruptMode), "Interrupt Mode", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (NumChannels), "Num Channels", 0}, + {ACPI_DMT_UINT8, ACPI_CSRT1_OFFSET (DmaAddressWidth), "DMA Address Width", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (BaseRequestLine), "Base Request Line", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT1_OFFSET (NumHandshakeSignals), "Num Handshake Signals", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT1_OFFSET (MaxBlockSize), "Max Block Size", 0}, + ACPI_DMT_TERMINATOR +}; + + +/* Resource Descriptor subtable */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2[] = +{ + {ACPI_DMT_UINT32, ACPI_CSRT2_OFFSET (Length), "Length", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT2_OFFSET (Type), "Type", 0}, + {ACPI_DMT_UINT16, ACPI_CSRT2_OFFSET (Subtype), "Subtype", 0}, + {ACPI_DMT_UINT32, ACPI_CSRT2_OFFSET (Uid), "UID", 0}, ACPI_DMT_TERMINATOR }; @@ -1984,6 +2006,21 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * + * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[] = +{ + {ACPI_DMT_UINT32, ACPI_TPM2_OFFSET (Flags), "Flags", 0}, + {ACPI_DMT_UINT64, ACPI_TPM2_OFFSET (ControlAddress), "Control Address", 0}, + {ACPI_DMT_UINT32, ACPI_TPM2_OFFSET (StartMethod), "Start Method", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * UEFI - UEFI Boot optimization Table * ******************************************************************************/ Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Wed Jan 2 19:01:21 2013 (r244971) @@ -617,7 +617,7 @@ CmDoCompile ( /* Namespace cross-reference */ AslGbl_NamespaceEvent = UtBeginEvent ("Cross reference parse tree and Namespace"); - Status = LkCrossReferenceNamespace (); + Status = XfCrossReferenceNamespace (); if (ACPI_FAILURE (Status)) { goto ErrorExit; @@ -639,8 +639,8 @@ CmDoCompile ( DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Method analysis\n\n"); TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE, - AnMethodAnalysisWalkBegin, - AnMethodAnalysisWalkEnd, &AnalysisWalkInfo); + MtMethodAnalysisWalkBegin, + MtMethodAnalysisWalkEnd, &AnalysisWalkInfo); UtEndEvent (Event); /* Semantic error checking part two - typing of method returns */ @@ -719,11 +719,11 @@ CmDoOutputFiles ( /* Create listings and hex files */ LsDoListings (); - LsDoHexOutput (); + HxDoHexOutput (); /* Dump the namespace to the .nsp file if requested */ - (void) LsDisplayNamespace (); + (void) NsDisplayNamespace (); } @@ -766,12 +766,12 @@ CmDumpAllEvents ( Delta = (UINT32) (Event->EndTime - Event->StartTime); - USec = Delta / 10; - MSec = Delta / 10000; + USec = Delta / ACPI_100NSEC_PER_USEC; + MSec = Delta / ACPI_100NSEC_PER_MSEC; /* Round milliseconds up */ - if ((USec - (MSec * 1000)) >= 500) + if ((USec - (MSec * ACPI_USEC_PER_MSEC)) >= 500) { MSec++; } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Wed Jan 2 19:01:21 2013 (r244971) @@ -188,19 +188,23 @@ AnOperandTypecheckWalkEnd ( void *Context); ACPI_STATUS -AnMethodAnalysisWalkBegin ( +AnMethodTypingWalkEnd ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); + +/* + * aslmethod - Control method analysis walk + */ ACPI_STATUS -AnMethodAnalysisWalkEnd ( +MtMethodAnalysisWalkBegin ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); ACPI_STATUS -AnMethodTypingWalkEnd ( +MtMethodAnalysisWalkEnd ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); @@ -342,6 +346,12 @@ LsDoListings ( void); void +LsDumpAsciiInComment ( + UINT32 FileId, + UINT32 Count, + UINT8 *Buffer); + +void LsWriteNodeToAsmListing ( ACPI_PARSE_OBJECT *Op); @@ -351,13 +361,18 @@ LsWriteNode ( UINT32 FileId); void -LsDoHexOutput ( +LsDumpParseTree ( void); + +/* + * aslhex - generate all "hex" output files (C, ASM, ASL) + */ void -LsDumpParseTree ( +HxDoHexOutput ( void); + /* * aslfold - constant folding */ @@ -689,26 +704,34 @@ LdLoadNamespace ( /* - * asllookup - namespace cross reference + * asllookup - namespace lookup functions */ -ACPI_STATUS -LkCrossReferenceNamespace ( - void); - void LkFindUnreferencedObjects ( void); + +/* + * aslnamesp - namespace output file generation + */ ACPI_STATUS -LsDisplayNamespace ( +NsDisplayNamespace ( void); void -LsSetupNsList ( +NsSetupNamespaceListing ( void *Handle); /* + * aslxref - namespace cross reference + */ +ACPI_STATUS +XfCrossReferenceNamespace ( + void); + + +/* * aslutils - common compiler utilites */ void Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.y Wed Jan 2 18:49:40 2013 (r244970) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.y Wed Jan 2 19:01:21 2013 (r244971) @@ -661,6 +661,7 @@ void * AslLocalAllo /* Types */ %type SuperName +%type ObjectTypeName %type ArgTerm %type LocalTerm %type DebugTerm @@ -1991,7 +1992,7 @@ NotTerm ObjectTypeTerm : PARSEOP_OBJECTTYPE '(' {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);} - SuperName + ObjectTypeName ')' {$$ = TrLinkChildren ($3,1,$4);} | PARSEOP_OBJECTTYPE '(' error ')' {$$ = AslDoError(); yyclearin;} @@ -2439,6 +2440,18 @@ SuperName | LocalTerm {} | DebugTerm {} | Type6Opcode {} + +/* For ObjectType: SuperName except for UserTerm (method invocation) */ + +ObjectTypeName + : NameString {} + | ArgTerm {} + | LocalTerm {} + | DebugTerm {} + | RefOfTerm {} + | DerefOfTerm {} + | IndexTerm {} + /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */ ; Added: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Wed Jan 2 19:01:21 2013 (r244971) @@ -0,0 +1,393 @@ +/****************************************************************************** + * + * Module Name: aslfileio - File I/O support + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2012, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "aslcompiler.h" + +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslfileio") + + +/******************************************************************************* + * + * FUNCTION: AslAbort + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump the error log and abort the compiler. Used for serious + * I/O errors. + * + ******************************************************************************/ + +void +AslAbort ( + void) +{ + + AePrintErrorLog (ASL_FILE_STDERR); + if (Gbl_DebugFlag) + { + /* Print error summary to stdout also */ + + AePrintErrorLog (ASL_FILE_STDOUT); + } + + exit (1); +} + + +/******************************************************************************* + * + * FUNCTION: FlFileError + * + * PARAMETERS: FileId - Index into file info array + * ErrorId - Index into error message array + * + * RETURN: None + * + * DESCRIPTION: Decode errno to an error message and add the entire error + * to the error log. + * + ******************************************************************************/ + +void +FlFileError ( + UINT32 FileId, + UINT8 ErrorId) +{ + + sprintf (MsgBuffer, "\"%s\" (%s)", Gbl_Files[FileId].Filename, + strerror (errno)); + AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer); +} + + +/******************************************************************************* + * + * FUNCTION: FlOpenFile + * + * PARAMETERS: FileId - Index into file info array + * Filename - file pathname to open + * Mode - Open mode for fopen + * + * RETURN: None + * + * DESCRIPTION: Open a file. + * NOTE: Aborts compiler on any error. + * + ******************************************************************************/ + +void +FlOpenFile ( + UINT32 FileId, + char *Filename, + char *Mode) +{ + FILE *File; + + + File = fopen (Filename, Mode); + if (!File) + { + FlFileError (FileId, ASL_MSG_OPEN); + AslAbort (); + } + + Gbl_Files[FileId].Filename = Filename; + Gbl_Files[FileId].Handle = File; +} + + +/******************************************************************************* + * + * FUNCTION: FlGetFileSize + * + * PARAMETERS: FileId - Index into file info array + * + * RETURN: File Size + * + * DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open. + * + ******************************************************************************/ + +UINT32 +FlGetFileSize ( + UINT32 FileId) +{ + FILE *fp; + UINT32 FileSize; + long Offset; + + + fp = Gbl_Files[FileId].Handle; + Offset = ftell (fp); + + fseek (fp, 0, SEEK_END); + FileSize = (UINT32) ftell (fp); + + /* Restore file pointer */ + + fseek (fp, Offset, SEEK_SET); + return (FileSize); +} + + +/******************************************************************************* + * + * FUNCTION: FlReadFile + * + * PARAMETERS: FileId - Index into file info array + * Buffer - Where to place the data + * Length - Amount to read + * + * RETURN: Status. AE_ERROR indicates EOF. + * + * DESCRIPTION: Read data from an open file. + * NOTE: Aborts compiler on any error. + * + ******************************************************************************/ + +ACPI_STATUS +FlReadFile ( + UINT32 FileId, + void *Buffer, + UINT32 Length) +{ + UINT32 Actual; + + + /* Read and check for error */ + + Actual = fread (Buffer, 1, Length, Gbl_Files[FileId].Handle); + if (Actual < Length) + { + if (feof (Gbl_Files[FileId].Handle)) + { + /* End-of-file, just return error */ + + return (AE_ERROR); + } + + FlFileError (FileId, ASL_MSG_READ); + AslAbort (); + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: FlWriteFile + * + * PARAMETERS: FileId - Index into file info array + * Buffer - Data to write + * Length - Amount of data to write + * + * RETURN: None + * + * DESCRIPTION: Write data to an open file. + * NOTE: Aborts compiler on any error. + * + ******************************************************************************/ + +void +FlWriteFile ( + UINT32 FileId, + void *Buffer, + UINT32 Length) +{ + UINT32 Actual; + + + /* Write and check for error */ + + Actual = fwrite ((char *) Buffer, 1, Length, Gbl_Files[FileId].Handle); + if (Actual != Length) + { + FlFileError (FileId, ASL_MSG_WRITE); + AslAbort (); + } +} + + +/******************************************************************************* + * + * FUNCTION: FlPrintFile + * + * PARAMETERS: FileId - Index into file info array + * Format - Printf format string + * ... - Printf arguments + * + * RETURN: None + * + * DESCRIPTION: Formatted write to an open file. + * NOTE: Aborts compiler on any error. + * + ******************************************************************************/ + +void +FlPrintFile ( + UINT32 FileId, + char *Format, + ...) +{ + INT32 Actual; + va_list Args; + + + va_start (Args, Format); + + Actual = vfprintf (Gbl_Files[FileId].Handle, Format, Args); + va_end (Args); + + if (Actual == -1) + { + FlFileError (FileId, ASL_MSG_WRITE); + AslAbort (); + } +} + + +/******************************************************************************* + * + * FUNCTION: FlSeekFile + * + * PARAMETERS: FileId - Index into file info array + * Offset - Absolute byte offset in file + * + * RETURN: None + * + * DESCRIPTION: Seek to absolute offset. + * NOTE: Aborts compiler on any error. + * + ******************************************************************************/ + +void +FlSeekFile ( + UINT32 FileId, + long Offset) +{ + int Error; + + + Error = fseek (Gbl_Files[FileId].Handle, Offset, SEEK_SET); + if (Error) + { + FlFileError (FileId, ASL_MSG_SEEK); + AslAbort (); + } +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 2 19:02:17 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 19CEEEE2; Wed, 2 Jan 2013 19:02:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E70F61DD0; Wed, 2 Jan 2013 19:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r02J2G9d044602; Wed, 2 Jan 2013 19:02:16 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r02J2Gg0044601; Wed, 2 Jan 2013 19:02:16 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301021902.r02J2Gg0044601@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 2 Jan 2013 19:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r244972 - vendor-sys/acpica/20121220 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 19:02:17 -0000 Author: jkim Date: Wed Jan 2 19:02:16 2013 New Revision: 244972 URL: http://svnweb.freebsd.org/changeset/base/244972 Log: Tag ACPICA 20121220. Added: vendor-sys/acpica/20121220/ - copied from r244971, vendor-sys/acpica/dist/ From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 2 20:56:54 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8C96AA16; Wed, 2 Jan 2013 20:56:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7EAD12B5; Wed, 2 Jan 2013 20:56:54 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r02KusJP061673; Wed, 2 Jan 2013 20:56:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r02KusED061672; Wed, 2 Jan 2013 20:56:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301022056.r02KusED061672@svn.freebsd.org> From: Xin LI Date: Wed, 2 Jan 2013 20:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r244973 - vendor-crypto/openssl/dist/crypto/bn X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 20:56:54 -0000 Author: delphij Date: Wed Jan 2 20:56:53 2013 New Revision: 244973 URL: http://svnweb.freebsd.org/changeset/base/244973 Log: Integrate OpenSSL changeset 22950 (appro): bn_word.c: fix overflow bug in BN_add_word. Modified: vendor-crypto/openssl/dist/crypto/bn/bn_word.c Modified: vendor-crypto/openssl/dist/crypto/bn/bn_word.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/bn_word.c Wed Jan 2 19:02:16 2013 (r244972) +++ vendor-crypto/openssl/dist/crypto/bn/bn_word.c Wed Jan 2 20:56:53 2013 (r244973) @@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) a->neg=!(a->neg); return(i); } - /* Only expand (and risk failing) if it's possibly necessary */ - if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) && - (bn_wexpand(a,a->top+1) == NULL)) - return(0); - i=0; - for (;;) + for (i=0;w!=0 && itop;i++) { - if (i >= a->top) - l=w; - else - l=(a->d[i]+w)&BN_MASK2; - a->d[i]=l; - if (w > l) - w=1; - else - break; - i++; + a->d[i] = l = (a->d[i]+w)&BN_MASK2; + w = (w>l)?1:0; } - if (i >= a->top) + if (w && i==a->top) + { + if (bn_wexpand(a,a->top+1) == NULL) return 0; a->top++; + a->d[i]=w; + } bn_check_top(a); return(1); } From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 2 21:53:47 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 83EE9B9; Wed, 2 Jan 2013 21:53:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 685B0699; Wed, 2 Jan 2013 21:53:47 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r02Lrlxq070736; Wed, 2 Jan 2013 21:53:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r02Lrk8t070725; Wed, 2 Jan 2013 21:53:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301022153.r02Lrk8t070725@svn.freebsd.org> From: Xin LI Date: Wed, 2 Jan 2013 21:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r244978 - vendor/one-true-awk/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 21:53:47 -0000 Author: delphij Date: Wed Jan 2 21:53:45 2013 New Revision: 244978 URL: http://svnweb.freebsd.org/changeset/base/244978 Log: Vendor import of bwk's Dec 20, 2012 version. Modified: vendor/one-true-awk/dist/FIXES vendor/one-true-awk/dist/main.c vendor/one-true-awk/dist/makefile vendor/one-true-awk/dist/proto.h vendor/one-true-awk/dist/run.c vendor/one-true-awk/dist/tran.c Modified: vendor/one-true-awk/dist/FIXES ============================================================================== --- vendor/one-true-awk/dist/FIXES Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/FIXES Wed Jan 2 21:53:45 2013 (r244978) @@ -25,6 +25,22 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +Dec 20, 2012: + fiddled makefile to get correct yacc and bison flags. pick yacc + (linux) or bison (mac) as necessary. + + added __attribute__((__noreturn__)) to a couple of lines in + proto.h, to silence someone's enthusiastic checker. + + fixed obscure call by value bug in split(a[1],a) reported on + 9fans. the management of temporary values is just a mess; i + took a shortcut by making an extra string copy. thanks + to paul patience and arnold robbins for passing it on and for + proposed patches. + + tiny fiddle in setfval to eliminate -0 results in T.expr, which + has irritated me for 20+ years. + Aug 10, 2011: another fix to avoid core dump with delete(ARGV); again, many thanks to ruslan ermilov. Modified: vendor/one-true-awk/dist/main.c ============================================================================== --- vendor/one-true-awk/dist/main.c Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/main.c Wed Jan 2 21:53:45 2013 (r244978) @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20110810"; +const char *version = "version 20121220"; #define DEBUG #include Modified: vendor/one-true-awk/dist/makefile ============================================================================== --- vendor/one-true-awk/dist/makefile Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/makefile Wed Jan 2 21:53:45 2013 (r244978) @@ -26,15 +26,15 @@ CFLAGS = -g CFLAGS = -O2 CFLAGS = -CC = gcc -Wall -g -CC = cc CC = gcc -Wall -g -Wwrite-strings CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov +CC = gcc -g -Wall -pedantic CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing -YACC = bison -y -YACC = yacc -YFLAGS = -d +YACC = bison -d -y +YACC = yacc -d -S +#YFLAGS = -d -S + # -S uses sprintf in yacc parser instead of sprint OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o Modified: vendor/one-true-awk/dist/proto.h ============================================================================== --- vendor/one-true-awk/dist/proto.h Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/proto.h Wed Jan 2 21:53:45 2013 (r244978) @@ -46,7 +46,7 @@ extern void freetr(Node *); extern int hexstr(uschar **); extern int quoted(uschar **); extern char *cclenter(const char *); -extern void overflo(const char *); +extern void overflo(const char *) __attribute__((__noreturn__)); extern void cfoll(fa *, Node *); extern int first(Node *); extern void follow(Node *); @@ -132,7 +132,7 @@ extern void fpecatch(int); extern void bracecheck(void); extern void bcheck2(int, int, int); extern void SYNTAX(const char *, ...); -extern void FATAL(const char *, ...); +extern void FATAL(const char *, ...) __attribute__((__noreturn__)); extern void WARNING(const char *, ...); extern void error(void); extern void eprint(void); Modified: vendor/one-true-awk/dist/run.c ============================================================================== --- vendor/one-true-awk/dist/run.c Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/run.c Wed Jan 2 21:53:45 2013 (r244978) @@ -1210,13 +1210,13 @@ Cell *dopa2(Node **a, int n) /* a[0], a[ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */ { Cell *x = 0, *y, *ap; - char *s; + char *s, *origs; int sep; char *t, temp, num[50], *fs = 0; int n, tempstat, arg3type; y = execute(a[0]); /* source string */ - s = getsval(y); + origs = s = strdup(getsval(y)); arg3type = ptoi(a[3]); if (a[2] == 0) /* fs string */ fs = *FS; @@ -1336,6 +1336,7 @@ Cell *split(Node **a, int nnn) /* split( } tempfree(ap); tempfree(y); + free(origs); if (a[2] != 0 && arg3type == STRING) { tempfree(x); } Modified: vendor/one-true-awk/dist/tran.c ============================================================================== --- vendor/one-true-awk/dist/tran.c Wed Jan 2 21:45:20 2013 (r244977) +++ vendor/one-true-awk/dist/tran.c Wed Jan 2 21:53:45 2013 (r244978) @@ -298,6 +298,8 @@ Awkfloat setfval(Cell *vp, Awkfloat f) / xfree(vp->sval); /* free any previous string */ vp->tval &= ~STR; /* mark string invalid */ vp->tval |= NUM; /* mark number ok */ + if (f == -0) /* who would have thought this possible? */ + f = 0; dprintf( ("setfval %p: %s = %g, t=%o\n", (void*)vp, NN(vp->nval), f, vp->tval) ); return vp->fval = f; } From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 2 21:54:38 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AFF1C29F; Wed, 2 Jan 2013 21:54:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0C66A4; Wed, 2 Jan 2013 21:54:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r02Lscfi070886; Wed, 2 Jan 2013 21:54:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r02Lsc7j070885; Wed, 2 Jan 2013 21:54:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301022154.r02Lsc7j070885@svn.freebsd.org> From: Xin LI Date: Wed, 2 Jan 2013 21:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r244979 - vendor/one-true-awk/20121220 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 21:54:38 -0000 Author: delphij Date: Wed Jan 2 21:54:37 2013 New Revision: 244979 URL: http://svnweb.freebsd.org/changeset/base/244979 Log: Tag 20121220 version. Added: vendor/one-true-awk/20121220/ - copied from r244978, vendor/one-true-awk/dist/