Date: Fri, 5 Jun 2009 18:50:45 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193531 - in head/usr.sbin/acpi: . acpiconf acpidb acpidump iasl Message-ID: <200906051850.n55Ioj0Q034928@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Fri Jun 5 18:50:45 2009 New Revision: 193531 URL: http://svn.freebsd.org/changeset/base/193531 Log: Import ACPICA 20090521. Modified: head/usr.sbin/acpi/Makefile.inc head/usr.sbin/acpi/acpiconf/acpiconf.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/acpidb/acpidb.c head/usr.sbin/acpi/acpidump/acpi.c head/usr.sbin/acpi/iasl/Makefile Modified: head/usr.sbin/acpi/Makefile.inc ============================================================================== --- head/usr.sbin/acpi/Makefile.inc Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/Makefile.inc Fri Jun 5 18:50:45 2009 (r193531) @@ -8,4 +8,17 @@ CFLAGS+= -I${.CURDIR}/../../../sys .include "${.CURDIR}/../../Makefile.inc" .endif -.PATH: ${ACPICA_DIR} ${ACPICA_DIR}/compiler ${ACPICA_DIR}/common +.PATH: ${ACPICA_DIR} \ + ${ACPICA_DIR}/common \ + ${ACPICA_DIR}/compiler \ + ${ACPICA_DIR}/debugger \ + ${ACPICA_DIR}/disassembler \ + ${ACPICA_DIR}/dispatcher \ + ${ACPICA_DIR}/events \ + ${ACPICA_DIR}/executer \ + ${ACPICA_DIR}/hardware \ + ${ACPICA_DIR}/namespace \ + ${ACPICA_DIR}/parser \ + ${ACPICA_DIR}/resources \ + ${ACPICA_DIR}/tables \ + ${ACPICA_DIR}/utilities Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- head/usr.sbin/acpi/acpiconf/acpiconf.c Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/acpiconf/acpiconf.c Fri Jun 5 18:50:45 2009 (r193531) @@ -37,7 +37,8 @@ #include <unistd.h> #include <dev/acpica/acpiio.h> -#include <contrib/dev/acpica/acpi.h> + +#include <contrib/dev/acpica/include/acpi.h> #define ACPIDEV "/dev/acpi" Modified: head/usr.sbin/acpi/acpidb/Makefile ============================================================================== --- head/usr.sbin/acpi/acpidb/Makefile Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/acpidb/Makefile Fri Jun 5 18:50:45 2009 (r193531) @@ -17,7 +17,7 @@ SRCS+= evevent.c evgpe.c evgpeblk.c evmi evrgnini.c evsci.c evxface.c evxfevnt.c evxfregn.c # hardware -SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c +SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwvalid.c hwxface.c # interpreter/dispatcher SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c dsobject.c \ @@ -37,8 +37,9 @@ SRCS+= psargs.c psloop.c psopcode.c pspa # namespace SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c \ - nsload.c nsnames.c nsobject.c nsparse.c nssearch.c \ - nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c + nsload.c nsnames.c nsobject.c nsparse.c nspredef.c \ + nssearch.c nsutils.c nswalk.c nsxfeval.c nsxfname.c \ + nsxfobj.c # resources SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c \ @@ -51,14 +52,15 @@ SRCS+= tbfadt.c tbfind.c tbinstal.c tbut # utilities SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdelete.c \ - uteval.c utglobal.c utinit.c utmath.c utmisc.c \ + uteval.c utglobal.c utinit.c utlock.c utmath.c utmisc.c \ utmutex.c utobject.c utresrc.c utstate.c uttrack.c \ utxface.c MAN= acpidb.8 WARNS?= 2 -CFLAGS+= -DACPI_EXEC_APP -CFLAGS+=-fno-strict-aliasing +CFLAGS+= -DACPI_EXEC_APP -fno-strict-aliasing +DPADD= ${LIBPTHREAD} +LDADD= -lpthread .include <bsd.prog.mk> Modified: head/usr.sbin/acpi/acpidb/acpidb.c ============================================================================== --- head/usr.sbin/acpi/acpidb/acpidb.c Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/acpidb/acpidb.c Fri Jun 5 18:50:45 2009 (r193531) @@ -42,9 +42,8 @@ #include <stdlib.h> #include <unistd.h> -#include <contrib/dev/acpica/acpi.h> -#include <contrib/dev/acpica/acnamesp.h> -#include <contrib/dev/acpica/acdebug.h> +#include <contrib/dev/acpica/include/acpi.h> +#include <contrib/dev/acpica/tools/acpiexec/aecommon.h> /* * Dummy DSDT Table Header @@ -90,7 +89,13 @@ static void aml_simulation_regdump(con ACPI_STATUS AeLocalGetRootPointer(void) { - return AE_ERROR; + + return (AE_ERROR); +} + +void +AeTableOverride(ACPI_TABLE_HEADER *ExistingTable, ACPI_TABLE_HEADER **NewTable) +{ } static void Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/acpidump/acpi.c Fri Jun 5 18:50:45 2009 (r193531) @@ -34,7 +34,9 @@ #include <assert.h> #include <err.h> #include <fcntl.h> +#include <paths.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -803,11 +805,26 @@ dsdt_save_file(char *outfile, struct ACP void aml_disassemble(struct ACPIsdt *rsdt, struct ACPIsdt *dsdp) { - char tmpstr[32], buf[256]; + char buf[PATH_MAX], tmpstr[PATH_MAX]; + const char *tmpdir; + char *tmpext; FILE *fp; - int fd, len; + size_t len; + int fd; - strcpy(tmpstr, "/tmp/acpidump.XXXXXX"); + tmpdir = getenv("TMPDIR"); + if (tmpdir == NULL) + tmpdir = _PATH_TMP; + strncpy(tmpstr, tmpdir, sizeof(tmpstr)); + strncat(tmpstr, "/acpidump.", sizeof(tmpstr) - strlen(tmpdir)); + if (realpath(tmpstr, buf) == NULL) { + perror("realpath tmp file"); + return; + } + strncpy(tmpstr, buf, sizeof(tmpstr)); + len = strlen(buf); + tmpext = tmpstr + len; + strncpy(tmpext, "XXXXXX", sizeof(tmpstr) - len); fd = mkstemp(tmpstr); if (fd < 0) { perror("iasl tmp file"); @@ -821,7 +838,7 @@ aml_disassemble(struct ACPIsdt *rsdt, st close(STDOUT_FILENO); if (vflag == 0) close(STDERR_FILENO); - execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, (char *) 0); + execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, NULL); err(1, "exec"); } @@ -829,8 +846,9 @@ aml_disassemble(struct ACPIsdt *rsdt, st unlink(tmpstr); /* Dump iasl's output to stdout */ - fp = fopen("acpidump.dsl", "r"); - unlink("acpidump.dsl"); + strncpy(tmpext, "dsl", sizeof(tmpstr) - len); + fp = fopen(tmpstr, "r"); + unlink(tmpstr); if (fp == NULL) { perror("iasl tmp file (read)"); return; Modified: head/usr.sbin/acpi/iasl/Makefile ============================================================================== --- head/usr.sbin/acpi/iasl/Makefile Fri Jun 5 18:44:36 2009 (r193530) +++ head/usr.sbin/acpi/iasl/Makefile Fri Jun 5 18:50:45 2009 (r193531) @@ -13,8 +13,8 @@ SRCS+= aslanalyze.c aslcodegen.c aslcomp aslfiles.c aslfold.c asllength.c asllisting.c \ aslload.c asllookup.c aslmain.c aslmap.c aslopcodes.c \ asloperands.c aslopt.c aslresource.c aslrestype1.c \ - aslrestype2.c aslstubs.c asltransform.c asltree.c \ - aslutils.c + aslrestype2.c aslstartup.c aslstubs.c asltransform.c \ + asltree.c aslutils.c # debugger SRCS+= dbfileio.c @@ -46,8 +46,8 @@ SRCS+= tbfadt.c tbinstal.c tbutils.c tbx # utilities SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdelete.c \ - utglobal.c utmath.c utmisc.c utmutex.c utobject.c \ - utresrc.c utstate.c + utglobal.c utinit.c utlock.c utmath.c utmisc.c \ + utmutex.c utobject.c utresrc.c utstate.c utxface.c MAN= iasl.8 @@ -55,6 +55,8 @@ CFLAGS+= -DACPI_ASL_COMPILER -I. CFLAGS+= -D_USE_BERKELEY_YACC LFLAGS= -i -PAslCompiler YFLAGS= -d -pAslCompiler +DPADD= ${LIBPTHREAD} +LDADD= -lpthread CLEANFILES= aslcompiler.y.h aslcompilerlex.l aslcompilerparse.y
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906051850.n55Ioj0Q034928>