diff options
author | jkim <jkim@FreeBSD.org> | 2013-08-23 23:25:58 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-08-23 23:25:58 +0000 |
commit | f2dafdee67fe5c7ef109890d8685b9a5cbebecf1 (patch) | |
tree | 7ada92196422cd8bffb5c7d81220d52437161bb0 /sys/contrib/dev/acpica/compiler | |
parent | 5017a032d282b2ecdd81495733cc73657ff2b8fb (diff) | |
download | FreeBSD-src-f2dafdee67fe5c7ef109890d8685b9a5cbebecf1.zip FreeBSD-src-f2dafdee67fe5c7ef109890d8685b9a5cbebecf1.tar.gz |
Merge ACPICA 20130823.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslcompile.c | 25 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslglobal.h | 1 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslload.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslmain.c | 1 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/asloptions.c | 30 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/dtcompile.c | 2 |
6 files changed, 48 insertions, 15 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c index 7b2393c..48ccfa3 100644 --- a/sys/contrib/dev/acpica/compiler/aslcompile.c +++ b/sys/contrib/dev/acpica/compiler/aslcompile.c @@ -593,10 +593,15 @@ CmDoCompile ( AslCompilerparse(); UtEndEvent (Event); - /* Flush out any remaining source after parse tree is complete */ + /* Check for parse errors */ - Event = UtBeginEvent ("Flush source input"); - CmFlushSourceCode (); + Status = AslCheckForErrorExit (); + if (ACPI_FAILURE (Status)) + { + fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n"); + LsDumpParseTree (); + goto ErrorExit; + } /* Did the parse tree get successfully constructed? */ @@ -606,16 +611,18 @@ CmDoCompile ( * If there are no errors, then we have some sort of * internal problem. */ - Status = AslCheckForErrorExit (); - if (Status == AE_OK) - { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, - NULL, "- Could not resolve parse tree root node"); - } + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, + NULL, "- Could not resolve parse tree root node"); goto ErrorExit; } + + /* Flush out any remaining source after parse tree is complete */ + + Event = UtBeginEvent ("Flush source input"); + CmFlushSourceCode (); + /* Optional parse tree dump, compiler debug output only */ LsDumpParseTree (); diff --git a/sys/contrib/dev/acpica/compiler/aslglobal.h b/sys/contrib/dev/acpica/compiler/aslglobal.h index e1be4ae..3f2c401 100644 --- a/sys/contrib/dev/acpica/compiler/aslglobal.h +++ b/sys/contrib/dev/acpica/compiler/aslglobal.h @@ -186,6 +186,7 @@ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_IncludeFilename, NULL) ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_OutputFilenamePrefix, NULL); ASL_EXTERN ASL_INCLUDE_DIR ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL); ASL_EXTERN char *Gbl_CurrentInputFilename; +ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_ExternalRefFilename, NULL); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_HasIncludeFiles, FALSE); diff --git a/sys/contrib/dev/acpica/compiler/aslload.c b/sys/contrib/dev/acpica/compiler/aslload.c index 57519d1..bc4d593 100644 --- a/sys/contrib/dev/acpica/compiler/aslload.c +++ b/sys/contrib/dev/acpica/compiler/aslload.c @@ -487,6 +487,10 @@ LdNamespace1Begin ( ACPI_TYPE_LOCAL_SCOPE, ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &(Node)); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } /* * However, this is an error -- primarily because the MS diff --git a/sys/contrib/dev/acpica/compiler/aslmain.c b/sys/contrib/dev/acpica/compiler/aslmain.c index 2a70588..67e561a 100644 --- a/sys/contrib/dev/acpica/compiler/aslmain.c +++ b/sys/contrib/dev/acpica/compiler/aslmain.c @@ -138,6 +138,7 @@ Usage ( ACPI_OPTION ("-dc <f1,f2>", "Disassemble AML and immediately compile it"); ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); ACPI_OPTION ("-e <f1,f2>", "Include ACPI table(s) for external symbol resolution"); + ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); diff --git a/sys/contrib/dev/acpica/compiler/asloptions.c b/sys/contrib/dev/acpica/compiler/asloptions.c index 877fb68..66a9249 100644 --- a/sys/contrib/dev/acpica/compiler/asloptions.c +++ b/sys/contrib/dev/acpica/compiler/asloptions.c @@ -68,7 +68,7 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" -#define ASL_SUPPORTED_OPTIONS "@:b|c|d^D:e:fgh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" +#define ASL_SUPPORTED_OPTIONS "@:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" /******************************************************************************* @@ -136,8 +136,7 @@ AslCommandLine ( if (BadCommandLine) { - printf ("\n"); - Usage (); + printf ("Use -h option for help information\n"); exit (1); } @@ -276,9 +275,30 @@ AslDoOptions ( } break; - case 'f': /* Ignore errors and force creation of aml file */ + case 'f': + + switch (AcpiGbl_Optarg[0]) + { + case '^': /* Ignore errors and force creation of aml file */ + + Gbl_IgnoreErrors = TRUE; + break; + + case 'e': /* Disassembler: Get external declaration file */ + + if (AcpiGetoptArgument (argc, argv)) + { + return (-1); + } + + Gbl_ExternalRefFilename = AcpiGbl_Optarg; + break; - Gbl_IgnoreErrors = TRUE; + default: + + printf ("Unknown option: -f%s\n", AcpiGbl_Optarg); + return (-1); + } break; case 'G': diff --git a/sys/contrib/dev/acpica/compiler/dtcompile.c b/sys/contrib/dev/acpica/compiler/dtcompile.c index 1b24af26..3407e1d 100644 --- a/sys/contrib/dev/acpica/compiler/dtcompile.c +++ b/sys/contrib/dev/acpica/compiler/dtcompile.c @@ -317,7 +317,7 @@ DtCompileDataTable ( DtSetTableLength (); return (Status); } - else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_RSDP)) + else if (ACPI_VALIDATE_RSDP_SIG (Signature)) { Status = DtCompileRsdp (FieldList); return (Status); |