Import ACPICA 20090521.
This commit is contained in:
parent
129d3046ef
commit
990651167b
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -17,7 +17,7 @@ SRCS+= evevent.c evgpe.c evgpeblk.c evmisc.c evregion.c \
|
||||
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 psparse.c psscope.c \
|
||||
|
||||
# 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 tbutils.c tbxface.c \
|
||||
|
||||
# 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>
|
||||
|
@ -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(const char *dumpfile);
|
||||
ACPI_STATUS
|
||||
AeLocalGetRootPointer(void)
|
||||
{
|
||||
return AE_ERROR;
|
||||
|
||||
return (AE_ERROR);
|
||||
}
|
||||
|
||||
void
|
||||
AeTableOverride(ACPI_TABLE_HEADER *ExistingTable, ACPI_TABLE_HEADER **NewTable)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -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 ACPIsdt *rsdt, struct ACPIsdt *dsdp)
|
||||
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, struct ACPIsdt *dsdp)
|
||||
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, struct ACPIsdt *dsdp)
|
||||
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;
|
||||
|
@ -13,8 +13,8 @@ SRCS+= aslanalyze.c aslcodegen.c aslcompile.c aslcompiler.y.h \
|
||||
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 tbxface.c
|
||||
|
||||
# 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user