Merge ACPICA 20130517.
This commit is contained in:
commit
a9d8d09c46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250838
@ -421,17 +421,20 @@ contrib/dev/acpica/components/resources/rsxface.c optional acpi
|
|||||||
contrib/dev/acpica/components/tables/tbfadt.c optional acpi
|
contrib/dev/acpica/components/tables/tbfadt.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbfind.c optional acpi
|
contrib/dev/acpica/components/tables/tbfind.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbinstal.c optional acpi
|
contrib/dev/acpica/components/tables/tbinstal.c optional acpi
|
||||||
|
contrib/dev/acpica/components/tables/tbprint.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbutils.c optional acpi
|
contrib/dev/acpica/components/tables/tbutils.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbxface.c optional acpi
|
contrib/dev/acpica/components/tables/tbxface.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbxfload.c optional acpi
|
contrib/dev/acpica/components/tables/tbxfload.c optional acpi
|
||||||
contrib/dev/acpica/components/tables/tbxfroot.c optional acpi
|
contrib/dev/acpica/components/tables/tbxfroot.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utaddress.c optional acpi
|
contrib/dev/acpica/components/utilities/utaddress.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utalloc.c optional acpi
|
contrib/dev/acpica/components/utilities/utalloc.c optional acpi
|
||||||
|
contrib/dev/acpica/components/utilities/utbuffer.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utcache.c optional acpi
|
contrib/dev/acpica/components/utilities/utcache.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utcopy.c optional acpi
|
contrib/dev/acpica/components/utilities/utcopy.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utdebug.c optional acpi
|
contrib/dev/acpica/components/utilities/utdebug.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utdecode.c optional acpi
|
contrib/dev/acpica/components/utilities/utdecode.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utdelete.c optional acpi
|
contrib/dev/acpica/components/utilities/utdelete.c optional acpi
|
||||||
|
contrib/dev/acpica/components/utilities/uterror.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/uteval.c optional acpi
|
contrib/dev/acpica/components/utilities/uteval.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utexcep.c optional acpi
|
contrib/dev/acpica/components/utilities/utexcep.c optional acpi
|
||||||
contrib/dev/acpica/components/utilities/utglobal.c optional acpi
|
contrib/dev/acpica/components/utilities/utglobal.c optional acpi
|
||||||
|
@ -19,9 +19,9 @@ fulldirs="common compiler components include os_specific"
|
|||||||
# files to remove
|
# files to remove
|
||||||
stripdirs="generate libraries tests tools"
|
stripdirs="generate libraries tests tools"
|
||||||
stripfiles="Makefile README accygwin.h acefi.h achaiku.h acintel.h \
|
stripfiles="Makefile README accygwin.h acefi.h achaiku.h acintel.h \
|
||||||
aclinux.h acmsvc.h acnetbsd.h acos2.h acwin.h acwin64.h \
|
aclinux.h acmacosx.h acmsvc.h acnetbsd.h acos2.h acwin.h \
|
||||||
new_table.txt osunixdir.c oswindir.c oswintbl.c oswinxf.c \
|
acwin64.h new_table.txt oslinuxtbl.c osunixdir.c oswindir.c \
|
||||||
readme.txt utclib.c"
|
oswintbl.c oswinxf.c readme.txt utclib.c"
|
||||||
|
|
||||||
# include files to canonify
|
# include files to canonify
|
||||||
src_headers="acapps.h acbuffer.h accommon.h acconfig.h acdebug.h \
|
src_headers="acapps.h acbuffer.h accommon.h acconfig.h acdebug.h \
|
||||||
|
@ -1,9 +1,109 @@
|
|||||||
|
----------------------------------------
|
||||||
|
17 May 2013. Summary of changes for version 20130517:
|
||||||
|
|
||||||
|
1) ACPICA kernel-resident subsystem:
|
||||||
|
|
||||||
|
Fixed a regression introduced in version 20130328 for _INI methods. This
|
||||||
|
change fixes a problem introduced in 20130328 where _INI methods are no
|
||||||
|
longer executed properly because of a memory block that was not
|
||||||
|
initialized correctly. ACPICA BZ 1016. Tomasz Nowicki
|
||||||
|
<tomasz.nowicki@linaro.org>.
|
||||||
|
|
||||||
|
Fixed a possible problem with the new extended sleep registers in the ACPI
|
||||||
|
5.0 FADT. Do not use these registers (even if populated) unless the HW-
|
||||||
|
reduced bit is set in the FADT (as per the ACPI specification). ACPICA BZ
|
||||||
|
1020. Lv Zheng.
|
||||||
|
|
||||||
|
Implemented return value repair code for _CST predefined objects: Sort the
|
||||||
|
list and detect/remove invalid entries. ACPICA BZ 890. Lv Zheng.
|
||||||
|
|
||||||
|
Implemented a debug-only option to disable loading of SSDTs from the
|
||||||
|
RSDT/XSDT during ACPICA initialization. This can be useful for debugging
|
||||||
|
ACPI problems on some machines. Set AcpiGbl_DisableSsdtTableLoad in
|
||||||
|
acglobal.h - ACPICA BZ 1005. Lv Zheng.
|
||||||
|
|
||||||
|
Fixed some issues in the ACPICA initialization and termination code:
|
||||||
|
Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
||||||
|
1) Clear events initialized flag upon event component termination. ACPICA
|
||||||
|
BZ 1013.
|
||||||
|
2) Fixed a possible memory leak in GPE init error path. ACPICA BZ 1018.
|
||||||
|
3) Delete global lock pending lock during termination. ACPICA BZ 1012.
|
||||||
|
4) Clear debug buffer global on termination to prevent possible multiple
|
||||||
|
delete. ACPICA BZ 1010.
|
||||||
|
|
||||||
|
Standardized all switch() blocks across the entire source base. After many
|
||||||
|
years, different formatting for switch() had crept in. This change makes
|
||||||
|
the formatting of every switch block identical. ACPICA BZ 997. Chao Guan.
|
||||||
|
|
||||||
|
Split some files to enhance ACPICA modularity and configurability:
|
||||||
|
1) Split buffer dump routines into utilities/utbuffer.c
|
||||||
|
2) Split internal error message routines into utilities/uterror.c
|
||||||
|
3) Split table print utilities into tables/tbprint.c
|
||||||
|
4) Split iASL command-line option processing into asloptions.c
|
||||||
|
|
||||||
|
Makefile enhancements:
|
||||||
|
1) Support for all new files above.
|
||||||
|
2) Abort make on errors from any subcomponent. Chao Guan.
|
||||||
|
3) Add build support for Apple Mac OS X. Liang Qi.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Current Release:
|
||||||
|
Non-Debug Version: 96.0K Code, 27.0K Data, 123.0K Total
|
||||||
|
Debug Version: 184.1K Code, 76.8K Data, 260.9K Total
|
||||||
|
Previous Release:
|
||||||
|
Non-Debug Version: 95.6K Code, 26.8K Data, 122.4K Total
|
||||||
|
Debug Version: 183.5K Code, 76.6K Data, 260.1K Total
|
||||||
|
|
||||||
|
|
||||||
|
2) iASL Compiler/Disassembler and Tools:
|
||||||
|
|
||||||
|
New utility: Implemented an easily portable version of the acpidump
|
||||||
|
utility to extract ACPI tables from the system (or a file) in an ASCII hex
|
||||||
|
dump format. The top-level code implements the various command line
|
||||||
|
options, file I/O, and table dump routines. To port to a new host, only
|
||||||
|
three functions need to be implemented to get tables -- since this
|
||||||
|
functionality is OS-dependent. See the tools/acpidump/apmain.c module and
|
||||||
|
the ACPICA reference for porting instructions. ACPICA BZ 859. Notes:
|
||||||
|
1) The Windows version obtains the ACPI tables from the Registry.
|
||||||
|
2) The Linux version is under development.
|
||||||
|
3) Other hosts - If an OS-dependent module is submitted, it will be
|
||||||
|
distributed with ACPICA.
|
||||||
|
|
||||||
|
iASL: Fixed a regression for -D preprocessor option (define symbol). A
|
||||||
|
restructuring/change to the initialization sequence caused this option to
|
||||||
|
no longer work properly.
|
||||||
|
|
||||||
|
iASL: Implemented a mechanism to disable specific warnings and remarks.
|
||||||
|
Adds a new command line option, "-vw <messageid> as well as "#pragma
|
||||||
|
disable <messageid>". ACPICA BZ 989. Chao Guan, Bob Moore.
|
||||||
|
|
||||||
|
iASL: Fix for too-strict package object validation. The package object
|
||||||
|
validation for return values from the predefined names is a bit too
|
||||||
|
strict, it does not allow names references within the package (which will
|
||||||
|
be resolved at runtime.) These types of references cannot be validated at
|
||||||
|
compile time. This change ignores named references within package objects
|
||||||
|
for names that return or define static packages.
|
||||||
|
|
||||||
|
Debugger: Fixed the 80-character command line limitation for the History
|
||||||
|
command. Now allows lines of arbitrary length. ACPICA BZ 1000. Chao Guan.
|
||||||
|
|
||||||
|
iASL: Added control method and package support for the -so option
|
||||||
|
(generates AML offset table for BIOS support.)
|
||||||
|
|
||||||
|
iASL: issue a remark if a non-serialized method creates named objects. If
|
||||||
|
a thread blocks within the method for any reason, and another thread
|
||||||
|
enters the method, the method will fail because an attempt will be made to
|
||||||
|
create the same (named) object twice. In this case, issue a remark that
|
||||||
|
the method should be marked serialized. NOTE: may become a warning later.
|
||||||
|
ACPICA BZ 909.
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
18 April 2013. Summary of changes for version 20130418:
|
18 April 2013. Summary of changes for version 20130418:
|
||||||
|
|
||||||
This release is available at https://acpica.org/downloads
|
|
||||||
|
|
||||||
|
|
||||||
1) ACPICA kernel-resident subsystem:
|
1) ACPICA kernel-resident subsystem:
|
||||||
|
|
||||||
Fixed a possible buffer overrun during some rare but specific field unit
|
Fixed a possible buffer overrun during some rare but specific field unit
|
||||||
|
@ -628,10 +628,12 @@ AdCreateTableHeader (
|
|||||||
switch (Table->Revision)
|
switch (Table->Revision)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
AcpiOsPrintf (" **** Invalid Revision");
|
AcpiOsPrintf (" **** Invalid Revision");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
/* Revision of DSDT controls the ACPI integer width */
|
/* Revision of DSDT controls the ACPI integer width */
|
||||||
|
|
||||||
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
|
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
|
||||||
@ -641,6 +643,7 @@ AdCreateTableHeader (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
|
@ -375,14 +375,17 @@ AcpiDmDumpDescending (
|
|||||||
case AML_BYTE_OP:
|
case AML_BYTE_OP:
|
||||||
case AML_WORD_OP:
|
case AML_WORD_OP:
|
||||||
case AML_DWORD_OP:
|
case AML_DWORD_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer);
|
AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_QWORD_OP:
|
case AML_QWORD_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_INT_NAMEPATH_OP:
|
case AML_INT_NAMEPATH_OP:
|
||||||
|
|
||||||
if (Op->Common.Value.String)
|
if (Op->Common.Value.String)
|
||||||
{
|
{
|
||||||
AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
|
AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
|
||||||
@ -400,10 +403,12 @@ AcpiDmDumpDescending (
|
|||||||
case AML_METHOD_OP:
|
case AML_METHOD_OP:
|
||||||
case AML_DEVICE_OP:
|
case AML_DEVICE_OP:
|
||||||
case AML_INT_NAMEDFIELD_OP:
|
case AML_INT_NAMEDFIELD_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name));
|
AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,6 +455,7 @@ AcpiDmFindOrphanDescending (
|
|||||||
{
|
{
|
||||||
#ifdef ACPI_UNDER_DEVELOPMENT
|
#ifdef ACPI_UNDER_DEVELOPMENT
|
||||||
case AML_ADD_OP:
|
case AML_ADD_OP:
|
||||||
|
|
||||||
ChildOp = Op->Common.Value.Arg;
|
ChildOp = Op->Common.Value.Arg;
|
||||||
if ((ChildOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
|
if ((ChildOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
|
||||||
!ChildOp->Common.Node)
|
!ChildOp->Common.Node)
|
||||||
@ -556,6 +562,7 @@ AcpiDmFindOrphanDescending (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,6 +594,7 @@ AcpiDmAddExternalsToNamespace (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -798,7 +798,6 @@ AcpiDmGetResourceTag (
|
|||||||
case ACPI_RESOURCE_NAME_ADDRESS32:
|
case ACPI_RESOURCE_NAME_ADDRESS32:
|
||||||
case ACPI_RESOURCE_NAME_ADDRESS64:
|
case ACPI_RESOURCE_NAME_ADDRESS64:
|
||||||
case ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64:
|
case ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Subtype differentiation is the flags.
|
* Subtype differentiation is the flags.
|
||||||
* Kindof brute force, but just blindly search for an index match
|
* Kindof brute force, but just blindly search for an index match
|
||||||
@ -846,6 +845,7 @@ AcpiDmGetResourceTag (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,48 +697,71 @@ AcpiDmDumpTable (
|
|||||||
case ACPI_DMT_EINJINST:
|
case ACPI_DMT_EINJINST:
|
||||||
case ACPI_DMT_ERSTACT:
|
case ACPI_DMT_ERSTACT:
|
||||||
case ACPI_DMT_ERSTINST:
|
case ACPI_DMT_ERSTINST:
|
||||||
|
|
||||||
ByteLength = 1;
|
ByteLength = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT16:
|
case ACPI_DMT_UINT16:
|
||||||
case ACPI_DMT_DMAR:
|
case ACPI_DMT_DMAR:
|
||||||
case ACPI_DMT_HEST:
|
case ACPI_DMT_HEST:
|
||||||
|
|
||||||
ByteLength = 2;
|
ByteLength = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT24:
|
case ACPI_DMT_UINT24:
|
||||||
|
|
||||||
ByteLength = 3;
|
ByteLength = 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT32:
|
case ACPI_DMT_UINT32:
|
||||||
case ACPI_DMT_NAME4:
|
case ACPI_DMT_NAME4:
|
||||||
case ACPI_DMT_SIG:
|
case ACPI_DMT_SIG:
|
||||||
case ACPI_DMT_SLIC:
|
case ACPI_DMT_SLIC:
|
||||||
|
|
||||||
ByteLength = 4;
|
ByteLength = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT40:
|
case ACPI_DMT_UINT40:
|
||||||
|
|
||||||
ByteLength = 5;
|
ByteLength = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT48:
|
case ACPI_DMT_UINT48:
|
||||||
case ACPI_DMT_NAME6:
|
case ACPI_DMT_NAME6:
|
||||||
|
|
||||||
ByteLength = 6;
|
ByteLength = 6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT56:
|
case ACPI_DMT_UINT56:
|
||||||
case ACPI_DMT_BUF7:
|
case ACPI_DMT_BUF7:
|
||||||
|
|
||||||
ByteLength = 7;
|
ByteLength = 7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT64:
|
case ACPI_DMT_UINT64:
|
||||||
case ACPI_DMT_NAME8:
|
case ACPI_DMT_NAME8:
|
||||||
|
|
||||||
ByteLength = 8;
|
ByteLength = 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_BUF16:
|
case ACPI_DMT_BUF16:
|
||||||
case ACPI_DMT_UUID:
|
case ACPI_DMT_UUID:
|
||||||
|
|
||||||
ByteLength = 16;
|
ByteLength = 16;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_BUF128:
|
case ACPI_DMT_BUF128:
|
||||||
|
|
||||||
ByteLength = 128;
|
ByteLength = 128;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_STRING:
|
case ACPI_DMT_STRING:
|
||||||
|
|
||||||
ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
|
ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_GAS:
|
case ACPI_DMT_GAS:
|
||||||
|
|
||||||
if (!LastOutputBlankLine)
|
if (!LastOutputBlankLine)
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
@ -746,7 +769,9 @@ AcpiDmDumpTable (
|
|||||||
}
|
}
|
||||||
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
|
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_HESTNTFY:
|
case ACPI_DMT_HESTNTFY:
|
||||||
|
|
||||||
if (!LastOutputBlankLine)
|
if (!LastOutputBlankLine)
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
@ -754,7 +779,9 @@ AcpiDmDumpTable (
|
|||||||
}
|
}
|
||||||
ByteLength = sizeof (ACPI_HEST_NOTIFY);
|
ByteLength = sizeof (ACPI_HEST_NOTIFY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ByteLength = 0;
|
ByteLength = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -837,7 +864,6 @@ AcpiDmDumpTable (
|
|||||||
case ACPI_DMT_BUF7:
|
case ACPI_DMT_BUF7:
|
||||||
case ACPI_DMT_BUF16:
|
case ACPI_DMT_BUF16:
|
||||||
case ACPI_DMT_BUF128:
|
case ACPI_DMT_BUF128:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffer: Size depends on the opcode and was set above.
|
* Buffer: Size depends on the opcode and was set above.
|
||||||
* Each hex byte is separated with a space.
|
* Each hex byte is separated with a space.
|
||||||
@ -1146,16 +1172,19 @@ AcpiDmDumpTable (
|
|||||||
switch (Temp8)
|
switch (Temp8)
|
||||||
{
|
{
|
||||||
case ACPI_IVRS_TYPE_HARDWARE:
|
case ACPI_IVRS_TYPE_HARDWARE:
|
||||||
|
|
||||||
Name = AcpiDmIvrsSubnames[0];
|
Name = AcpiDmIvrsSubnames[0];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_IVRS_TYPE_MEMORY1:
|
case ACPI_IVRS_TYPE_MEMORY1:
|
||||||
case ACPI_IVRS_TYPE_MEMORY2:
|
case ACPI_IVRS_TYPE_MEMORY2:
|
||||||
case ACPI_IVRS_TYPE_MEMORY3:
|
case ACPI_IVRS_TYPE_MEMORY3:
|
||||||
|
|
||||||
Name = AcpiDmIvrsSubnames[1];
|
Name = AcpiDmIvrsSubnames[1];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Name = AcpiDmIvrsSubnames[2];
|
Name = AcpiDmIvrsSubnames[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1164,9 +1193,11 @@ AcpiDmDumpTable (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_EXIT:
|
case ACPI_DMT_EXIT:
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
|
"**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
|
||||||
return (AE_SUPPORT);
|
return (AE_SUPPORT);
|
||||||
|
@ -349,27 +349,33 @@ AcpiDmValidateFadtLength (
|
|||||||
switch (Revision)
|
switch (Revision)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
|
AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
ExpectedLength = ACPI_FADT_V1_SIZE;
|
ExpectedLength = ACPI_FADT_V1_SIZE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
ExpectedLength = ACPI_FADT_V2_SIZE;
|
ExpectedLength = ACPI_FADT_V2_SIZE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
ExpectedLength = ACPI_FADT_V3_SIZE;
|
ExpectedLength = ACPI_FADT_V3_SIZE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
|
|
||||||
ExpectedLength = ACPI_FADT_V5_SIZE;
|
ExpectedLength = ACPI_FADT_V5_SIZE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,10 +440,12 @@ AcpiDmDumpAsf (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_ASF_TYPE_INFO:
|
case ACPI_ASF_TYPE_INFO:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf0;
|
InfoTable = AcpiDmTableInfoAsf0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ALERT:
|
case ACPI_ASF_TYPE_ALERT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf1;
|
InfoTable = AcpiDmTableInfoAsf1;
|
||||||
DataInfoTable = AcpiDmTableInfoAsf1a;
|
DataInfoTable = AcpiDmTableInfoAsf1a;
|
||||||
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ALERT));
|
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ALERT));
|
||||||
@ -447,6 +455,7 @@ AcpiDmDumpAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_CONTROL:
|
case ACPI_ASF_TYPE_CONTROL:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf2;
|
InfoTable = AcpiDmTableInfoAsf2;
|
||||||
DataInfoTable = AcpiDmTableInfoAsf2a;
|
DataInfoTable = AcpiDmTableInfoAsf2a;
|
||||||
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_REMOTE));
|
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_REMOTE));
|
||||||
@ -456,10 +465,12 @@ AcpiDmDumpAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_BOOT:
|
case ACPI_ASF_TYPE_BOOT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf3;
|
InfoTable = AcpiDmTableInfoAsf3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ADDRESS:
|
case ACPI_ASF_TYPE_ADDRESS:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf4;
|
InfoTable = AcpiDmTableInfoAsf4;
|
||||||
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ADDRESS));
|
DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ADDRESS));
|
||||||
DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, SubTable)->Devices;
|
DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, SubTable)->Devices;
|
||||||
@ -467,6 +478,7 @@ AcpiDmDumpAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown ASF sub-table type 0x%X\n", SubTable->Header.Type);
|
AcpiOsPrintf ("\n**** Unknown ASF sub-table type 0x%X\n", SubTable->Header.Type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -523,6 +535,7 @@ AcpiDmDumpAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -863,22 +876,31 @@ AcpiDmDumpDmar (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_DMAR_TYPE_HARDWARE_UNIT:
|
case ACPI_DMAR_TYPE_HARDWARE_UNIT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar0;
|
InfoTable = AcpiDmTableInfoDmar0;
|
||||||
ScopeOffset = sizeof (ACPI_DMAR_HARDWARE_UNIT);
|
ScopeOffset = sizeof (ACPI_DMAR_HARDWARE_UNIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_TYPE_RESERVED_MEMORY:
|
case ACPI_DMAR_TYPE_RESERVED_MEMORY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar1;
|
InfoTable = AcpiDmTableInfoDmar1;
|
||||||
ScopeOffset = sizeof (ACPI_DMAR_RESERVED_MEMORY);
|
ScopeOffset = sizeof (ACPI_DMAR_RESERVED_MEMORY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_TYPE_ATSR:
|
case ACPI_DMAR_TYPE_ATSR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar2;
|
InfoTable = AcpiDmTableInfoDmar2;
|
||||||
ScopeOffset = sizeof (ACPI_DMAR_ATSR);
|
ScopeOffset = sizeof (ACPI_DMAR_ATSR);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_HARDWARE_AFFINITY:
|
case ACPI_DMAR_HARDWARE_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar3;
|
InfoTable = AcpiDmTableInfoDmar3;
|
||||||
ScopeOffset = sizeof (ACPI_DMAR_RHSA);
|
ScopeOffset = sizeof (ACPI_DMAR_RHSA);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown DMAR sub-table type 0x%X\n\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown DMAR sub-table type 0x%X\n\n", SubTable->Type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1086,12 +1108,17 @@ AcpiDmDumpFpdt (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_FPDT_TYPE_BOOT:
|
case ACPI_FPDT_TYPE_BOOT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoFpdt0;
|
InfoTable = AcpiDmTableInfoFpdt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_FPDT_TYPE_S3PERF:
|
case ACPI_FPDT_TYPE_S3PERF:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoFpdt1;
|
InfoTable = AcpiDmTableInfoFpdt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown FPDT sub-table type 0x%X\n\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown FPDT sub-table type 0x%X\n\n", SubTable->Type);
|
||||||
|
|
||||||
/* Attempt to continue */
|
/* Attempt to continue */
|
||||||
@ -1164,6 +1191,7 @@ AcpiDmDumpHest (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_HEST_TYPE_IA32_CHECK:
|
case ACPI_HEST_TYPE_IA32_CHECK:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest0;
|
InfoTable = AcpiDmTableInfoHest0;
|
||||||
SubTableLength = sizeof (ACPI_HEST_IA_MACHINE_CHECK);
|
SubTableLength = sizeof (ACPI_HEST_IA_MACHINE_CHECK);
|
||||||
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK,
|
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK,
|
||||||
@ -1171,6 +1199,7 @@ AcpiDmDumpHest (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest1;
|
InfoTable = AcpiDmTableInfoHest1;
|
||||||
SubTableLength = sizeof (ACPI_HEST_IA_CORRECTED);
|
SubTableLength = sizeof (ACPI_HEST_IA_CORRECTED);
|
||||||
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED,
|
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED,
|
||||||
@ -1178,31 +1207,37 @@ AcpiDmDumpHest (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_IA32_NMI:
|
case ACPI_HEST_TYPE_IA32_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest2;
|
InfoTable = AcpiDmTableInfoHest2;
|
||||||
SubTableLength = sizeof (ACPI_HEST_IA_NMI);
|
SubTableLength = sizeof (ACPI_HEST_IA_NMI);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_ROOT_PORT:
|
case ACPI_HEST_TYPE_AER_ROOT_PORT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest6;
|
InfoTable = AcpiDmTableInfoHest6;
|
||||||
SubTableLength = sizeof (ACPI_HEST_AER_ROOT);
|
SubTableLength = sizeof (ACPI_HEST_AER_ROOT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_ENDPOINT:
|
case ACPI_HEST_TYPE_AER_ENDPOINT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest7;
|
InfoTable = AcpiDmTableInfoHest7;
|
||||||
SubTableLength = sizeof (ACPI_HEST_AER);
|
SubTableLength = sizeof (ACPI_HEST_AER);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_BRIDGE:
|
case ACPI_HEST_TYPE_AER_BRIDGE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest8;
|
InfoTable = AcpiDmTableInfoHest8;
|
||||||
SubTableLength = sizeof (ACPI_HEST_AER_BRIDGE);
|
SubTableLength = sizeof (ACPI_HEST_AER_BRIDGE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_GENERIC_ERROR:
|
case ACPI_HEST_TYPE_GENERIC_ERROR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest9;
|
InfoTable = AcpiDmTableInfoHest9;
|
||||||
SubTableLength = sizeof (ACPI_HEST_GENERIC);
|
SubTableLength = sizeof (ACPI_HEST_GENERIC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Cannot continue on unknown type - no length */
|
/* Cannot continue on unknown type - no length */
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown HEST sub-table type 0x%X\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown HEST sub-table type 0x%X\n", SubTable->Type);
|
||||||
@ -1304,14 +1339,19 @@ AcpiDmDumpIvrs (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_IVRS_TYPE_HARDWARE:
|
case ACPI_IVRS_TYPE_HARDWARE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoIvrs0;
|
InfoTable = AcpiDmTableInfoIvrs0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_IVRS_TYPE_MEMORY1:
|
case ACPI_IVRS_TYPE_MEMORY1:
|
||||||
case ACPI_IVRS_TYPE_MEMORY2:
|
case ACPI_IVRS_TYPE_MEMORY2:
|
||||||
case ACPI_IVRS_TYPE_MEMORY3:
|
case ACPI_IVRS_TYPE_MEMORY3:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoIvrs1;
|
InfoTable = AcpiDmTableInfoIvrs1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown IVRS sub-table type 0x%X\n",
|
AcpiOsPrintf ("\n**** Unknown IVRS sub-table type 0x%X\n",
|
||||||
SubTable->Type);
|
SubTable->Type);
|
||||||
|
|
||||||
@ -1473,45 +1513,72 @@ AcpiDmDumpMadt (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC:
|
case ACPI_MADT_TYPE_LOCAL_APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt0;
|
InfoTable = AcpiDmTableInfoMadt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_IO_APIC:
|
case ACPI_MADT_TYPE_IO_APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt1;
|
InfoTable = AcpiDmTableInfoMadt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
|
case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt2;
|
InfoTable = AcpiDmTableInfoMadt2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_NMI_SOURCE:
|
case ACPI_MADT_TYPE_NMI_SOURCE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt3;
|
InfoTable = AcpiDmTableInfoMadt3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
|
case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt4;
|
InfoTable = AcpiDmTableInfoMadt4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
|
case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt5;
|
InfoTable = AcpiDmTableInfoMadt5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_IO_SAPIC:
|
case ACPI_MADT_TYPE_IO_SAPIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt6;
|
InfoTable = AcpiDmTableInfoMadt6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_SAPIC:
|
case ACPI_MADT_TYPE_LOCAL_SAPIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt7;
|
InfoTable = AcpiDmTableInfoMadt7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
|
case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt8;
|
InfoTable = AcpiDmTableInfoMadt8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_X2APIC:
|
case ACPI_MADT_TYPE_LOCAL_X2APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt9;
|
InfoTable = AcpiDmTableInfoMadt9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
|
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt10;
|
InfoTable = AcpiDmTableInfoMadt10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
|
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt11;
|
InfoTable = AcpiDmTableInfoMadt11;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
|
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt12;
|
InfoTable = AcpiDmTableInfoMadt12;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type);
|
||||||
|
|
||||||
/* Attempt to continue */
|
/* Attempt to continue */
|
||||||
@ -2152,12 +2219,17 @@ AcpiDmDumpS3pt (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_S3PT_TYPE_RESUME:
|
case ACPI_S3PT_TYPE_RESUME:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoS3pt0;
|
InfoTable = AcpiDmTableInfoS3pt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_S3PT_TYPE_SUSPEND:
|
case ACPI_S3PT_TYPE_SUSPEND:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoS3pt1;
|
InfoTable = AcpiDmTableInfoS3pt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown S3PT sub-table type 0x%X\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown S3PT sub-table type 0x%X\n", SubTable->Type);
|
||||||
|
|
||||||
/* Attempt to continue */
|
/* Attempt to continue */
|
||||||
@ -2229,12 +2301,17 @@ AcpiDmDumpSlic (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_SLIC_TYPE_PUBLIC_KEY:
|
case ACPI_SLIC_TYPE_PUBLIC_KEY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSlic0;
|
InfoTable = AcpiDmTableInfoSlic0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SLIC_TYPE_WINDOWS_MARKER:
|
case ACPI_SLIC_TYPE_WINDOWS_MARKER:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSlic1;
|
InfoTable = AcpiDmTableInfoSlic1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n**** Unknown SLIC sub-table type 0x%X\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown SLIC sub-table type 0x%X\n", SubTable->Type);
|
||||||
|
|
||||||
/* Attempt to continue */
|
/* Attempt to continue */
|
||||||
@ -2390,14 +2467,20 @@ AcpiDmDumpSrat (
|
|||||||
switch (SubTable->Type)
|
switch (SubTable->Type)
|
||||||
{
|
{
|
||||||
case ACPI_SRAT_TYPE_CPU_AFFINITY:
|
case ACPI_SRAT_TYPE_CPU_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat0;
|
InfoTable = AcpiDmTableInfoSrat0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
|
case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat1;
|
InfoTable = AcpiDmTableInfoSrat1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
|
case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat2;
|
InfoTable = AcpiDmTableInfoSrat2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
AcpiOsPrintf ("\n**** Unknown SRAT sub-table type 0x%X\n", SubTable->Type);
|
AcpiOsPrintf ("\n**** Unknown SRAT sub-table type 0x%X\n", SubTable->Type);
|
||||||
|
|
||||||
|
@ -41,6 +41,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGES.
|
* POSSIBILITY OF SUCH DAMAGES.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ACPICA getopt() implementation
|
||||||
|
*
|
||||||
|
* Option strings:
|
||||||
|
* "f" - Option has no arguments
|
||||||
|
* "f:" - Option requires an argument
|
||||||
|
* "f^" - Option has optional single-char sub-options
|
||||||
|
* "f|" - Option has required single-char sub-options
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -54,8 +63,58 @@
|
|||||||
|
|
||||||
int AcpiGbl_Opterr = 1;
|
int AcpiGbl_Opterr = 1;
|
||||||
int AcpiGbl_Optind = 1;
|
int AcpiGbl_Optind = 1;
|
||||||
|
int AcpiGbl_SubOptChar = 0;
|
||||||
char *AcpiGbl_Optarg;
|
char *AcpiGbl_Optarg;
|
||||||
|
|
||||||
|
static int CurrentCharPtr = 1;
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AcpiGetoptArgument
|
||||||
|
*
|
||||||
|
* PARAMETERS: argc, argv - from main
|
||||||
|
*
|
||||||
|
* RETURN: 0 if an argument was found, -1 otherwise. Sets AcpiGbl_Optarg
|
||||||
|
* to point to the next argument.
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Get the next argument. Used to obtain arguments for the
|
||||||
|
* two-character options after the original call to AcpiGetopt.
|
||||||
|
* Note: Either the argument starts at the next character after
|
||||||
|
* the option, or it is pointed to by the next argv entry.
|
||||||
|
* (After call to AcpiGetopt, we need to backup to the previous
|
||||||
|
* argv entry).
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
int
|
||||||
|
AcpiGetoptArgument (
|
||||||
|
int argc,
|
||||||
|
char **argv)
|
||||||
|
{
|
||||||
|
AcpiGbl_Optind--;
|
||||||
|
CurrentCharPtr++;
|
||||||
|
|
||||||
|
if (argv[AcpiGbl_Optind][(int) (CurrentCharPtr+1)] != '\0')
|
||||||
|
{
|
||||||
|
AcpiGbl_Optarg = &argv[AcpiGbl_Optind++][(int) (CurrentCharPtr+1)];
|
||||||
|
}
|
||||||
|
else if (++AcpiGbl_Optind >= argc)
|
||||||
|
{
|
||||||
|
ACPI_OPTION_ERROR ("Option requires an argument: -", 'v');
|
||||||
|
|
||||||
|
CurrentCharPtr = 1;
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AcpiGbl_Optarg = argv[AcpiGbl_Optind++];
|
||||||
|
}
|
||||||
|
|
||||||
|
CurrentCharPtr = 1;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@ -76,7 +135,6 @@ AcpiGetopt(
|
|||||||
char **argv,
|
char **argv,
|
||||||
char *opts)
|
char *opts)
|
||||||
{
|
{
|
||||||
static int CurrentCharPtr = 1;
|
|
||||||
int CurrentChar;
|
int CurrentChar;
|
||||||
char *OptsPtr;
|
char *OptsPtr;
|
||||||
|
|
||||||
@ -152,6 +210,7 @@ AcpiGetopt(
|
|||||||
AcpiGbl_Optarg = "^";
|
AcpiGbl_Optarg = "^";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AcpiGbl_SubOptChar = AcpiGbl_Optarg[0];
|
||||||
AcpiGbl_Optind++;
|
AcpiGbl_Optind++;
|
||||||
CurrentCharPtr = 1;
|
CurrentCharPtr = 1;
|
||||||
}
|
}
|
||||||
@ -172,6 +231,7 @@ AcpiGetopt(
|
|||||||
return ('?');
|
return ('?');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AcpiGbl_SubOptChar = AcpiGbl_Optarg[0];
|
||||||
AcpiGbl_Optind++;
|
AcpiGbl_Optind++;
|
||||||
CurrentCharPtr = 1;
|
CurrentCharPtr = 1;
|
||||||
}
|
}
|
||||||
|
@ -381,6 +381,7 @@ AnIsResultUsed (
|
|||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,6 +412,7 @@ AnIsResultUsed (
|
|||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Any other type of parent means that the result is used */
|
/* Any other type of parent means that the result is used */
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -83,15 +83,19 @@ AnMapArgTypeToBtype (
|
|||||||
/* Simple types */
|
/* Simple types */
|
||||||
|
|
||||||
case ARGI_ANYTYPE:
|
case ARGI_ANYTYPE:
|
||||||
|
|
||||||
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
||||||
|
|
||||||
case ARGI_PACKAGE:
|
case ARGI_PACKAGE:
|
||||||
|
|
||||||
return (ACPI_BTYPE_PACKAGE);
|
return (ACPI_BTYPE_PACKAGE);
|
||||||
|
|
||||||
case ARGI_EVENT:
|
case ARGI_EVENT:
|
||||||
|
|
||||||
return (ACPI_BTYPE_EVENT);
|
return (ACPI_BTYPE_EVENT);
|
||||||
|
|
||||||
case ARGI_MUTEX:
|
case ARGI_MUTEX:
|
||||||
|
|
||||||
return (ACPI_BTYPE_MUTEX);
|
return (ACPI_BTYPE_MUTEX);
|
||||||
|
|
||||||
case ARGI_DDBHANDLE:
|
case ARGI_DDBHANDLE:
|
||||||
@ -111,31 +115,36 @@ AnMapArgTypeToBtype (
|
|||||||
case ARGI_BUFFER:
|
case ARGI_BUFFER:
|
||||||
case ARGI_BUFFER_OR_STRING:
|
case ARGI_BUFFER_OR_STRING:
|
||||||
case ARGI_COMPUTEDATA:
|
case ARGI_COMPUTEDATA:
|
||||||
|
|
||||||
return (ACPI_BTYPE_COMPUTE_DATA);
|
return (ACPI_BTYPE_COMPUTE_DATA);
|
||||||
|
|
||||||
/* References */
|
/* References */
|
||||||
|
|
||||||
case ARGI_INTEGER_REF:
|
case ARGI_INTEGER_REF:
|
||||||
|
|
||||||
return (ACPI_BTYPE_INTEGER);
|
return (ACPI_BTYPE_INTEGER);
|
||||||
|
|
||||||
case ARGI_OBJECT_REF:
|
case ARGI_OBJECT_REF:
|
||||||
|
|
||||||
return (ACPI_BTYPE_ALL_OBJECTS);
|
return (ACPI_BTYPE_ALL_OBJECTS);
|
||||||
|
|
||||||
case ARGI_DEVICE_REF:
|
case ARGI_DEVICE_REF:
|
||||||
|
|
||||||
return (ACPI_BTYPE_DEVICE_OBJECTS);
|
return (ACPI_BTYPE_DEVICE_OBJECTS);
|
||||||
|
|
||||||
case ARGI_REFERENCE:
|
case ARGI_REFERENCE:
|
||||||
|
|
||||||
return (ACPI_BTYPE_REFERENCE);
|
return (ACPI_BTYPE_REFERENCE);
|
||||||
|
|
||||||
case ARGI_TARGETREF:
|
case ARGI_TARGETREF:
|
||||||
case ARGI_FIXED_TARGET:
|
case ARGI_FIXED_TARGET:
|
||||||
case ARGI_SIMPLE_TARGET:
|
case ARGI_SIMPLE_TARGET:
|
||||||
|
|
||||||
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
||||||
|
|
||||||
/* Complex types */
|
/* Complex types */
|
||||||
|
|
||||||
case ARGI_DATAOBJECT:
|
case ARGI_DATAOBJECT:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffer, string, package or reference to a Op -
|
* Buffer, string, package or reference to a Op -
|
||||||
* Used only by SizeOf operator
|
* Used only by SizeOf operator
|
||||||
@ -150,6 +159,7 @@ AnMapArgTypeToBtype (
|
|||||||
return (ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER | ACPI_BTYPE_PACKAGE);
|
return (ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER | ACPI_BTYPE_PACKAGE);
|
||||||
|
|
||||||
case ARGI_REF_OR_STRING:
|
case ARGI_REF_OR_STRING:
|
||||||
|
|
||||||
return (ACPI_BTYPE_STRING | ACPI_BTYPE_REFERENCE);
|
return (ACPI_BTYPE_STRING | ACPI_BTYPE_REFERENCE);
|
||||||
|
|
||||||
case ARGI_REGION_OR_BUFFER:
|
case ARGI_REGION_OR_BUFFER:
|
||||||
@ -159,10 +169,12 @@ AnMapArgTypeToBtype (
|
|||||||
return (ACPI_BTYPE_REGION | ACPI_BTYPE_BUFFER | ACPI_BTYPE_FIELD_UNIT);
|
return (ACPI_BTYPE_REGION | ACPI_BTYPE_BUFFER | ACPI_BTYPE_FIELD_UNIT);
|
||||||
|
|
||||||
case ARGI_DATAREFOBJ:
|
case ARGI_DATAREFOBJ:
|
||||||
|
|
||||||
return (ACPI_BTYPE_INTEGER |ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER |
|
return (ACPI_BTYPE_INTEGER |ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER |
|
||||||
ACPI_BTYPE_PACKAGE | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE);
|
ACPI_BTYPE_PACKAGE | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,22 +219,28 @@ AnMapEtypeToBtype (
|
|||||||
switch (Etype)
|
switch (Etype)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_DDB_HANDLE);
|
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_DDB_HANDLE);
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
return (ACPI_BTYPE_COMPUTE_DATA);
|
return (ACPI_BTYPE_COMPUTE_DATA);
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
return (ACPI_BTYPE_PACKAGE);
|
return (ACPI_BTYPE_PACKAGE);
|
||||||
|
|
||||||
case ACPI_TYPE_FIELD_UNIT:
|
case ACPI_TYPE_FIELD_UNIT:
|
||||||
|
|
||||||
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_FIELD_UNIT);
|
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_FIELD_UNIT);
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER_FIELD:
|
case ACPI_TYPE_BUFFER_FIELD:
|
||||||
|
|
||||||
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_BUFFER_FIELD);
|
return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_BUFFER_FIELD);
|
||||||
|
|
||||||
case ACPI_TYPE_DDB_HANDLE:
|
case ACPI_TYPE_DDB_HANDLE:
|
||||||
|
|
||||||
return (ACPI_BTYPE_INTEGER | ACPI_BTYPE_DDB_HANDLE);
|
return (ACPI_BTYPE_INTEGER | ACPI_BTYPE_DDB_HANDLE);
|
||||||
|
|
||||||
case ACPI_BTYPE_DEBUG_OBJECT:
|
case ACPI_BTYPE_DEBUG_OBJECT:
|
||||||
@ -232,6 +250,7 @@ AnMapEtypeToBtype (
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return (1 << (Etype - 1));
|
return (1 << (Etype - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,6 +278,7 @@ AnMapEtypeToBtype (
|
|||||||
return (ACPI_BTYPE_REFERENCE);
|
return (ACPI_BTYPE_REFERENCE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
printf ("Unhandled encoded type: %X\n", Etype);
|
printf ("Unhandled encoded type: %X\n", Etype);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -438,51 +458,67 @@ AnMapObjTypeToBtype (
|
|||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_OBJECTTYPE_BFF: /* "BuffFieldObj" */
|
case PARSEOP_OBJECTTYPE_BFF: /* "BuffFieldObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_BUFFER_FIELD);
|
return (ACPI_BTYPE_BUFFER_FIELD);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_BUF: /* "BuffObj" */
|
case PARSEOP_OBJECTTYPE_BUF: /* "BuffObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_BUFFER);
|
return (ACPI_BTYPE_BUFFER);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_DDB: /* "DDBHandleObj" */
|
case PARSEOP_OBJECTTYPE_DDB: /* "DDBHandleObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_DDB_HANDLE);
|
return (ACPI_BTYPE_DDB_HANDLE);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_DEV: /* "DeviceObj" */
|
case PARSEOP_OBJECTTYPE_DEV: /* "DeviceObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_DEVICE);
|
return (ACPI_BTYPE_DEVICE);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_EVT: /* "EventObj" */
|
case PARSEOP_OBJECTTYPE_EVT: /* "EventObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_EVENT);
|
return (ACPI_BTYPE_EVENT);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_FLD: /* "FieldUnitObj" */
|
case PARSEOP_OBJECTTYPE_FLD: /* "FieldUnitObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_FIELD_UNIT);
|
return (ACPI_BTYPE_FIELD_UNIT);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_INT: /* "IntObj" */
|
case PARSEOP_OBJECTTYPE_INT: /* "IntObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_INTEGER);
|
return (ACPI_BTYPE_INTEGER);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_MTH: /* "MethodObj" */
|
case PARSEOP_OBJECTTYPE_MTH: /* "MethodObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_METHOD);
|
return (ACPI_BTYPE_METHOD);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_MTX: /* "MutexObj" */
|
case PARSEOP_OBJECTTYPE_MTX: /* "MutexObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_MUTEX);
|
return (ACPI_BTYPE_MUTEX);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_OPR: /* "OpRegionObj" */
|
case PARSEOP_OBJECTTYPE_OPR: /* "OpRegionObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_REGION);
|
return (ACPI_BTYPE_REGION);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_PKG: /* "PkgObj" */
|
case PARSEOP_OBJECTTYPE_PKG: /* "PkgObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_PACKAGE);
|
return (ACPI_BTYPE_PACKAGE);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_POW: /* "PowerResObj" */
|
case PARSEOP_OBJECTTYPE_POW: /* "PowerResObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_POWER);
|
return (ACPI_BTYPE_POWER);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_STR: /* "StrObj" */
|
case PARSEOP_OBJECTTYPE_STR: /* "StrObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_STRING);
|
return (ACPI_BTYPE_STRING);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_THZ: /* "ThermalZoneObj" */
|
case PARSEOP_OBJECTTYPE_THZ: /* "ThermalZoneObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_THERMAL);
|
return (ACPI_BTYPE_THERMAL);
|
||||||
|
|
||||||
case PARSEOP_OBJECTTYPE_UNK: /* "UnknownObj" */
|
case PARSEOP_OBJECTTYPE_UNK: /* "UnknownObj" */
|
||||||
|
|
||||||
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
return (ACPI_BTYPE_OBJECTS_AND_REFS);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,7 @@ CgWriteAmlOpcode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Aml.Opcode = Op->Asl.AmlOpcode;
|
Aml.Opcode = Op->Asl.AmlOpcode;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -382,7 +383,9 @@ CgWriteAmlOpcode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All data opcodes must appear above */
|
/* All data opcodes must appear above */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -560,7 +563,9 @@ CgWriteNode (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Internal data opcodes must all appear above */
|
/* Internal data opcodes must all appear above */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,9 @@ AslCompilerSignon (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other output types supported */
|
/* No other output types supported */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +209,9 @@ AslCompilerFileHeader (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other output types supported */
|
/* No other output types supported */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,11 +230,14 @@ AslCompilerFileHeader (
|
|||||||
case ASL_FILE_C_SOURCE_OUTPUT:
|
case ASL_FILE_C_SOURCE_OUTPUT:
|
||||||
case ASL_FILE_C_OFFSET_OUTPUT:
|
case ASL_FILE_C_OFFSET_OUTPUT:
|
||||||
case ASL_FILE_C_INCLUDE_OUTPUT:
|
case ASL_FILE_C_INCLUDE_OUTPUT:
|
||||||
|
|
||||||
FlPrintFile (FileId, " */\n");
|
FlPrintFile (FileId, " */\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other output types */
|
/* Nothing to do for other output types */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,6 +291,15 @@ AslError (
|
|||||||
ACPI_PARSE_OBJECT *Op,
|
ACPI_PARSE_OBJECT *Op,
|
||||||
char *ExtraMessage);
|
char *ExtraMessage);
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AslDisableException (
|
||||||
|
char *MessageIdString);
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
AslIsExceptionDisabled (
|
||||||
|
UINT8 Level,
|
||||||
|
UINT8 MessageId);
|
||||||
|
|
||||||
void
|
void
|
||||||
AslCoreSubsystemError (
|
AslCoreSubsystemError (
|
||||||
ACPI_PARSE_OBJECT *Op,
|
ACPI_PARSE_OBJECT *Op,
|
||||||
@ -791,6 +800,17 @@ void
|
|||||||
LkFindUnreferencedObjects (
|
LkFindUnreferencedObjects (
|
||||||
void);
|
void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* aslmain - startup
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
Usage (
|
||||||
|
void);
|
||||||
|
|
||||||
|
void
|
||||||
|
AslFilenameHelp (
|
||||||
|
void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* aslnamesp - namespace output file generation
|
* aslnamesp - namespace output file generation
|
||||||
@ -803,6 +823,13 @@ void
|
|||||||
NsSetupNamespaceListing (
|
NsSetupNamespaceListing (
|
||||||
void *Handle);
|
void *Handle);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* asloptions - command line processing
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
AslCommandLine (
|
||||||
|
int argc,
|
||||||
|
char **argv);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* aslxref - namespace cross reference
|
* aslxref - namespace cross reference
|
||||||
|
@ -201,6 +201,7 @@ AePrintException (
|
|||||||
switch (Enode->Level)
|
switch (Enode->Level)
|
||||||
{
|
{
|
||||||
case ASL_REMARK:
|
case ASL_REMARK:
|
||||||
|
|
||||||
if (!Gbl_DisplayRemarks)
|
if (!Gbl_DisplayRemarks)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -208,6 +209,7 @@ AePrintException (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ASL_OPTIMIZATION:
|
case ASL_OPTIMIZATION:
|
||||||
|
|
||||||
if (!Gbl_DisplayOptimizations)
|
if (!Gbl_DisplayOptimizations)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -215,6 +217,7 @@ AePrintException (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -674,6 +677,113 @@ AslCommonError (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslDisableException
|
||||||
|
*
|
||||||
|
* PARAMETERS: MessageIdString - ID to be disabled
|
||||||
|
*
|
||||||
|
* RETURN: Status
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Enter a message ID into the global disabled messages table
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AslDisableException (
|
||||||
|
char *MessageIdString)
|
||||||
|
{
|
||||||
|
UINT32 MessageId;
|
||||||
|
|
||||||
|
|
||||||
|
/* Convert argument to an integer and validate it */
|
||||||
|
|
||||||
|
MessageId = (UINT32) strtoul (MessageIdString, NULL, 0);
|
||||||
|
|
||||||
|
if ((MessageId < 2000) || (MessageId > 5999))
|
||||||
|
{
|
||||||
|
printf ("\"%s\" is not a valid warning/remark ID\n",
|
||||||
|
MessageIdString);
|
||||||
|
return (AE_BAD_PARAMETER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Insert value into the global disabled message array */
|
||||||
|
|
||||||
|
if (Gbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
|
||||||
|
{
|
||||||
|
printf ("Too many messages have been disabled (max %u)\n",
|
||||||
|
ASL_MAX_DISABLED_MESSAGES);
|
||||||
|
return (AE_LIMIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
Gbl_DisabledMessages[Gbl_DisabledMessagesIndex] = MessageId;
|
||||||
|
Gbl_DisabledMessagesIndex++;
|
||||||
|
return (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslIsExceptionDisabled
|
||||||
|
*
|
||||||
|
* PARAMETERS: Level - Seriousness (Warning/error, etc.)
|
||||||
|
* MessageId - Index into global message buffer
|
||||||
|
*
|
||||||
|
* RETURN: TRUE if exception/message should be ignored
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Check if the user has specified options such that this
|
||||||
|
* exception should be ignored
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
AslIsExceptionDisabled (
|
||||||
|
UINT8 Level,
|
||||||
|
UINT8 MessageId)
|
||||||
|
{
|
||||||
|
UINT32 EncodedMessageId;
|
||||||
|
UINT32 i;
|
||||||
|
|
||||||
|
|
||||||
|
switch (Level)
|
||||||
|
{
|
||||||
|
case ASL_WARNING2:
|
||||||
|
case ASL_WARNING3:
|
||||||
|
|
||||||
|
/* Check for global disable via -w1/-w2/-w3 options */
|
||||||
|
|
||||||
|
if (Level > Gbl_WarningLevel)
|
||||||
|
{
|
||||||
|
return (TRUE);
|
||||||
|
}
|
||||||
|
/* Fall through */
|
||||||
|
|
||||||
|
case ASL_WARNING:
|
||||||
|
case ASL_REMARK:
|
||||||
|
/*
|
||||||
|
* Ignore this warning/remark if it has been disabled by
|
||||||
|
* the user (-vw option)
|
||||||
|
*/
|
||||||
|
EncodedMessageId = MessageId + ((Level + 1) * 1000);
|
||||||
|
for (i = 0; i < Gbl_DisabledMessagesIndex; i++)
|
||||||
|
{
|
||||||
|
/* Simple implementation via fixed array */
|
||||||
|
|
||||||
|
if (EncodedMessageId == Gbl_DisabledMessages[i])
|
||||||
|
{
|
||||||
|
return (TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: AslError
|
* FUNCTION: AslError
|
||||||
@ -698,19 +808,12 @@ AslError (
|
|||||||
char *ExtraMessage)
|
char *ExtraMessage)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (Level)
|
/* Check if user wants to ignore this exception */
|
||||||
{
|
|
||||||
case ASL_WARNING2:
|
if (AslIsExceptionDisabled (Level, MessageId))
|
||||||
case ASL_WARNING3:
|
|
||||||
if (Gbl_WarningLevel < Level)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Op)
|
if (Op)
|
||||||
{
|
{
|
||||||
|
@ -441,7 +441,6 @@ OpcAmlConstantWalk (
|
|||||||
ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
|
Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
|
||||||
@ -455,7 +454,6 @@ OpcAmlConstantWalk (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
|
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
|
||||||
@ -493,8 +491,8 @@ OpcAmlConstantWalk (
|
|||||||
ObjDesc->Buffer.Length);
|
ObjDesc->Buffer.Length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
printf ("Unsupported return type: %s\n",
|
printf ("Unsupported return type: %s\n",
|
||||||
AcpiUtGetObjectTypeName (ObjDesc));
|
AcpiUtGetObjectTypeName (ObjDesc));
|
||||||
break;
|
break;
|
||||||
@ -536,27 +534,32 @@ OpcUpdateIntegerNode (
|
|||||||
switch (Op->Asl.AmlLength)
|
switch (Op->Asl.AmlLength)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
TrUpdateNode (PARSEOP_BYTECONST, Op);
|
TrUpdateNode (PARSEOP_BYTECONST, Op);
|
||||||
Op->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
|
Op->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
TrUpdateNode (PARSEOP_WORDCONST, Op);
|
TrUpdateNode (PARSEOP_WORDCONST, Op);
|
||||||
Op->Asl.AmlOpcode = AML_RAW_DATA_WORD;
|
Op->Asl.AmlOpcode = AML_RAW_DATA_WORD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
TrUpdateNode (PARSEOP_DWORDCONST, Op);
|
TrUpdateNode (PARSEOP_DWORDCONST, Op);
|
||||||
Op->Asl.AmlOpcode = AML_RAW_DATA_DWORD;
|
Op->Asl.AmlOpcode = AML_RAW_DATA_DWORD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
|
|
||||||
TrUpdateNode (PARSEOP_QWORDCONST, Op);
|
TrUpdateNode (PARSEOP_QWORDCONST, Op);
|
||||||
Op->Asl.AmlOpcode = AML_RAW_DATA_QWORD;
|
Op->Asl.AmlOpcode = AML_RAW_DATA_QWORD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
OpcSetOptimalIntegerSize (Op);
|
OpcSetOptimalIntegerSize (Op);
|
||||||
TrUpdateNode (PARSEOP_INTEGER, Op);
|
TrUpdateNode (PARSEOP_INTEGER, Op);
|
||||||
break;
|
break;
|
||||||
|
@ -110,6 +110,7 @@ extern char *AslCompilertext;
|
|||||||
|
|
||||||
#define ASL_DEFAULT_LINE_BUFFER_SIZE (1024 * 32) /* 32K */
|
#define ASL_DEFAULT_LINE_BUFFER_SIZE (1024 * 32) /* 32K */
|
||||||
#define ASL_MSG_BUFFER_SIZE 4096
|
#define ASL_MSG_BUFFER_SIZE 4096
|
||||||
|
#define ASL_MAX_DISABLED_MESSAGES 32
|
||||||
#define HEX_TABLE_LINE_SIZE 8
|
#define HEX_TABLE_LINE_SIZE 8
|
||||||
#define HEX_LISTING_LINE_SIZE 8
|
#define HEX_LISTING_LINE_SIZE 8
|
||||||
|
|
||||||
@ -224,6 +225,7 @@ ASL_EXTERN char *Gbl_TemplateSignature;
|
|||||||
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentHexColumn, 0);
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentHexColumn, 0);
|
||||||
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
|
||||||
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentLine, 0);
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentLine, 0);
|
||||||
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_DisabledMessagesIndex, 0);
|
||||||
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_HexBytesWereWritten, FALSE);
|
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_HexBytesWereWritten, FALSE);
|
||||||
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_NumNamespaceObjects, 0);
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_NumNamespaceObjects, 0);
|
||||||
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_ReservedMethods, 0);
|
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_ReservedMethods, 0);
|
||||||
@ -250,6 +252,7 @@ ASL_EXTERN UINT8 Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE];
|
|||||||
ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE];
|
ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE];
|
||||||
ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE];
|
ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE];
|
||||||
ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE];
|
ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE];
|
||||||
|
ASL_EXTERN UINT32 Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES];
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ASLGLOBAL_H */
|
#endif /* __ASLGLOBAL_H */
|
||||||
|
@ -107,7 +107,9 @@ HxDoHexOutput (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other output types supported */
|
/* No other output types supported */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,7 @@ CgGenerateAmlOpcodeLength (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All data opcodes must be above */
|
/* All data opcodes must be above */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -326,6 +327,7 @@ CgGenerateAmlLengths (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +157,8 @@ LsGenerateListing (
|
|||||||
|
|
||||||
if (FileId == ASL_FILE_C_OFFSET_OUTPUT)
|
if (FileId == ASL_FILE_C_OFFSET_OUTPUT)
|
||||||
{
|
{
|
||||||
|
Gbl_CurrentAmlOffset = 0;
|
||||||
|
|
||||||
/* Offset table file has a special header and footer */
|
/* Offset table file has a special header and footer */
|
||||||
|
|
||||||
LsDoOffsetTableHeader (FileId);
|
LsDoOffsetTableHeader (FileId);
|
||||||
@ -265,9 +267,10 @@ LsTreeWriteWalk (
|
|||||||
|
|
||||||
DbgPrint (ASL_TREE_OUTPUT,
|
DbgPrint (ASL_TREE_OUTPUT,
|
||||||
"%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level);
|
"%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level);
|
||||||
|
|
||||||
UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
|
UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
|
||||||
|
|
||||||
DbgPrint (ASL_TREE_OUTPUT, "\n");
|
DbgPrint (ASL_TREE_OUTPUT, " (%.4X)\n", Op->Asl.ParseOpcode);
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,16 +322,20 @@ LsWriteNodeToListing (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
switch (OpClass)
|
switch (OpClass)
|
||||||
{
|
{
|
||||||
case AML_CLASS_NAMED_OBJECT:
|
case AML_CLASS_NAMED_OBJECT:
|
||||||
|
|
||||||
switch (Op->Asl.AmlOpcode)
|
switch (Op->Asl.AmlOpcode)
|
||||||
{
|
{
|
||||||
case AML_SCOPE_OP:
|
case AML_SCOPE_OP:
|
||||||
case AML_ALIAS_OP:
|
case AML_ALIAS_OP:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if (Op->Asl.ExternalName)
|
if (Op->Asl.ExternalName)
|
||||||
{
|
{
|
||||||
LsFlushListingBuffer (FileId);
|
LsFlushListingBuffer (FileId);
|
||||||
@ -339,7 +346,9 @@ LsWriteNodeToListing (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Don't care about other objects */
|
/* Don't care about other objects */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -427,7 +436,9 @@ LsWriteNodeToListing (
|
|||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All other opcodes have an AML opcode */
|
/* All other opcodes have an AML opcode */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,7 +454,6 @@ LsWriteNodeToListing (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_NAMED_OBJECT:
|
case AML_CLASS_NAMED_OBJECT:
|
||||||
|
|
||||||
switch (Op->Asl.AmlOpcode)
|
switch (Op->Asl.AmlOpcode)
|
||||||
@ -451,7 +461,6 @@ LsWriteNodeToListing (
|
|||||||
case AML_FIELD_OP:
|
case AML_FIELD_OP:
|
||||||
case AML_INDEX_FIELD_OP:
|
case AML_INDEX_FIELD_OP:
|
||||||
case AML_BANK_FIELD_OP:
|
case AML_BANK_FIELD_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For fields, we want to dump all the AML after the
|
* For fields, we want to dump all the AML after the
|
||||||
* entire definition
|
* entire definition
|
||||||
@ -479,6 +488,7 @@ LsWriteNodeToListing (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.LogicalLineNumber,
|
LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.LogicalLineNumber,
|
||||||
FileId);
|
FileId);
|
||||||
break;
|
break;
|
||||||
@ -503,7 +513,6 @@ LsWriteNodeToListing (
|
|||||||
case ASL_FILE_C_SOURCE_OUTPUT:
|
case ASL_FILE_C_SOURCE_OUTPUT:
|
||||||
case ASL_FILE_ASM_INCLUDE_OUTPUT:
|
case ASL_FILE_ASM_INCLUDE_OUTPUT:
|
||||||
case ASL_FILE_C_INCLUDE_OUTPUT:
|
case ASL_FILE_C_INCLUDE_OUTPUT:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For named objects, we will create a valid symbol so that the
|
* For named objects, we will create a valid symbol so that the
|
||||||
* AML code can be referenced from C or ASM
|
* AML code can be referenced from C or ASM
|
||||||
@ -558,7 +567,9 @@ LsWriteNodeToListing (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for listing file */
|
/* Nothing to do for listing file */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,6 +590,7 @@ LsWriteNodeToListing (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CLASS_UNKNOWN:
|
case AML_CLASS_UNKNOWN:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,9 @@ LsWriteListingHexBytes (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other types supported */
|
/* No other types supported */
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -617,7 +619,9 @@ LsFlushListingBuffer (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other types supported */
|
/* No other types supported */
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,9 @@ LdLoadFieldElements (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other opcodes should arrive here */
|
/* No other opcodes should arrive here */
|
||||||
|
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,6 +376,7 @@ LdNamespace1Begin (
|
|||||||
default:
|
default:
|
||||||
|
|
||||||
/* All other opcodes go below */
|
/* All other opcodes go below */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +425,6 @@ LdNamespace1Begin (
|
|||||||
|
|
||||||
|
|
||||||
case PARSEOP_EXTERNAL:
|
case PARSEOP_EXTERNAL:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "External" simply enters a name and type into the namespace.
|
* "External" simply enters a name and type into the namespace.
|
||||||
* We must be careful to not open a new scope, however, no matter
|
* We must be careful to not open a new scope, however, no matter
|
||||||
@ -466,7 +468,6 @@ LdNamespace1Begin (
|
|||||||
|
|
||||||
|
|
||||||
case PARSEOP_SCOPE:
|
case PARSEOP_SCOPE:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The name referenced by Scope(Name) must already exist at this point.
|
* The name referenced by Scope(Name) must already exist at this point.
|
||||||
* In other words, forward references for Scope() are not supported.
|
* In other words, forward references for Scope() are not supported.
|
||||||
@ -521,7 +522,6 @@ LdNamespace1Begin (
|
|||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These types we will allow, but we will change the type.
|
* These types we will allow, but we will change the type.
|
||||||
* This enables some existing code of the form:
|
* This enables some existing code of the form:
|
||||||
|
@ -144,9 +144,11 @@ LkIsObjectUsed (
|
|||||||
case ACPI_TYPE_PROCESSOR:
|
case ACPI_TYPE_PROCESSOR:
|
||||||
case ACPI_TYPE_POWER:
|
case ACPI_TYPE_POWER:
|
||||||
case ACPI_TYPE_LOCAL_RESOURCE:
|
case ACPI_TYPE_LOCAL_RESOURCE:
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGES.
|
* POSSIBILITY OF SUCH DAMAGES.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define _DECLARE_GLOBALS
|
#define _DECLARE_GLOBALS
|
||||||
|
|
||||||
#include <contrib/dev/acpica/compiler/aslcompiler.h>
|
#include <contrib/dev/acpica/compiler/aslcompiler.h>
|
||||||
@ -49,27 +48,12 @@
|
|||||||
#include <contrib/dev/acpica/include/acdisasm.h>
|
#include <contrib/dev/acpica/include/acdisasm.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
#include <crtdbg.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _COMPONENT ACPI_COMPILER
|
#define _COMPONENT ACPI_COMPILER
|
||||||
ACPI_MODULE_NAME ("aslmain")
|
ACPI_MODULE_NAME ("aslmain")
|
||||||
|
|
||||||
|
|
||||||
/* Local prototypes */
|
/* Local prototypes */
|
||||||
|
|
||||||
static void
|
|
||||||
Options (
|
|
||||||
void);
|
|
||||||
|
|
||||||
static void
|
|
||||||
FilenameHelp (
|
|
||||||
void);
|
|
||||||
|
|
||||||
static void
|
|
||||||
Usage (
|
|
||||||
void);
|
|
||||||
|
|
||||||
static void ACPI_SYSTEM_XFACE
|
static void ACPI_SYSTEM_XFACE
|
||||||
AslSignalHandler (
|
AslSignalHandler (
|
||||||
int Sig);
|
int Sig);
|
||||||
@ -78,34 +62,10 @@ static void
|
|||||||
AslInitialize (
|
AslInitialize (
|
||||||
void);
|
void);
|
||||||
|
|
||||||
static int
|
|
||||||
AslCommandLine (
|
|
||||||
int argc,
|
|
||||||
char **argv);
|
|
||||||
|
|
||||||
static int
|
|
||||||
AslDoOptions (
|
|
||||||
int argc,
|
|
||||||
char **argv,
|
|
||||||
BOOLEAN IsResponseFile);
|
|
||||||
|
|
||||||
static void
|
|
||||||
AslMergeOptionTokens (
|
|
||||||
char *InBuffer,
|
|
||||||
char *OutBuffer);
|
|
||||||
|
|
||||||
static int
|
|
||||||
AslDoResponseFile (
|
|
||||||
char *Filename);
|
|
||||||
|
|
||||||
|
|
||||||
#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"
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: Options
|
* FUNCTION: Usage
|
||||||
*
|
*
|
||||||
* PARAMETERS: None
|
* PARAMETERS: None
|
||||||
*
|
*
|
||||||
@ -116,10 +76,12 @@ AslDoResponseFile (
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
static void
|
void
|
||||||
Options (
|
Usage (
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
|
printf ("%s\n\n", ASL_COMPLIANCE);
|
||||||
|
ACPI_USAGE_HEADER ("iasl [Options] [Files]");
|
||||||
|
|
||||||
printf ("\nGlobal:\n");
|
printf ("\nGlobal:\n");
|
||||||
ACPI_OPTION ("-@ <file>", "Specify command file");
|
ACPI_OPTION ("-@ <file>", "Specify command file");
|
||||||
@ -140,6 +102,7 @@ Options (
|
|||||||
ACPI_OPTION ("-vo", "Enable optimization comments");
|
ACPI_OPTION ("-vo", "Enable optimization comments");
|
||||||
ACPI_OPTION ("-vr", "Disable remarks");
|
ACPI_OPTION ("-vr", "Disable remarks");
|
||||||
ACPI_OPTION ("-vs", "Disable signon");
|
ACPI_OPTION ("-vs", "Disable signon");
|
||||||
|
ACPI_OPTION ("-vw <messageid>", "Disable specific warning or remark");
|
||||||
ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level");
|
ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level");
|
||||||
ACPI_OPTION ("-we", "Report warnings as errors");
|
ACPI_OPTION ("-we", "Report warnings as errors");
|
||||||
|
|
||||||
@ -209,8 +172,8 @@ Options (
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
static void
|
void
|
||||||
FilenameHelp (
|
AslFilenameHelp (
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -225,29 +188,6 @@ FilenameHelp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: Usage
|
|
||||||
*
|
|
||||||
* PARAMETERS: None
|
|
||||||
*
|
|
||||||
* RETURN: None
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Display usage and option message
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
Usage (
|
|
||||||
void)
|
|
||||||
{
|
|
||||||
|
|
||||||
printf ("%s\n\n", ASL_COMPLIANCE);
|
|
||||||
ACPI_USAGE_HEADER ("iasl [Options] [Files]");
|
|
||||||
Options ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: AslSignalHandler
|
* FUNCTION: AslSignalHandler
|
||||||
@ -310,11 +250,6 @@ AslInitialize (
|
|||||||
UINT32 i;
|
UINT32 i;
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
_CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | _CrtSetDbgFlag(0));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < ASL_NUM_FILES; i++)
|
for (i = 0; i < ASL_NUM_FILES; i++)
|
||||||
{
|
{
|
||||||
Gbl_Files[i].Handle = NULL;
|
Gbl_Files[i].Handle = NULL;
|
||||||
@ -326,675 +261,6 @@ AslInitialize (
|
|||||||
|
|
||||||
Gbl_Files[ASL_FILE_STDERR].Handle = stderr;
|
Gbl_Files[ASL_FILE_STDERR].Handle = stderr;
|
||||||
Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
|
Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
|
||||||
|
|
||||||
/* Allocate the line buffer(s) */
|
|
||||||
|
|
||||||
Gbl_LineBufferSize /= 2;
|
|
||||||
UtExpandLineBuffers ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AslMergeOptionTokens
|
|
||||||
*
|
|
||||||
* PARAMETERS: InBuffer - Input containing an option string
|
|
||||||
* OutBuffer - Merged output buffer
|
|
||||||
*
|
|
||||||
* RETURN: None
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Remove all whitespace from an option string.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
AslMergeOptionTokens (
|
|
||||||
char *InBuffer,
|
|
||||||
char *OutBuffer)
|
|
||||||
{
|
|
||||||
char *Token;
|
|
||||||
|
|
||||||
|
|
||||||
*OutBuffer = 0;
|
|
||||||
|
|
||||||
Token = strtok (InBuffer, ASL_TOKEN_SEPARATORS);
|
|
||||||
while (Token)
|
|
||||||
{
|
|
||||||
strcat (OutBuffer, Token);
|
|
||||||
Token = strtok (NULL, ASL_TOKEN_SEPARATORS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AslDoResponseFile
|
|
||||||
*
|
|
||||||
* PARAMETERS: Filename - Name of the response file
|
|
||||||
*
|
|
||||||
* RETURN: Status
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Open a response file and process all options within.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static int
|
|
||||||
AslDoResponseFile (
|
|
||||||
char *Filename)
|
|
||||||
{
|
|
||||||
char *argv = StringBuffer2;
|
|
||||||
FILE *ResponseFile;
|
|
||||||
int OptStatus = 0;
|
|
||||||
int Opterr;
|
|
||||||
int Optind;
|
|
||||||
|
|
||||||
|
|
||||||
ResponseFile = fopen (Filename, "r");
|
|
||||||
if (!ResponseFile)
|
|
||||||
{
|
|
||||||
printf ("Could not open command file %s, %s\n",
|
|
||||||
Filename, strerror (errno));
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Must save the current GetOpt globals */
|
|
||||||
|
|
||||||
Opterr = AcpiGbl_Opterr;
|
|
||||||
Optind = AcpiGbl_Optind;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Process all lines in the response file. There must be one complete
|
|
||||||
* option per line
|
|
||||||
*/
|
|
||||||
while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile))
|
|
||||||
{
|
|
||||||
/* Compress all tokens, allowing us to use a single argv entry */
|
|
||||||
|
|
||||||
AslMergeOptionTokens (StringBuffer, StringBuffer2);
|
|
||||||
|
|
||||||
/* Process the option */
|
|
||||||
|
|
||||||
AcpiGbl_Opterr = 0;
|
|
||||||
AcpiGbl_Optind = 0;
|
|
||||||
|
|
||||||
OptStatus = AslDoOptions (1, &argv, TRUE);
|
|
||||||
if (OptStatus)
|
|
||||||
{
|
|
||||||
printf ("Invalid option in command file %s: %s\n",
|
|
||||||
Filename, StringBuffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore the GetOpt globals */
|
|
||||||
|
|
||||||
AcpiGbl_Opterr = Opterr;
|
|
||||||
AcpiGbl_Optind = Optind;
|
|
||||||
|
|
||||||
fclose (ResponseFile);
|
|
||||||
return (OptStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AslDoOptions
|
|
||||||
*
|
|
||||||
* PARAMETERS: argc/argv - Standard argc/argv
|
|
||||||
* IsResponseFile - TRUE if executing a response file.
|
|
||||||
*
|
|
||||||
* RETURN: Status
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Command line option processing
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static int
|
|
||||||
AslDoOptions (
|
|
||||||
int argc,
|
|
||||||
char **argv,
|
|
||||||
BOOLEAN IsResponseFile)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
ACPI_STATUS Status;
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the command line options */
|
|
||||||
|
|
||||||
while ((j = AcpiGetopt (argc, argv, ASL_SUPPORTED_OPTIONS)) != EOF) switch (j)
|
|
||||||
{
|
|
||||||
case '@': /* Begin a response file */
|
|
||||||
|
|
||||||
if (IsResponseFile)
|
|
||||||
{
|
|
||||||
printf ("Nested command files are not supported\n");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AslDoResponseFile (AcpiGbl_Optarg))
|
|
||||||
{
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'b': /* Debug output options */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'f':
|
|
||||||
AslCompilerdebug = 1; /* same as yydebug */
|
|
||||||
DtParserdebug = 1;
|
|
||||||
PrParserdebug = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -b%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Produce debug output file */
|
|
||||||
|
|
||||||
Gbl_DebugFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'r':
|
|
||||||
Gbl_NoResourceChecking = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'd': /* Disassembler */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '^':
|
|
||||||
Gbl_DoCompile = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'a':
|
|
||||||
Gbl_DoCompile = FALSE;
|
|
||||||
Gbl_DisassembleAll = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'b': /* Do not convert buffers to resource descriptors */
|
|
||||||
AcpiGbl_NoResourceDisassembly = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Gbl_DisasmFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'D': /* Define a symbol */
|
|
||||||
PrAddDefine (AcpiGbl_Optarg, NULL, TRUE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'e': /* External files for disassembler */
|
|
||||||
Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg);
|
|
||||||
if (ACPI_FAILURE (Status))
|
|
||||||
{
|
|
||||||
printf ("Could not add %s to external list\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'f': /* Ignore errors and force creation of aml file */
|
|
||||||
Gbl_IgnoreErrors = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'G':
|
|
||||||
Gbl_CompileGeneric = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'g': /* Get all ACPI tables */
|
|
||||||
|
|
||||||
Gbl_GetAllTables = TRUE;
|
|
||||||
Gbl_DoCompile = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'h':
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '^':
|
|
||||||
Usage ();
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
UtDisplayConstantOpcodes ();
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
case 'f':
|
|
||||||
FilenameHelp ();
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
case 'r':
|
|
||||||
/* reserved names */
|
|
||||||
|
|
||||||
ApDisplayReservedNames ();
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
UtDisplaySupportedTables ();
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -h%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
case 'I': /* Add an include file search directory */
|
|
||||||
FlAddIncludeDirectory (AcpiGbl_Optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'i': /* Output AML as an include file */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'a':
|
|
||||||
|
|
||||||
/* Produce assembly code include file */
|
|
||||||
|
|
||||||
Gbl_AsmIncludeOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
|
|
||||||
/* Produce C include file */
|
|
||||||
|
|
||||||
Gbl_C_IncludeOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n':
|
|
||||||
|
|
||||||
/* Compiler/Disassembler: Ignore the NOOP operator */
|
|
||||||
|
|
||||||
AcpiGbl_IgnoreNoopOperator = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -i%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'l': /* Listing files */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '^':
|
|
||||||
/* Produce listing file (Mixed source/aml) */
|
|
||||||
|
|
||||||
Gbl_ListingFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'i':
|
|
||||||
/* Produce preprocessor output file */
|
|
||||||
|
|
||||||
Gbl_PreprocessorOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n':
|
|
||||||
/* Produce namespace file */
|
|
||||||
|
|
||||||
Gbl_NsOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 's':
|
|
||||||
/* Produce combined source file */
|
|
||||||
|
|
||||||
Gbl_SourceOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -l%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'm': /* Set line buffer size */
|
|
||||||
Gbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
|
|
||||||
if (Gbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
|
|
||||||
{
|
|
||||||
Gbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
|
|
||||||
}
|
|
||||||
printf ("Line Buffer Size: %u\n", Gbl_LineBufferSize);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'n': /* Parse only */
|
|
||||||
Gbl_ParseOnlyFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'o': /* Control compiler AML optimizations */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'a':
|
|
||||||
|
|
||||||
/* Disable all optimizations */
|
|
||||||
|
|
||||||
Gbl_FoldConstants = FALSE;
|
|
||||||
Gbl_IntegerOptimizationFlag = FALSE;
|
|
||||||
Gbl_ReferenceOptimizationFlag = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'f':
|
|
||||||
|
|
||||||
/* Disable folding on "normal" expressions */
|
|
||||||
|
|
||||||
Gbl_FoldConstants = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'i':
|
|
||||||
|
|
||||||
/* Disable integer optimization to constants */
|
|
||||||
|
|
||||||
Gbl_IntegerOptimizationFlag = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n':
|
|
||||||
|
|
||||||
/* Disable named reference optimization */
|
|
||||||
|
|
||||||
Gbl_ReferenceOptimizationFlag = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
|
|
||||||
/* Display compile time(s) */
|
|
||||||
|
|
||||||
Gbl_CompileTimesFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'P': /* Preprocessor options */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '^': /* Proprocess only, emit (.i) file */
|
|
||||||
Gbl_PreprocessOnly = TRUE;
|
|
||||||
Gbl_PreprocessorOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n': /* Disable preprocessor */
|
|
||||||
Gbl_PreprocessFlag = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -P%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'p': /* Override default AML output filename */
|
|
||||||
Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
|
|
||||||
Gbl_UseDefaultAmlFilename = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'r': /* Override revision found in table header */
|
|
||||||
Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 's': /* Create AML in a source code file */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'a':
|
|
||||||
|
|
||||||
/* Produce assembly code output file */
|
|
||||||
|
|
||||||
Gbl_AsmOutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
|
|
||||||
/* Produce C hex output file */
|
|
||||||
|
|
||||||
Gbl_C_OutputFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'o':
|
|
||||||
|
|
||||||
/* Produce AML offset table in C */
|
|
||||||
|
|
||||||
Gbl_C_OffsetTableFlag = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -s%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 't': /* Produce hex table output file */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case 'a':
|
|
||||||
Gbl_HexOutputFlag = HEX_OUTPUT_ASM;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
Gbl_HexOutputFlag = HEX_OUTPUT_C;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 's':
|
|
||||||
Gbl_HexOutputFlag = HEX_OUTPUT_ASL;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -t%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'T': /* Create a ACPI table template file */
|
|
||||||
Gbl_DoTemplates = TRUE;
|
|
||||||
Gbl_TemplateSignature = AcpiGbl_Optarg;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'v': /* Version and verbosity settings */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '^':
|
|
||||||
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
|
||||||
exit (0);
|
|
||||||
|
|
||||||
case 'a':
|
|
||||||
/* Disable All error/warning messages */
|
|
||||||
|
|
||||||
Gbl_NoErrors = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'i':
|
|
||||||
/*
|
|
||||||
* Support for integrated development environment(s).
|
|
||||||
*
|
|
||||||
* 1) No compiler signon
|
|
||||||
* 2) Send stderr messages to stdout
|
|
||||||
* 3) Less verbose error messages (single line only for each)
|
|
||||||
* 4) Error/warning messages are formatted appropriately to
|
|
||||||
* be recognized by MS Visual Studio
|
|
||||||
*/
|
|
||||||
Gbl_VerboseErrors = FALSE;
|
|
||||||
Gbl_DoSignon = FALSE;
|
|
||||||
Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'o':
|
|
||||||
Gbl_DisplayOptimizations = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'r':
|
|
||||||
Gbl_DisplayRemarks = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 's':
|
|
||||||
Gbl_DoSignon = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
Gbl_VerboseTemplates = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'w': /* Set warning levels */
|
|
||||||
switch (AcpiGbl_Optarg[0])
|
|
||||||
{
|
|
||||||
case '1':
|
|
||||||
Gbl_WarningLevel = ASL_WARNING;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '2':
|
|
||||||
Gbl_WarningLevel = ASL_WARNING2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '3':
|
|
||||||
Gbl_WarningLevel = ASL_WARNING3;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'e':
|
|
||||||
Gbl_WarningsAsErrors = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf ("Unknown option: -w%s\n", AcpiGbl_Optarg);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'x': /* Set debug print output level */
|
|
||||||
AcpiDbgLevel = strtoul (AcpiGbl_Optarg, NULL, 16);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'z':
|
|
||||||
Gbl_UseOriginalCompilerId = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AslCommandLine
|
|
||||||
*
|
|
||||||
* PARAMETERS: argc/argv
|
|
||||||
*
|
|
||||||
* RETURN: Last argv index
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Command line processing
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static int
|
|
||||||
AslCommandLine (
|
|
||||||
int argc,
|
|
||||||
char **argv)
|
|
||||||
{
|
|
||||||
int BadCommandLine = 0;
|
|
||||||
ACPI_STATUS Status;
|
|
||||||
|
|
||||||
|
|
||||||
/* Minimum command line contains at least the command and an input file */
|
|
||||||
|
|
||||||
if (argc < 2)
|
|
||||||
{
|
|
||||||
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
|
||||||
Usage ();
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Process all command line options */
|
|
||||||
|
|
||||||
BadCommandLine = AslDoOptions (argc, argv, FALSE);
|
|
||||||
|
|
||||||
if (Gbl_DoTemplates)
|
|
||||||
{
|
|
||||||
Status = DtCreateTemplates (Gbl_TemplateSignature);
|
|
||||||
if (ACPI_FAILURE (Status))
|
|
||||||
{
|
|
||||||
exit (-1);
|
|
||||||
}
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Next parameter must be the input filename */
|
|
||||||
|
|
||||||
if (!argv[AcpiGbl_Optind] &&
|
|
||||||
!Gbl_DisasmFlag &&
|
|
||||||
!Gbl_GetAllTables)
|
|
||||||
{
|
|
||||||
printf ("Missing input filename\n");
|
|
||||||
BadCommandLine = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Gbl_DoSignon)
|
|
||||||
{
|
|
||||||
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
|
||||||
if (Gbl_IgnoreErrors)
|
|
||||||
{
|
|
||||||
printf ("Ignoring all errors, forcing AML file generation\n\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Abort if anything went wrong on the command line */
|
|
||||||
|
|
||||||
if (BadCommandLine)
|
|
||||||
{
|
|
||||||
printf ("\n");
|
|
||||||
Usage ();
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (AcpiGbl_Optind);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1021,24 +287,24 @@ main (
|
|||||||
int Index2;
|
int Index2;
|
||||||
|
|
||||||
|
|
||||||
signal (SIGINT, AslSignalHandler);
|
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
|
||||||
|
|
||||||
|
/* Initialize preprocessor and compiler before command line processing */
|
||||||
|
|
||||||
|
signal (SIGINT, AslSignalHandler);
|
||||||
AcpiGbl_ExternalFileList = NULL;
|
AcpiGbl_ExternalFileList = NULL;
|
||||||
AcpiDbgLevel = 0;
|
AcpiDbgLevel = 0;
|
||||||
|
PrInitializePreprocessor ();
|
||||||
#ifdef _DEBUG
|
AslInitialize ();
|
||||||
_CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_LEAK_CHECK_DF |
|
|
||||||
_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Init and command line */
|
|
||||||
|
|
||||||
Index1 = Index2 = AslCommandLine (argc, argv);
|
Index1 = Index2 = AslCommandLine (argc, argv);
|
||||||
|
|
||||||
AslInitialize ();
|
/* Allocate the line buffer(s), must be after command line */
|
||||||
PrInitializePreprocessor ();
|
|
||||||
|
|
||||||
/* Options that have no additional parameters or pathnames */
|
Gbl_LineBufferSize /= 2;
|
||||||
|
UtExpandLineBuffers ();
|
||||||
|
|
||||||
|
/* Perform global actions first/only */
|
||||||
|
|
||||||
if (Gbl_GetAllTables)
|
if (Gbl_GetAllTables)
|
||||||
{
|
{
|
||||||
|
@ -46,17 +46,52 @@
|
|||||||
#define __ASLMESSAGES_H
|
#define __ASLMESSAGES_H
|
||||||
|
|
||||||
|
|
||||||
#define ASL_WARNING 0
|
typedef enum
|
||||||
#define ASL_WARNING2 1
|
{
|
||||||
#define ASL_WARNING3 2
|
ASL_OPTIMIZATION = 0,
|
||||||
#define ASL_ERROR 3
|
ASL_REMARK,
|
||||||
#define ASL_REMARK 4
|
ASL_WARNING,
|
||||||
#define ASL_OPTIMIZATION 5
|
ASL_WARNING2,
|
||||||
#define ASL_NUM_REPORT_LEVELS 6
|
ASL_WARNING3,
|
||||||
|
ASL_ERROR,
|
||||||
|
ASL_NUM_REPORT_LEVELS
|
||||||
|
|
||||||
|
} ASL_MESSAGE_TYPES;
|
||||||
|
|
||||||
/* Values for all compiler messages */
|
#ifdef ASL_EXCEPTIONS
|
||||||
|
|
||||||
|
/* Strings for message reporting levels, must match values above */
|
||||||
|
|
||||||
|
const char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
|
||||||
|
"Optimize",
|
||||||
|
"Remark ",
|
||||||
|
"Warning ",
|
||||||
|
"Warning ",
|
||||||
|
"Warning ",
|
||||||
|
"Error "
|
||||||
|
};
|
||||||
|
|
||||||
|
/* All lowercase versions for IDEs */
|
||||||
|
|
||||||
|
const char *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = {
|
||||||
|
"optimize",
|
||||||
|
"remark ",
|
||||||
|
"warning ",
|
||||||
|
"warning ",
|
||||||
|
"warning ",
|
||||||
|
"error "
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Values for all compiler messages.
|
||||||
|
*
|
||||||
|
* NOTE: With the introduction of the -vw option to disable specific messages,
|
||||||
|
* new messages should only be added to the end of this list, so that values
|
||||||
|
* for existing messages are not disturbed.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ASL_MSG_RESERVED = 0,
|
ASL_MSG_RESERVED = 0,
|
||||||
@ -180,6 +215,7 @@ typedef enum
|
|||||||
ASL_MSG_SCOPE_TYPE,
|
ASL_MSG_SCOPE_TYPE,
|
||||||
ASL_MSG_SEEK,
|
ASL_MSG_SEEK,
|
||||||
ASL_MSG_SERIALIZED,
|
ASL_MSG_SERIALIZED,
|
||||||
|
ASL_MSG_SERIALIZED_REQUIRED,
|
||||||
ASL_MSG_SINGLE_NAME_OPTIMIZATION,
|
ASL_MSG_SINGLE_NAME_OPTIMIZATION,
|
||||||
ASL_MSG_SOME_NO_RETVAL,
|
ASL_MSG_SOME_NO_RETVAL,
|
||||||
ASL_MSG_STRING_LENGTH,
|
ASL_MSG_STRING_LENGTH,
|
||||||
@ -235,9 +271,15 @@ typedef enum
|
|||||||
|
|
||||||
#ifdef ASL_EXCEPTIONS
|
#ifdef ASL_EXCEPTIONS
|
||||||
|
|
||||||
/* Actual message strings for each compiler message */
|
/*
|
||||||
|
* Actual message strings for each compiler message.
|
||||||
char *AslMessages [] = {
|
*
|
||||||
|
* NOTE: With the introduction of the -vw option to disable specific messages,
|
||||||
|
* new messages should only be added to the end of this list, so that values
|
||||||
|
* for existing messages are not disturbed.
|
||||||
|
*/
|
||||||
|
char *AslMessages [] =
|
||||||
|
{
|
||||||
/* The zeroth message is reserved */ "",
|
/* The zeroth message is reserved */ "",
|
||||||
/* ASL_MSG_ALIGNMENT */ "Must be a multiple of alignment/granularity value",
|
/* ASL_MSG_ALIGNMENT */ "Must be a multiple of alignment/granularity value",
|
||||||
/* ASL_MSG_ALPHANUMERIC_STRING */ "String must be entirely alphanumeric",
|
/* ASL_MSG_ALPHANUMERIC_STRING */ "String must be entirely alphanumeric",
|
||||||
@ -358,6 +400,7 @@ char *AslMessages [] = {
|
|||||||
/* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator",
|
/* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator",
|
||||||
/* ASL_MSG_SEEK */ "Could not seek file",
|
/* ASL_MSG_SEEK */ "Could not seek file",
|
||||||
/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized",
|
/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized",
|
||||||
|
/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized",
|
||||||
/* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)",
|
/* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)",
|
||||||
/* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value",
|
/* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value",
|
||||||
/* ASL_MSG_STRING_LENGTH */ "String literal too long",
|
/* ASL_MSG_STRING_LENGTH */ "String literal too long",
|
||||||
@ -408,27 +451,6 @@ char *AslMessages [] = {
|
|||||||
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero"
|
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
|
|
||||||
"Warning ",
|
|
||||||
"Warning ",
|
|
||||||
"Warning ",
|
|
||||||
"Error ",
|
|
||||||
"Remark ",
|
|
||||||
"Optimize"
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = {
|
|
||||||
"warning ",
|
|
||||||
"warning ",
|
|
||||||
"warning ",
|
|
||||||
"error ",
|
|
||||||
"remark ",
|
|
||||||
"optimize"
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */
|
|
||||||
|
|
||||||
#endif /* ASL_EXCEPTIONS */
|
#endif /* ASL_EXCEPTIONS */
|
||||||
|
|
||||||
#endif /* __ASLMESSAGES_H */
|
#endif /* __ASLMESSAGES_H */
|
||||||
|
@ -44,12 +44,22 @@
|
|||||||
|
|
||||||
#include <contrib/dev/acpica/compiler/aslcompiler.h>
|
#include <contrib/dev/acpica/compiler/aslcompiler.h>
|
||||||
#include "aslcompiler.y.h"
|
#include "aslcompiler.y.h"
|
||||||
|
#include <contrib/dev/acpica/include/acparser.h>
|
||||||
|
#include <contrib/dev/acpica/include/amlcode.h>
|
||||||
|
|
||||||
|
|
||||||
#define _COMPONENT ACPI_COMPILER
|
#define _COMPONENT ACPI_COMPILER
|
||||||
ACPI_MODULE_NAME ("aslmethod")
|
ACPI_MODULE_NAME ("aslmethod")
|
||||||
|
|
||||||
|
|
||||||
|
/* Local prototypes */
|
||||||
|
|
||||||
|
void
|
||||||
|
MtCheckNamedObjectInMethod (
|
||||||
|
ACPI_PARSE_OBJECT *Op,
|
||||||
|
ASL_METHOD_INFO *MethodInfo);
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: MtMethodAnalysisWalkBegin
|
* FUNCTION: MtMethodAnalysisWalkBegin
|
||||||
@ -111,6 +121,8 @@ MtMethodAnalysisWalkBegin (
|
|||||||
/* Get the SerializeRule and SyncLevel nodes, ignored here */
|
/* Get the SerializeRule and SyncLevel nodes, ignored here */
|
||||||
|
|
||||||
Next = Next->Asl.Next;
|
Next = Next->Asl.Next;
|
||||||
|
MethodInfo->ShouldBeSerialized = (UINT8) Next->Asl.Value.Integer;
|
||||||
|
|
||||||
Next = Next->Asl.Next;
|
Next = Next->Asl.Next;
|
||||||
ArgNode = Next;
|
ArgNode = Next;
|
||||||
|
|
||||||
@ -181,7 +193,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_METHODCALL:
|
case PARSEOP_METHODCALL:
|
||||||
|
|
||||||
if (MethodInfo &&
|
if (MethodInfo &&
|
||||||
@ -191,7 +202,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_LOCAL0:
|
case PARSEOP_LOCAL0:
|
||||||
case PARSEOP_LOCAL1:
|
case PARSEOP_LOCAL1:
|
||||||
case PARSEOP_LOCAL2:
|
case PARSEOP_LOCAL2:
|
||||||
@ -236,7 +246,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_ARG0:
|
case PARSEOP_ARG0:
|
||||||
case PARSEOP_ARG1:
|
case PARSEOP_ARG1:
|
||||||
case PARSEOP_ARG2:
|
case PARSEOP_ARG2:
|
||||||
@ -287,7 +296,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_RETURN:
|
case PARSEOP_RETURN:
|
||||||
|
|
||||||
if (!MethodInfo)
|
if (!MethodInfo)
|
||||||
@ -320,7 +328,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_BREAK:
|
case PARSEOP_BREAK:
|
||||||
case PARSEOP_CONTINUE:
|
case PARSEOP_CONTINUE:
|
||||||
|
|
||||||
@ -340,7 +347,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_STALL:
|
case PARSEOP_STALL:
|
||||||
|
|
||||||
/* We can range check if the argument is an integer */
|
/* We can range check if the argument is an integer */
|
||||||
@ -352,7 +358,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_DEVICE:
|
case PARSEOP_DEVICE:
|
||||||
case PARSEOP_EVENT:
|
case PARSEOP_EVENT:
|
||||||
case PARSEOP_MUTEX:
|
case PARSEOP_MUTEX:
|
||||||
@ -372,7 +377,6 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_NAME:
|
case PARSEOP_NAME:
|
||||||
|
|
||||||
/* Typecheck any predefined names statically defined with Name() */
|
/* Typecheck any predefined names statically defined with Name() */
|
||||||
@ -410,15 +414,74 @@ MtMethodAnalysisWalkBegin (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for named object creation within a non-serialized method */
|
||||||
|
|
||||||
|
MtCheckNamedObjectInMethod (Op, MethodInfo);
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: MtCheckNamedObjectInMethod
|
||||||
|
*
|
||||||
|
* PARAMETERS: Op - Current parser op
|
||||||
|
* MethodInfo - Info for method being parsed
|
||||||
|
*
|
||||||
|
* RETURN: None
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Detect if a non-serialized method is creating a named object,
|
||||||
|
* which could possibly cause problems if two threads execute
|
||||||
|
* the method concurrently. Emit a remark in this case.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
void
|
||||||
|
MtCheckNamedObjectInMethod (
|
||||||
|
ACPI_PARSE_OBJECT *Op,
|
||||||
|
ASL_METHOD_INFO *MethodInfo)
|
||||||
|
{
|
||||||
|
const ACPI_OPCODE_INFO *OpInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/* We don't care about actual method declarations */
|
||||||
|
|
||||||
|
if (Op->Asl.AmlOpcode == AML_METHOD_OP)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Determine if we are creating a named object */
|
||||||
|
|
||||||
|
OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
|
||||||
|
if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* If we have a named object created within a non-serialized method,
|
||||||
|
* emit a remark that the method should be serialized.
|
||||||
|
*
|
||||||
|
* Reason: If a thread blocks within the method for any reason, and
|
||||||
|
* another thread enters the method, the method will fail because an
|
||||||
|
* attempt will be made to create the same object twice.
|
||||||
|
*/
|
||||||
|
if (MethodInfo && !MethodInfo->ShouldBeSerialized)
|
||||||
|
{
|
||||||
|
AslError (ASL_REMARK, ASL_MSG_SERIALIZED_REQUIRED, MethodInfo->Op,
|
||||||
|
"due to creation of named objects within");
|
||||||
|
|
||||||
|
/* Emit message only ONCE per method */
|
||||||
|
|
||||||
|
MethodInfo->ShouldBeSerialized = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: MtMethodAnalysisWalkEnd
|
* FUNCTION: MtMethodAnalysisWalkEnd
|
||||||
@ -446,6 +509,7 @@ MtMethodAnalysisWalkEnd (
|
|||||||
{
|
{
|
||||||
case PARSEOP_METHOD:
|
case PARSEOP_METHOD:
|
||||||
case PARSEOP_RETURN:
|
case PARSEOP_RETURN:
|
||||||
|
|
||||||
if (!MethodInfo)
|
if (!MethodInfo)
|
||||||
{
|
{
|
||||||
printf ("No method info for method! [%s]\n", Op->Asl.Namepath);
|
printf ("No method info for method! [%s]\n", Op->Asl.Namepath);
|
||||||
@ -458,6 +522,7 @@ MtMethodAnalysisWalkEnd (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +599,6 @@ MtMethodAnalysisWalkEnd (
|
|||||||
ACPI_FREE (MethodInfo);
|
ACPI_FREE (MethodInfo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_NAME:
|
case PARSEOP_NAME:
|
||||||
|
|
||||||
/* Special check for two names like _L01 and _E01 in same scope */
|
/* Special check for two names like _L01 and _E01 in same scope */
|
||||||
@ -542,7 +606,6 @@ MtMethodAnalysisWalkEnd (
|
|||||||
ApCheckForGpeNameConflict (Op);
|
ApCheckForGpeNameConflict (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_RETURN:
|
case PARSEOP_RETURN:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -572,7 +635,6 @@ MtMethodAnalysisWalkEnd (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_IF:
|
case PARSEOP_IF:
|
||||||
|
|
||||||
if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
|
if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
|
||||||
@ -588,7 +650,6 @@ MtMethodAnalysisWalkEnd (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_ELSE:
|
case PARSEOP_ELSE:
|
||||||
|
|
||||||
if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
|
if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
|
||||||
|
@ -194,7 +194,6 @@ NsDoOneNamespaceObject (
|
|||||||
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
||||||
@ -203,7 +202,9 @@ NsDoOneNamespaceObject (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other types */
|
/* Nothing to do for other types */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +229,6 @@ NsDoOneNamespaceObject (
|
|||||||
ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
|
ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
||||||
@ -245,7 +245,6 @@ NsDoOneNamespaceObject (
|
|||||||
Op->Asl.Value.String);
|
Op->Asl.Value.String);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||||
|
|
||||||
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
|
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
|
||||||
@ -258,42 +257,47 @@ NsDoOneNamespaceObject (
|
|||||||
Op->Asl.Parent->Asl.ExtraValue, (UINT32) Op->Asl.Value.Integer);
|
Op->Asl.Parent->Asl.ExtraValue, (UINT32) Op->Asl.Value.Integer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER_FIELD:
|
case ACPI_TYPE_BUFFER_FIELD:
|
||||||
|
|
||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_CREATEBYTEFIELD:
|
case PARSEOP_CREATEBYTEFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [BYTE ( 8 bit)]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [BYTE ( 8 bit)]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_CREATEDWORDFIELD:
|
case PARSEOP_CREATEDWORDFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [DWORD (32 bit)]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [DWORD (32 bit)]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_CREATEQWORDFIELD:
|
case PARSEOP_CREATEQWORDFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [QWORD (64 bit)]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [QWORD (64 bit)]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_CREATEWORDFIELD:
|
case PARSEOP_CREATEWORDFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [WORD (16 bit)]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [WORD (16 bit)]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_CREATEBITFIELD:
|
case PARSEOP_CREATEBITFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [BIT ( 1 bit)]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [BIT ( 1 bit)]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_CREATEFIELD:
|
case PARSEOP_CREATEFIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [Arbitrary Bit Field]");
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, " [Arbitrary Bit Field]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
||||||
@ -316,7 +320,6 @@ NsDoOneNamespaceObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
|
||||||
@ -338,7 +341,6 @@ NsDoOneNamespaceObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
||||||
@ -346,14 +348,12 @@ NsDoOneNamespaceObject (
|
|||||||
Op->Asl.AmlSubtreeLength);
|
Op->Asl.AmlSubtreeLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_RESOURCE:
|
case ACPI_TYPE_LOCAL_RESOURCE:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
||||||
" [Desc Offset 0x%.4X Bytes]", Node->Value);
|
" [Desc Offset 0x%.4X Bytes]", Node->Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_RESOURCE_FIELD:
|
case ACPI_TYPE_LOCAL_RESOURCE_FIELD:
|
||||||
|
|
||||||
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
|
||||||
@ -372,9 +372,10 @@ NsDoOneNamespaceObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other types */
|
/* Nothing to do for other types */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,6 @@ LsEmitOffsetTableEntry (
|
|||||||
UINT32 FileId,
|
UINT32 FileId,
|
||||||
ACPI_NAMESPACE_NODE *Node,
|
ACPI_NAMESPACE_NODE *Node,
|
||||||
UINT32 Offset,
|
UINT32 Offset,
|
||||||
UINT32 Length,
|
|
||||||
char *OpName,
|
char *OpName,
|
||||||
UINT64 Value,
|
UINT64 Value,
|
||||||
UINT8 AmlOpcode);
|
UINT8 AmlOpcode);
|
||||||
@ -77,7 +76,9 @@ LsEmitOffsetTableEntry (
|
|||||||
* Three types of objects are currently emitted to the offset table:
|
* Three types of objects are currently emitted to the offset table:
|
||||||
* 1) Tagged (named) resource descriptors
|
* 1) Tagged (named) resource descriptors
|
||||||
* 2) Named integer objects with constant integer values
|
* 2) Named integer objects with constant integer values
|
||||||
* 3) Operation Regions that have constant Offset (address) parameters
|
* 3) Named package objects
|
||||||
|
* 4) Operation Regions that have constant Offset (address) parameters
|
||||||
|
* 5) Control methods
|
||||||
*
|
*
|
||||||
* The offset table allows the BIOS to dynamically update the values of these
|
* The offset table allows the BIOS to dynamically update the values of these
|
||||||
* objects at boot time.
|
* objects at boot time.
|
||||||
@ -94,7 +95,7 @@ LsAmlOffsetWalk (
|
|||||||
ACPI_NAMESPACE_NODE *Node;
|
ACPI_NAMESPACE_NODE *Node;
|
||||||
UINT32 Length;
|
UINT32 Length;
|
||||||
UINT32 OffsetOfOpcode;
|
UINT32 OffsetOfOpcode;
|
||||||
ACPI_PARSE_OBJECT *AddressOp;
|
ACPI_PARSE_OBJECT *NextOp;
|
||||||
|
|
||||||
|
|
||||||
/* Ignore actual data blocks for resource descriptors */
|
/* Ignore actual data blocks for resource descriptors */
|
||||||
@ -119,13 +120,17 @@ LsAmlOffsetWalk (
|
|||||||
(Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
|
(Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
|
||||||
{
|
{
|
||||||
LsEmitOffsetTableEntry (FileId, Node, Gbl_CurrentAmlOffset,
|
LsEmitOffsetTableEntry (FileId, Node, Gbl_CurrentAmlOffset,
|
||||||
Op->Asl.FinalAmlLength, Op->Asl.ParseOpName, 0, Op->Asl.Extra);
|
Op->Asl.ParseOpName, 0, Op->Asl.Extra);
|
||||||
|
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
|
||||||
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (Op->Asl.AmlOpcode)
|
||||||
|
{
|
||||||
|
case AML_NAME_OP:
|
||||||
|
|
||||||
/* Named object -- Name (NameString, DataRefObject) */
|
/* Named object -- Name (NameString, DataRefObject) */
|
||||||
|
|
||||||
else if (Op->Asl.AmlOpcode == AML_NAME_OP)
|
|
||||||
{
|
|
||||||
if (!Op->Asl.Child)
|
if (!Op->Asl.Child)
|
||||||
{
|
{
|
||||||
FlPrintFile (FileId, "%s NO CHILD!\n", MsgBuffer);
|
FlPrintFile (FileId, "%s NO CHILD!\n", MsgBuffer);
|
||||||
@ -154,12 +159,24 @@ LsAmlOffsetWalk (
|
|||||||
case AML_DWORD_OP:
|
case AML_DWORD_OP:
|
||||||
case AML_QWORD_OP:
|
case AML_QWORD_OP:
|
||||||
|
|
||||||
/* The +1/-1 is to handle the integer size prefix (opcode) */
|
/* The +1 is to handle the integer size prefix (opcode) */
|
||||||
|
|
||||||
LsEmitOffsetTableEntry (FileId, Node,
|
LsEmitOffsetTableEntry (FileId, Node,
|
||||||
(Gbl_CurrentAmlOffset + OffsetOfOpcode + 1),
|
(Gbl_CurrentAmlOffset + OffsetOfOpcode + 1),
|
||||||
(Op->Asl.FinalAmlLength - 1), Op->Asl.ParseOpName,
|
Op->Asl.ParseOpName, Op->Asl.Value.Integer,
|
||||||
Op->Asl.Value.Integer, (UINT8) Op->Asl.AmlOpcode);
|
(UINT8) Op->Asl.AmlOpcode);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_PACKAGE_OP:
|
||||||
|
case AML_VAR_PACKAGE_OP:
|
||||||
|
|
||||||
|
NextOp = Op->Asl.Child;
|
||||||
|
|
||||||
|
LsEmitOffsetTableEntry (FileId, Node,
|
||||||
|
(Gbl_CurrentAmlOffset + OffsetOfOpcode),
|
||||||
|
Op->Asl.ParseOpName,
|
||||||
|
NextOp->Asl.Value.Integer,
|
||||||
|
(UINT8) Op->Asl.AmlOpcode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -168,25 +185,24 @@ LsAmlOffsetWalk (
|
|||||||
|
|
||||||
Gbl_CurrentAmlOffset += Length;
|
Gbl_CurrentAmlOffset += Length;
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
|
||||||
|
case AML_REGION_OP:
|
||||||
|
|
||||||
/* OperationRegion (NameString, RegionSpace, RegionOffset, RegionLength) */
|
/* OperationRegion (NameString, RegionSpace, RegionOffset, RegionLength) */
|
||||||
|
|
||||||
else if (Op->Asl.AmlOpcode == AML_REGION_OP)
|
|
||||||
{
|
|
||||||
Length = Op->Asl.FinalAmlLength;
|
Length = Op->Asl.FinalAmlLength;
|
||||||
|
|
||||||
/* Get the name/namepath node */
|
/* Get the name/namepath node */
|
||||||
|
|
||||||
AddressOp = Op->Asl.Child;
|
NextOp = Op->Asl.Child;
|
||||||
OffsetOfOpcode = Length + AddressOp->Asl.FinalAmlLength + 1;
|
OffsetOfOpcode = Length + NextOp->Asl.FinalAmlLength + 1;
|
||||||
|
|
||||||
/* Get the SpaceId node, then the Offset (address) node */
|
/* Get the SpaceId node, then the Offset (address) node */
|
||||||
|
|
||||||
AddressOp = AddressOp->Asl.Next;
|
NextOp = NextOp->Asl.Next;
|
||||||
AddressOp = AddressOp->Asl.Next;
|
NextOp = NextOp->Asl.Next;
|
||||||
|
|
||||||
switch (AddressOp->Asl.AmlOpcode)
|
switch (NextOp->Asl.AmlOpcode)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We are only interested in integer constants that can be changed
|
* We are only interested in integer constants that can be changed
|
||||||
@ -198,12 +214,10 @@ LsAmlOffsetWalk (
|
|||||||
case AML_DWORD_OP:
|
case AML_DWORD_OP:
|
||||||
case AML_QWORD_OP:
|
case AML_QWORD_OP:
|
||||||
|
|
||||||
/* The +1/-1 is to handle the integer size prefix (opcode) */
|
|
||||||
|
|
||||||
LsEmitOffsetTableEntry (FileId, Node,
|
LsEmitOffsetTableEntry (FileId, Node,
|
||||||
(Gbl_CurrentAmlOffset + OffsetOfOpcode + 1),
|
(Gbl_CurrentAmlOffset + OffsetOfOpcode + 1),
|
||||||
(AddressOp->Asl.FinalAmlLength - 1), Op->Asl.ParseOpName,
|
Op->Asl.ParseOpName, NextOp->Asl.Value.Integer,
|
||||||
AddressOp->Asl.Value.Integer, (UINT8) AddressOp->Asl.AmlOpcode);
|
(UINT8) NextOp->Asl.AmlOpcode);
|
||||||
|
|
||||||
Gbl_CurrentAmlOffset += Length;
|
Gbl_CurrentAmlOffset += Length;
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
@ -211,6 +225,31 @@ LsAmlOffsetWalk (
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_METHOD_OP:
|
||||||
|
|
||||||
|
/* Method (Namepath, ...) */
|
||||||
|
|
||||||
|
Length = Op->Asl.FinalAmlLength;
|
||||||
|
|
||||||
|
/* Get the NameSeg/NamePath Op */
|
||||||
|
|
||||||
|
NextOp = Op->Asl.Child;
|
||||||
|
|
||||||
|
/* Point to the *last* nameseg in the namepath */
|
||||||
|
|
||||||
|
OffsetOfOpcode = NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE;
|
||||||
|
|
||||||
|
LsEmitOffsetTableEntry (FileId, Node,
|
||||||
|
(Gbl_CurrentAmlOffset + OffsetOfOpcode + Length),
|
||||||
|
Op->Asl.ParseOpName,
|
||||||
|
*((UINT32 *) &NextOp->Asl.Value.Buffer[OffsetOfOpcode]),
|
||||||
|
(UINT8) Op->Asl.AmlOpcode);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
|
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
|
||||||
@ -225,7 +264,6 @@ LsAmlOffsetWalk (
|
|||||||
* PARAMETERS: FileId - ID of current listing file
|
* PARAMETERS: FileId - ID of current listing file
|
||||||
* Node - Namespace node associated with the name
|
* Node - Namespace node associated with the name
|
||||||
* Offset - Offset of the value within the AML table
|
* Offset - Offset of the value within the AML table
|
||||||
* Length - Length in bytes of the value
|
|
||||||
* OpName - Name of the AML opcode
|
* OpName - Name of the AML opcode
|
||||||
* Value - Current value of the AML field
|
* Value - Current value of the AML field
|
||||||
* AmlOpcode - Opcode associated with the field
|
* AmlOpcode - Opcode associated with the field
|
||||||
@ -241,7 +279,6 @@ LsEmitOffsetTableEntry (
|
|||||||
UINT32 FileId,
|
UINT32 FileId,
|
||||||
ACPI_NAMESPACE_NODE *Node,
|
ACPI_NAMESPACE_NODE *Node,
|
||||||
UINT32 Offset,
|
UINT32 Offset,
|
||||||
UINT32 Length,
|
|
||||||
char *OpName,
|
char *OpName,
|
||||||
UINT64 Value,
|
UINT64 Value,
|
||||||
UINT8 AmlOpcode)
|
UINT8 AmlOpcode)
|
||||||
@ -293,8 +330,6 @@ LsDoOffsetTableHeader (
|
|||||||
UINT32 FileId)
|
UINT32 FileId)
|
||||||
{
|
{
|
||||||
|
|
||||||
Gbl_CurrentAmlOffset = 0;
|
|
||||||
|
|
||||||
FlPrintFile (FileId,
|
FlPrintFile (FileId,
|
||||||
"#ifndef __AML_OFFSET_TABLE_H\n"
|
"#ifndef __AML_OFFSET_TABLE_H\n"
|
||||||
"#define __AML_OFFSET_TABLE_H\n\n");
|
"#define __AML_OFFSET_TABLE_H\n\n");
|
||||||
@ -302,13 +337,40 @@ LsDoOffsetTableHeader (
|
|||||||
FlPrintFile (FileId, "typedef struct {\n"
|
FlPrintFile (FileId, "typedef struct {\n"
|
||||||
" char *Pathname;\n"
|
" char *Pathname;\n"
|
||||||
" unsigned long Offset;\n"
|
" unsigned long Offset;\n"
|
||||||
" unsigned char AmlOpcode;\n"
|
" unsigned char Opcode;\n"
|
||||||
" unsigned long long AmlValue;\n"
|
" unsigned long long Value;\n"
|
||||||
"} AML_OFFSET_TABLE_ENTRY;\n\n");
|
"} AML_OFFSET_TABLE_ENTRY;\n\n");
|
||||||
|
|
||||||
FlPrintFile (FileId,
|
FlPrintFile (FileId,
|
||||||
"#endif /* __AML_OFFSET_TABLE_H */\n\n");
|
"#endif /* __AML_OFFSET_TABLE_H */\n\n");
|
||||||
|
|
||||||
|
FlPrintFile (FileId,
|
||||||
|
"/*\n"
|
||||||
|
" * Information about supported object types:\n"
|
||||||
|
" *\n"
|
||||||
|
" * Integers:\n"
|
||||||
|
" * Offset points to the actual integer data\n"
|
||||||
|
" * Opcode is the integer prefix, indicates length of the data\n"
|
||||||
|
" * Value is the existing value in the AML\n"
|
||||||
|
" *\n"
|
||||||
|
" * Packages:\n"
|
||||||
|
" * Offset points to the package opcode\n"
|
||||||
|
" * Opcode is the package or var_package opcode\n"
|
||||||
|
" * Value is the package element cound\n"
|
||||||
|
" *\n"
|
||||||
|
" * Operation Regions:\n"
|
||||||
|
" * Offset points to the region address data\n"
|
||||||
|
" * Opcode is the address integer prefix, indicates length of the data\n"
|
||||||
|
" * Value is the existing address value in the AML\n"
|
||||||
|
" *\n"
|
||||||
|
" * Control Methods:\n"
|
||||||
|
" * Offset points to the first byte of the namepath\n"
|
||||||
|
" *\n"
|
||||||
|
" * Resource Descriptors:\n"
|
||||||
|
" * Offset points to the start of the descriptor\n"
|
||||||
|
" * Opcode is the descriptor type\n"
|
||||||
|
" */\n");
|
||||||
|
|
||||||
FlPrintFile (FileId,
|
FlPrintFile (FileId,
|
||||||
"AML_OFFSET_TABLE_ENTRY %s_%s_OffsetTable[] =\n{\n",
|
"AML_OFFSET_TABLE_ENTRY %s_%s_OffsetTable[] =\n{\n",
|
||||||
Gbl_TableSignature, Gbl_TableId);
|
Gbl_TableSignature, Gbl_TableId);
|
||||||
|
@ -266,6 +266,7 @@ OpcSetOptimalIntegerSize (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -811,7 +812,9 @@ OpcGenerateAmlOpcode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other opcodes */
|
/* Nothing to do for other opcodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,6 @@ OpnDoFieldCommon (
|
|||||||
/* Nothing additional to do */
|
/* Nothing additional to do */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_OFFSET:
|
case PARSEOP_OFFSET:
|
||||||
|
|
||||||
/* New offset into the field */
|
/* New offset into the field */
|
||||||
@ -342,7 +341,6 @@ OpnDoFieldCommon (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_NAMESEG:
|
case PARSEOP_NAMESEG:
|
||||||
case PARSEOP_RESERVED_BYTES:
|
case PARSEOP_RESERVED_BYTES:
|
||||||
|
|
||||||
@ -360,6 +358,7 @@ OpnDoFieldCommon (
|
|||||||
case AML_FIELD_ACCESS_BYTE:
|
case AML_FIELD_ACCESS_BYTE:
|
||||||
case AML_FIELD_ACCESS_BUFFER:
|
case AML_FIELD_ACCESS_BUFFER:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
MinimumLength = 8;
|
MinimumLength = 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -380,7 +379,9 @@ OpnDoFieldCommon (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All supported field opcodes must appear above */
|
/* All supported field opcodes must appear above */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -610,7 +611,6 @@ OpnDoBuffer (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_STRING_LITERAL:
|
case PARSEOP_STRING_LITERAL:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -624,18 +624,16 @@ OpnDoBuffer (
|
|||||||
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
|
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_RAW_DATA:
|
case PARSEOP_RAW_DATA:
|
||||||
|
|
||||||
/* Buffer nodes are already initialized (e.g. Unicode operator) */
|
/* Buffer nodes are already initialized (e.g. Unicode operator) */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
case PARSEOP_DEFAULT_ARG:
|
case PARSEOP_DEFAULT_ARG:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, InitializerOp,
|
AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, InitializerOp,
|
||||||
"Unknown buffer initializer opcode");
|
"Unknown buffer initializer opcode");
|
||||||
printf ("Unknown buffer initializer opcode [%s]\n",
|
printf ("Unknown buffer initializer opcode [%s]\n",
|
||||||
@ -1092,6 +1090,7 @@ OpnAttachNameToNode (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1130,42 +1129,52 @@ OpnGenerateAmlOperands (
|
|||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_DEFINITIONBLOCK:
|
case PARSEOP_DEFINITIONBLOCK:
|
||||||
|
|
||||||
OpnDoDefinitionBlock (Op);
|
OpnDoDefinitionBlock (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_METHOD:
|
case PARSEOP_METHOD:
|
||||||
|
|
||||||
OpnDoMethod (Op);
|
OpnDoMethod (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_MUTEX:
|
case PARSEOP_MUTEX:
|
||||||
|
|
||||||
OpnDoMutex (Op);
|
OpnDoMutex (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_FIELD:
|
case PARSEOP_FIELD:
|
||||||
|
|
||||||
OpnDoField (Op);
|
OpnDoField (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_INDEXFIELD:
|
case PARSEOP_INDEXFIELD:
|
||||||
|
|
||||||
OpnDoIndexField (Op);
|
OpnDoIndexField (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_BANKFIELD:
|
case PARSEOP_BANKFIELD:
|
||||||
|
|
||||||
OpnDoBankField (Op);
|
OpnDoBankField (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_BUFFER:
|
case PARSEOP_BUFFER:
|
||||||
|
|
||||||
OpnDoBuffer (Op);
|
OpnDoBuffer (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_LOADTABLE:
|
case PARSEOP_LOADTABLE:
|
||||||
|
|
||||||
OpnDoLoadTable (Op);
|
OpnDoLoadTable (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_OPERATIONREGION:
|
case PARSEOP_OPERATIONREGION:
|
||||||
|
|
||||||
OpnDoRegion (Op);
|
OpnDoRegion (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_RESOURCETEMPLATE:
|
case PARSEOP_RESOURCETEMPLATE:
|
||||||
|
|
||||||
RsDoResourceTemplate (Op);
|
RsDoResourceTemplate (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1173,9 +1182,11 @@ OpnGenerateAmlOperands (
|
|||||||
case PARSEOP_NAMESTRING:
|
case PARSEOP_NAMESTRING:
|
||||||
case PARSEOP_METHODCALL:
|
case PARSEOP_METHODCALL:
|
||||||
case PARSEOP_STRING_LITERAL:
|
case PARSEOP_STRING_LITERAL:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
791
sys/contrib/dev/acpica/compiler/asloptions.c
Normal file
791
sys/contrib/dev/acpica/compiler/asloptions.c
Normal file
@ -0,0 +1,791 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Module Name: asloptions - compiler command line processing
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2000 - 2013, 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 <contrib/dev/acpica/compiler/aslcompiler.h>
|
||||||
|
#include <contrib/dev/acpica/include/acapps.h>
|
||||||
|
#include <contrib/dev/acpica/include/acdisasm.h>
|
||||||
|
|
||||||
|
#define _COMPONENT ACPI_COMPILER
|
||||||
|
ACPI_MODULE_NAME ("asloption")
|
||||||
|
|
||||||
|
|
||||||
|
/* Local prototypes */
|
||||||
|
|
||||||
|
static int
|
||||||
|
AslDoOptions (
|
||||||
|
int argc,
|
||||||
|
char **argv,
|
||||||
|
BOOLEAN IsResponseFile);
|
||||||
|
|
||||||
|
static void
|
||||||
|
AslMergeOptionTokens (
|
||||||
|
char *InBuffer,
|
||||||
|
char *OutBuffer);
|
||||||
|
|
||||||
|
static int
|
||||||
|
AslDoResponseFile (
|
||||||
|
char *Filename);
|
||||||
|
|
||||||
|
|
||||||
|
#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"
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslCommandLine
|
||||||
|
*
|
||||||
|
* PARAMETERS: argc/argv
|
||||||
|
*
|
||||||
|
* RETURN: Last argv index
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Command line processing
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
int
|
||||||
|
AslCommandLine (
|
||||||
|
int argc,
|
||||||
|
char **argv)
|
||||||
|
{
|
||||||
|
int BadCommandLine = 0;
|
||||||
|
ACPI_STATUS Status;
|
||||||
|
|
||||||
|
|
||||||
|
/* Minimum command line contains at least the command and an input file */
|
||||||
|
|
||||||
|
if (argc < 2)
|
||||||
|
{
|
||||||
|
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
||||||
|
Usage ();
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Process all command line options */
|
||||||
|
|
||||||
|
BadCommandLine = AslDoOptions (argc, argv, FALSE);
|
||||||
|
|
||||||
|
if (Gbl_DoTemplates)
|
||||||
|
{
|
||||||
|
Status = DtCreateTemplates (Gbl_TemplateSignature);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
exit (-1);
|
||||||
|
}
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Next parameter must be the input filename */
|
||||||
|
|
||||||
|
if (!argv[AcpiGbl_Optind] &&
|
||||||
|
!Gbl_DisasmFlag &&
|
||||||
|
!Gbl_GetAllTables)
|
||||||
|
{
|
||||||
|
printf ("Missing input filename\n");
|
||||||
|
BadCommandLine = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Gbl_DoSignon)
|
||||||
|
{
|
||||||
|
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
||||||
|
if (Gbl_IgnoreErrors)
|
||||||
|
{
|
||||||
|
printf ("Ignoring all errors, forcing AML file generation\n\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BadCommandLine)
|
||||||
|
{
|
||||||
|
printf ("\n");
|
||||||
|
Usage ();
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (AcpiGbl_Optind);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslDoOptions
|
||||||
|
*
|
||||||
|
* PARAMETERS: argc/argv - Standard argc/argv
|
||||||
|
* IsResponseFile - TRUE if executing a response file.
|
||||||
|
*
|
||||||
|
* RETURN: Status
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Command line option processing
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static int
|
||||||
|
AslDoOptions (
|
||||||
|
int argc,
|
||||||
|
char **argv,
|
||||||
|
BOOLEAN IsResponseFile)
|
||||||
|
{
|
||||||
|
ACPI_STATUS Status;
|
||||||
|
UINT32 j;
|
||||||
|
|
||||||
|
|
||||||
|
/* Get the command line options */
|
||||||
|
|
||||||
|
while ((j = AcpiGetopt (argc, argv, ASL_SUPPORTED_OPTIONS)) != EOF) switch (j)
|
||||||
|
{
|
||||||
|
case '@': /* Begin a response file */
|
||||||
|
|
||||||
|
if (IsResponseFile)
|
||||||
|
{
|
||||||
|
printf ("Nested command files are not supported\n");
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AslDoResponseFile (AcpiGbl_Optarg))
|
||||||
|
{
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'b': /* Debug output options */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'f':
|
||||||
|
|
||||||
|
AslCompilerdebug = 1; /* same as yydebug */
|
||||||
|
DtParserdebug = 1;
|
||||||
|
PrParserdebug = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -b%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Produce debug output file */
|
||||||
|
|
||||||
|
Gbl_DebugFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'r':
|
||||||
|
|
||||||
|
Gbl_NoResourceChecking = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'd': /* Disassembler */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '^':
|
||||||
|
|
||||||
|
Gbl_DoCompile = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
Gbl_DoCompile = FALSE;
|
||||||
|
Gbl_DisassembleAll = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'b': /* Do not convert buffers to resource descriptors */
|
||||||
|
|
||||||
|
AcpiGbl_NoResourceDisassembly = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Gbl_DisasmFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'D': /* Define a symbol */
|
||||||
|
|
||||||
|
PrAddDefine (AcpiGbl_Optarg, NULL, TRUE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'e': /* External files for disassembler */
|
||||||
|
|
||||||
|
Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
printf ("Could not add %s to external list\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'f': /* Ignore errors and force creation of aml file */
|
||||||
|
|
||||||
|
Gbl_IgnoreErrors = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'G':
|
||||||
|
|
||||||
|
Gbl_CompileGeneric = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'g': /* Get all ACPI tables */
|
||||||
|
|
||||||
|
Gbl_GetAllTables = TRUE;
|
||||||
|
Gbl_DoCompile = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'h':
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '^':
|
||||||
|
|
||||||
|
Usage ();
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
UtDisplayConstantOpcodes ();
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
case 'f':
|
||||||
|
|
||||||
|
AslFilenameHelp ();
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
case 'r':
|
||||||
|
|
||||||
|
/* reserved names */
|
||||||
|
|
||||||
|
ApDisplayReservedNames ();
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
|
||||||
|
UtDisplaySupportedTables ();
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -h%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'I': /* Add an include file search directory */
|
||||||
|
|
||||||
|
FlAddIncludeDirectory (AcpiGbl_Optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'i': /* Output AML as an include file */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
/* Produce assembly code include file */
|
||||||
|
|
||||||
|
Gbl_AsmIncludeOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
/* Produce C include file */
|
||||||
|
|
||||||
|
Gbl_C_IncludeOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
|
||||||
|
/* Compiler/Disassembler: Ignore the NOOP operator */
|
||||||
|
|
||||||
|
AcpiGbl_IgnoreNoopOperator = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -i%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'l': /* Listing files */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '^':
|
||||||
|
|
||||||
|
/* Produce listing file (Mixed source/aml) */
|
||||||
|
|
||||||
|
Gbl_ListingFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'i':
|
||||||
|
|
||||||
|
/* Produce preprocessor output file */
|
||||||
|
|
||||||
|
Gbl_PreprocessorOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
|
||||||
|
/* Produce namespace file */
|
||||||
|
|
||||||
|
Gbl_NsOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
|
||||||
|
/* Produce combined source file */
|
||||||
|
|
||||||
|
Gbl_SourceOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -l%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'm': /* Set line buffer size */
|
||||||
|
|
||||||
|
Gbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
|
||||||
|
if (Gbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
Gbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
|
||||||
|
}
|
||||||
|
printf ("Line Buffer Size: %u\n", Gbl_LineBufferSize);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n': /* Parse only */
|
||||||
|
|
||||||
|
Gbl_ParseOnlyFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'o': /* Control compiler AML optimizations */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
/* Disable all optimizations */
|
||||||
|
|
||||||
|
Gbl_FoldConstants = FALSE;
|
||||||
|
Gbl_IntegerOptimizationFlag = FALSE;
|
||||||
|
Gbl_ReferenceOptimizationFlag = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'f':
|
||||||
|
|
||||||
|
/* Disable folding on "normal" expressions */
|
||||||
|
|
||||||
|
Gbl_FoldConstants = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'i':
|
||||||
|
|
||||||
|
/* Disable integer optimization to constants */
|
||||||
|
|
||||||
|
Gbl_IntegerOptimizationFlag = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
|
||||||
|
/* Disable named reference optimization */
|
||||||
|
|
||||||
|
Gbl_ReferenceOptimizationFlag = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
|
||||||
|
/* Display compile time(s) */
|
||||||
|
|
||||||
|
Gbl_CompileTimesFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'P': /* Preprocessor options */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '^': /* Proprocess only, emit (.i) file */
|
||||||
|
|
||||||
|
Gbl_PreprocessOnly = TRUE;
|
||||||
|
Gbl_PreprocessorOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n': /* Disable preprocessor */
|
||||||
|
|
||||||
|
Gbl_PreprocessFlag = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -P%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'p': /* Override default AML output filename */
|
||||||
|
|
||||||
|
Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
|
||||||
|
Gbl_UseDefaultAmlFilename = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'r': /* Override revision found in table header */
|
||||||
|
|
||||||
|
Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's': /* Create AML in a source code file */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
/* Produce assembly code output file */
|
||||||
|
|
||||||
|
Gbl_AsmOutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
/* Produce C hex output file */
|
||||||
|
|
||||||
|
Gbl_C_OutputFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'o':
|
||||||
|
|
||||||
|
/* Produce AML offset table in C */
|
||||||
|
|
||||||
|
Gbl_C_OffsetTableFlag = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -s%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't': /* Produce hex table output file */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
Gbl_HexOutputFlag = HEX_OUTPUT_ASM;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
|
||||||
|
Gbl_HexOutputFlag = HEX_OUTPUT_C;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
|
||||||
|
Gbl_HexOutputFlag = HEX_OUTPUT_ASL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -t%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'T': /* Create a ACPI table template file */
|
||||||
|
|
||||||
|
Gbl_DoTemplates = TRUE;
|
||||||
|
Gbl_TemplateSignature = AcpiGbl_Optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'v': /* Version and verbosity settings */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '^':
|
||||||
|
|
||||||
|
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
|
||||||
|
exit (0);
|
||||||
|
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
/* Disable All error/warning messages */
|
||||||
|
|
||||||
|
Gbl_NoErrors = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'i':
|
||||||
|
/*
|
||||||
|
* Support for integrated development environment(s).
|
||||||
|
*
|
||||||
|
* 1) No compiler signon
|
||||||
|
* 2) Send stderr messages to stdout
|
||||||
|
* 3) Less verbose error messages (single line only for each)
|
||||||
|
* 4) Error/warning messages are formatted appropriately to
|
||||||
|
* be recognized by MS Visual Studio
|
||||||
|
*/
|
||||||
|
Gbl_VerboseErrors = FALSE;
|
||||||
|
Gbl_DoSignon = FALSE;
|
||||||
|
Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'o':
|
||||||
|
|
||||||
|
Gbl_DisplayOptimizations = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'r':
|
||||||
|
|
||||||
|
Gbl_DisplayRemarks = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
|
||||||
|
Gbl_DoSignon = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
|
||||||
|
Gbl_VerboseTemplates = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'w':
|
||||||
|
|
||||||
|
/* Get the required argument */
|
||||||
|
|
||||||
|
if (AcpiGetoptArgument (argc, argv))
|
||||||
|
{
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = AslDisableException (AcpiGbl_Optarg);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'w': /* Set warning levels */
|
||||||
|
|
||||||
|
switch (AcpiGbl_Optarg[0])
|
||||||
|
{
|
||||||
|
case '1':
|
||||||
|
|
||||||
|
Gbl_WarningLevel = ASL_WARNING;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '2':
|
||||||
|
|
||||||
|
Gbl_WarningLevel = ASL_WARNING2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '3':
|
||||||
|
|
||||||
|
Gbl_WarningLevel = ASL_WARNING3;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'e':
|
||||||
|
|
||||||
|
Gbl_WarningsAsErrors = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
printf ("Unknown option: -w%s\n", AcpiGbl_Optarg);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'x': /* Set debug print output level */
|
||||||
|
|
||||||
|
AcpiDbgLevel = strtoul (AcpiGbl_Optarg, NULL, 16);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'z':
|
||||||
|
|
||||||
|
Gbl_UseOriginalCompilerId = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslMergeOptionTokens
|
||||||
|
*
|
||||||
|
* PARAMETERS: InBuffer - Input containing an option string
|
||||||
|
* OutBuffer - Merged output buffer
|
||||||
|
*
|
||||||
|
* RETURN: None
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Remove all whitespace from an option string.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
AslMergeOptionTokens (
|
||||||
|
char *InBuffer,
|
||||||
|
char *OutBuffer)
|
||||||
|
{
|
||||||
|
char *Token;
|
||||||
|
|
||||||
|
|
||||||
|
*OutBuffer = 0;
|
||||||
|
|
||||||
|
Token = strtok (InBuffer, ASL_TOKEN_SEPARATORS);
|
||||||
|
while (Token)
|
||||||
|
{
|
||||||
|
strcat (OutBuffer, Token);
|
||||||
|
Token = strtok (NULL, ASL_TOKEN_SEPARATORS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AslDoResponseFile
|
||||||
|
*
|
||||||
|
* PARAMETERS: Filename - Name of the response file
|
||||||
|
*
|
||||||
|
* RETURN: Status
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Open a response file and process all options within.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static int
|
||||||
|
AslDoResponseFile (
|
||||||
|
char *Filename)
|
||||||
|
{
|
||||||
|
char *argv = StringBuffer2;
|
||||||
|
FILE *ResponseFile;
|
||||||
|
int OptStatus = 0;
|
||||||
|
int Opterr;
|
||||||
|
int Optind;
|
||||||
|
|
||||||
|
|
||||||
|
ResponseFile = fopen (Filename, "r");
|
||||||
|
if (!ResponseFile)
|
||||||
|
{
|
||||||
|
printf ("Could not open command file %s, %s\n",
|
||||||
|
Filename, strerror (errno));
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Must save the current GetOpt globals */
|
||||||
|
|
||||||
|
Opterr = AcpiGbl_Opterr;
|
||||||
|
Optind = AcpiGbl_Optind;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process all lines in the response file. There must be one complete
|
||||||
|
* option per line
|
||||||
|
*/
|
||||||
|
while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile))
|
||||||
|
{
|
||||||
|
/* Compress all tokens, allowing us to use a single argv entry */
|
||||||
|
|
||||||
|
AslMergeOptionTokens (StringBuffer, StringBuffer2);
|
||||||
|
|
||||||
|
/* Process the option */
|
||||||
|
|
||||||
|
AcpiGbl_Opterr = 0;
|
||||||
|
AcpiGbl_Optind = 0;
|
||||||
|
|
||||||
|
OptStatus = AslDoOptions (1, &argv, TRUE);
|
||||||
|
if (OptStatus)
|
||||||
|
{
|
||||||
|
printf ("Invalid option in command file %s: %s\n",
|
||||||
|
Filename, StringBuffer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore the GetOpt globals */
|
||||||
|
|
||||||
|
AcpiGbl_Opterr = Opterr;
|
||||||
|
AcpiGbl_Optind = Optind;
|
||||||
|
|
||||||
|
fclose (ResponseFile);
|
||||||
|
return (OptStatus);
|
||||||
|
}
|
@ -310,7 +310,6 @@ ApCheckPredefinedReturnValue (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All other ops are very difficult or impossible to typecheck at
|
* All other ops are very difficult or impossible to typecheck at
|
||||||
* compile time. These include all Localx, Argx, and method
|
* compile time. These include all Localx, Argx, and method
|
||||||
@ -379,6 +378,7 @@ ApCheckForPredefinedObject (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,33 +624,53 @@ ApCheckObjectType (
|
|||||||
case PARSEOP_ONE:
|
case PARSEOP_ONE:
|
||||||
case PARSEOP_ONES:
|
case PARSEOP_ONES:
|
||||||
case PARSEOP_INTEGER:
|
case PARSEOP_INTEGER:
|
||||||
|
|
||||||
ReturnBtype = ACPI_RTYPE_INTEGER;
|
ReturnBtype = ACPI_RTYPE_INTEGER;
|
||||||
TypeName = "Integer";
|
TypeName = "Integer";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_STRING_LITERAL:
|
case PARSEOP_STRING_LITERAL:
|
||||||
|
|
||||||
ReturnBtype = ACPI_RTYPE_STRING;
|
ReturnBtype = ACPI_RTYPE_STRING;
|
||||||
TypeName = "String";
|
TypeName = "String";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_BUFFER:
|
case PARSEOP_BUFFER:
|
||||||
|
|
||||||
ReturnBtype = ACPI_RTYPE_BUFFER;
|
ReturnBtype = ACPI_RTYPE_BUFFER;
|
||||||
TypeName = "Buffer";
|
TypeName = "Buffer";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_PACKAGE:
|
case PARSEOP_PACKAGE:
|
||||||
case PARSEOP_VAR_PACKAGE:
|
case PARSEOP_VAR_PACKAGE:
|
||||||
|
|
||||||
ReturnBtype = ACPI_RTYPE_PACKAGE;
|
ReturnBtype = ACPI_RTYPE_PACKAGE;
|
||||||
TypeName = "Package";
|
TypeName = "Package";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_NAMESEG:
|
case PARSEOP_NAMESEG:
|
||||||
case PARSEOP_NAMESTRING:
|
case PARSEOP_NAMESTRING:
|
||||||
|
/*
|
||||||
|
* Ignore any named references within a package object.
|
||||||
|
*
|
||||||
|
* For Package objects, references are allowed instead of any of the
|
||||||
|
* standard data types (Integer/String/Buffer/Package). These
|
||||||
|
* references are resolved at runtime. NAMESEG and NAMESTRING are
|
||||||
|
* impossible to typecheck at compile time because the type of
|
||||||
|
* any named object can be changed at runtime (for example,
|
||||||
|
* CopyObject will change the type of the target object).
|
||||||
|
*/
|
||||||
|
if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT)
|
||||||
|
{
|
||||||
|
return (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnBtype = ACPI_RTYPE_REFERENCE;
|
ReturnBtype = ACPI_RTYPE_REFERENCE;
|
||||||
TypeName = "Reference";
|
TypeName = "Reference";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Not one of the supported object types */
|
/* Not one of the supported object types */
|
||||||
|
|
||||||
TypeName = UtGetOpName (Op->Asl.ParseOpcode);
|
TypeName = UtGetOpName (Op->Asl.ParseOpcode);
|
||||||
|
@ -319,6 +319,7 @@ RsLargeAddressCheck (
|
|||||||
case ACPI_RESOURCE_FLAG_MIF:
|
case ACPI_RESOURCE_FLAG_MIF:
|
||||||
case ACPI_RESOURCE_FLAG_MAF:
|
case ACPI_RESOURCE_FLAG_MAF:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_INVALID_ADDR_FLAGS, LengthOp, NULL);
|
AslError (ASL_ERROR, ASL_MSG_INVALID_ADDR_FLAGS, LengthOp, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -364,6 +365,7 @@ RsLargeAddressCheck (
|
|||||||
|
|
||||||
case (ACPI_RESOURCE_FLAG_MIF | ACPI_RESOURCE_FLAG_MAF):
|
case (ACPI_RESOURCE_FLAG_MIF | ACPI_RESOURCE_FLAG_MAF):
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_INVALID_ADDR_FLAGS, LengthOp, NULL);
|
AslError (ASL_ERROR, ASL_MSG_INVALID_ADDR_FLAGS, LengthOp, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -655,45 +657,54 @@ RsDoOneResourceDescriptor (
|
|||||||
switch (DescriptorTypeOp->Asl.ParseOpcode)
|
switch (DescriptorTypeOp->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_DMA:
|
case PARSEOP_DMA:
|
||||||
|
|
||||||
Rnode = RsDoDmaDescriptor (DescriptorTypeOp,
|
Rnode = RsDoDmaDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_FIXEDDMA:
|
case PARSEOP_FIXEDDMA:
|
||||||
|
|
||||||
Rnode = RsDoFixedDmaDescriptor (DescriptorTypeOp,
|
Rnode = RsDoFixedDmaDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DWORDIO:
|
case PARSEOP_DWORDIO:
|
||||||
|
|
||||||
Rnode = RsDoDwordIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoDwordIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DWORDMEMORY:
|
case PARSEOP_DWORDMEMORY:
|
||||||
|
|
||||||
Rnode = RsDoDwordMemoryDescriptor (DescriptorTypeOp,
|
Rnode = RsDoDwordMemoryDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DWORDSPACE:
|
case PARSEOP_DWORDSPACE:
|
||||||
|
|
||||||
Rnode = RsDoDwordSpaceDescriptor (DescriptorTypeOp,
|
Rnode = RsDoDwordSpaceDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_ENDDEPENDENTFN:
|
case PARSEOP_ENDDEPENDENTFN:
|
||||||
|
|
||||||
switch (*State)
|
switch (*State)
|
||||||
{
|
{
|
||||||
case ACPI_RSTATE_NORMAL:
|
case ACPI_RSTATE_NORMAL:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_MISSING_STARTDEPENDENT,
|
AslError (ASL_ERROR, ASL_MSG_MISSING_STARTDEPENDENT,
|
||||||
DescriptorTypeOp, NULL);
|
DescriptorTypeOp, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_RSTATE_START_DEPENDENT:
|
case ACPI_RSTATE_START_DEPENDENT:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
||||||
DescriptorTypeOp, NULL);
|
DescriptorTypeOp, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_RSTATE_DEPENDENT_LIST:
|
case ACPI_RSTATE_DEPENDENT_LIST:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -703,89 +714,107 @@ RsDoOneResourceDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_ENDTAG:
|
case PARSEOP_ENDTAG:
|
||||||
|
|
||||||
Rnode = RsDoEndTagDescriptor (DescriptorTypeOp,
|
Rnode = RsDoEndTagDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_EXTENDEDIO:
|
case PARSEOP_EXTENDEDIO:
|
||||||
|
|
||||||
Rnode = RsDoExtendedIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoExtendedIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_EXTENDEDMEMORY:
|
case PARSEOP_EXTENDEDMEMORY:
|
||||||
|
|
||||||
Rnode = RsDoExtendedMemoryDescriptor (DescriptorTypeOp,
|
Rnode = RsDoExtendedMemoryDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_EXTENDEDSPACE:
|
case PARSEOP_EXTENDEDSPACE:
|
||||||
|
|
||||||
Rnode = RsDoExtendedSpaceDescriptor (DescriptorTypeOp,
|
Rnode = RsDoExtendedSpaceDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_FIXEDIO:
|
case PARSEOP_FIXEDIO:
|
||||||
|
|
||||||
Rnode = RsDoFixedIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoFixedIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_INTERRUPT:
|
case PARSEOP_INTERRUPT:
|
||||||
|
|
||||||
Rnode = RsDoInterruptDescriptor (DescriptorTypeOp,
|
Rnode = RsDoInterruptDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_IO:
|
case PARSEOP_IO:
|
||||||
|
|
||||||
Rnode = RsDoIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_IRQ:
|
case PARSEOP_IRQ:
|
||||||
|
|
||||||
Rnode = RsDoIrqDescriptor (DescriptorTypeOp,
|
Rnode = RsDoIrqDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_IRQNOFLAGS:
|
case PARSEOP_IRQNOFLAGS:
|
||||||
|
|
||||||
Rnode = RsDoIrqNoFlagsDescriptor (DescriptorTypeOp,
|
Rnode = RsDoIrqNoFlagsDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_MEMORY24:
|
case PARSEOP_MEMORY24:
|
||||||
|
|
||||||
Rnode = RsDoMemory24Descriptor (DescriptorTypeOp,
|
Rnode = RsDoMemory24Descriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_MEMORY32:
|
case PARSEOP_MEMORY32:
|
||||||
|
|
||||||
Rnode = RsDoMemory32Descriptor (DescriptorTypeOp,
|
Rnode = RsDoMemory32Descriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_MEMORY32FIXED:
|
case PARSEOP_MEMORY32FIXED:
|
||||||
|
|
||||||
Rnode = RsDoMemory32FixedDescriptor (DescriptorTypeOp,
|
Rnode = RsDoMemory32FixedDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_QWORDIO:
|
case PARSEOP_QWORDIO:
|
||||||
|
|
||||||
Rnode = RsDoQwordIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoQwordIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_QWORDMEMORY:
|
case PARSEOP_QWORDMEMORY:
|
||||||
|
|
||||||
Rnode = RsDoQwordMemoryDescriptor (DescriptorTypeOp,
|
Rnode = RsDoQwordMemoryDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_QWORDSPACE:
|
case PARSEOP_QWORDSPACE:
|
||||||
|
|
||||||
Rnode = RsDoQwordSpaceDescriptor (DescriptorTypeOp,
|
Rnode = RsDoQwordSpaceDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_REGISTER:
|
case PARSEOP_REGISTER:
|
||||||
|
|
||||||
Rnode = RsDoGeneralRegisterDescriptor (DescriptorTypeOp,
|
Rnode = RsDoGeneralRegisterDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_STARTDEPENDENTFN:
|
case PARSEOP_STARTDEPENDENTFN:
|
||||||
|
|
||||||
switch (*State)
|
switch (*State)
|
||||||
{
|
{
|
||||||
case ACPI_RSTATE_START_DEPENDENT:
|
case ACPI_RSTATE_START_DEPENDENT:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
||||||
DescriptorTypeOp, NULL);
|
DescriptorTypeOp, NULL);
|
||||||
break;
|
break;
|
||||||
@ -793,6 +822,7 @@ RsDoOneResourceDescriptor (
|
|||||||
case ACPI_RSTATE_NORMAL:
|
case ACPI_RSTATE_NORMAL:
|
||||||
case ACPI_RSTATE_DEPENDENT_LIST:
|
case ACPI_RSTATE_DEPENDENT_LIST:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -803,9 +833,11 @@ RsDoOneResourceDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_STARTDEPENDENTFN_NOPRI:
|
case PARSEOP_STARTDEPENDENTFN_NOPRI:
|
||||||
|
|
||||||
switch (*State)
|
switch (*State)
|
||||||
{
|
{
|
||||||
case ACPI_RSTATE_START_DEPENDENT:
|
case ACPI_RSTATE_START_DEPENDENT:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
AslError (ASL_ERROR, ASL_MSG_DEPENDENT_NESTING,
|
||||||
DescriptorTypeOp, NULL);
|
DescriptorTypeOp, NULL);
|
||||||
break;
|
break;
|
||||||
@ -813,6 +845,7 @@ RsDoOneResourceDescriptor (
|
|||||||
case ACPI_RSTATE_NORMAL:
|
case ACPI_RSTATE_NORMAL:
|
||||||
case ACPI_RSTATE_DEPENDENT_LIST:
|
case ACPI_RSTATE_DEPENDENT_LIST:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -823,60 +856,72 @@ RsDoOneResourceDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_VENDORLONG:
|
case PARSEOP_VENDORLONG:
|
||||||
|
|
||||||
Rnode = RsDoVendorLargeDescriptor (DescriptorTypeOp,
|
Rnode = RsDoVendorLargeDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_VENDORSHORT:
|
case PARSEOP_VENDORSHORT:
|
||||||
|
|
||||||
Rnode = RsDoVendorSmallDescriptor (DescriptorTypeOp,
|
Rnode = RsDoVendorSmallDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_WORDBUSNUMBER:
|
case PARSEOP_WORDBUSNUMBER:
|
||||||
|
|
||||||
Rnode = RsDoWordBusNumberDescriptor (DescriptorTypeOp,
|
Rnode = RsDoWordBusNumberDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_WORDIO:
|
case PARSEOP_WORDIO:
|
||||||
|
|
||||||
Rnode = RsDoWordIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoWordIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_WORDSPACE:
|
case PARSEOP_WORDSPACE:
|
||||||
|
|
||||||
Rnode = RsDoWordSpaceDescriptor (DescriptorTypeOp,
|
Rnode = RsDoWordSpaceDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_GPIO_INT:
|
case PARSEOP_GPIO_INT:
|
||||||
|
|
||||||
Rnode = RsDoGpioIntDescriptor (DescriptorTypeOp,
|
Rnode = RsDoGpioIntDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_GPIO_IO:
|
case PARSEOP_GPIO_IO:
|
||||||
|
|
||||||
Rnode = RsDoGpioIoDescriptor (DescriptorTypeOp,
|
Rnode = RsDoGpioIoDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_I2C_SERIALBUS:
|
case PARSEOP_I2C_SERIALBUS:
|
||||||
|
|
||||||
Rnode = RsDoI2cSerialBusDescriptor (DescriptorTypeOp,
|
Rnode = RsDoI2cSerialBusDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_SPI_SERIALBUS:
|
case PARSEOP_SPI_SERIALBUS:
|
||||||
|
|
||||||
Rnode = RsDoSpiSerialBusDescriptor (DescriptorTypeOp,
|
Rnode = RsDoSpiSerialBusDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_UART_SERIALBUS:
|
case PARSEOP_UART_SERIALBUS:
|
||||||
|
|
||||||
Rnode = RsDoUartSerialBusDescriptor (DescriptorTypeOp,
|
Rnode = RsDoUartSerialBusDescriptor (DescriptorTypeOp,
|
||||||
CurrentByteOffset);
|
CurrentByteOffset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DEFAULT_ARG:
|
case PARSEOP_DEFAULT_ARG:
|
||||||
|
|
||||||
/* Just ignore any of these, they are used as fillers/placeholders */
|
/* Just ignore any of these, they are used as fillers/placeholders */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
printf ("Unknown resource descriptor type [%s]\n",
|
printf ("Unknown resource descriptor type [%s]\n",
|
||||||
DescriptorTypeOp->Asl.ParseOpName);
|
DescriptorTypeOp->Asl.ParseOpName);
|
||||||
break;
|
break;
|
||||||
|
@ -245,6 +245,7 @@ RsDoFixedDmaDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Ignore any extra nodes */
|
default: /* Ignore any extra nodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,7 +617,6 @@ RsDoGpioIoDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 9: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
case 9: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Always set the VendorOffset even if there is no Vendor Data.
|
* Always set the VendorOffset even if there is no Vendor Data.
|
||||||
* This field is required in order to calculate the length
|
* This field is required in order to calculate the length
|
||||||
@ -812,6 +811,7 @@ RsDoI2cSerialBusDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Ignore any extra nodes */
|
default: /* Ignore any extra nodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -986,6 +986,7 @@ RsDoSpiSerialBusDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Ignore any extra nodes */
|
default: /* Ignore any extra nodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1177,6 +1178,7 @@ RsDoUartSerialBusDescriptor (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Ignore any extra nodes */
|
default: /* Ignore any extra nodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,6 +534,7 @@ AslDoOneFile (
|
|||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
printf ("Unknown file type %X\n", Gbl_FileType);
|
printf ("Unknown file type %X\n", Gbl_FileType);
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -395,16 +395,19 @@ count (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
TotalKeywords++;
|
TotalKeywords++;
|
||||||
TotalNamedObjects++;
|
TotalNamedObjects++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
TotalKeywords++;
|
TotalKeywords++;
|
||||||
TotalExecutableOpcodes++;
|
TotalExecutableOpcodes++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,6 +597,7 @@ DoCharacter:
|
|||||||
goto CompletedString;
|
goto CompletedString;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -605,34 +609,42 @@ DoCharacter:
|
|||||||
switch (StringChar)
|
switch (StringChar)
|
||||||
{
|
{
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
||||||
StringChar = 0x07; /* BELL */
|
StringChar = 0x07; /* BELL */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'b':
|
case 'b':
|
||||||
|
|
||||||
StringChar = 0x08; /* BACKSPACE */
|
StringChar = 0x08; /* BACKSPACE */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
|
|
||||||
StringChar = 0x0C; /* FORMFEED */
|
StringChar = 0x0C; /* FORMFEED */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
|
|
||||||
StringChar = 0x0A; /* LINEFEED */
|
StringChar = 0x0A; /* LINEFEED */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
|
|
||||||
StringChar = 0x0D; /* CARRIAGE RETURN*/
|
StringChar = 0x0D; /* CARRIAGE RETURN*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
|
|
||||||
StringChar = 0x09; /* HORIZONTAL TAB */
|
StringChar = 0x09; /* HORIZONTAL TAB */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|
||||||
StringChar = 0x0B; /* VERTICAL TAB */
|
StringChar = 0x0B; /* VERTICAL TAB */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
|
|
||||||
State = ASL_HEX_CONSTANT;
|
State = ASL_HEX_CONSTANT;
|
||||||
i = 0;
|
i = 0;
|
||||||
continue;
|
continue;
|
||||||
@ -640,6 +652,7 @@ DoCharacter:
|
|||||||
case '\'': /* Single Quote */
|
case '\'': /* Single Quote */
|
||||||
case '\"': /* Double Quote */
|
case '\"': /* Double Quote */
|
||||||
case '\\': /* Backslash */
|
case '\\': /* Backslash */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -709,7 +722,6 @@ DoCharacter:
|
|||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
case ASL_HEX_CONSTANT:
|
case ASL_HEX_CONSTANT:
|
||||||
|
|
||||||
/* Up to two hex digits allowed */
|
/* Up to two hex digits allowed */
|
||||||
@ -755,6 +767,7 @@ DoCharacter:
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,15 +299,16 @@ TrTransformSubtree (
|
|||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_DEFINITIONBLOCK:
|
case PARSEOP_DEFINITIONBLOCK:
|
||||||
|
|
||||||
TrDoDefinitionBlock (Op);
|
TrDoDefinitionBlock (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_SWITCH:
|
case PARSEOP_SWITCH:
|
||||||
|
|
||||||
TrDoSwitch (Op);
|
TrDoSwitch (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_METHOD:
|
case PARSEOP_METHOD:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TBD: Zero the tempname (_T_x) count. Probably shouldn't be a global,
|
* TBD: Zero the tempname (_T_x) count. Probably shouldn't be a global,
|
||||||
* however
|
* however
|
||||||
@ -316,7 +317,9 @@ TrTransformSubtree (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do here for other opcodes */
|
/* Nothing to do here for other opcodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -700,18 +703,21 @@ TrDoSwitch (
|
|||||||
switch (Btype)
|
switch (Btype)
|
||||||
{
|
{
|
||||||
case ACPI_BTYPE_INTEGER:
|
case ACPI_BTYPE_INTEGER:
|
||||||
|
|
||||||
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
|
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
|
||||||
(UINT64) 0);
|
(UINT64) 0);
|
||||||
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_BTYPE_STRING:
|
case ACPI_BTYPE_STRING:
|
||||||
|
|
||||||
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
|
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
|
||||||
(UINT64) ACPI_TO_INTEGER (""));
|
(UINT64) ACPI_TO_INTEGER (""));
|
||||||
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_BTYPE_BUFFER:
|
case ACPI_BTYPE_BUFFER:
|
||||||
|
|
||||||
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
|
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
|
||||||
(UINT64) 0));
|
(UINT64) 0));
|
||||||
Next = NewOp2->Asl.Next;
|
Next = NewOp2->Asl.Next;
|
||||||
@ -728,6 +734,7 @@ TrDoSwitch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,20 +185,24 @@ TrUpdateNode (
|
|||||||
switch (ParseOpcode)
|
switch (ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_BYTECONST:
|
case PARSEOP_BYTECONST:
|
||||||
|
|
||||||
Op->Asl.Value.Integer = ACPI_UINT8_MAX;
|
Op->Asl.Value.Integer = ACPI_UINT8_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_WORDCONST:
|
case PARSEOP_WORDCONST:
|
||||||
|
|
||||||
Op->Asl.Value.Integer = ACPI_UINT16_MAX;
|
Op->Asl.Value.Integer = ACPI_UINT16_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DWORDCONST:
|
case PARSEOP_DWORDCONST:
|
||||||
|
|
||||||
Op->Asl.Value.Integer = ACPI_UINT32_MAX;
|
Op->Asl.Value.Integer = ACPI_UINT32_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Don't need to do the QWORD case */
|
/* Don't need to do the QWORD case */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Don't care about others */
|
/* Don't care about others */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -214,22 +218,27 @@ TrUpdateNode (
|
|||||||
switch (ParseOpcode)
|
switch (ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_BYTECONST:
|
case PARSEOP_BYTECONST:
|
||||||
|
|
||||||
UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
|
UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
|
||||||
Op->Asl.Value.Integer &= ACPI_UINT8_MAX;
|
Op->Asl.Value.Integer &= ACPI_UINT8_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_WORDCONST:
|
case PARSEOP_WORDCONST:
|
||||||
|
|
||||||
UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
|
UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
|
||||||
Op->Asl.Value.Integer &= ACPI_UINT16_MAX;
|
Op->Asl.Value.Integer &= ACPI_UINT16_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DWORDCONST:
|
case PARSEOP_DWORDCONST:
|
||||||
|
|
||||||
UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
|
UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
|
||||||
Op->Asl.Value.Integer &= ACPI_UINT32_MAX;
|
Op->Asl.Value.Integer &= ACPI_UINT32_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Don't care about others, don't need to check QWORD */
|
/* Don't care about others, don't need to check QWORD */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,54 +266,71 @@ TrGetNodeFlagName (
|
|||||||
switch (Flags)
|
switch (Flags)
|
||||||
{
|
{
|
||||||
case NODE_VISITED:
|
case NODE_VISITED:
|
||||||
|
|
||||||
return ("NODE_VISITED");
|
return ("NODE_VISITED");
|
||||||
|
|
||||||
case NODE_AML_PACKAGE:
|
case NODE_AML_PACKAGE:
|
||||||
|
|
||||||
return ("NODE_AML_PACKAGE");
|
return ("NODE_AML_PACKAGE");
|
||||||
|
|
||||||
case NODE_IS_TARGET:
|
case NODE_IS_TARGET:
|
||||||
|
|
||||||
return ("NODE_IS_TARGET");
|
return ("NODE_IS_TARGET");
|
||||||
|
|
||||||
case NODE_IS_RESOURCE_DESC:
|
case NODE_IS_RESOURCE_DESC:
|
||||||
|
|
||||||
return ("NODE_IS_RESOURCE_DESC");
|
return ("NODE_IS_RESOURCE_DESC");
|
||||||
|
|
||||||
case NODE_IS_RESOURCE_FIELD:
|
case NODE_IS_RESOURCE_FIELD:
|
||||||
|
|
||||||
return ("NODE_IS_RESOURCE_FIELD");
|
return ("NODE_IS_RESOURCE_FIELD");
|
||||||
|
|
||||||
case NODE_HAS_NO_EXIT:
|
case NODE_HAS_NO_EXIT:
|
||||||
|
|
||||||
return ("NODE_HAS_NO_EXIT");
|
return ("NODE_HAS_NO_EXIT");
|
||||||
|
|
||||||
case NODE_IF_HAS_NO_EXIT:
|
case NODE_IF_HAS_NO_EXIT:
|
||||||
|
|
||||||
return ("NODE_IF_HAS_NO_EXIT");
|
return ("NODE_IF_HAS_NO_EXIT");
|
||||||
|
|
||||||
case NODE_NAME_INTERNALIZED:
|
case NODE_NAME_INTERNALIZED:
|
||||||
|
|
||||||
return ("NODE_NAME_INTERNALIZED");
|
return ("NODE_NAME_INTERNALIZED");
|
||||||
|
|
||||||
case NODE_METHOD_NO_RETVAL:
|
case NODE_METHOD_NO_RETVAL:
|
||||||
|
|
||||||
return ("NODE_METHOD_NO_RETVAL");
|
return ("NODE_METHOD_NO_RETVAL");
|
||||||
|
|
||||||
case NODE_METHOD_SOME_NO_RETVAL:
|
case NODE_METHOD_SOME_NO_RETVAL:
|
||||||
|
|
||||||
return ("NODE_METHOD_SOME_NO_RETVAL");
|
return ("NODE_METHOD_SOME_NO_RETVAL");
|
||||||
|
|
||||||
case NODE_RESULT_NOT_USED:
|
case NODE_RESULT_NOT_USED:
|
||||||
|
|
||||||
return ("NODE_RESULT_NOT_USED");
|
return ("NODE_RESULT_NOT_USED");
|
||||||
|
|
||||||
case NODE_METHOD_TYPED:
|
case NODE_METHOD_TYPED:
|
||||||
|
|
||||||
return ("NODE_METHOD_TYPED");
|
return ("NODE_METHOD_TYPED");
|
||||||
|
|
||||||
case NODE_COMPILE_TIME_CONST:
|
case NODE_COMPILE_TIME_CONST:
|
||||||
|
|
||||||
return ("NODE_COMPILE_TIME_CONST");
|
return ("NODE_COMPILE_TIME_CONST");
|
||||||
|
|
||||||
case NODE_IS_TERM_ARG:
|
case NODE_IS_TERM_ARG:
|
||||||
|
|
||||||
return ("NODE_IS_TERM_ARG");
|
return ("NODE_IS_TERM_ARG");
|
||||||
|
|
||||||
case NODE_WAS_ONES_OP:
|
case NODE_WAS_ONES_OP:
|
||||||
|
|
||||||
return ("NODE_WAS_ONES_OP");
|
return ("NODE_WAS_ONES_OP");
|
||||||
|
|
||||||
case NODE_IS_NAME_DECLARATION:
|
case NODE_IS_NAME_DECLARATION:
|
||||||
|
|
||||||
return ("NODE_IS_NAME_DECLARATION");
|
return ("NODE_IS_NAME_DECLARATION");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return ("Multiple Flags (or unknown flag) set");
|
return ("Multiple Flags (or unknown flag) set");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,11 +496,13 @@ TrCreateConstantLeafNode (
|
|||||||
switch (ParseOpcode)
|
switch (ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP___LINE__:
|
case PARSEOP___LINE__:
|
||||||
|
|
||||||
Op = TrAllocateNode (PARSEOP_INTEGER);
|
Op = TrAllocateNode (PARSEOP_INTEGER);
|
||||||
Op->Asl.Value.Integer = Op->Asl.LineNumber;
|
Op->Asl.Value.Integer = Op->Asl.LineNumber;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP___PATH__:
|
case PARSEOP___PATH__:
|
||||||
|
|
||||||
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
||||||
|
|
||||||
/* Op.Asl.Filename contains the full pathname to the file */
|
/* Op.Asl.Filename contains the full pathname to the file */
|
||||||
@ -483,6 +511,7 @@ TrCreateConstantLeafNode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP___FILE__:
|
case PARSEOP___FILE__:
|
||||||
|
|
||||||
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
||||||
|
|
||||||
/* Get the simple filename from the full path */
|
/* Get the simple filename from the full path */
|
||||||
@ -493,6 +522,7 @@ TrCreateConstantLeafNode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP___DATE__:
|
case PARSEOP___DATE__:
|
||||||
|
|
||||||
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
|
||||||
|
|
||||||
/* Get a copy of the current time */
|
/* Get a copy of the current time */
|
||||||
@ -507,6 +537,7 @@ TrCreateConstantLeafNode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* This would be an internal error */
|
default: /* This would be an internal error */
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,30 +582,37 @@ TrCreateValuedLeafNode (
|
|||||||
switch (ParseOpcode)
|
switch (ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_STRING_LITERAL:
|
case PARSEOP_STRING_LITERAL:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
|
DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_NAMESEG:
|
case PARSEOP_NAMESEG:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
|
DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_NAMESTRING:
|
case PARSEOP_NAMESTRING:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
|
DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_EISAID:
|
case PARSEOP_EISAID:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
|
DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_METHOD:
|
case PARSEOP_METHOD:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
|
DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_INTEGER:
|
case PARSEOP_INTEGER:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
|
DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,20 +666,25 @@ TrCreateNode (
|
|||||||
switch (ParseOpcode)
|
switch (ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_DEFINITIONBLOCK:
|
case PARSEOP_DEFINITIONBLOCK:
|
||||||
|
|
||||||
RootNode = Op;
|
RootNode = Op;
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
|
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_OPERATIONREGION:
|
case PARSEOP_OPERATIONREGION:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
|
DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_OR:
|
case PARSEOP_OR:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "OR->");
|
DbgPrint (ASL_PARSE_OUTPUT, "OR->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other opcodes */
|
/* Nothing to do for other opcodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -746,20 +789,25 @@ TrLinkChildren (
|
|||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
case PARSEOP_DEFINITIONBLOCK:
|
case PARSEOP_DEFINITIONBLOCK:
|
||||||
|
|
||||||
RootNode = Op;
|
RootNode = Op;
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
|
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_OPERATIONREGION:
|
case PARSEOP_OPERATIONREGION:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
|
DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_OR:
|
case PARSEOP_OR:
|
||||||
|
|
||||||
DbgPrint (ASL_PARSE_OUTPUT, "OR->");
|
DbgPrint (ASL_PARSE_OUTPUT, "OR->");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other opcodes */
|
/* Nothing to do for other opcodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,7 +1154,6 @@ TrWalkParseTree (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ASL_WALK_VISIT_UPWARD:
|
case ASL_WALK_VISIT_UPWARD:
|
||||||
|
|
||||||
while (Op)
|
while (Op)
|
||||||
@ -1161,7 +1208,6 @@ TrWalkParseTree (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ASL_WALK_VISIT_TWICE:
|
case ASL_WALK_VISIT_TWICE:
|
||||||
|
|
||||||
while (Op)
|
while (Op)
|
||||||
|
@ -81,16 +81,17 @@
|
|||||||
|
|
||||||
typedef struct asl_method_info
|
typedef struct asl_method_info
|
||||||
{
|
{
|
||||||
UINT8 NumArguments;
|
ACPI_PARSE_OBJECT *Op;
|
||||||
UINT8 LocalInitialized[ACPI_METHOD_NUM_LOCALS];
|
struct asl_method_info *Next;
|
||||||
UINT8 ArgInitialized[ACPI_METHOD_NUM_ARGS];
|
|
||||||
UINT32 ValidArgTypes[ACPI_METHOD_NUM_ARGS];
|
UINT32 ValidArgTypes[ACPI_METHOD_NUM_ARGS];
|
||||||
UINT32 ValidReturnTypes;
|
UINT32 ValidReturnTypes;
|
||||||
UINT32 NumReturnNoValue;
|
UINT32 NumReturnNoValue;
|
||||||
UINT32 NumReturnWithValue;
|
UINT32 NumReturnWithValue;
|
||||||
ACPI_PARSE_OBJECT *Op;
|
UINT8 NumArguments;
|
||||||
struct asl_method_info *Next;
|
UINT8 LocalInitialized[ACPI_METHOD_NUM_LOCALS];
|
||||||
|
UINT8 ArgInitialized[ACPI_METHOD_NUM_ARGS];
|
||||||
UINT8 HasBeenTyped;
|
UINT8 HasBeenTyped;
|
||||||
|
UINT8 ShouldBeSerialized;
|
||||||
|
|
||||||
} ASL_METHOD_INFO;
|
} ASL_METHOD_INFO;
|
||||||
|
|
||||||
|
@ -956,6 +956,7 @@ UtStrtoul64 (
|
|||||||
case 8:
|
case 8:
|
||||||
case 10:
|
case 10:
|
||||||
case 16:
|
case 16:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1090,19 +1091,24 @@ UtStrtoul64 (
|
|||||||
switch (Base)
|
switch (Base)
|
||||||
{
|
{
|
||||||
case 8:
|
case 8:
|
||||||
|
|
||||||
Status = AE_BAD_OCTAL_CONSTANT;
|
Status = AE_BAD_OCTAL_CONSTANT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
|
|
||||||
Status = AE_BAD_DECIMAL_CONSTANT;
|
Status = AE_BAD_DECIMAL_CONSTANT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
|
|
||||||
Status = AE_BAD_HEX_CONSTANT;
|
Status = AE_BAD_HEX_CONSTANT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Base validated above */
|
/* Base validated above */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +122,7 @@ AnMethodTypingWalkEnd (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,6 +177,7 @@ AnOperandTypecheckWalkEnd (
|
|||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,6 +254,7 @@ AnOperandTypecheckWalkEnd (
|
|||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,11 +382,13 @@ AnOperandTypecheckWalkEnd (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_DEBUG:
|
case PARSEOP_DEBUG:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARSEOP_REFOF:
|
case PARSEOP_REFOF:
|
||||||
case PARSEOP_INDEX:
|
case PARSEOP_INDEX:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -391,6 +396,7 @@ AnOperandTypecheckWalkEnd (
|
|||||||
|
|
||||||
case ARGI_INTEGER:
|
case ARGI_INTEGER:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,6 +440,7 @@ AnOperandTypecheckWalkEnd (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,9 +527,11 @@ AnOtherSemanticAnalysisWalkBegin (
|
|||||||
case PARSEOP_ACQUIRE:
|
case PARSEOP_ACQUIRE:
|
||||||
case PARSEOP_WAIT:
|
case PARSEOP_WAIT:
|
||||||
case PARSEOP_LOADTABLE:
|
case PARSEOP_LOADTABLE:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AslError (ASL_ERROR, ASL_MSG_RESULT_NOT_USED,
|
AslError (ASL_ERROR, ASL_MSG_RESULT_NOT_USED,
|
||||||
Op, Op->Asl.ExternalName);
|
Op, Op->Asl.ExternalName);
|
||||||
break;
|
break;
|
||||||
@ -661,6 +670,7 @@ AnOtherSemanticAnalysisWalkBegin (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,27 +533,33 @@ XfNamespaceLocateBegin (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CREATE_BIT_FIELD_OP:
|
case AML_CREATE_BIT_FIELD_OP:
|
||||||
|
|
||||||
FieldBitLength = 1;
|
FieldBitLength = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CREATE_BYTE_FIELD_OP:
|
case AML_CREATE_BYTE_FIELD_OP:
|
||||||
case AML_INDEX_OP:
|
case AML_INDEX_OP:
|
||||||
|
|
||||||
FieldBitLength = 8;
|
FieldBitLength = 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CREATE_WORD_FIELD_OP:
|
case AML_CREATE_WORD_FIELD_OP:
|
||||||
|
|
||||||
FieldBitLength = 16;
|
FieldBitLength = 16;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CREATE_DWORD_FIELD_OP:
|
case AML_CREATE_DWORD_FIELD_OP:
|
||||||
|
|
||||||
FieldBitLength = 32;
|
FieldBitLength = 32;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CREATE_QWORD_FIELD_OP:
|
case AML_CREATE_QWORD_FIELD_OP:
|
||||||
|
|
||||||
FieldBitLength = 64;
|
FieldBitLength = 64;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
FieldBitLength = 0;
|
FieldBitLength = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -595,6 +601,7 @@ XfNamespaceLocateBegin (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,18 +735,22 @@ XfNamespaceLocateBegin (
|
|||||||
case AML_FIELD_ACCESS_BYTE:
|
case AML_FIELD_ACCESS_BYTE:
|
||||||
case AML_FIELD_ACCESS_BUFFER:
|
case AML_FIELD_ACCESS_BUFFER:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
MinimumLength = 1;
|
MinimumLength = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_FIELD_ACCESS_WORD:
|
case AML_FIELD_ACCESS_WORD:
|
||||||
|
|
||||||
MinimumLength = 2;
|
MinimumLength = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_FIELD_ACCESS_DWORD:
|
case AML_FIELD_ACCESS_DWORD:
|
||||||
|
|
||||||
MinimumLength = 4;
|
MinimumLength = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_FIELD_ACCESS_QWORD:
|
case AML_FIELD_ACCESS_QWORD:
|
||||||
|
|
||||||
MinimumLength = 8;
|
MinimumLength = 8;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -784,6 +795,7 @@ XfNamespaceLocateBegin (
|
|||||||
default:
|
default:
|
||||||
|
|
||||||
/* Nothing to do for other address spaces */
|
/* Nothing to do for other address spaces */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,18 +127,22 @@ DtDoOperator (
|
|||||||
switch (Operator)
|
switch (Operator)
|
||||||
{
|
{
|
||||||
case EXPOP_ONES_COMPLIMENT:
|
case EXPOP_ONES_COMPLIMENT:
|
||||||
|
|
||||||
Result = ~RightValue;
|
Result = ~RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_LOGICAL_NOT:
|
case EXPOP_LOGICAL_NOT:
|
||||||
|
|
||||||
Result = !RightValue;
|
Result = !RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_MULTIPLY:
|
case EXPOP_MULTIPLY:
|
||||||
|
|
||||||
Result = LeftValue * RightValue;
|
Result = LeftValue * RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_DIVIDE:
|
case EXPOP_DIVIDE:
|
||||||
|
|
||||||
if (!RightValue)
|
if (!RightValue)
|
||||||
{
|
{
|
||||||
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
|
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
|
||||||
@ -149,6 +153,7 @@ DtDoOperator (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_MODULO:
|
case EXPOP_MODULO:
|
||||||
|
|
||||||
if (!RightValue)
|
if (!RightValue)
|
||||||
{
|
{
|
||||||
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
|
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
|
||||||
@ -163,58 +168,72 @@ DtDoOperator (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_SUBTRACT:
|
case EXPOP_SUBTRACT:
|
||||||
|
|
||||||
Result = LeftValue - RightValue;
|
Result = LeftValue - RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_SHIFT_RIGHT:
|
case EXPOP_SHIFT_RIGHT:
|
||||||
|
|
||||||
Result = LeftValue >> RightValue;
|
Result = LeftValue >> RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_SHIFT_LEFT:
|
case EXPOP_SHIFT_LEFT:
|
||||||
|
|
||||||
Result = LeftValue << RightValue;
|
Result = LeftValue << RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_LESS:
|
case EXPOP_LESS:
|
||||||
|
|
||||||
Result = LeftValue < RightValue;
|
Result = LeftValue < RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_GREATER:
|
case EXPOP_GREATER:
|
||||||
|
|
||||||
Result = LeftValue > RightValue;
|
Result = LeftValue > RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_LESS_EQUAL:
|
case EXPOP_LESS_EQUAL:
|
||||||
|
|
||||||
Result = LeftValue <= RightValue;
|
Result = LeftValue <= RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_GREATER_EQUAL:
|
case EXPOP_GREATER_EQUAL:
|
||||||
|
|
||||||
Result = LeftValue >= RightValue;
|
Result = LeftValue >= RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_EQUAL:
|
case EXPOP_EQUAL:
|
||||||
|
|
||||||
Result = LeftValue == RightValue;
|
Result = LeftValue == RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_NOT_EQUAL:
|
case EXPOP_NOT_EQUAL:
|
||||||
|
|
||||||
Result = LeftValue != RightValue;
|
Result = LeftValue != RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_AND:
|
case EXPOP_AND:
|
||||||
|
|
||||||
Result = LeftValue & RightValue;
|
Result = LeftValue & RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_XOR:
|
case EXPOP_XOR:
|
||||||
|
|
||||||
Result = LeftValue ^ RightValue;
|
Result = LeftValue ^ RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_OR:
|
case EXPOP_OR:
|
||||||
|
|
||||||
Result = LeftValue | RightValue;
|
Result = LeftValue | RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_LOGICAL_AND:
|
case EXPOP_LOGICAL_AND:
|
||||||
|
|
||||||
Result = LeftValue && RightValue;
|
Result = LeftValue && RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXPOP_LOGICAL_OR:
|
case EXPOP_LOGICAL_OR:
|
||||||
|
|
||||||
Result = LeftValue || RightValue;
|
Result = LeftValue || RightValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -104,14 +104,17 @@ DtCompileOneField (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case DT_FIELD_TYPE_INTEGER:
|
case DT_FIELD_TYPE_INTEGER:
|
||||||
|
|
||||||
DtCompileInteger (Buffer, Field, ByteLength, Flags);
|
DtCompileInteger (Buffer, Field, ByteLength, Flags);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_FIELD_TYPE_STRING:
|
case DT_FIELD_TYPE_STRING:
|
||||||
|
|
||||||
DtCompileString (Buffer, Field, ByteLength);
|
DtCompileString (Buffer, Field, ByteLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_FIELD_TYPE_UUID:
|
case DT_FIELD_TYPE_UUID:
|
||||||
|
|
||||||
Status = DtCompileUuid (Buffer, Field, ByteLength);
|
Status = DtCompileUuid (Buffer, Field, ByteLength);
|
||||||
if (ACPI_SUCCESS (Status))
|
if (ACPI_SUCCESS (Status))
|
||||||
{
|
{
|
||||||
@ -121,17 +124,21 @@ DtCompileOneField (
|
|||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
|
|
||||||
case DT_FIELD_TYPE_BUFFER:
|
case DT_FIELD_TYPE_BUFFER:
|
||||||
|
|
||||||
DtCompileBuffer (Buffer, Field->Value, Field, ByteLength);
|
DtCompileBuffer (Buffer, Field->Value, Field, ByteLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_FIELD_TYPE_UNICODE:
|
case DT_FIELD_TYPE_UNICODE:
|
||||||
|
|
||||||
DtCompileUnicode (Buffer, Field, ByteLength);
|
DtCompileUnicode (Buffer, Field, ByteLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_FIELD_TYPE_DEVICE_PATH:
|
case DT_FIELD_TYPE_DEVICE_PATH:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid field type");
|
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid field type");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -382,10 +389,12 @@ DtNormalizeBuffer (
|
|||||||
case ']':
|
case ']':
|
||||||
case ' ':
|
case ' ':
|
||||||
case ',':
|
case ',':
|
||||||
|
|
||||||
Separator = TRUE;
|
Separator = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if (Separator)
|
if (Separator)
|
||||||
{
|
{
|
||||||
/* Insert blank as the standard separator */
|
/* Insert blank as the standard separator */
|
||||||
|
@ -426,7 +426,7 @@ DtGetNextLine (
|
|||||||
UINT32 State = DT_NORMAL_TEXT;
|
UINT32 State = DT_NORMAL_TEXT;
|
||||||
UINT32 CurrentLineOffset;
|
UINT32 CurrentLineOffset;
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
char c;
|
int c;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; ;)
|
for (i = 0; ;)
|
||||||
@ -440,7 +440,7 @@ DtGetNextLine (
|
|||||||
UtExpandLineBuffers ();
|
UtExpandLineBuffers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
c = (char) getc (Handle);
|
c = getc (Handle);
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
{
|
{
|
||||||
switch (State)
|
switch (State)
|
||||||
@ -452,6 +452,7 @@ DtGetNextLine (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,14 +480,16 @@ DtGetNextLine (
|
|||||||
|
|
||||||
/* Normal text, insert char into line buffer */
|
/* Normal text, insert char into line buffer */
|
||||||
|
|
||||||
Gbl_CurrentLineBuffer[i] = c;
|
Gbl_CurrentLineBuffer[i] = (char) c;
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '/':
|
case '/':
|
||||||
|
|
||||||
State = DT_START_COMMENT;
|
State = DT_START_COMMENT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '"':
|
case '"':
|
||||||
|
|
||||||
State = DT_START_QUOTED_STRING;
|
State = DT_START_QUOTED_STRING;
|
||||||
LineNotAllBlanks = TRUE;
|
LineNotAllBlanks = TRUE;
|
||||||
i++;
|
i++;
|
||||||
@ -501,6 +504,7 @@ DtGetNextLine (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|
||||||
CurrentLineOffset = Gbl_NextLineOffset;
|
CurrentLineOffset = Gbl_NextLineOffset;
|
||||||
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
||||||
Gbl_CurrentLineNumber++;
|
Gbl_CurrentLineNumber++;
|
||||||
@ -527,6 +531,7 @@ DtGetNextLine (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if (c != ' ')
|
if (c != ' ')
|
||||||
{
|
{
|
||||||
LineNotAllBlanks = TRUE;
|
LineNotAllBlanks = TRUE;
|
||||||
@ -541,26 +546,30 @@ DtGetNextLine (
|
|||||||
|
|
||||||
/* Insert raw chars until end of quoted string */
|
/* Insert raw chars until end of quoted string */
|
||||||
|
|
||||||
Gbl_CurrentLineBuffer[i] = c;
|
Gbl_CurrentLineBuffer[i] = (char) c;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '"':
|
case '"':
|
||||||
|
|
||||||
State = DT_NORMAL_TEXT;
|
State = DT_NORMAL_TEXT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\\':
|
case '\\':
|
||||||
|
|
||||||
State = DT_ESCAPE_SEQUENCE;
|
State = DT_ESCAPE_SEQUENCE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|
||||||
AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
|
AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
|
||||||
Gbl_CurrentLineNumber++);
|
Gbl_CurrentLineNumber++);
|
||||||
State = DT_NORMAL_TEXT;
|
State = DT_NORMAL_TEXT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Get next character */
|
default: /* Get next character */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -569,7 +578,7 @@ DtGetNextLine (
|
|||||||
|
|
||||||
/* Just copy the escaped character. TBD: sufficient for table compiler? */
|
/* Just copy the escaped character. TBD: sufficient for table compiler? */
|
||||||
|
|
||||||
Gbl_CurrentLineBuffer[i] = c;
|
Gbl_CurrentLineBuffer[i] = (char) c;
|
||||||
i++;
|
i++;
|
||||||
State = DT_START_QUOTED_STRING;
|
State = DT_START_QUOTED_STRING;
|
||||||
break;
|
break;
|
||||||
@ -581,21 +590,24 @@ DtGetNextLine (
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '*':
|
case '*':
|
||||||
|
|
||||||
State = DT_SLASH_ASTERISK_COMMENT;
|
State = DT_SLASH_ASTERISK_COMMENT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '/':
|
case '/':
|
||||||
|
|
||||||
State = DT_SLASH_SLASH_COMMENT;
|
State = DT_SLASH_SLASH_COMMENT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Not a comment */
|
default: /* Not a comment */
|
||||||
|
|
||||||
i++; /* Save the preceding slash */
|
i++; /* Save the preceding slash */
|
||||||
if (i >= Gbl_LineBufferSize)
|
if (i >= Gbl_LineBufferSize)
|
||||||
{
|
{
|
||||||
UtExpandLineBuffers ();
|
UtExpandLineBuffers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Gbl_CurrentLineBuffer[i] = c;
|
Gbl_CurrentLineBuffer[i] = (char) c;
|
||||||
i++;
|
i++;
|
||||||
State = DT_NORMAL_TEXT;
|
State = DT_NORMAL_TEXT;
|
||||||
break;
|
break;
|
||||||
@ -609,15 +621,18 @@ DtGetNextLine (
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|
||||||
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
||||||
Gbl_CurrentLineNumber++;
|
Gbl_CurrentLineNumber++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
|
|
||||||
State = DT_END_COMMENT;
|
State = DT_END_COMMENT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -642,20 +657,24 @@ DtGetNextLine (
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '/':
|
case '/':
|
||||||
|
|
||||||
State = DT_NORMAL_TEXT;
|
State = DT_NORMAL_TEXT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|
||||||
CurrentLineOffset = Gbl_NextLineOffset;
|
CurrentLineOffset = Gbl_NextLineOffset;
|
||||||
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
Gbl_NextLineOffset = (UINT32) ftell (Handle);
|
||||||
Gbl_CurrentLineNumber++;
|
Gbl_CurrentLineNumber++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
|
|
||||||
/* Consume all adjacent asterisks */
|
/* Consume all adjacent asterisks */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
State = DT_SLASH_ASTERISK_COMMENT;
|
State = DT_SLASH_ASTERISK_COMMENT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -694,6 +713,7 @@ DtGetNextLine (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, "Unknown input state");
|
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, "Unknown input state");
|
||||||
return (ASL_EOF);
|
return (ASL_EOF);
|
||||||
}
|
}
|
||||||
|
@ -312,14 +312,17 @@ DtGetSubtableLength (
|
|||||||
switch (Info->Opcode)
|
switch (Info->Opcode)
|
||||||
{
|
{
|
||||||
case ACPI_DMT_GAS:
|
case ACPI_DMT_GAS:
|
||||||
|
|
||||||
Step = 5;
|
Step = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_HESTNTFY:
|
case ACPI_DMT_HESTNTFY:
|
||||||
|
|
||||||
Step = 9;
|
Step = 9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Step = 1;
|
Step = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -280,26 +280,32 @@ DtCompileAsf (
|
|||||||
switch (AsfTable->Header.Type & 0x7F) /* Mask off top bit */
|
switch (AsfTable->Header.Type & 0x7F) /* Mask off top bit */
|
||||||
{
|
{
|
||||||
case ACPI_ASF_TYPE_INFO:
|
case ACPI_ASF_TYPE_INFO:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf0;
|
InfoTable = AcpiDmTableInfoAsf0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ALERT:
|
case ACPI_ASF_TYPE_ALERT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf1;
|
InfoTable = AcpiDmTableInfoAsf1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_CONTROL:
|
case ACPI_ASF_TYPE_CONTROL:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf2;
|
InfoTable = AcpiDmTableInfoAsf2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_BOOT:
|
case ACPI_ASF_TYPE_BOOT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf3;
|
InfoTable = AcpiDmTableInfoAsf3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ADDRESS:
|
case ACPI_ASF_TYPE_ADDRESS:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoAsf4;
|
InfoTable = AcpiDmTableInfoAsf4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "ASF!");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "ASF!");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -316,10 +322,12 @@ DtCompileAsf (
|
|||||||
switch (AsfTable->Header.Type & 0x7F) /* Mask off top bit */
|
switch (AsfTable->Header.Type & 0x7F) /* Mask off top bit */
|
||||||
{
|
{
|
||||||
case ACPI_ASF_TYPE_INFO:
|
case ACPI_ASF_TYPE_INFO:
|
||||||
|
|
||||||
DataInfoTable = NULL;
|
DataInfoTable = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ALERT:
|
case ACPI_ASF_TYPE_ALERT:
|
||||||
|
|
||||||
DataInfoTable = AcpiDmTableInfoAsf1a;
|
DataInfoTable = AcpiDmTableInfoAsf1a;
|
||||||
DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT,
|
DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT,
|
||||||
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
||||||
@ -327,6 +335,7 @@ DtCompileAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_CONTROL:
|
case ACPI_ASF_TYPE_CONTROL:
|
||||||
|
|
||||||
DataInfoTable = AcpiDmTableInfoAsf2a;
|
DataInfoTable = AcpiDmTableInfoAsf2a;
|
||||||
DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE,
|
DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE,
|
||||||
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
||||||
@ -334,10 +343,12 @@ DtCompileAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_BOOT:
|
case ACPI_ASF_TYPE_BOOT:
|
||||||
|
|
||||||
DataInfoTable = NULL;
|
DataInfoTable = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ASF_TYPE_ADDRESS:
|
case ACPI_ASF_TYPE_ADDRESS:
|
||||||
|
|
||||||
DataInfoTable = TableInfoAsfAddress;
|
DataInfoTable = TableInfoAsfAddress;
|
||||||
DataCount = ACPI_CAST_PTR (ACPI_ASF_ADDRESS,
|
DataCount = ACPI_CAST_PTR (ACPI_ASF_ADDRESS,
|
||||||
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
ACPI_SUB_PTR (UINT8, Subtable->Buffer,
|
||||||
@ -345,6 +356,7 @@ DtCompileAsf (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "ASF!");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "ASF!");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -574,18 +586,27 @@ DtCompileDmar (
|
|||||||
switch (DmarHeader->Type)
|
switch (DmarHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_DMAR_TYPE_HARDWARE_UNIT:
|
case ACPI_DMAR_TYPE_HARDWARE_UNIT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar0;
|
InfoTable = AcpiDmTableInfoDmar0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_TYPE_RESERVED_MEMORY:
|
case ACPI_DMAR_TYPE_RESERVED_MEMORY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar1;
|
InfoTable = AcpiDmTableInfoDmar1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_TYPE_ATSR:
|
case ACPI_DMAR_TYPE_ATSR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar2;
|
InfoTable = AcpiDmTableInfoDmar2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMAR_HARDWARE_AFFINITY:
|
case ACPI_DMAR_HARDWARE_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoDmar3;
|
InfoTable = AcpiDmTableInfoDmar3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "DMAR");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "DMAR");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -810,14 +831,17 @@ DtCompileFpdt (
|
|||||||
switch (FpdtHeader->Type)
|
switch (FpdtHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_FPDT_TYPE_BOOT:
|
case ACPI_FPDT_TYPE_BOOT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoFpdt0;
|
InfoTable = AcpiDmTableInfoFpdt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_FPDT_TYPE_S3PERF:
|
case ACPI_FPDT_TYPE_S3PERF:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoFpdt1;
|
InfoTable = AcpiDmTableInfoFpdt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "FPDT");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "FPDT");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
break;
|
break;
|
||||||
@ -884,34 +908,42 @@ DtCompileHest (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_HEST_TYPE_IA32_CHECK:
|
case ACPI_HEST_TYPE_IA32_CHECK:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest0;
|
InfoTable = AcpiDmTableInfoHest0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest1;
|
InfoTable = AcpiDmTableInfoHest1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_IA32_NMI:
|
case ACPI_HEST_TYPE_IA32_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest2;
|
InfoTable = AcpiDmTableInfoHest2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_ROOT_PORT:
|
case ACPI_HEST_TYPE_AER_ROOT_PORT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest6;
|
InfoTable = AcpiDmTableInfoHest6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_ENDPOINT:
|
case ACPI_HEST_TYPE_AER_ENDPOINT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest7;
|
InfoTable = AcpiDmTableInfoHest7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_AER_BRIDGE:
|
case ACPI_HEST_TYPE_AER_BRIDGE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest8;
|
InfoTable = AcpiDmTableInfoHest8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_GENERIC_ERROR:
|
case ACPI_HEST_TYPE_GENERIC_ERROR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoHest9;
|
InfoTable = AcpiDmTableInfoHest9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Cannot continue on unknown type */
|
/* Cannot continue on unknown type */
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "HEST");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "HEST");
|
||||||
@ -933,16 +965,19 @@ DtCompileHest (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_HEST_TYPE_IA32_CHECK:
|
case ACPI_HEST_TYPE_IA32_CHECK:
|
||||||
|
|
||||||
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK,
|
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK,
|
||||||
Subtable->Buffer))->NumHardwareBanks;
|
Subtable->Buffer))->NumHardwareBanks;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK:
|
||||||
|
|
||||||
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED,
|
BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED,
|
||||||
Subtable->Buffer))->NumHardwareBanks;
|
Subtable->Buffer))->NumHardwareBanks;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1019,16 +1054,19 @@ DtCompileIvrs (
|
|||||||
switch (IvrsHeader->Type)
|
switch (IvrsHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_IVRS_TYPE_HARDWARE:
|
case ACPI_IVRS_TYPE_HARDWARE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoIvrs0;
|
InfoTable = AcpiDmTableInfoIvrs0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_IVRS_TYPE_MEMORY1:
|
case ACPI_IVRS_TYPE_MEMORY1:
|
||||||
case ACPI_IVRS_TYPE_MEMORY2:
|
case ACPI_IVRS_TYPE_MEMORY2:
|
||||||
case ACPI_IVRS_TYPE_MEMORY3:
|
case ACPI_IVRS_TYPE_MEMORY3:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoIvrs1;
|
InfoTable = AcpiDmTableInfoIvrs1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IVRS");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IVRS");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -1088,6 +1126,7 @@ DtCompileIvrs (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart,
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart,
|
||||||
"IVRS Device Entry");
|
"IVRS Device Entry");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
@ -1165,45 +1204,72 @@ DtCompileMadt (
|
|||||||
switch (MadtHeader->Type)
|
switch (MadtHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC:
|
case ACPI_MADT_TYPE_LOCAL_APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt0;
|
InfoTable = AcpiDmTableInfoMadt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_IO_APIC:
|
case ACPI_MADT_TYPE_IO_APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt1;
|
InfoTable = AcpiDmTableInfoMadt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
|
case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt2;
|
InfoTable = AcpiDmTableInfoMadt2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_NMI_SOURCE:
|
case ACPI_MADT_TYPE_NMI_SOURCE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt3;
|
InfoTable = AcpiDmTableInfoMadt3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
|
case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt4;
|
InfoTable = AcpiDmTableInfoMadt4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
|
case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt5;
|
InfoTable = AcpiDmTableInfoMadt5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_IO_SAPIC:
|
case ACPI_MADT_TYPE_IO_SAPIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt6;
|
InfoTable = AcpiDmTableInfoMadt6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_SAPIC:
|
case ACPI_MADT_TYPE_LOCAL_SAPIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt7;
|
InfoTable = AcpiDmTableInfoMadt7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
|
case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt8;
|
InfoTable = AcpiDmTableInfoMadt8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_X2APIC:
|
case ACPI_MADT_TYPE_LOCAL_X2APIC:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt9;
|
InfoTable = AcpiDmTableInfoMadt9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
|
case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt10;
|
InfoTable = AcpiDmTableInfoMadt10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
|
case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt11;
|
InfoTable = AcpiDmTableInfoMadt11;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
|
case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoMadt12;
|
InfoTable = AcpiDmTableInfoMadt12;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "MADT");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "MADT");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -1665,14 +1731,17 @@ DtCompileS3pt (
|
|||||||
switch (S3ptHeader->Type)
|
switch (S3ptHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_S3PT_TYPE_RESUME:
|
case ACPI_S3PT_TYPE_RESUME:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoS3pt0;
|
InfoTable = AcpiDmTableInfoS3pt0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_S3PT_TYPE_SUSPEND:
|
case ACPI_S3PT_TYPE_SUSPEND:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoS3pt1;
|
InfoTable = AcpiDmTableInfoS3pt1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "S3PT");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "S3PT");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -1736,12 +1805,17 @@ DtCompileSlic (
|
|||||||
switch (SlicHeader->Type)
|
switch (SlicHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_SLIC_TYPE_PUBLIC_KEY:
|
case ACPI_SLIC_TYPE_PUBLIC_KEY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSlic0;
|
InfoTable = AcpiDmTableInfoSlic0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SLIC_TYPE_WINDOWS_MARKER:
|
case ACPI_SLIC_TYPE_WINDOWS_MARKER:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSlic1;
|
InfoTable = AcpiDmTableInfoSlic1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
@ -1871,15 +1945,22 @@ DtCompileSrat (
|
|||||||
switch (SratHeader->Type)
|
switch (SratHeader->Type)
|
||||||
{
|
{
|
||||||
case ACPI_SRAT_TYPE_CPU_AFFINITY:
|
case ACPI_SRAT_TYPE_CPU_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat0;
|
InfoTable = AcpiDmTableInfoSrat0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
|
case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat1;
|
InfoTable = AcpiDmTableInfoSrat1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
|
case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
|
||||||
|
|
||||||
InfoTable = AcpiDmTableInfoSrat2;
|
InfoTable = AcpiDmTableInfoSrat2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT");
|
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT");
|
||||||
return (AE_ERROR);
|
return (AE_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -82,19 +82,12 @@ DtError (
|
|||||||
char *ExtraMessage)
|
char *ExtraMessage)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (Level)
|
/* Check if user wants to ignore this exception */
|
||||||
{
|
|
||||||
case ASL_WARNING2:
|
if (AslIsExceptionDisabled (Level, MessageId))
|
||||||
case ASL_WARNING3:
|
|
||||||
if (Gbl_WarningLevel < Level)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FieldObject)
|
if (FieldObject)
|
||||||
{
|
{
|
||||||
@ -140,6 +133,7 @@ DtNameError (
|
|||||||
{
|
{
|
||||||
case ASL_WARNING2:
|
case ASL_WARNING2:
|
||||||
case ASL_WARNING3:
|
case ASL_WARNING3:
|
||||||
|
|
||||||
if (Gbl_WarningLevel < Level)
|
if (Gbl_WarningLevel < Level)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -147,6 +141,7 @@ DtNameError (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,6 +382,7 @@ DtGetFieldType (
|
|||||||
case ACPI_DMT_FLAGS1:
|
case ACPI_DMT_FLAGS1:
|
||||||
case ACPI_DMT_FLAGS2:
|
case ACPI_DMT_FLAGS2:
|
||||||
case ACPI_DMT_FLAGS4:
|
case ACPI_DMT_FLAGS4:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_FLAG;
|
Type = DT_FIELD_TYPE_FLAG;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -395,6 +391,7 @@ DtGetFieldType (
|
|||||||
case ACPI_DMT_NAME6:
|
case ACPI_DMT_NAME6:
|
||||||
case ACPI_DMT_NAME8:
|
case ACPI_DMT_NAME8:
|
||||||
case ACPI_DMT_STRING:
|
case ACPI_DMT_STRING:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_STRING;
|
Type = DT_FIELD_TYPE_STRING;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -403,31 +400,38 @@ DtGetFieldType (
|
|||||||
case ACPI_DMT_BUF16:
|
case ACPI_DMT_BUF16:
|
||||||
case ACPI_DMT_BUF128:
|
case ACPI_DMT_BUF128:
|
||||||
case ACPI_DMT_PCI_PATH:
|
case ACPI_DMT_PCI_PATH:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_BUFFER;
|
Type = DT_FIELD_TYPE_BUFFER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_GAS:
|
case ACPI_DMT_GAS:
|
||||||
case ACPI_DMT_HESTNTFY:
|
case ACPI_DMT_HESTNTFY:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_INLINE_SUBTABLE;
|
Type = DT_FIELD_TYPE_INLINE_SUBTABLE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UNICODE:
|
case ACPI_DMT_UNICODE:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_UNICODE;
|
Type = DT_FIELD_TYPE_UNICODE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UUID:
|
case ACPI_DMT_UUID:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_UUID;
|
Type = DT_FIELD_TYPE_UUID;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_DEVICE_PATH:
|
case ACPI_DMT_DEVICE_PATH:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_DEVICE_PATH;
|
Type = DT_FIELD_TYPE_DEVICE_PATH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_LABEL:
|
case ACPI_DMT_LABEL:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_LABEL;
|
Type = DT_FIELD_TYPE_LABEL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Type = DT_FIELD_TYPE_INTEGER;
|
Type = DT_FIELD_TYPE_INTEGER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -517,6 +521,7 @@ DtGetFieldLength (
|
|||||||
case ACPI_DMT_FLAGS4:
|
case ACPI_DMT_FLAGS4:
|
||||||
case ACPI_DMT_LABEL:
|
case ACPI_DMT_LABEL:
|
||||||
case ACPI_DMT_EXTRA_TEXT:
|
case ACPI_DMT_EXTRA_TEXT:
|
||||||
|
|
||||||
ByteLength = 0;
|
ByteLength = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -535,6 +540,7 @@ DtGetFieldLength (
|
|||||||
case ACPI_DMT_EINJINST:
|
case ACPI_DMT_EINJINST:
|
||||||
case ACPI_DMT_ERSTACT:
|
case ACPI_DMT_ERSTACT:
|
||||||
case ACPI_DMT_ERSTINST:
|
case ACPI_DMT_ERSTINST:
|
||||||
|
|
||||||
ByteLength = 1;
|
ByteLength = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -542,10 +548,12 @@ DtGetFieldLength (
|
|||||||
case ACPI_DMT_DMAR:
|
case ACPI_DMT_DMAR:
|
||||||
case ACPI_DMT_HEST:
|
case ACPI_DMT_HEST:
|
||||||
case ACPI_DMT_PCI_PATH:
|
case ACPI_DMT_PCI_PATH:
|
||||||
|
|
||||||
ByteLength = 2;
|
ByteLength = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT24:
|
case ACPI_DMT_UINT24:
|
||||||
|
|
||||||
ByteLength = 3;
|
ByteLength = 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -553,29 +561,35 @@ DtGetFieldLength (
|
|||||||
case ACPI_DMT_NAME4:
|
case ACPI_DMT_NAME4:
|
||||||
case ACPI_DMT_SLIC:
|
case ACPI_DMT_SLIC:
|
||||||
case ACPI_DMT_SIG:
|
case ACPI_DMT_SIG:
|
||||||
|
|
||||||
ByteLength = 4;
|
ByteLength = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT40:
|
case ACPI_DMT_UINT40:
|
||||||
|
|
||||||
ByteLength = 5;
|
ByteLength = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT48:
|
case ACPI_DMT_UINT48:
|
||||||
case ACPI_DMT_NAME6:
|
case ACPI_DMT_NAME6:
|
||||||
|
|
||||||
ByteLength = 6;
|
ByteLength = 6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT56:
|
case ACPI_DMT_UINT56:
|
||||||
case ACPI_DMT_BUF7:
|
case ACPI_DMT_BUF7:
|
||||||
|
|
||||||
ByteLength = 7;
|
ByteLength = 7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UINT64:
|
case ACPI_DMT_UINT64:
|
||||||
case ACPI_DMT_NAME8:
|
case ACPI_DMT_NAME8:
|
||||||
|
|
||||||
ByteLength = 8;
|
ByteLength = 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_STRING:
|
case ACPI_DMT_STRING:
|
||||||
|
|
||||||
Value = DtGetFieldValue (Field);
|
Value = DtGetFieldValue (Field);
|
||||||
if (Value)
|
if (Value)
|
||||||
{
|
{
|
||||||
@ -591,14 +605,17 @@ DtGetFieldLength (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_GAS:
|
case ACPI_DMT_GAS:
|
||||||
|
|
||||||
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
|
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_HESTNTFY:
|
case ACPI_DMT_HESTNTFY:
|
||||||
|
|
||||||
ByteLength = sizeof (ACPI_HEST_NOTIFY);
|
ByteLength = sizeof (ACPI_HEST_NOTIFY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_BUFFER:
|
case ACPI_DMT_BUFFER:
|
||||||
|
|
||||||
Value = DtGetFieldValue (Field);
|
Value = DtGetFieldValue (Field);
|
||||||
if (Value)
|
if (Value)
|
||||||
{
|
{
|
||||||
@ -615,14 +632,17 @@ DtGetFieldLength (
|
|||||||
|
|
||||||
case ACPI_DMT_BUF16:
|
case ACPI_DMT_BUF16:
|
||||||
case ACPI_DMT_UUID:
|
case ACPI_DMT_UUID:
|
||||||
|
|
||||||
ByteLength = 16;
|
ByteLength = 16;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_BUF128:
|
case ACPI_DMT_BUF128:
|
||||||
|
|
||||||
ByteLength = 128;
|
ByteLength = 128;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_DMT_UNICODE:
|
case ACPI_DMT_UNICODE:
|
||||||
|
|
||||||
Value = DtGetFieldValue (Field);
|
Value = DtGetFieldValue (Field);
|
||||||
|
|
||||||
/* TBD: error if Value is NULL? (as below?) */
|
/* TBD: error if Value is NULL? (as below?) */
|
||||||
@ -631,6 +651,7 @@ DtGetFieldLength (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid table opcode");
|
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid table opcode");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,7 @@ PrDoDirective (
|
|||||||
switch (Directive)
|
switch (Directive)
|
||||||
{
|
{
|
||||||
case PR_DIRECTIVE_ELIF:
|
case PR_DIRECTIVE_ELIF:
|
||||||
|
|
||||||
*IgnoringThisCodeBlock = !(*IgnoringThisCodeBlock);
|
*IgnoringThisCodeBlock = !(*IgnoringThisCodeBlock);
|
||||||
if (*IgnoringThisCodeBlock == TRUE)
|
if (*IgnoringThisCodeBlock == TRUE)
|
||||||
{
|
{
|
||||||
@ -493,10 +494,12 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_ELSE:
|
case PR_DIRECTIVE_ELSE:
|
||||||
|
|
||||||
*IgnoringThisCodeBlock = !(*IgnoringThisCodeBlock);
|
*IgnoringThisCodeBlock = !(*IgnoringThisCodeBlock);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PR_DIRECTIVE_ENDIF:
|
case PR_DIRECTIVE_ENDIF:
|
||||||
|
|
||||||
*IgnoringThisCodeBlock = FALSE;
|
*IgnoringThisCodeBlock = FALSE;
|
||||||
Gbl_IfDepth--;
|
Gbl_IfDepth--;
|
||||||
if (Gbl_IfDepth < 0)
|
if (Gbl_IfDepth < 0)
|
||||||
@ -508,6 +511,7 @@ PrDoDirective (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,6 +594,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_ERROR:
|
case PR_DIRECTIVE_ERROR:
|
||||||
|
|
||||||
/* TBD compiler should abort */
|
/* TBD compiler should abort */
|
||||||
/* Note: No macro expansion */
|
/* Note: No macro expansion */
|
||||||
|
|
||||||
@ -598,6 +603,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_IF:
|
case PR_DIRECTIVE_IF:
|
||||||
|
|
||||||
TokenOffset = Token - Gbl_MainTokenBuffer;
|
TokenOffset = Token - Gbl_MainTokenBuffer;
|
||||||
|
|
||||||
/* Need to expand #define macros in the expression string first */
|
/* Need to expand #define macros in the expression string first */
|
||||||
@ -623,6 +629,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_IFDEF:
|
case PR_DIRECTIVE_IFDEF:
|
||||||
|
|
||||||
if (!PrMatchDefine (Token))
|
if (!PrMatchDefine (Token))
|
||||||
{
|
{
|
||||||
*IgnoringThisCodeBlock = TRUE;
|
*IgnoringThisCodeBlock = TRUE;
|
||||||
@ -635,6 +642,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_IFNDEF:
|
case PR_DIRECTIVE_IFNDEF:
|
||||||
|
|
||||||
if (PrMatchDefine (Token))
|
if (PrMatchDefine (Token))
|
||||||
{
|
{
|
||||||
*IgnoringThisCodeBlock = TRUE;
|
*IgnoringThisCodeBlock = TRUE;
|
||||||
@ -647,6 +655,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_INCLUDE:
|
case PR_DIRECTIVE_INCLUDE:
|
||||||
|
|
||||||
Token = PrGetNextToken (NULL, " \"<>", Next);
|
Token = PrGetNextToken (NULL, " \"<>", Next);
|
||||||
if (!Token)
|
if (!Token)
|
||||||
{
|
{
|
||||||
@ -661,6 +670,7 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_LINE:
|
case PR_DIRECTIVE_LINE:
|
||||||
|
|
||||||
TokenOffset = Token - Gbl_MainTokenBuffer;
|
TokenOffset = Token - Gbl_MainTokenBuffer;
|
||||||
|
|
||||||
Status = PrResolveIntegerExpression (
|
Status = PrResolveIntegerExpression (
|
||||||
@ -686,15 +696,20 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_PRAGMA:
|
case PR_DIRECTIVE_PRAGMA:
|
||||||
/* Only "#pragma message" supported at this time */
|
|
||||||
|
|
||||||
if (strcmp (Token, "message"))
|
if (!strcmp (Token, "disable"))
|
||||||
{
|
{
|
||||||
PrError (ASL_ERROR, ASL_MSG_UNKNOWN_PRAGMA,
|
Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next);
|
||||||
THIS_TOKEN_OFFSET (Token));
|
if (!Token)
|
||||||
return;
|
{
|
||||||
|
goto SyntaxError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TokenOffset = Token - Gbl_MainTokenBuffer;
|
||||||
|
AslDisableException (&Gbl_CurrentLineBuffer[TokenOffset]);
|
||||||
|
}
|
||||||
|
else if (!strcmp (Token, "message"))
|
||||||
|
{
|
||||||
Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next);
|
Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next);
|
||||||
if (!Token)
|
if (!Token)
|
||||||
{
|
{
|
||||||
@ -703,9 +718,18 @@ PrDoDirective (
|
|||||||
|
|
||||||
TokenOffset = Token - Gbl_MainTokenBuffer;
|
TokenOffset = Token - Gbl_MainTokenBuffer;
|
||||||
AcpiOsPrintf ("%s\n", &Gbl_CurrentLineBuffer[TokenOffset]);
|
AcpiOsPrintf ("%s\n", &Gbl_CurrentLineBuffer[TokenOffset]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PrError (ASL_ERROR, ASL_MSG_UNKNOWN_PRAGMA,
|
||||||
|
THIS_TOKEN_OFFSET (Token));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_UNDEF:
|
case PR_DIRECTIVE_UNDEF:
|
||||||
|
|
||||||
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
|
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
|
||||||
"#undef: %s\n", Gbl_CurrentLineNumber, Token);
|
"#undef: %s\n", Gbl_CurrentLineNumber, Token);
|
||||||
|
|
||||||
@ -713,11 +737,13 @@ PrDoDirective (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_DIRECTIVE_WARNING:
|
case PR_DIRECTIVE_WARNING:
|
||||||
|
|
||||||
PrError (ASL_WARNING, ASL_MSG_ERROR_DIRECTIVE,
|
PrError (ASL_WARNING, ASL_MSG_ERROR_DIRECTIVE,
|
||||||
THIS_TOKEN_OFFSET (Token));
|
THIS_TOKEN_OFFSET (Token));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Should never get here */
|
/* Should never get here */
|
||||||
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
|
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
|
||||||
"Unrecognized directive: %u\n",
|
"Unrecognized directive: %u\n",
|
||||||
|
@ -361,22 +361,27 @@ AcpiDbDisplayTableInfo (
|
|||||||
switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
|
switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
|
||||||
{
|
{
|
||||||
case ACPI_TABLE_ORIGIN_UNKNOWN:
|
case ACPI_TABLE_ORIGIN_UNKNOWN:
|
||||||
|
|
||||||
AcpiOsPrintf ("Unknown ");
|
AcpiOsPrintf ("Unknown ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TABLE_ORIGIN_MAPPED:
|
case ACPI_TABLE_ORIGIN_MAPPED:
|
||||||
|
|
||||||
AcpiOsPrintf ("Mapped ");
|
AcpiOsPrintf ("Mapped ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TABLE_ORIGIN_ALLOCATED:
|
case ACPI_TABLE_ORIGIN_ALLOCATED:
|
||||||
|
|
||||||
AcpiOsPrintf ("Allocated ");
|
AcpiOsPrintf ("Allocated ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TABLE_ORIGIN_OVERRIDE:
|
case ACPI_TABLE_ORIGIN_OVERRIDE:
|
||||||
|
|
||||||
AcpiOsPrintf ("Override ");
|
AcpiOsPrintf ("Override ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("INVALID ");
|
AcpiOsPrintf ("INVALID ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -304,20 +304,24 @@ AcpiDbConvertToObject (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Object->Type = ACPI_TYPE_STRING;
|
Object->Type = ACPI_TYPE_STRING;
|
||||||
Object->String.Pointer = String;
|
Object->String.Pointer = String;
|
||||||
Object->String.Length = (UINT32) ACPI_STRLEN (String);
|
Object->String.Length = (UINT32) ACPI_STRLEN (String);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
Status = AcpiDbConvertToBuffer (String, Object);
|
Status = AcpiDbConvertToBuffer (String, Object);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
Status = AcpiDbConvertToPackage (String, Object);
|
Status = AcpiDbConvertToPackage (String, Object);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Object->Type = ACPI_TYPE_INTEGER;
|
Object->Type = ACPI_TYPE_INTEGER;
|
||||||
Status = AcpiUtStrtoul64 (String, 16, &Object->Integer.Value);
|
Status = AcpiUtStrtoul64 (String, 16, &Object->Integer.Value);
|
||||||
break;
|
break;
|
||||||
|
@ -265,7 +265,6 @@ AcpiDbDecodeAndDisplayObject (
|
|||||||
Node = ObjPtr;
|
Node = ObjPtr;
|
||||||
goto DumpNode;
|
goto DumpNode;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_DESC_TYPE_OPERAND:
|
case ACPI_DESC_TYPE_OPERAND:
|
||||||
|
|
||||||
/* This is a ACPI OPERAND OBJECT */
|
/* This is a ACPI OPERAND OBJECT */
|
||||||
@ -282,7 +281,6 @@ AcpiDbDecodeAndDisplayObject (
|
|||||||
AcpiExDumpObjectDescriptor (ObjPtr, 1);
|
AcpiExDumpObjectDescriptor (ObjPtr, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_DESC_TYPE_PARSER:
|
case ACPI_DESC_TYPE_PARSER:
|
||||||
|
|
||||||
/* This is a Parser Op object */
|
/* This is a Parser Op object */
|
||||||
@ -299,7 +297,6 @@ AcpiDbDecodeAndDisplayObject (
|
|||||||
AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
|
AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Is not a recognizeable object */
|
/* Is not a recognizeable object */
|
||||||
@ -446,6 +443,7 @@ AcpiDbDisplayMethodInfo (
|
|||||||
switch (OpInfo->Class)
|
switch (OpInfo->Class)
|
||||||
{
|
{
|
||||||
case AML_CLASS_ARGUMENT:
|
case AML_CLASS_ARGUMENT:
|
||||||
|
|
||||||
if (CountRemaining)
|
if (CountRemaining)
|
||||||
{
|
{
|
||||||
NumRemainingOperands++;
|
NumRemainingOperands++;
|
||||||
@ -455,11 +453,13 @@ AcpiDbDisplayMethodInfo (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_CLASS_UNKNOWN:
|
case AML_CLASS_UNKNOWN:
|
||||||
|
|
||||||
/* Bad opcode or ASCII character */
|
/* Bad opcode or ASCII character */
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if (CountRemaining)
|
if (CountRemaining)
|
||||||
{
|
{
|
||||||
NumRemainingOperators++;
|
NumRemainingOperators++;
|
||||||
@ -931,15 +931,21 @@ AcpiDbDisplayGpes (
|
|||||||
switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
||||||
{
|
{
|
||||||
case ACPI_GPE_DISPATCH_NONE:
|
case ACPI_GPE_DISPATCH_NONE:
|
||||||
|
|
||||||
AcpiOsPrintf ("NotUsed");
|
AcpiOsPrintf ("NotUsed");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_GPE_DISPATCH_METHOD:
|
case ACPI_GPE_DISPATCH_METHOD:
|
||||||
|
|
||||||
AcpiOsPrintf ("Method");
|
AcpiOsPrintf ("Method");
|
||||||
break;
|
break;
|
||||||
case ACPI_GPE_DISPATCH_HANDLER:
|
case ACPI_GPE_DISPATCH_HANDLER:
|
||||||
|
|
||||||
AcpiOsPrintf ("Handler");
|
AcpiOsPrintf ("Handler");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_GPE_DISPATCH_NOTIFY:
|
case ACPI_GPE_DISPATCH_NOTIFY:
|
||||||
|
|
||||||
Count = 0;
|
Count = 0;
|
||||||
Notify = GpeEventInfo->Dispatch.NotifyList;
|
Notify = GpeEventInfo->Dispatch.NotifyList;
|
||||||
while (Notify)
|
while (Notify)
|
||||||
@ -949,7 +955,9 @@ AcpiDbDisplayGpes (
|
|||||||
}
|
}
|
||||||
AcpiOsPrintf ("Implicit Notify on %u devices", Count);
|
AcpiOsPrintf ("Implicit Notify on %u devices", Count);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("UNKNOWN: %X",
|
AcpiOsPrintf ("UNKNOWN: %X",
|
||||||
GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
|
GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
|
||||||
break;
|
break;
|
||||||
|
@ -109,6 +109,7 @@ AcpiDbDeleteObjects (
|
|||||||
switch (Objects[i].Type)
|
switch (Objects[i].Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
ACPI_FREE (Objects[i].Buffer.Pointer);
|
ACPI_FREE (Objects[i].Buffer.Pointer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -125,6 +126,7 @@ AcpiDbDeleteObjects (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,12 +54,12 @@
|
|||||||
|
|
||||||
#define HI_NO_HISTORY 0
|
#define HI_NO_HISTORY 0
|
||||||
#define HI_RECORD_HISTORY 1
|
#define HI_RECORD_HISTORY 1
|
||||||
#define HISTORY_SIZE 20
|
#define HISTORY_SIZE 40
|
||||||
|
|
||||||
|
|
||||||
typedef struct HistoryInfo
|
typedef struct HistoryInfo
|
||||||
{
|
{
|
||||||
char Command[80];
|
char *Command;
|
||||||
UINT32 CmdNum;
|
UINT32 CmdNum;
|
||||||
|
|
||||||
} HISTORY_INFO;
|
} HISTORY_INFO;
|
||||||
@ -88,13 +88,35 @@ void
|
|||||||
AcpiDbAddToHistory (
|
AcpiDbAddToHistory (
|
||||||
char *CommandLine)
|
char *CommandLine)
|
||||||
{
|
{
|
||||||
|
UINT16 CmdLen;
|
||||||
|
UINT16 BufferLen;
|
||||||
|
|
||||||
/* Put command into the next available slot */
|
/* Put command into the next available slot */
|
||||||
|
|
||||||
|
CmdLen = (UINT16) ACPI_STRLEN (CommandLine);
|
||||||
|
if (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command != NULL)
|
||||||
|
{
|
||||||
|
BufferLen = (UINT16) ACPI_STRLEN (
|
||||||
|
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command);
|
||||||
|
if (CmdLen > BufferLen)
|
||||||
|
{
|
||||||
|
AcpiOsFree (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].
|
||||||
|
Command);
|
||||||
|
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command =
|
||||||
|
AcpiOsAllocate (CmdLen + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command =
|
||||||
|
AcpiOsAllocate (CmdLen + 1);
|
||||||
|
}
|
||||||
|
|
||||||
ACPI_STRCPY (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command,
|
ACPI_STRCPY (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command,
|
||||||
CommandLine);
|
CommandLine);
|
||||||
|
|
||||||
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].CmdNum = AcpiGbl_NextCmdNum;
|
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].CmdNum =
|
||||||
|
AcpiGbl_NextCmdNum;
|
||||||
|
|
||||||
/* Adjust indexes */
|
/* Adjust indexes */
|
||||||
|
|
||||||
@ -148,8 +170,12 @@ AcpiDbDisplayHistory (
|
|||||||
|
|
||||||
for (i = 0; i < AcpiGbl_NumHistory; i++)
|
for (i = 0; i < AcpiGbl_NumHistory; i++)
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("%ld %s\n", AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum,
|
if (AcpiGbl_HistoryBuffer[HistoryIndex].Command)
|
||||||
|
{
|
||||||
|
AcpiOsPrintf ("%3ld %s\n",
|
||||||
|
AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum,
|
||||||
AcpiGbl_HistoryBuffer[HistoryIndex].Command);
|
AcpiGbl_HistoryBuffer[HistoryIndex].Command);
|
||||||
|
}
|
||||||
|
|
||||||
HistoryIndex++;
|
HistoryIndex++;
|
||||||
if (HistoryIndex >= HISTORY_SIZE)
|
if (HistoryIndex >= HISTORY_SIZE)
|
||||||
@ -199,7 +225,7 @@ AcpiDbGetFromHistory (
|
|||||||
{
|
{
|
||||||
if (AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum == CmdNum)
|
if (AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum == CmdNum)
|
||||||
{
|
{
|
||||||
/* Found the commnad, return it */
|
/* Found the command, return it */
|
||||||
|
|
||||||
return (AcpiGbl_HistoryBuffer[HistoryIndex].Command);
|
return (AcpiGbl_HistoryBuffer[HistoryIndex].Command);
|
||||||
}
|
}
|
||||||
|
@ -753,6 +753,7 @@ AcpiDbCommandDispatch (
|
|||||||
switch (CommandIndex)
|
switch (CommandIndex)
|
||||||
{
|
{
|
||||||
case CMD_NULL:
|
case CMD_NULL:
|
||||||
|
|
||||||
if (Op)
|
if (Op)
|
||||||
{
|
{
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
@ -768,41 +769,50 @@ AcpiDbCommandDispatch (
|
|||||||
|
|
||||||
case CMD_ARGS:
|
case CMD_ARGS:
|
||||||
case CMD_ARGUMENTS:
|
case CMD_ARGUMENTS:
|
||||||
|
|
||||||
AcpiDbDisplayArguments ();
|
AcpiDbDisplayArguments ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_BATCH:
|
case CMD_BATCH:
|
||||||
|
|
||||||
AcpiDbBatchExecute (AcpiGbl_DbArgs[1]);
|
AcpiDbBatchExecute (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_BREAKPOINT:
|
case CMD_BREAKPOINT:
|
||||||
|
|
||||||
AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op);
|
AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_BUSINFO:
|
case CMD_BUSINFO:
|
||||||
|
|
||||||
AcpiDbGetBusInfo ();
|
AcpiDbGetBusInfo ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_CALL:
|
case CMD_CALL:
|
||||||
|
|
||||||
AcpiDbSetMethodCallBreakpoint (Op);
|
AcpiDbSetMethodCallBreakpoint (Op);
|
||||||
Status = AE_OK;
|
Status = AE_OK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_CLOSE:
|
case CMD_CLOSE:
|
||||||
|
|
||||||
AcpiDbCloseDebugFile ();
|
AcpiDbCloseDebugFile ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_DEBUG:
|
case CMD_DEBUG:
|
||||||
|
|
||||||
AcpiDbExecute (AcpiGbl_DbArgs[1],
|
AcpiDbExecute (AcpiGbl_DbArgs[1],
|
||||||
&AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_SINGLE_STEP);
|
&AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_SINGLE_STEP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_DISASSEMBLE:
|
case CMD_DISASSEMBLE:
|
||||||
case CMD_DISASM:
|
case CMD_DISASM:
|
||||||
|
|
||||||
(void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
|
(void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_DUMP:
|
case CMD_DUMP:
|
||||||
|
|
||||||
AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -819,45 +829,55 @@ AcpiDbCommandDispatch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_EVENT:
|
case CMD_EVENT:
|
||||||
|
|
||||||
AcpiOsPrintf ("Event command not implemented\n");
|
AcpiOsPrintf ("Event command not implemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_EVALUATE:
|
case CMD_EVALUATE:
|
||||||
case CMD_EXECUTE:
|
case CMD_EXECUTE:
|
||||||
|
|
||||||
AcpiDbExecute (AcpiGbl_DbArgs[1],
|
AcpiDbExecute (AcpiGbl_DbArgs[1],
|
||||||
&AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_NO_SINGLE_STEP);
|
&AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_NO_SINGLE_STEP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_FIND:
|
case CMD_FIND:
|
||||||
|
|
||||||
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
|
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_GO:
|
case CMD_GO:
|
||||||
|
|
||||||
AcpiGbl_CmSingleStep = FALSE;
|
AcpiGbl_CmSingleStep = FALSE;
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
case CMD_GPE:
|
case CMD_GPE:
|
||||||
|
|
||||||
AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_GPES:
|
case CMD_GPES:
|
||||||
|
|
||||||
AcpiDbDisplayGpes ();
|
AcpiDbDisplayGpes ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_HANDLERS:
|
case CMD_HANDLERS:
|
||||||
|
|
||||||
AcpiDbDisplayHandlers ();
|
AcpiDbDisplayHandlers ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_HELP:
|
case CMD_HELP:
|
||||||
case CMD_HELP2:
|
case CMD_HELP2:
|
||||||
|
|
||||||
AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
|
AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_HISTORY:
|
case CMD_HISTORY:
|
||||||
|
|
||||||
AcpiDbDisplayHistory ();
|
AcpiDbDisplayHistory ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_HISTORY_EXE:
|
case CMD_HISTORY_EXE: /* ! command */
|
||||||
|
|
||||||
CommandLine = AcpiDbGetFromHistory (AcpiGbl_DbArgs[1]);
|
CommandLine = AcpiDbGetFromHistory (AcpiGbl_DbArgs[1]);
|
||||||
if (!CommandLine)
|
if (!CommandLine)
|
||||||
{
|
{
|
||||||
@ -867,7 +887,8 @@ AcpiDbCommandDispatch (
|
|||||||
Status = AcpiDbCommandDispatch (CommandLine, WalkState, Op);
|
Status = AcpiDbCommandDispatch (CommandLine, WalkState, Op);
|
||||||
return (Status);
|
return (Status);
|
||||||
|
|
||||||
case CMD_HISTORY_LAST:
|
case CMD_HISTORY_LAST: /* !! command */
|
||||||
|
|
||||||
CommandLine = AcpiDbGetFromHistory (NULL);
|
CommandLine = AcpiDbGetFromHistory (NULL);
|
||||||
if (!CommandLine)
|
if (!CommandLine)
|
||||||
{
|
{
|
||||||
@ -878,14 +899,17 @@ AcpiDbCommandDispatch (
|
|||||||
return (Status);
|
return (Status);
|
||||||
|
|
||||||
case CMD_INFORMATION:
|
case CMD_INFORMATION:
|
||||||
|
|
||||||
AcpiDbDisplayMethodInfo (Op);
|
AcpiDbDisplayMethodInfo (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_INTEGRITY:
|
case CMD_INTEGRITY:
|
||||||
|
|
||||||
AcpiDbCheckIntegrity ();
|
AcpiDbCheckIntegrity ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_INTO:
|
case CMD_INTO:
|
||||||
|
|
||||||
if (Op)
|
if (Op)
|
||||||
{
|
{
|
||||||
AcpiGbl_CmSingleStep = TRUE;
|
AcpiGbl_CmSingleStep = TRUE;
|
||||||
@ -894,6 +918,7 @@ AcpiDbCommandDispatch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_LEVEL:
|
case CMD_LEVEL:
|
||||||
|
|
||||||
if (ParamCount == 0)
|
if (ParamCount == 0)
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Current debug level for file output is: %8.8lX\n",
|
AcpiOsPrintf ("Current debug level for file output is: %8.8lX\n",
|
||||||
@ -921,96 +946,119 @@ AcpiDbCommandDispatch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_LIST:
|
case CMD_LIST:
|
||||||
|
|
||||||
AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
|
AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_LOAD:
|
case CMD_LOAD:
|
||||||
|
|
||||||
Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL);
|
Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_LOCKS:
|
case CMD_LOCKS:
|
||||||
|
|
||||||
AcpiDbDisplayLocks ();
|
AcpiDbDisplayLocks ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_LOCALS:
|
case CMD_LOCALS:
|
||||||
|
|
||||||
AcpiDbDisplayLocals ();
|
AcpiDbDisplayLocals ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_METHODS:
|
case CMD_METHODS:
|
||||||
|
|
||||||
Status = AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
|
Status = AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_NAMESPACE:
|
case CMD_NAMESPACE:
|
||||||
|
|
||||||
AcpiDbDumpNamespace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
AcpiDbDumpNamespace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_NOTIFY:
|
case CMD_NOTIFY:
|
||||||
|
|
||||||
Temp = ACPI_STRTOUL (AcpiGbl_DbArgs[2], NULL, 0);
|
Temp = ACPI_STRTOUL (AcpiGbl_DbArgs[2], NULL, 0);
|
||||||
AcpiDbSendNotify (AcpiGbl_DbArgs[1], Temp);
|
AcpiDbSendNotify (AcpiGbl_DbArgs[1], Temp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_OBJECT:
|
case CMD_OBJECT:
|
||||||
|
|
||||||
AcpiUtStrupr (AcpiGbl_DbArgs[1]);
|
AcpiUtStrupr (AcpiGbl_DbArgs[1]);
|
||||||
Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_OPEN:
|
case CMD_OPEN:
|
||||||
|
|
||||||
AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
|
AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_OSI:
|
case CMD_OSI:
|
||||||
|
|
||||||
AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_OWNER:
|
case CMD_OWNER:
|
||||||
|
|
||||||
AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_PREDEFINED:
|
case CMD_PREDEFINED:
|
||||||
|
|
||||||
AcpiDbCheckPredefinedNames ();
|
AcpiDbCheckPredefinedNames ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_PREFIX:
|
case CMD_PREFIX:
|
||||||
|
|
||||||
AcpiDbSetScope (AcpiGbl_DbArgs[1]);
|
AcpiDbSetScope (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_REFERENCES:
|
case CMD_REFERENCES:
|
||||||
|
|
||||||
AcpiDbFindReferences (AcpiGbl_DbArgs[1]);
|
AcpiDbFindReferences (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_RESOURCES:
|
case CMD_RESOURCES:
|
||||||
|
|
||||||
AcpiDbDisplayResources (AcpiGbl_DbArgs[1]);
|
AcpiDbDisplayResources (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_RESULTS:
|
case CMD_RESULTS:
|
||||||
|
|
||||||
AcpiDbDisplayResults ();
|
AcpiDbDisplayResults ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_SET:
|
case CMD_SET:
|
||||||
|
|
||||||
AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
|
AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
|
||||||
AcpiGbl_DbArgs[3]);
|
AcpiGbl_DbArgs[3]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_SLEEP:
|
case CMD_SLEEP:
|
||||||
|
|
||||||
Status = AcpiDbSleep (AcpiGbl_DbArgs[1]);
|
Status = AcpiDbSleep (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_STATS:
|
case CMD_STATS:
|
||||||
|
|
||||||
Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
|
Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_STOP:
|
case CMD_STOP:
|
||||||
|
|
||||||
return (AE_NOT_IMPLEMENTED);
|
return (AE_NOT_IMPLEMENTED);
|
||||||
|
|
||||||
case CMD_TABLES:
|
case CMD_TABLES:
|
||||||
|
|
||||||
AcpiDbDisplayTableInfo (AcpiGbl_DbArgs[1]);
|
AcpiDbDisplayTableInfo (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_TEMPLATE:
|
case CMD_TEMPLATE:
|
||||||
|
|
||||||
AcpiDbDisplayTemplate (AcpiGbl_DbArgs[1]);
|
AcpiDbDisplayTemplate (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_TERMINATE:
|
case CMD_TERMINATE:
|
||||||
|
|
||||||
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
|
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
|
||||||
AcpiUtSubsystemShutdown ();
|
AcpiUtSubsystemShutdown ();
|
||||||
|
|
||||||
@ -1023,28 +1071,34 @@ AcpiDbCommandDispatch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_THREADS:
|
case CMD_THREADS:
|
||||||
|
|
||||||
AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
|
AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
|
||||||
AcpiGbl_DbArgs[3]);
|
AcpiGbl_DbArgs[3]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_TRACE:
|
case CMD_TRACE:
|
||||||
|
|
||||||
(void) AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
|
(void) AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_TREE:
|
case CMD_TREE:
|
||||||
|
|
||||||
AcpiDbDisplayCallingTree ();
|
AcpiDbDisplayCallingTree ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_TYPE:
|
case CMD_TYPE:
|
||||||
|
|
||||||
AcpiDbDisplayObjectType (AcpiGbl_DbArgs[1]);
|
AcpiDbDisplayObjectType (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_UNLOAD:
|
case CMD_UNLOAD:
|
||||||
|
|
||||||
AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
|
AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_EXIT:
|
case CMD_EXIT:
|
||||||
case CMD_QUIT:
|
case CMD_QUIT:
|
||||||
|
|
||||||
if (Op)
|
if (Op)
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Method execution terminated\n");
|
AcpiOsPrintf ("Method execution terminated\n");
|
||||||
@ -1062,6 +1116,7 @@ AcpiDbCommandDispatch (
|
|||||||
|
|
||||||
case CMD_NOT_FOUND:
|
case CMD_NOT_FOUND:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("Unknown Command\n");
|
AcpiOsPrintf ("Unknown Command\n");
|
||||||
return (AE_CTRL_TRUE);
|
return (AE_CTRL_TRUE);
|
||||||
}
|
}
|
||||||
|
@ -271,6 +271,7 @@ AcpiDbSetMethodData (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,25 +506,30 @@ AcpiDbWalkForExecute (
|
|||||||
switch (ArgType)
|
switch (ArgType)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
ThisParam->Integer.Value = 1;
|
ThisParam->Integer.Value = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
ThisParam->String.Pointer = "This is the default argument string";
|
ThisParam->String.Pointer = "This is the default argument string";
|
||||||
ThisParam->String.Length = ACPI_STRLEN (ThisParam->String.Pointer);
|
ThisParam->String.Length = ACPI_STRLEN (ThisParam->String.Pointer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
ThisParam->Buffer.Pointer = (UINT8 *) Params; /* just a garbage buffer */
|
ThisParam->Buffer.Pointer = (UINT8 *) Params; /* just a garbage buffer */
|
||||||
ThisParam->Buffer.Length = 48;
|
ThisParam->Buffer.Length = 48;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
ThisParam->Package.Elements = NULL;
|
ThisParam->Package.Elements = NULL;
|
||||||
ThisParam->Package.Count = 0;
|
ThisParam->Package.Count = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("%s: Unsupported argument type: %u\n",
|
AcpiOsPrintf ("%s: Unsupported argument type: %u\n",
|
||||||
Pathname, ArgType);
|
Pathname, ArgType);
|
||||||
break;
|
break;
|
||||||
|
@ -671,7 +671,7 @@ AcpiDbIntegrityWalk (
|
|||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AcpiUtValidAcpiName (Node->Name.Integer))
|
if (!AcpiUtValidAcpiName (Node->Name.Ascii))
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
|
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
@ -267,6 +267,7 @@ AcpiDbEnumerateObject (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -479,7 +480,6 @@ AcpiDbDisplayStatistics (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case CMD_STAT_SIZES:
|
case CMD_STAT_SIZES:
|
||||||
|
|
||||||
AcpiOsPrintf ("\nInternal object sizes:\n\n");
|
AcpiOsPrintf ("\nInternal object sizes:\n\n");
|
||||||
@ -530,7 +530,6 @@ AcpiDbDisplayStatistics (
|
|||||||
AcpiOsPrintf ("Notify Info %3d\n", sizeof (ACPI_NOTIFY_INFO));
|
AcpiOsPrintf ("Notify Info %3d\n", sizeof (ACPI_NOTIFY_INFO));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case CMD_STAT_STACK:
|
case CMD_STAT_STACK:
|
||||||
#if defined(ACPI_DEBUG_OUTPUT)
|
#if defined(ACPI_DEBUG_OUTPUT)
|
||||||
|
|
||||||
@ -545,6 +544,7 @@ AcpiDbDisplayStatistics (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,14 +179,12 @@ AcpiDbDumpExternalObject (
|
|||||||
AcpiOsPrintf ("[Null Object] (Type=0)\n");
|
AcpiOsPrintf ("[Null Object] (Type=0)\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
|
AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
|
||||||
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
AcpiOsPrintf ("[String] Length %.2X = ", ObjDesc->String.Length);
|
AcpiOsPrintf ("[String] Length %.2X = ", ObjDesc->String.Length);
|
||||||
@ -194,7 +192,6 @@ AcpiDbDumpExternalObject (
|
|||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
||||||
@ -213,7 +210,6 @@ AcpiDbDumpExternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
|
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
|
||||||
@ -225,26 +221,22 @@ AcpiDbDumpExternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Object Reference] = ");
|
AcpiOsPrintf ("[Object Reference] = ");
|
||||||
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
|
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PROCESSOR:
|
case ACPI_TYPE_PROCESSOR:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Processor]\n");
|
AcpiOsPrintf ("[Processor]\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_POWER:
|
case ACPI_TYPE_POWER:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Power Resource]\n");
|
AcpiOsPrintf ("[Power Resource]\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Type);
|
AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Type);
|
||||||
|
@ -232,9 +232,11 @@ AcpiDbSingleStep (
|
|||||||
{
|
{
|
||||||
case AML_CLASS_UNKNOWN:
|
case AML_CLASS_UNKNOWN:
|
||||||
case AML_CLASS_ARGUMENT: /* constants, literals, etc. do nothing */
|
case AML_CLASS_ARGUMENT: /* constants, literals, etc. do nothing */
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All other opcodes -- continue */
|
/* All other opcodes -- continue */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -410,6 +412,9 @@ AcpiDbInitialize (
|
|||||||
ACPI_STATUS Status;
|
ACPI_STATUS Status;
|
||||||
|
|
||||||
|
|
||||||
|
ACPI_FUNCTION_TRACE (DbInitialize);
|
||||||
|
|
||||||
|
|
||||||
/* Init globals */
|
/* Init globals */
|
||||||
|
|
||||||
AcpiGbl_DbBuffer = NULL;
|
AcpiGbl_DbBuffer = NULL;
|
||||||
@ -431,7 +436,7 @@ AcpiDbInitialize (
|
|||||||
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
|
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
|
||||||
if (!AcpiGbl_DbBuffer)
|
if (!AcpiGbl_DbBuffer)
|
||||||
{
|
{
|
||||||
return (AE_NO_MEMORY);
|
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
ACPI_MEMSET (AcpiGbl_DbBuffer, 0, ACPI_DEBUG_BUFFER_SIZE);
|
ACPI_MEMSET (AcpiGbl_DbBuffer, 0, ACPI_DEBUG_BUFFER_SIZE);
|
||||||
|
|
||||||
@ -454,14 +459,14 @@ AcpiDbInitialize (
|
|||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Could not get debugger mutex\n");
|
AcpiOsPrintf ("Could not get debugger mutex\n");
|
||||||
return (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY);
|
Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Could not get debugger mutex\n");
|
AcpiOsPrintf ("Could not get debugger mutex\n");
|
||||||
return (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the debug execution thread to execute commands */
|
/* Create the debug execution thread to execute commands */
|
||||||
@ -469,8 +474,8 @@ AcpiDbInitialize (
|
|||||||
Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbExecuteThread, NULL);
|
Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbExecuteThread, NULL);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
AcpiOsPrintf ("Could not start debugger thread\n");
|
ACPI_EXCEPTION ((AE_INFO, Status, "Could not start debugger thread"));
|
||||||
return (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +487,7 @@ AcpiDbInitialize (
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -506,6 +511,7 @@ AcpiDbTerminate (
|
|||||||
if (AcpiGbl_DbBuffer)
|
if (AcpiGbl_DbBuffer)
|
||||||
{
|
{
|
||||||
AcpiOsFree (AcpiGbl_DbBuffer);
|
AcpiOsFree (AcpiGbl_DbBuffer);
|
||||||
|
AcpiGbl_DbBuffer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,6 @@ AcpiDmByteList (
|
|||||||
|
|
||||||
case ACPI_DASM_BUFFER:
|
case ACPI_DASM_BUFFER:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Not a resource, string, or unicode string.
|
* Not a resource, string, or unicode string.
|
||||||
* Just dump the buffer
|
* Just dump the buffer
|
||||||
|
@ -128,6 +128,7 @@ AcpiDmParseDeferredOps (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unhandled deferred AML opcode [0x%.4X]",
|
ACPI_ERROR ((AE_INFO, "Unhandled deferred AML opcode [0x%.4X]",
|
||||||
Op->Common.AmlOpcode));
|
Op->Common.AmlOpcode));
|
||||||
break;
|
break;
|
||||||
@ -265,6 +266,7 @@ AcpiDmDeferredParse (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,20 +237,24 @@ AcpiDmNamestring (
|
|||||||
switch (ACPI_GET8 (Name))
|
switch (ACPI_GET8 (Name))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
SegCount = 0;
|
SegCount = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_DUAL_NAME_PREFIX:
|
case AML_DUAL_NAME_PREFIX:
|
||||||
|
|
||||||
SegCount = 2;
|
SegCount = 2;
|
||||||
Name++;
|
Name++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_MULTI_NAME_PREFIX_OP:
|
case AML_MULTI_NAME_PREFIX_OP:
|
||||||
|
|
||||||
SegCount = (UINT32) ACPI_GET8 (Name + 1);
|
SegCount = (UINT32) ACPI_GET8 (Name + 1);
|
||||||
Name += 2;
|
Name += 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
SegCount = 1;
|
SegCount = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,6 @@ AcpiDmDecodeInternalObject (
|
|||||||
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
AcpiOsPrintf ("(%u) \"%.24s",
|
AcpiOsPrintf ("(%u) \"%.24s",
|
||||||
@ -230,7 +229,6 @@ AcpiDmDecodeInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
AcpiOsPrintf ("(%u)", ObjDesc->Buffer.Length);
|
AcpiOsPrintf ("(%u)", ObjDesc->Buffer.Length);
|
||||||
@ -240,7 +238,6 @@ AcpiDmDecodeInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf (" %p", ObjDesc);
|
AcpiOsPrintf (" %p", ObjDesc);
|
||||||
@ -283,14 +280,17 @@ AcpiDmDecodeNode (
|
|||||||
/* These types have no attached object */
|
/* These types have no attached object */
|
||||||
|
|
||||||
case ACPI_TYPE_DEVICE:
|
case ACPI_TYPE_DEVICE:
|
||||||
|
|
||||||
AcpiOsPrintf (" Device");
|
AcpiOsPrintf (" Device");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_THERMAL:
|
case ACPI_TYPE_THERMAL:
|
||||||
|
|
||||||
AcpiOsPrintf (" Thermal Zone");
|
AcpiOsPrintf (" Thermal Zone");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
|
AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -335,13 +335,11 @@ AcpiDmDisplayInternalObject (
|
|||||||
AcpiOsPrintf ("<Parser> ");
|
AcpiOsPrintf ("<Parser> ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_DESC_TYPE_NAMED:
|
case ACPI_DESC_TYPE_NAMED:
|
||||||
|
|
||||||
AcpiDmDecodeNode ((ACPI_NAMESPACE_NODE *) ObjDesc);
|
AcpiDmDecodeNode ((ACPI_NAMESPACE_NODE *) ObjDesc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_DESC_TYPE_OPERAND:
|
case ACPI_DESC_TYPE_OPERAND:
|
||||||
|
|
||||||
Type = ObjDesc->Common.Type;
|
Type = ObjDesc->Common.Type;
|
||||||
@ -375,7 +373,6 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_ARG:
|
case ACPI_REFCLASS_ARG:
|
||||||
|
|
||||||
AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
|
AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
|
||||||
@ -388,7 +385,6 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_INDEX:
|
case ACPI_REFCLASS_INDEX:
|
||||||
|
|
||||||
switch (ObjDesc->Reference.TargetType)
|
switch (ObjDesc->Reference.TargetType)
|
||||||
@ -420,7 +416,6 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_REFOF:
|
case ACPI_REFCLASS_REFOF:
|
||||||
|
|
||||||
if (!ObjDesc->Reference.Object)
|
if (!ObjDesc->Reference.Object)
|
||||||
@ -446,20 +441,17 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_NAME:
|
case ACPI_REFCLASS_NAME:
|
||||||
|
|
||||||
AcpiDmDecodeNode (ObjDesc->Reference.Node);
|
AcpiDmDecodeNode (ObjDesc->Reference.Node);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_DEBUG:
|
case ACPI_REFCLASS_DEBUG:
|
||||||
case ACPI_REFCLASS_TABLE:
|
case ACPI_REFCLASS_TABLE:
|
||||||
|
|
||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default: /* Unknown reference class */
|
default: /* Unknown reference class */
|
||||||
|
|
||||||
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
|
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
|
||||||
@ -467,7 +459,6 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("<Obj> ");
|
AcpiOsPrintf ("<Obj> ");
|
||||||
@ -476,7 +467,6 @@ AcpiDmDisplayInternalObject (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
|
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
|
||||||
|
@ -121,6 +121,7 @@ AcpiDmPredefinedDescription (
|
|||||||
switch (NameString[1])
|
switch (NameString[1])
|
||||||
{
|
{
|
||||||
case 'A':
|
case 'A':
|
||||||
|
|
||||||
if ((NameString[2] == 'C') && (LastCharIsDigit))
|
if ((NameString[2] == 'C') && (LastCharIsDigit))
|
||||||
{
|
{
|
||||||
NameString = "_ACx";
|
NameString = "_ACx";
|
||||||
@ -132,6 +133,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
|
|
||||||
if ((NameString[2] == 'J') && (LastCharIsDigit))
|
if ((NameString[2] == 'J') && (LastCharIsDigit))
|
||||||
{
|
{
|
||||||
NameString = "_EJx";
|
NameString = "_EJx";
|
||||||
@ -143,6 +145,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
|
|
||||||
if (LastCharsAreHex)
|
if (LastCharsAreHex)
|
||||||
{
|
{
|
||||||
NameString = "_Lxx";
|
NameString = "_Lxx";
|
||||||
@ -150,6 +153,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Q':
|
case 'Q':
|
||||||
|
|
||||||
if (LastCharsAreHex)
|
if (LastCharsAreHex)
|
||||||
{
|
{
|
||||||
NameString = "_Qxx";
|
NameString = "_Qxx";
|
||||||
@ -157,6 +161,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
|
|
||||||
if (NameString[2] == '_')
|
if (NameString[2] == '_')
|
||||||
{
|
{
|
||||||
NameString = "_T_x";
|
NameString = "_T_x";
|
||||||
@ -164,6 +169,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
|
|
||||||
if (LastCharsAreHex)
|
if (LastCharsAreHex)
|
||||||
{
|
{
|
||||||
NameString = "_Wxx";
|
NameString = "_Wxx";
|
||||||
@ -171,6 +177,7 @@ AcpiDmPredefinedDescription (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,21 +543,26 @@ AcpiDmDisassembleOneOp (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case ACPI_DASM_LNOT_SUFFIX:
|
case ACPI_DASM_LNOT_SUFFIX:
|
||||||
|
|
||||||
switch (Op->Common.AmlOpcode)
|
switch (Op->Common.AmlOpcode)
|
||||||
{
|
{
|
||||||
case AML_LEQUAL_OP:
|
case AML_LEQUAL_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("LNotEqual");
|
AcpiOsPrintf ("LNotEqual");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_LGREATER_OP:
|
case AML_LGREATER_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("LLessEqual");
|
AcpiOsPrintf ("LLessEqual");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_LLESS_OP:
|
case AML_LLESS_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("LGreaterEqual");
|
AcpiOsPrintf ("LGreaterEqual");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Op->Common.DisasmOpcode = 0;
|
Op->Common.DisasmOpcode = 0;
|
||||||
@ -589,7 +601,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer);
|
AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_WORD_OP:
|
case AML_WORD_OP:
|
||||||
|
|
||||||
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
|
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
|
||||||
@ -602,7 +613,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_DWORD_OP:
|
case AML_DWORD_OP:
|
||||||
|
|
||||||
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
|
if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
|
||||||
@ -615,22 +625,18 @@ AcpiDmDisassembleOneOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_QWORD_OP:
|
case AML_QWORD_OP:
|
||||||
|
|
||||||
AcpiOsPrintf ("0x%8.8X%8.8X",
|
AcpiOsPrintf ("0x%8.8X%8.8X",
|
||||||
ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_STRING_OP:
|
case AML_STRING_OP:
|
||||||
|
|
||||||
AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT8_MAX);
|
AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT8_MAX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_BUFFER_OP:
|
case AML_BUFFER_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the type of buffer. We can have one of the following:
|
* Determine the type of buffer. We can have one of the following:
|
||||||
*
|
*
|
||||||
@ -680,7 +686,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_STATICSTRING_OP:
|
case AML_INT_STATICSTRING_OP:
|
||||||
|
|
||||||
if (Op->Common.Value.String)
|
if (Op->Common.Value.String)
|
||||||
@ -693,13 +698,11 @@ AcpiDmDisassembleOneOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_NAMEPATH_OP:
|
case AML_INT_NAMEPATH_OP:
|
||||||
|
|
||||||
AcpiDmNamestring (Op->Common.Value.Name);
|
AcpiDmNamestring (Op->Common.Value.Name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_NAMEDFIELD_OP:
|
case AML_INT_NAMEDFIELD_OP:
|
||||||
|
|
||||||
Length = AcpiDmDumpName (Op->Named.Name);
|
Length = AcpiDmDumpName (Op->Named.Name);
|
||||||
@ -710,7 +713,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
Info->BitOffset += (UINT32) Op->Common.Value.Integer;
|
Info->BitOffset += (UINT32) Op->Common.Value.Integer;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_RESERVEDFIELD_OP:
|
case AML_INT_RESERVEDFIELD_OP:
|
||||||
|
|
||||||
/* Offset() -- Must account for previous offsets */
|
/* Offset() -- Must account for previous offsets */
|
||||||
@ -730,7 +732,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
AcpiDmCommaIfFieldMember (Op);
|
AcpiDmCommaIfFieldMember (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_ACCESSFIELD_OP:
|
case AML_INT_ACCESSFIELD_OP:
|
||||||
case AML_INT_EXTACCESSFIELD_OP:
|
case AML_INT_EXTACCESSFIELD_OP:
|
||||||
|
|
||||||
@ -748,9 +749,7 @@ AcpiDmDisassembleOneOp (
|
|||||||
AcpiDmCommaIfFieldMember (Op);
|
AcpiDmCommaIfFieldMember (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_CONNECTION_OP:
|
case AML_INT_CONNECTION_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Two types of Connection() - one with a buffer object, the
|
* Two types of Connection() - one with a buffer object, the
|
||||||
* other with a namestring that points to a buffer object.
|
* other with a namestring that points to a buffer object.
|
||||||
@ -790,7 +789,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
AcpiDmByteList (Info, Op);
|
AcpiDmByteList (Info, Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_INT_METHODCALL_OP:
|
case AML_INT_METHODCALL_OP:
|
||||||
|
|
||||||
Op = AcpiPsGetDepthNext (NULL, Op);
|
Op = AcpiPsGetDepthNext (NULL, Op);
|
||||||
@ -799,7 +797,6 @@ AcpiDmDisassembleOneOp (
|
|||||||
AcpiDmNamestring (Op->Common.Value.Name);
|
AcpiDmNamestring (Op->Common.Value.Name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Just get the opcode name and print it */
|
/* Just get the opcode name and print it */
|
||||||
|
@ -337,6 +337,7 @@ AcpiDmResourceTemplate (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,16 +153,19 @@ AcpiDmMemoryFields (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case 16:
|
case 16:
|
||||||
|
|
||||||
AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
|
AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
|
||||||
AcpiDmMemoryNames[i]);
|
AcpiDmMemoryNames[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
|
|
||||||
AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
|
AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
|
||||||
AcpiDmMemoryNames[i]);
|
AcpiDmMemoryNames[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,21 +204,25 @@ AcpiDmAddressFields (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case 16:
|
case 16:
|
||||||
|
|
||||||
AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
|
AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
|
||||||
AcpiDmAddressNames[i]);
|
AcpiDmAddressNames[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
|
|
||||||
AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
|
AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
|
||||||
AcpiDmAddressNames[i]);
|
AcpiDmAddressNames[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 64:
|
case 64:
|
||||||
|
|
||||||
AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i],
|
AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i],
|
||||||
AcpiDmAddressNames[i]);
|
AcpiDmAddressNames[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,22 +249,27 @@ AcpiDmAddressPrefix (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_RESOURCE_TYPE_ADDRESS16:
|
case ACPI_RESOURCE_TYPE_ADDRESS16:
|
||||||
|
|
||||||
AcpiOsPrintf ("Word");
|
AcpiOsPrintf ("Word");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_RESOURCE_TYPE_ADDRESS32:
|
case ACPI_RESOURCE_TYPE_ADDRESS32:
|
||||||
|
|
||||||
AcpiOsPrintf ("DWord");
|
AcpiOsPrintf ("DWord");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_RESOURCE_TYPE_ADDRESS64:
|
case ACPI_RESOURCE_TYPE_ADDRESS64:
|
||||||
|
|
||||||
AcpiOsPrintf ("QWord");
|
AcpiOsPrintf ("QWord");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
|
case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
|
||||||
|
|
||||||
AcpiOsPrintf ("Extended");
|
AcpiOsPrintf ("Extended");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,14 +376,17 @@ AcpiDmGpioDescriptor (
|
|||||||
switch (ConnectionType)
|
switch (ConnectionType)
|
||||||
{
|
{
|
||||||
case AML_RESOURCE_GPIO_TYPE_INT:
|
case AML_RESOURCE_GPIO_TYPE_INT:
|
||||||
|
|
||||||
AcpiDmGpioIntDescriptor (Resource, Length, Level);
|
AcpiDmGpioIntDescriptor (Resource, Length, Level);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_RESOURCE_GPIO_TYPE_IO:
|
case AML_RESOURCE_GPIO_TYPE_IO:
|
||||||
|
|
||||||
AcpiDmGpioIoDescriptor (Resource, Length, Level);
|
AcpiDmGpioIoDescriptor (Resource, Length, Level);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("Unknown GPIO type\n");
|
AcpiOsPrintf ("Unknown GPIO type\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -443,6 +446,7 @@ AcpiDmDumpSerialBusVendorData (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,6 +461,7 @@ AcpiDmDescendingOp (
|
|||||||
/* Fallthrough */
|
/* Fallthrough */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiDmIndent (Level);
|
AcpiDmIndent (Level);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -699,7 +700,6 @@ AcpiDmDescendingOp (
|
|||||||
AcpiDmFieldFlags (NextOp);
|
AcpiDmFieldFlags (NextOp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_BUFFER_OP:
|
case AML_BUFFER_OP:
|
||||||
|
|
||||||
/* The next op is the size parameter */
|
/* The next op is the size parameter */
|
||||||
@ -737,7 +737,6 @@ AcpiDmDescendingOp (
|
|||||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
|
|
||||||
case AML_VAR_PACKAGE_OP:
|
case AML_VAR_PACKAGE_OP:
|
||||||
case AML_IF_OP:
|
case AML_IF_OP:
|
||||||
case AML_WHILE_OP:
|
case AML_WHILE_OP:
|
||||||
@ -751,7 +750,6 @@ AcpiDmDescendingOp (
|
|||||||
}
|
}
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
|
|
||||||
case AML_PACKAGE_OP:
|
case AML_PACKAGE_OP:
|
||||||
|
|
||||||
/* The next op is the size parameter */
|
/* The next op is the size parameter */
|
||||||
@ -763,13 +761,11 @@ AcpiDmDescendingOp (
|
|||||||
}
|
}
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
|
||||||
|
|
||||||
case AML_MATCH_OP:
|
case AML_MATCH_OP:
|
||||||
|
|
||||||
AcpiDmMatchOp (Op);
|
AcpiDmMatchOp (Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -866,7 +862,6 @@ AcpiDmAscendingOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case BLOCK_BRACE:
|
case BLOCK_BRACE:
|
||||||
case (BLOCK_BRACE | BLOCK_PAREN):
|
case (BLOCK_BRACE | BLOCK_PAREN):
|
||||||
|
|
||||||
@ -906,7 +901,6 @@ AcpiDmAscendingOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case BLOCK_NONE:
|
case BLOCK_NONE:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
@ -86,7 +86,6 @@ AcpiDsExecBeginControlOp (
|
|||||||
switch (Op->Common.AmlOpcode)
|
switch (Op->Common.AmlOpcode)
|
||||||
{
|
{
|
||||||
case AML_WHILE_OP:
|
case AML_WHILE_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is an additional iteration of a while loop, continue.
|
* If this is an additional iteration of a while loop, continue.
|
||||||
* There is no need to allocate a new control state.
|
* There is no need to allocate a new control state.
|
||||||
@ -107,7 +106,6 @@ AcpiDsExecBeginControlOp (
|
|||||||
/*lint -fallthrough */
|
/*lint -fallthrough */
|
||||||
|
|
||||||
case AML_IF_OP:
|
case AML_IF_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IF/WHILE: Create a new control state to manage these
|
* IF/WHILE: Create a new control state to manage these
|
||||||
* constructs. We need to manage these as a stack, in order
|
* constructs. We need to manage these as a stack, in order
|
||||||
@ -150,6 +148,7 @@ AcpiDsExecBeginControlOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,12 +203,10 @@ AcpiDsExecEndControlOp (
|
|||||||
AcpiUtDeleteGenericState (ControlState);
|
AcpiUtDeleteGenericState (ControlState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_ELSE_OP:
|
case AML_ELSE_OP:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_WHILE_OP:
|
case AML_WHILE_OP:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", Op));
|
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", Op));
|
||||||
@ -252,7 +249,6 @@ AcpiDsExecEndControlOp (
|
|||||||
AcpiUtDeleteGenericState (ControlState);
|
AcpiUtDeleteGenericState (ControlState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_RETURN_OP:
|
case AML_RETURN_OP:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||||
@ -348,12 +344,11 @@ AcpiDsExecEndControlOp (
|
|||||||
Status = AE_CTRL_TERMINATE;
|
Status = AE_CTRL_TERMINATE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_NOOP_OP:
|
case AML_NOOP_OP:
|
||||||
|
|
||||||
/* Just do nothing! */
|
/* Just do nothing! */
|
||||||
break;
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case AML_BREAK_POINT_OP:
|
case AML_BREAK_POINT_OP:
|
||||||
|
|
||||||
@ -373,11 +368,9 @@ AcpiDsExecEndControlOp (
|
|||||||
"Executed AML Breakpoint opcode");
|
"Executed AML Breakpoint opcode");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_BREAK_OP:
|
case AML_BREAK_OP:
|
||||||
case AML_CONTINUE_OP: /* ACPI 2.0 */
|
case AML_CONTINUE_OP: /* ACPI 2.0 */
|
||||||
|
|
||||||
|
|
||||||
/* Pop and delete control states until we find a while */
|
/* Pop and delete control states until we find a while */
|
||||||
|
|
||||||
while (WalkState->ControlState &&
|
while (WalkState->ControlState &&
|
||||||
@ -410,7 +403,6 @@ AcpiDsExecEndControlOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unknown control opcode=0x%X Op=%p",
|
ACPI_ERROR ((AE_INFO, "Unknown control opcode=0x%X Op=%p",
|
||||||
|
@ -599,21 +599,25 @@ AcpiDsInitFieldObjects (
|
|||||||
switch (WalkState->Opcode)
|
switch (WalkState->Opcode)
|
||||||
{
|
{
|
||||||
case AML_FIELD_OP:
|
case AML_FIELD_OP:
|
||||||
|
|
||||||
Arg = AcpiPsGetArg (Op, 2);
|
Arg = AcpiPsGetArg (Op, 2);
|
||||||
Type = ACPI_TYPE_LOCAL_REGION_FIELD;
|
Type = ACPI_TYPE_LOCAL_REGION_FIELD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_BANK_FIELD_OP:
|
case AML_BANK_FIELD_OP:
|
||||||
|
|
||||||
Arg = AcpiPsGetArg (Op, 4);
|
Arg = AcpiPsGetArg (Op, 4);
|
||||||
Type = ACPI_TYPE_LOCAL_BANK_FIELD;
|
Type = ACPI_TYPE_LOCAL_BANK_FIELD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AML_INDEX_FIELD_OP:
|
case AML_INDEX_FIELD_OP:
|
||||||
|
|
||||||
Arg = AcpiPsGetArg (Op, 3);
|
Arg = AcpiPsGetArg (Op, 3);
|
||||||
Type = ACPI_TYPE_LOCAL_INDEX_FIELD;
|
Type = ACPI_TYPE_LOCAL_INDEX_FIELD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,20 +128,18 @@ AcpiDsInitOneObject (
|
|||||||
Info->OpRegionCount++;
|
Info->OpRegionCount++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
|
|
||||||
Info->MethodCount++;
|
Info->MethodCount++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_DEVICE:
|
case ACPI_TYPE_DEVICE:
|
||||||
|
|
||||||
Info->DeviceCount++;
|
Info->DeviceCount++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ AcpiDsMethodDataGetNode (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Type %u is invalid", Type));
|
ACPI_ERROR ((AE_INFO, "Type %u is invalid", Type));
|
||||||
return_ACPI_STATUS (AE_TYPE);
|
return_ACPI_STATUS (AE_TYPE);
|
||||||
}
|
}
|
||||||
@ -472,7 +473,6 @@ AcpiDsMethodDataGetValue (
|
|||||||
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
|
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
|
||||||
|
|
||||||
case ACPI_REFCLASS_LOCAL:
|
case ACPI_REFCLASS_LOCAL:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No error message for this case, will be trapped again later to
|
* No error message for this case, will be trapped again later to
|
||||||
* detect and ignore cases of Store(LocalX,LocalX)
|
* detect and ignore cases of Store(LocalX,LocalX)
|
||||||
|
@ -677,7 +677,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
switch (ObjDesc->Common.Type)
|
switch (ObjDesc->Common.Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defer evaluation of Buffer TermArg operand
|
* Defer evaluation of Buffer TermArg operand
|
||||||
*/
|
*/
|
||||||
@ -687,9 +686,7 @@ AcpiDsInitObjectFromOp (
|
|||||||
ObjDesc->Buffer.AmlLength = Op->Named.Length;
|
ObjDesc->Buffer.AmlLength = Op->Named.Length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defer evaluation of Package TermArg operand
|
* Defer evaluation of Package TermArg operand
|
||||||
*/
|
*/
|
||||||
@ -699,7 +696,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
ObjDesc->Package.AmlLength = Op->Named.Length;
|
ObjDesc->Package.AmlLength = Op->Named.Length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
switch (OpInfo->Type)
|
switch (OpInfo->Type)
|
||||||
@ -752,7 +748,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_LITERAL:
|
case AML_TYPE_LITERAL:
|
||||||
|
|
||||||
ObjDesc->Integer.Value = Op->Common.Value.Integer;
|
ObjDesc->Integer.Value = Op->Common.Value.Integer;
|
||||||
@ -770,8 +765,8 @@ AcpiDsInitObjectFromOp (
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unknown Integer type 0x%X",
|
ACPI_ERROR ((AE_INFO, "Unknown Integer type 0x%X",
|
||||||
OpInfo->Type));
|
OpInfo->Type));
|
||||||
Status = AE_AML_OPERAND_TYPE;
|
Status = AE_AML_OPERAND_TYPE;
|
||||||
@ -779,7 +774,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
ObjDesc->String.Pointer = Op->Common.Value.String;
|
ObjDesc->String.Pointer = Op->Common.Value.String;
|
||||||
@ -792,11 +786,9 @@ AcpiDsInitObjectFromOp (
|
|||||||
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
|
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||||
|
|
||||||
switch (OpInfo->Type)
|
switch (OpInfo->Type)
|
||||||
@ -816,7 +808,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_METHOD_ARGUMENT:
|
case AML_TYPE_METHOD_ARGUMENT:
|
||||||
|
|
||||||
/* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */
|
/* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */
|
||||||
@ -860,7 +851,6 @@ AcpiDsInitObjectFromOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unimplemented data type: 0x%X",
|
ACPI_ERROR ((AE_INFO, "Unimplemented data type: 0x%X",
|
||||||
|
@ -680,6 +680,7 @@ AcpiDsEvalDataObjectOperands (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
|
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,6 @@ AcpiDsIsResultUsed (
|
|||||||
|
|
||||||
case AML_IF_OP:
|
case AML_IF_OP:
|
||||||
case AML_WHILE_OP:
|
case AML_WHILE_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we are executing the predicate AND this is the predicate op,
|
* If we are executing the predicate AND this is the predicate op,
|
||||||
* we will use the return value
|
* we will use the return value
|
||||||
@ -277,7 +276,9 @@ AcpiDsIsResultUsed (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Ignore other control opcodes */
|
/* Ignore other control opcodes */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,16 +286,13 @@ AcpiDsIsResultUsed (
|
|||||||
|
|
||||||
goto ResultNotUsed;
|
goto ResultNotUsed;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_CREATE:
|
case AML_CLASS_CREATE:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These opcodes allow TermArg(s) as operands and therefore
|
* These opcodes allow TermArg(s) as operands and therefore
|
||||||
* the operands can be method calls. The result is used.
|
* the operands can be method calls. The result is used.
|
||||||
*/
|
*/
|
||||||
goto ResultUsed;
|
goto ResultUsed;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_NAMED_OBJECT:
|
case AML_CLASS_NAMED_OBJECT:
|
||||||
|
|
||||||
if ((Op->Common.Parent->Common.AmlOpcode == AML_REGION_OP) ||
|
if ((Op->Common.Parent->Common.AmlOpcode == AML_REGION_OP) ||
|
||||||
@ -314,9 +312,7 @@ AcpiDsIsResultUsed (
|
|||||||
|
|
||||||
goto ResultNotUsed;
|
goto ResultNotUsed;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In all other cases. the parent will actually use the return
|
* In all other cases. the parent will actually use the return
|
||||||
* object, so keep it.
|
* object, so keep it.
|
||||||
|
@ -318,7 +318,6 @@ AcpiDsExecBeginOp (
|
|||||||
Status = AcpiDsExecBeginControlOp (WalkState, Op);
|
Status = AcpiDsExecBeginControlOp (WalkState, Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_NAMED_OBJECT:
|
case AML_CLASS_NAMED_OBJECT:
|
||||||
|
|
||||||
if (WalkState->WalkType & ACPI_WALK_METHOD)
|
if (WalkState->WalkType & ACPI_WALK_METHOD)
|
||||||
@ -350,14 +349,13 @@ AcpiDsExecBeginOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_EXECUTE:
|
case AML_CLASS_EXECUTE:
|
||||||
case AML_CLASS_CREATE:
|
case AML_CLASS_CREATE:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,7 +439,6 @@ AcpiDsExecEndOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_EXECUTE: /* Most operators with arguments */
|
case AML_CLASS_EXECUTE: /* Most operators with arguments */
|
||||||
|
|
||||||
/* Build resolved operand stack */
|
/* Build resolved operand stack */
|
||||||
@ -514,7 +511,6 @@ AcpiDsExecEndOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
switch (OpType)
|
switch (OpType)
|
||||||
@ -527,9 +523,7 @@ AcpiDsExecEndOp (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_METHOD_CALL:
|
case AML_TYPE_METHOD_CALL:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the method is referenced from within a package
|
* If the method is referenced from within a package
|
||||||
* declaration, it is not a invocation of the method, just
|
* declaration, it is not a invocation of the method, just
|
||||||
@ -596,7 +590,6 @@ AcpiDsExecEndOp (
|
|||||||
*/
|
*/
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_CREATE_FIELD:
|
case AML_TYPE_CREATE_FIELD:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||||
@ -620,7 +613,6 @@ AcpiDsExecEndOp (
|
|||||||
switch (Op->Common.Parent->Common.AmlOpcode)
|
switch (Op->Common.Parent->Common.AmlOpcode)
|
||||||
{
|
{
|
||||||
case AML_NAME_OP:
|
case AML_NAME_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Put the Node on the object stack (Contains the ACPI Name
|
* Put the Node on the object stack (Contains the ACPI Name
|
||||||
* of this object)
|
* of this object)
|
||||||
@ -661,7 +653,6 @@ AcpiDsExecEndOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_NAMED_FIELD:
|
case AML_TYPE_NAMED_FIELD:
|
||||||
case AML_TYPE_NAMED_COMPLEX:
|
case AML_TYPE_NAMED_COMPLEX:
|
||||||
case AML_TYPE_NAMED_SIMPLE:
|
case AML_TYPE_NAMED_SIMPLE:
|
||||||
@ -708,14 +699,12 @@ AcpiDsExecEndOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_UNDEFINED:
|
case AML_TYPE_UNDEFINED:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Undefined opcode type Op=%p", Op));
|
"Undefined opcode type Op=%p", Op));
|
||||||
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
|
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_BOGUS:
|
case AML_TYPE_BOGUS:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||||
@ -723,7 +712,6 @@ AcpiDsExecEndOp (
|
|||||||
WalkState->Opcode, Op));
|
WalkState->Opcode, Op));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
|
@ -81,6 +81,7 @@ AcpiDsInitCallbacks (
|
|||||||
switch (PassNumber)
|
switch (PassNumber)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
|
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
|
||||||
ACPI_PARSE_DELETE_TREE;
|
ACPI_PARSE_DELETE_TREE;
|
||||||
WalkState->DescendingCallback = AcpiDsLoad1BeginOp;
|
WalkState->DescendingCallback = AcpiDsLoad1BeginOp;
|
||||||
@ -88,6 +89,7 @@ AcpiDsInitCallbacks (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
|
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
|
||||||
ACPI_PARSE_DELETE_TREE;
|
ACPI_PARSE_DELETE_TREE;
|
||||||
WalkState->DescendingCallback = AcpiDsLoad2BeginOp;
|
WalkState->DescendingCallback = AcpiDsLoad2BeginOp;
|
||||||
@ -95,6 +97,7 @@ AcpiDsInitCallbacks (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
#ifndef ACPI_NO_METHOD_EXECUTION
|
||||||
WalkState->ParseFlags |= ACPI_PARSE_EXECUTE |
|
WalkState->ParseFlags |= ACPI_PARSE_EXECUTE |
|
||||||
ACPI_PARSE_DELETE_TREE;
|
ACPI_PARSE_DELETE_TREE;
|
||||||
@ -104,6 +107,7 @@ AcpiDsInitCallbacks (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +178,6 @@ AcpiDsLoad1BeginOp (
|
|||||||
switch (WalkState->Opcode)
|
switch (WalkState->Opcode)
|
||||||
{
|
{
|
||||||
case AML_SCOPE_OP:
|
case AML_SCOPE_OP:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The target name of the Scope() operator must exist at this point so
|
* The target name of the Scope() operator must exist at this point so
|
||||||
* that we can actually open the scope to enter new names underneath it.
|
* that we can actually open the scope to enter new names underneath it.
|
||||||
@ -221,7 +224,6 @@ AcpiDsLoad1BeginOp (
|
|||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These types we will allow, but we will change the type.
|
* These types we will allow, but we will change the type.
|
||||||
* This enables some existing code of the form:
|
* This enables some existing code of the form:
|
||||||
@ -242,7 +244,6 @@ AcpiDsLoad1BeginOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow scope change to root during execution of module-level
|
* Allow scope change to root during execution of module-level
|
||||||
* code. Root is typed METHOD during this time.
|
* code. Root is typed METHOD during this time.
|
||||||
@ -268,7 +269,6 @@ AcpiDsLoad1BeginOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
* For all other named opcodes, we will enter the name into
|
* For all other named opcodes, we will enter the name into
|
||||||
|
@ -496,7 +496,6 @@ AcpiDsLoad2EndOp (
|
|||||||
Status = AcpiDsCreateBufferField (Op, WalkState);
|
Status = AcpiDsCreateBufferField (Op, WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_NAMED_FIELD:
|
case AML_TYPE_NAMED_FIELD:
|
||||||
/*
|
/*
|
||||||
* If we are executing a method, initialize the field
|
* If we are executing a method, initialize the field
|
||||||
@ -525,12 +524,12 @@ AcpiDsLoad2EndOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All NAMED_FIELD opcodes must be handled above */
|
/* All NAMED_FIELD opcodes must be handled above */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_NAMED_SIMPLE:
|
case AML_TYPE_NAMED_SIMPLE:
|
||||||
|
|
||||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||||
@ -561,13 +560,13 @@ AcpiDsLoad2EndOp (
|
|||||||
Status = AcpiExCreateEvent (WalkState);
|
Status = AcpiExCreateEvent (WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_ALIAS_OP:
|
case AML_ALIAS_OP:
|
||||||
|
|
||||||
Status = AcpiExCreateAlias (WalkState);
|
Status = AcpiExCreateAlias (WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Unknown opcode */
|
/* Unknown opcode */
|
||||||
|
|
||||||
Status = AE_OK;
|
Status = AE_OK;
|
||||||
@ -652,13 +651,11 @@ AcpiDsLoad2EndOp (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_NAME_OP:
|
case AML_NAME_OP:
|
||||||
|
|
||||||
Status = AcpiDsCreateNode (WalkState, Node, Op);
|
Status = AcpiDsCreateNode (WalkState, Node, Op);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_METHOD_OP:
|
case AML_METHOD_OP:
|
||||||
/*
|
/*
|
||||||
* MethodOp PkgLength NameString MethodFlags TermList
|
* MethodOp PkgLength NameString MethodFlags TermList
|
||||||
@ -696,18 +693,17 @@ AcpiDsLoad2EndOp (
|
|||||||
#endif /* ACPI_NO_METHOD_EXECUTION */
|
#endif /* ACPI_NO_METHOD_EXECUTION */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* All NAMED_COMPLEX opcodes must be handled above */
|
/* All NAMED_COMPLEX opcodes must be handled above */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_INTERNAL:
|
case AML_CLASS_INTERNAL:
|
||||||
|
|
||||||
/* case AML_INT_NAMEPATH_OP: */
|
/* case AML_INT_NAMEPATH_OP: */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_CLASS_METHOD_CALL:
|
case AML_CLASS_METHOD_CALL:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||||
@ -747,6 +743,7 @@ AcpiDsLoad2EndOp (
|
|||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@ AcpiEvRemoveGlobalLockHandler (
|
|||||||
Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
|
Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
|
||||||
AcpiEvGlobalLockHandler);
|
AcpiEvGlobalLockHandler);
|
||||||
|
|
||||||
|
AcpiOsDeleteLock (AcpiGbl_GlobalLockPendingLock);
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,6 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||||||
switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
||||||
{
|
{
|
||||||
case ACPI_GPE_DISPATCH_NOTIFY:
|
case ACPI_GPE_DISPATCH_NOTIFY:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implicit notify.
|
* Implicit notify.
|
||||||
* Dispatch a DEVICE_WAKE notify to the appropriate handler.
|
* Dispatch a DEVICE_WAKE notify to the appropriate handler.
|
||||||
@ -631,6 +630,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_VOID; /* Should never happen */
|
return_VOID; /* Should never happen */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -817,7 +817,6 @@ AcpiEvGpeDispatch (
|
|||||||
|
|
||||||
case ACPI_GPE_DISPATCH_METHOD:
|
case ACPI_GPE_DISPATCH_METHOD:
|
||||||
case ACPI_GPE_DISPATCH_NOTIFY:
|
case ACPI_GPE_DISPATCH_NOTIFY:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute the method associated with the GPE
|
* Execute the method associated with the GPE
|
||||||
* NOTE: Level-triggered GPEs are cleared after the method completes.
|
* NOTE: Level-triggered GPEs are cleared after the method completes.
|
||||||
@ -833,7 +832,6 @@ AcpiEvGpeDispatch (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No handler or method to run!
|
* No handler or method to run!
|
||||||
* 03/2010: This case should no longer be possible. We will not allow
|
* 03/2010: This case should no longer be possible. We will not allow
|
||||||
|
@ -420,6 +420,8 @@ AcpiEvCreateGpeBlock (
|
|||||||
Status = AcpiEvInstallGpeBlock (GpeBlock, InterruptNumber);
|
Status = AcpiEvInstallGpeBlock (GpeBlock, InterruptNumber);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
|
ACPI_FREE (GpeBlock->RegisterInfo);
|
||||||
|
ACPI_FREE (GpeBlock->EventInfo);
|
||||||
ACPI_FREE (GpeBlock);
|
ACPI_FREE (GpeBlock);
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
@ -382,14 +382,17 @@ AcpiEvMatchGpeMethod (
|
|||||||
switch (Name[1])
|
switch (Name[1])
|
||||||
{
|
{
|
||||||
case 'L':
|
case 'L':
|
||||||
|
|
||||||
Type = ACPI_GPE_LEVEL_TRIGGERED;
|
Type = ACPI_GPE_LEVEL_TRIGGERED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
|
|
||||||
Type = ACPI_GPE_EDGE_TRIGGERED;
|
Type = ACPI_GPE_EDGE_TRIGGERED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Unknown method type, just ignore it */
|
/* Unknown method type, just ignore it */
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD,
|
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD,
|
||||||
|
@ -393,36 +393,43 @@ AcpiEvInstallSpaceHandler (
|
|||||||
switch (SpaceId)
|
switch (SpaceId)
|
||||||
{
|
{
|
||||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||||
|
|
||||||
Handler = AcpiExSystemMemorySpaceHandler;
|
Handler = AcpiExSystemMemorySpaceHandler;
|
||||||
Setup = AcpiEvSystemMemoryRegionSetup;
|
Setup = AcpiEvSystemMemoryRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||||
|
|
||||||
Handler = AcpiExSystemIoSpaceHandler;
|
Handler = AcpiExSystemIoSpaceHandler;
|
||||||
Setup = AcpiEvIoSpaceRegionSetup;
|
Setup = AcpiEvIoSpaceRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_PCI_CONFIG:
|
case ACPI_ADR_SPACE_PCI_CONFIG:
|
||||||
|
|
||||||
Handler = AcpiExPciConfigSpaceHandler;
|
Handler = AcpiExPciConfigSpaceHandler;
|
||||||
Setup = AcpiEvPciConfigRegionSetup;
|
Setup = AcpiEvPciConfigRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_CMOS:
|
case ACPI_ADR_SPACE_CMOS:
|
||||||
|
|
||||||
Handler = AcpiExCmosSpaceHandler;
|
Handler = AcpiExCmosSpaceHandler;
|
||||||
Setup = AcpiEvCmosRegionSetup;
|
Setup = AcpiEvCmosRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_PCI_BAR_TARGET:
|
case ACPI_ADR_SPACE_PCI_BAR_TARGET:
|
||||||
|
|
||||||
Handler = AcpiExPciBarSpaceHandler;
|
Handler = AcpiExPciBarSpaceHandler;
|
||||||
Setup = AcpiEvPciBarRegionSetup;
|
Setup = AcpiEvPciBarRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_ADR_SPACE_DATA_TABLE:
|
case ACPI_ADR_SPACE_DATA_TABLE:
|
||||||
|
|
||||||
Handler = AcpiExDataTableSpaceHandler;
|
Handler = AcpiExDataTableSpaceHandler;
|
||||||
Setup = NULL;
|
Setup = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_BAD_PARAMETER;
|
Status = AE_BAD_PARAMETER;
|
||||||
goto UnlockAndExit;
|
goto UnlockAndExit;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,7 @@ AcpiEvIsNotifyObject (
|
|||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,6 +307,8 @@ AcpiEvTerminate (
|
|||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Could not remove Global Lock handler"));
|
"Could not remove Global Lock handler"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AcpiGbl_EventsInitialized = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deallocate all handler objects installed within GPE info structs */
|
/* Deallocate all handler objects installed within GPE info structs */
|
||||||
|
@ -664,7 +664,9 @@ AcpiEvInitializeRegion (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Ignore other objects */
|
/* Ignore other objects */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,14 +250,17 @@ AcpiSetGpe (
|
|||||||
switch (Action)
|
switch (Action)
|
||||||
{
|
{
|
||||||
case ACPI_GPE_ENABLE:
|
case ACPI_GPE_ENABLE:
|
||||||
|
|
||||||
Status = AcpiEvEnableGpe (GpeEventInfo);
|
Status = AcpiEvEnableGpe (GpeEventInfo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_GPE_DISABLE:
|
case ACPI_GPE_DISABLE:
|
||||||
|
|
||||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
|
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_BAD_PARAMETER;
|
Status = AE_BAD_PARAMETER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -487,14 +490,17 @@ AcpiSetGpeWakeMask (
|
|||||||
switch (Action)
|
switch (Action)
|
||||||
{
|
{
|
||||||
case ACPI_GPE_ENABLE:
|
case ACPI_GPE_ENABLE:
|
||||||
|
|
||||||
ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
|
ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_GPE_DISABLE:
|
case ACPI_GPE_DISABLE:
|
||||||
|
|
||||||
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
|
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, (UINT8) RegisterBit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "%u, Invalid action", Action));
|
ACPI_ERROR ((AE_INFO, "%u, Invalid action", Action));
|
||||||
Status = AE_BAD_PARAMETER;
|
Status = AE_BAD_PARAMETER;
|
||||||
break;
|
break;
|
||||||
|
@ -149,6 +149,7 @@ AcpiInstallAddressSpaceHandler (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +483,6 @@ AcpiExLoadOp (
|
|||||||
TableDesc.Address = ObjDesc->Region.Address;
|
TableDesc.Address = ObjDesc->Region.Address;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */
|
case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||||
@ -526,8 +525,8 @@ AcpiExLoadOp (
|
|||||||
TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
|
TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +114,7 @@ AcpiExConvertToInteger (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_TYPE);
|
return_ACPI_STATUS (AE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +134,6 @@ AcpiExConvertToInteger (
|
|||||||
switch (ObjDesc->Common.Type)
|
switch (ObjDesc->Common.Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert string to an integer - for most cases, the string must be
|
* Convert string to an integer - for most cases, the string must be
|
||||||
* hexadecimal as per the ACPI specification. The only exception (as
|
* hexadecimal as per the ACPI specification. The only exception (as
|
||||||
@ -147,7 +147,6 @@ AcpiExConvertToInteger (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
/* Check for zero-length buffer */
|
/* Check for zero-length buffer */
|
||||||
@ -179,10 +178,10 @@ AcpiExConvertToInteger (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other types can get here */
|
/* No other types can get here */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +241,6 @@ AcpiExConvertToBuffer (
|
|||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a new Buffer object.
|
* Create a new Buffer object.
|
||||||
* Need enough space for one integer
|
* Need enough space for one integer
|
||||||
@ -261,9 +259,7 @@ AcpiExConvertToBuffer (
|
|||||||
AcpiGbl_IntegerByteWidth);
|
AcpiGbl_IntegerByteWidth);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a new Buffer object
|
* Create a new Buffer object
|
||||||
* Size will be the string length
|
* Size will be the string length
|
||||||
@ -287,8 +283,8 @@ AcpiExConvertToBuffer (
|
|||||||
ObjDesc->String.Length);
|
ObjDesc->String.Length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_TYPE);
|
return_ACPI_STATUS (AE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,15 +340,18 @@ AcpiExConvertToAscii (
|
|||||||
switch (DataWidth)
|
switch (DataWidth)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
DecimalLength = ACPI_MAX8_DECIMAL_DIGITS;
|
DecimalLength = ACPI_MAX8_DECIMAL_DIGITS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
DecimalLength = ACPI_MAX32_DECIMAL_DIGITS;
|
DecimalLength = ACPI_MAX32_DECIMAL_DIGITS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
DecimalLength = ACPI_MAX64_DECIMAL_DIGITS;
|
DecimalLength = ACPI_MAX64_DECIMAL_DIGITS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -461,7 +460,6 @@ AcpiExConvertToString (
|
|||||||
*ResultDesc = ObjDesc;
|
*ResultDesc = ObjDesc;
|
||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
switch (Type)
|
switch (Type)
|
||||||
@ -505,7 +503,6 @@ AcpiExConvertToString (
|
|||||||
NewBuf [StringLength] = 0;
|
NewBuf [StringLength] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
/* Setup string length, base, and separator */
|
/* Setup string length, base, and separator */
|
||||||
@ -604,6 +601,7 @@ AcpiExConvertToString (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_TYPE);
|
return_ACPI_STATUS (AE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,6 +661,7 @@ AcpiExConvertToTargetType (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No conversion allowed for these types */
|
/* No conversion allowed for these types */
|
||||||
|
|
||||||
if (DestinationType != SourceDesc->Common.Type)
|
if (DestinationType != SourceDesc->Common.Type)
|
||||||
@ -676,7 +675,6 @@ AcpiExConvertToTargetType (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ARGI_TARGETREF:
|
case ARGI_TARGETREF:
|
||||||
|
|
||||||
switch (DestinationType)
|
switch (DestinationType)
|
||||||
@ -693,7 +691,6 @@ AcpiExConvertToTargetType (
|
|||||||
16);
|
16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
/*
|
/*
|
||||||
* The operand must be a String. We can convert an
|
* The operand must be a String. We can convert an
|
||||||
@ -703,7 +700,6 @@ AcpiExConvertToTargetType (
|
|||||||
ACPI_IMPLICIT_CONVERT_HEX);
|
ACPI_IMPLICIT_CONVERT_HEX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
/*
|
/*
|
||||||
* The operand must be a Buffer. We can convert an
|
* The operand must be a Buffer. We can convert an
|
||||||
@ -712,8 +708,8 @@ AcpiExConvertToTargetType (
|
|||||||
Status = AcpiExConvertToBuffer (SourceDesc, ResultDesc);
|
Status = AcpiExConvertToBuffer (SourceDesc, ResultDesc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Bad destination type during conversion: 0x%X",
|
ACPI_ERROR ((AE_INFO, "Bad destination type during conversion: 0x%X",
|
||||||
DestinationType));
|
DestinationType));
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
@ -721,15 +717,14 @@ AcpiExConvertToTargetType (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ARGI_REFERENCE:
|
case ARGI_REFERENCE:
|
||||||
/*
|
/*
|
||||||
* CreateXxxxField cases - we are storing the field object into the name
|
* CreateXxxxField cases - we are storing the field object into the name
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Unknown Target type ID 0x%X AmlOpcode 0x%X DestType %s",
|
"Unknown Target type ID 0x%X AmlOpcode 0x%X DestType %s",
|
||||||
GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
|
GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
|
||||||
|
@ -113,7 +113,6 @@ AcpiExCreateAlias (
|
|||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
case ACPI_TYPE_BUFFER_FIELD:
|
case ACPI_TYPE_BUFFER_FIELD:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These types open a new scope, so we need the NS node in order to access
|
* These types open a new scope, so we need the NS node in order to access
|
||||||
* any children.
|
* any children.
|
||||||
@ -123,7 +122,6 @@ AcpiExCreateAlias (
|
|||||||
case ACPI_TYPE_PROCESSOR:
|
case ACPI_TYPE_PROCESSOR:
|
||||||
case ACPI_TYPE_THERMAL:
|
case ACPI_TYPE_THERMAL:
|
||||||
case ACPI_TYPE_LOCAL_SCOPE:
|
case ACPI_TYPE_LOCAL_SCOPE:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The new alias has the type ALIAS and points to the original
|
* The new alias has the type ALIAS and points to the original
|
||||||
* NS node, not the object itself.
|
* NS node, not the object itself.
|
||||||
@ -133,7 +131,6 @@ AcpiExCreateAlias (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Control method aliases need to be differentiated
|
* Control method aliases need to be differentiated
|
||||||
*/
|
*/
|
||||||
|
@ -208,6 +208,7 @@ AcpiExDoDebugObject (
|
|||||||
return_VOID;
|
return_VOID;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,6 +242,7 @@ AcpiExDoDebugObject (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
|
AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
|
||||||
Level+4, 0);
|
Level+4, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -380,6 +380,7 @@ AcpiExDumpObject (
|
|||||||
switch (Info->Opcode)
|
switch (Info->Opcode)
|
||||||
{
|
{
|
||||||
case ACPI_EXD_INIT:
|
case ACPI_EXD_INIT:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_EXD_TYPE:
|
case ACPI_EXD_TYPE:
|
||||||
@ -541,19 +542,16 @@ AcpiExDumpOperand (
|
|||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_INDEX:
|
case ACPI_REFCLASS_INDEX:
|
||||||
|
|
||||||
AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
|
AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_TABLE:
|
case ACPI_REFCLASS_TABLE:
|
||||||
|
|
||||||
AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
|
AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_REFOF:
|
case ACPI_REFCLASS_REFOF:
|
||||||
|
|
||||||
AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
|
AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
|
||||||
@ -561,20 +559,17 @@ AcpiExDumpOperand (
|
|||||||
ObjDesc->Reference.Object)->Common.Type));
|
ObjDesc->Reference.Object)->Common.Type));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_NAME:
|
case ACPI_REFCLASS_NAME:
|
||||||
|
|
||||||
AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
|
AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_ARG:
|
case ACPI_REFCLASS_ARG:
|
||||||
case ACPI_REFCLASS_LOCAL:
|
case ACPI_REFCLASS_LOCAL:
|
||||||
|
|
||||||
AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
|
AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default: /* Unknown reference class */
|
default: /* Unknown reference class */
|
||||||
|
|
||||||
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
|
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
|
||||||
@ -582,7 +577,6 @@ AcpiExDumpOperand (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
AcpiOsPrintf ("Buffer length %.2X @ %p\n",
|
AcpiOsPrintf ("Buffer length %.2X @ %p\n",
|
||||||
@ -604,14 +598,12 @@ AcpiExDumpOperand (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
AcpiOsPrintf ("Integer %8.8X%8.8X\n",
|
AcpiOsPrintf ("Integer %8.8X%8.8X\n",
|
||||||
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
|
AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
|
||||||
@ -632,7 +624,6 @@ AcpiExDumpOperand (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_REGION:
|
case ACPI_TYPE_REGION:
|
||||||
|
|
||||||
AcpiOsPrintf ("Region %s (%X)",
|
AcpiOsPrintf ("Region %s (%X)",
|
||||||
@ -655,7 +646,6 @@ AcpiExDumpOperand (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
AcpiOsPrintf ("String length %X @ %p ",
|
AcpiOsPrintf ("String length %X @ %p ",
|
||||||
@ -666,13 +656,11 @@ AcpiExDumpOperand (
|
|||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||||
|
|
||||||
AcpiOsPrintf ("BankField\n");
|
AcpiOsPrintf ("BankField\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||||
|
|
||||||
AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
|
AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
|
||||||
@ -687,13 +675,11 @@ AcpiExDumpOperand (
|
|||||||
AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
|
AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||||
|
|
||||||
AcpiOsPrintf ("IndexField\n");
|
AcpiOsPrintf ("IndexField\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER_FIELD:
|
case ACPI_TYPE_BUFFER_FIELD:
|
||||||
|
|
||||||
AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
|
AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
|
||||||
@ -716,13 +702,11 @@ AcpiExDumpOperand (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_EVENT:
|
case ACPI_TYPE_EVENT:
|
||||||
|
|
||||||
AcpiOsPrintf ("Event\n");
|
AcpiOsPrintf ("Event\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_METHOD:
|
case ACPI_TYPE_METHOD:
|
||||||
|
|
||||||
AcpiOsPrintf ("Method(%X) @ %p:%X\n",
|
AcpiOsPrintf ("Method(%X) @ %p:%X\n",
|
||||||
@ -731,38 +715,33 @@ AcpiExDumpOperand (
|
|||||||
ObjDesc->Method.AmlLength);
|
ObjDesc->Method.AmlLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_MUTEX:
|
case ACPI_TYPE_MUTEX:
|
||||||
|
|
||||||
AcpiOsPrintf ("Mutex\n");
|
AcpiOsPrintf ("Mutex\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_DEVICE:
|
case ACPI_TYPE_DEVICE:
|
||||||
|
|
||||||
AcpiOsPrintf ("Device\n");
|
AcpiOsPrintf ("Device\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_POWER:
|
case ACPI_TYPE_POWER:
|
||||||
|
|
||||||
AcpiOsPrintf ("Power\n");
|
AcpiOsPrintf ("Power\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PROCESSOR:
|
case ACPI_TYPE_PROCESSOR:
|
||||||
|
|
||||||
AcpiOsPrintf ("Processor\n");
|
AcpiOsPrintf ("Processor\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_THERMAL:
|
case ACPI_TYPE_THERMAL:
|
||||||
|
|
||||||
AcpiOsPrintf ("Thermal\n");
|
AcpiOsPrintf ("Thermal\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Unknown Type */
|
/* Unknown Type */
|
||||||
|
|
||||||
AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
|
AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
|
||||||
@ -1005,7 +984,6 @@ AcpiExDumpPackageObj (
|
|||||||
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
AcpiOsPrintf ("[String] Value: ");
|
AcpiOsPrintf ("[String] Value: ");
|
||||||
@ -1013,7 +991,6 @@ AcpiExDumpPackageObj (
|
|||||||
AcpiOsPrintf ("\n");
|
AcpiOsPrintf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
||||||
@ -1028,7 +1005,6 @@ AcpiExDumpPackageObj (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
|
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
|
||||||
@ -1040,7 +1016,6 @@ AcpiExDumpPackageObj (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
|
AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
|
||||||
@ -1049,7 +1024,6 @@ AcpiExDumpPackageObj (
|
|||||||
AcpiExDumpReferenceObj (ObjDesc);
|
AcpiExDumpReferenceObj (ObjDesc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
|
AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
|
||||||
|
@ -360,21 +360,25 @@ AcpiExWriteDataToField (
|
|||||||
switch (SourceDesc->Common.Type)
|
switch (SourceDesc->Common.Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
Buffer = &SourceDesc->Integer.Value;
|
Buffer = &SourceDesc->Integer.Value;
|
||||||
Length = sizeof (SourceDesc->Integer.Value);
|
Length = sizeof (SourceDesc->Integer.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
Buffer = SourceDesc->Buffer.Pointer;
|
Buffer = SourceDesc->Buffer.Pointer;
|
||||||
Length = SourceDesc->Buffer.Length;
|
Length = SourceDesc->Buffer.Length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Buffer = SourceDesc->String.Pointer;
|
Buffer = SourceDesc->String.Pointer;
|
||||||
Length = SourceDesc->String.Length;
|
Length = SourceDesc->String.Length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,9 +480,7 @@ AcpiExFieldDatumIo (
|
|||||||
Status = AE_OK;
|
Status = AE_OK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ensure that the BankValue is not beyond the capacity of
|
* Ensure that the BankValue is not beyond the capacity of
|
||||||
* the register
|
* the register
|
||||||
@ -512,7 +510,6 @@ AcpiExFieldDatumIo (
|
|||||||
|
|
||||||
/*lint -fallthrough */
|
/*lint -fallthrough */
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||||
/*
|
/*
|
||||||
* For simple RegionFields, we just directly access the owning
|
* For simple RegionFields, we just directly access the owning
|
||||||
@ -522,10 +519,7 @@ AcpiExFieldDatumIo (
|
|||||||
ReadWrite);
|
ReadWrite);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ensure that the IndexValue is not beyond the capacity of
|
* Ensure that the IndexValue is not beyond the capacity of
|
||||||
* the register
|
* the register
|
||||||
@ -575,7 +569,6 @@ AcpiExFieldDatumIo (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Wrong object type in field I/O %u",
|
ACPI_ERROR ((AE_INFO, "Wrong object type in field I/O %u",
|
||||||
|
@ -115,16 +115,13 @@ AcpiExGetObjectReference (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_DESC_TYPE_NAMED:
|
case ACPI_DESC_TYPE_NAMED:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A named reference that has already been resolved to a Node
|
* A named reference that has already been resolved to a Node
|
||||||
*/
|
*/
|
||||||
ReferencedObj = ObjDesc;
|
ReferencedObj = ObjDesc;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Invalid descriptor type 0x%X",
|
ACPI_ERROR ((AE_INFO, "Invalid descriptor type 0x%X",
|
||||||
@ -286,19 +283,23 @@ AcpiExDoConcatenate (
|
|||||||
switch (Operand0->Common.Type)
|
switch (Operand0->Common.Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, 16);
|
Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Status = AcpiExConvertToString (Operand1, &LocalOperand1,
|
Status = AcpiExConvertToString (Operand1, &LocalOperand1,
|
||||||
ACPI_IMPLICIT_CONVERT_HEX);
|
ACPI_IMPLICIT_CONVERT_HEX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
Status = AcpiExConvertToBuffer (Operand1, &LocalOperand1);
|
Status = AcpiExConvertToBuffer (Operand1, &LocalOperand1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
|
ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
|
||||||
Operand0->Common.Type));
|
Operand0->Common.Type));
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
@ -450,37 +451,30 @@ AcpiExDoMathOp (
|
|||||||
|
|
||||||
return (Integer0 + Integer1);
|
return (Integer0 + Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_BIT_AND_OP: /* And (Integer0, Integer1, Result) */
|
case AML_BIT_AND_OP: /* And (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (Integer0 & Integer1);
|
return (Integer0 & Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_BIT_NAND_OP: /* NAnd (Integer0, Integer1, Result) */
|
case AML_BIT_NAND_OP: /* NAnd (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (~(Integer0 & Integer1));
|
return (~(Integer0 & Integer1));
|
||||||
|
|
||||||
|
|
||||||
case AML_BIT_OR_OP: /* Or (Integer0, Integer1, Result) */
|
case AML_BIT_OR_OP: /* Or (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (Integer0 | Integer1);
|
return (Integer0 | Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_BIT_NOR_OP: /* NOr (Integer0, Integer1, Result) */
|
case AML_BIT_NOR_OP: /* NOr (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (~(Integer0 | Integer1));
|
return (~(Integer0 | Integer1));
|
||||||
|
|
||||||
|
|
||||||
case AML_BIT_XOR_OP: /* XOr (Integer0, Integer1, Result) */
|
case AML_BIT_XOR_OP: /* XOr (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (Integer0 ^ Integer1);
|
return (Integer0 ^ Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_MULTIPLY_OP: /* Multiply (Integer0, Integer1, Result) */
|
case AML_MULTIPLY_OP: /* Multiply (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (Integer0 * Integer1);
|
return (Integer0 * Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_SHIFT_LEFT_OP: /* ShiftLeft (Operand, ShiftCount, Result)*/
|
case AML_SHIFT_LEFT_OP: /* ShiftLeft (Operand, ShiftCount, Result)*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -493,7 +487,6 @@ AcpiExDoMathOp (
|
|||||||
}
|
}
|
||||||
return (Integer0 << Integer1);
|
return (Integer0 << Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_SHIFT_RIGHT_OP: /* ShiftRight (Operand, ShiftCount, Result) */
|
case AML_SHIFT_RIGHT_OP: /* ShiftRight (Operand, ShiftCount, Result) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -506,7 +499,6 @@ AcpiExDoMathOp (
|
|||||||
}
|
}
|
||||||
return (Integer0 >> Integer1);
|
return (Integer0 >> Integer1);
|
||||||
|
|
||||||
|
|
||||||
case AML_SUBTRACT_OP: /* Subtract (Integer0, Integer1, Result) */
|
case AML_SUBTRACT_OP: /* Subtract (Integer0, Integer1, Result) */
|
||||||
|
|
||||||
return (Integer0 - Integer1);
|
return (Integer0 - Integer1);
|
||||||
@ -571,6 +563,7 @@ AcpiExDoLogicalNumericOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -638,19 +631,23 @@ AcpiExDoLogicalOp (
|
|||||||
switch (Operand0->Common.Type)
|
switch (Operand0->Common.Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, 16);
|
Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Status = AcpiExConvertToString (Operand1, &LocalOperand1,
|
Status = AcpiExConvertToString (Operand1, &LocalOperand1,
|
||||||
ACPI_IMPLICIT_CONVERT_HEX);
|
ACPI_IMPLICIT_CONVERT_HEX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_BUFFER:
|
case ACPI_TYPE_BUFFER:
|
||||||
|
|
||||||
Status = AcpiExConvertToBuffer (Operand1, &LocalOperand1);
|
Status = AcpiExConvertToBuffer (Operand1, &LocalOperand1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -699,6 +696,7 @@ AcpiExDoLogicalOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -776,6 +774,7 @@ AcpiExDoLogicalOp (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_AML_INTERNAL;
|
Status = AE_AML_INTERNAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,6 @@ AcpiExGetNameString (
|
|||||||
HasPrefix = TRUE;
|
HasPrefix = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_PARENT_PREFIX:
|
case AML_PARENT_PREFIX:
|
||||||
|
|
||||||
/* Increment past possibly multiple parent prefixes */
|
/* Increment past possibly multiple parent prefixes */
|
||||||
@ -352,7 +351,6 @@ AcpiExGetNameString (
|
|||||||
HasPrefix = TRUE;
|
HasPrefix = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Not a prefix character */
|
/* Not a prefix character */
|
||||||
@ -388,7 +386,6 @@ AcpiExGetNameString (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_MULTI_NAME_PREFIX_OP:
|
case AML_MULTI_NAME_PREFIX_OP:
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "MultiNamePrefix at %p\n",
|
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "MultiNamePrefix at %p\n",
|
||||||
@ -420,7 +417,6 @@ AcpiExGetNameString (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
/* NullName valid as of 8-12-98 ASL/AML Grammar Update */
|
/* NullName valid as of 8-12-98 ASL/AML Grammar Update */
|
||||||
@ -443,7 +439,6 @@ AcpiExGetNameString (
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* Name segment string */
|
/* Name segment string */
|
||||||
|
@ -180,37 +180,31 @@ AcpiExOpcode_1A_0T_0R (
|
|||||||
Status = AcpiExReleaseMutex (Operand[0], WalkState);
|
Status = AcpiExReleaseMutex (Operand[0], WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_RESET_OP: /* Reset (EventObject) */
|
case AML_RESET_OP: /* Reset (EventObject) */
|
||||||
|
|
||||||
Status = AcpiExSystemResetEvent (Operand[0]);
|
Status = AcpiExSystemResetEvent (Operand[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_SIGNAL_OP: /* Signal (EventObject) */
|
case AML_SIGNAL_OP: /* Signal (EventObject) */
|
||||||
|
|
||||||
Status = AcpiExSystemSignalEvent (Operand[0]);
|
Status = AcpiExSystemSignalEvent (Operand[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_SLEEP_OP: /* Sleep (MsecTime) */
|
case AML_SLEEP_OP: /* Sleep (MsecTime) */
|
||||||
|
|
||||||
Status = AcpiExSystemDoSleep (Operand[0]->Integer.Value);
|
Status = AcpiExSystemDoSleep (Operand[0]->Integer.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_STALL_OP: /* Stall (UsecTime) */
|
case AML_STALL_OP: /* Stall (UsecTime) */
|
||||||
|
|
||||||
Status = AcpiExSystemDoStall ((UINT32) Operand[0]->Integer.Value);
|
Status = AcpiExSystemDoStall ((UINT32) Operand[0]->Integer.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_UNLOAD_OP: /* Unload (Handle) */
|
case AML_UNLOAD_OP: /* Unload (Handle) */
|
||||||
|
|
||||||
Status = AcpiExUnloadTable (Operand[0]);
|
Status = AcpiExUnloadTable (Operand[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default: /* Unknown opcode */
|
default: /* Unknown opcode */
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
||||||
@ -330,7 +324,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
ReturnDesc->Integer.Value = ~Operand[0]->Integer.Value;
|
ReturnDesc->Integer.Value = ~Operand[0]->Integer.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_FIND_SET_LEFT_BIT_OP: /* FindSetLeftBit (Operand, Result) */
|
case AML_FIND_SET_LEFT_BIT_OP: /* FindSetLeftBit (Operand, Result) */
|
||||||
|
|
||||||
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
|
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
|
||||||
@ -348,7 +341,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
ReturnDesc->Integer.Value = Temp32;
|
ReturnDesc->Integer.Value = Temp32;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_FIND_SET_RIGHT_BIT_OP: /* FindSetRightBit (Operand, Result) */
|
case AML_FIND_SET_RIGHT_BIT_OP: /* FindSetRightBit (Operand, Result) */
|
||||||
|
|
||||||
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
|
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
|
||||||
@ -369,9 +361,7 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
Temp32 == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - Temp32;
|
Temp32 == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - Temp32;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_FROM_BCD_OP: /* FromBcd (BCDValue, Result) */
|
case AML_FROM_BCD_OP: /* FromBcd (BCDValue, Result) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The 64-bit ACPI integer can hold 16 4-bit BCD characters
|
* The 64-bit ACPI integer can hold 16 4-bit BCD characters
|
||||||
* (if table is 32-bit, integer can hold 8 BCD characters)
|
* (if table is 32-bit, integer can hold 8 BCD characters)
|
||||||
@ -416,7 +406,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
|
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
|
||||||
|
|
||||||
ReturnDesc->Integer.Value = 0;
|
ReturnDesc->Integer.Value = 0;
|
||||||
@ -448,9 +437,7 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_COND_REF_OF_OP: /* CondRefOf (SourceObject, Result) */
|
case AML_COND_REF_OF_OP: /* CondRefOf (SourceObject, Result) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This op is a little strange because the internal return value is
|
* This op is a little strange because the internal return value is
|
||||||
* different than the return value stored in the result descriptor
|
* different than the return value stored in the result descriptor
|
||||||
@ -485,14 +472,14 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* No other opcodes get here */
|
/* No other opcodes get here */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_STORE_OP: /* Store (Source, Target) */
|
case AML_STORE_OP: /* Store (Source, Target) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A store operand is typically a number, string, buffer or lvalue
|
* A store operand is typically a number, string, buffer or lvalue
|
||||||
* Be careful about deleting the source object,
|
* Be careful about deleting the source object,
|
||||||
@ -519,7 +506,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACPI 2.0 Opcodes
|
* ACPI 2.0 Opcodes
|
||||||
*/
|
*/
|
||||||
@ -529,7 +515,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
WalkState);
|
WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TO_DECSTRING_OP: /* ToDecimalString (Data, Result) */
|
case AML_TO_DECSTRING_OP: /* ToDecimalString (Data, Result) */
|
||||||
|
|
||||||
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
|
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
|
||||||
@ -541,7 +526,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TO_HEXSTRING_OP: /* ToHexString (Data, Result) */
|
case AML_TO_HEXSTRING_OP: /* ToHexString (Data, Result) */
|
||||||
|
|
||||||
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
|
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
|
||||||
@ -553,7 +537,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TO_BUFFER_OP: /* ToBuffer (Data, Result) */
|
case AML_TO_BUFFER_OP: /* ToBuffer (Data, Result) */
|
||||||
|
|
||||||
Status = AcpiExConvertToBuffer (Operand[0], &ReturnDesc);
|
Status = AcpiExConvertToBuffer (Operand[0], &ReturnDesc);
|
||||||
@ -564,7 +547,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TO_INTEGER_OP: /* ToInteger (Data, Result) */
|
case AML_TO_INTEGER_OP: /* ToInteger (Data, Result) */
|
||||||
|
|
||||||
Status = AcpiExConvertToInteger (Operand[0], &ReturnDesc,
|
Status = AcpiExConvertToInteger (Operand[0], &ReturnDesc,
|
||||||
@ -576,7 +558,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_SHIFT_LEFT_BIT_OP: /* ShiftLeftBit (Source, BitNum) */
|
case AML_SHIFT_LEFT_BIT_OP: /* ShiftLeftBit (Source, BitNum) */
|
||||||
case AML_SHIFT_RIGHT_BIT_OP: /* ShiftRightBit (Source, BitNum) */
|
case AML_SHIFT_RIGHT_BIT_OP: /* ShiftRightBit (Source, BitNum) */
|
||||||
|
|
||||||
@ -588,7 +569,6 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
Status = AE_SUPPORT;
|
Status = AE_SUPPORT;
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
|
||||||
|
|
||||||
default: /* Unknown opcode */
|
default: /* Unknown opcode */
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
||||||
@ -676,10 +656,8 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_DECREMENT_OP: /* Decrement (Operand) */
|
case AML_DECREMENT_OP: /* Decrement (Operand) */
|
||||||
case AML_INCREMENT_OP: /* Increment (Operand) */
|
case AML_INCREMENT_OP: /* Increment (Operand) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a new integer. Can't just get the base integer and
|
* Create a new integer. Can't just get the base integer and
|
||||||
* increment it because it may be an Arg or Field.
|
* increment it because it may be an Arg or Field.
|
||||||
@ -744,9 +722,7 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
Status = AcpiExStore (ReturnDesc, Operand[0], WalkState);
|
Status = AcpiExStore (ReturnDesc, Operand[0], WalkState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_TYPE_OP: /* ObjectType (SourceObject) */
|
case AML_TYPE_OP: /* ObjectType (SourceObject) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: The operand is not resolved at this point because we want to
|
* Note: The operand is not resolved at this point because we want to
|
||||||
* get the associated object, not its value. For example, we don't
|
* get the associated object, not its value. For example, we don't
|
||||||
@ -772,9 +748,7 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */
|
case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: The operand is not resolved at this point because we want to
|
* Note: The operand is not resolved at this point because we want to
|
||||||
* get the associated object, not its value.
|
* get the associated object, not its value.
|
||||||
@ -801,10 +775,12 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ACPI_TYPE_INTEGER:
|
case ACPI_TYPE_INTEGER:
|
||||||
|
|
||||||
Value = AcpiGbl_IntegerByteWidth;
|
Value = AcpiGbl_IntegerByteWidth;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
Value = TempDesc->String.Length;
|
Value = TempDesc->String.Length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -825,6 +801,7 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Operand must be Buffer/Integer/String/Package - found type %s",
|
"Operand must be Buffer/Integer/String/Package - found type %s",
|
||||||
AcpiUtGetTypeName (Type)));
|
AcpiUtGetTypeName (Type)));
|
||||||
@ -932,9 +909,11 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_STRING:
|
case ACPI_TYPE_STRING:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = AE_AML_OPERAND_TYPE;
|
Status = AE_AML_OPERAND_TYPE;
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
@ -993,7 +972,6 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
switch (Operand[0]->Reference.Class)
|
switch (Operand[0]->Reference.Class)
|
||||||
{
|
{
|
||||||
case ACPI_REFCLASS_INDEX:
|
case ACPI_REFCLASS_INDEX:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The target type for the Index operator must be
|
* The target type for the Index operator must be
|
||||||
* either a Buffer or a Package
|
* either a Buffer or a Package
|
||||||
@ -1025,9 +1003,7 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_TYPE_PACKAGE:
|
case ACPI_TYPE_PACKAGE:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the referenced element of the package. We must
|
* Return the referenced element of the package. We must
|
||||||
* add another reference to the referenced object, however.
|
* add another reference to the referenced object, however.
|
||||||
@ -1039,7 +1015,6 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
@ -1050,7 +1025,6 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ACPI_REFCLASS_REFOF:
|
case ACPI_REFCLASS_REFOF:
|
||||||
|
|
||||||
ReturnDesc = Operand[0]->Reference.Object;
|
ReturnDesc = Operand[0]->Reference.Object;
|
||||||
@ -1067,8 +1041,8 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
AcpiUtAddReference (ReturnDesc);
|
AcpiUtAddReference (ReturnDesc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Unknown class in reference(%p) - 0x%2.2X",
|
"Unknown class in reference(%p) - 0x%2.2X",
|
||||||
Operand[0], Operand[0]->Reference.Class));
|
Operand[0], Operand[0]->Reference.Class));
|
||||||
@ -1079,7 +1053,6 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user