Import ACPICA 20160422.
This commit is contained in:
parent
937fa60dd2
commit
2331c68115
95
changes.txt
95
changes.txt
@ -1,3 +1,98 @@
|
||||
----------------------------------------
|
||||
22 April 2016. Summary of changes for version 20160422:
|
||||
|
||||
1) ACPICA kernel-resident subsystem:
|
||||
|
||||
Fixed a regression in the GAS (generic address structure) arbitrary bit
|
||||
support in AcpiHwRead/AcpiHwWrite. Problem could cause incorrect behavior
|
||||
and incorrect return values. Lv Zheng. ACPICA BZ 1270.
|
||||
|
||||
ACPI 6.0: Added support for new/renamed resource macros. One new argument
|
||||
was added to each of these macros, and the original name has been
|
||||
deprecated. The AML disassembler will always disassemble to the new
|
||||
names. Support for the new macros was added to iASL, disassembler,
|
||||
resource manager, and the acpihelp utility. ACPICA BZ 1274.
|
||||
|
||||
I2cSerialBus -> I2cSerialBusV2
|
||||
SpiSerialBus -> SpiSerialBusV2
|
||||
UartSerialBus -> UartSerialBusV2
|
||||
|
||||
ACPI 6.0: Added support for a new integer field that was appended to the
|
||||
package object returned by the _BIX method. This adds iASL compile-time
|
||||
and AML runtime error checking. ACPICA BZ 1273.
|
||||
|
||||
ACPI 6.1: Added support for a new PCCT subtable, "HW-Reduced Comm
|
||||
Subspace Type2" (Headers, Disassembler, and data table compiler).
|
||||
|
||||
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: 137.4K Code, 52.6K Data, 190.0K Total
|
||||
Debug Version: 201.5K Code, 82.2K Data, 283.7K Total
|
||||
Previous Release:
|
||||
Non-Debug Version: 137.1K Code, 51.5K Data, 188.6K Total
|
||||
Debug Version: 201.0K Code, 82.0K Data, 283.0K Total
|
||||
|
||||
|
||||
2) iASL Compiler/Disassembler and Tools:
|
||||
|
||||
iASL: Implemented an ASL grammar extension to allow/enable executable
|
||||
"module-level code" to be created and executed under the various
|
||||
operators that create new scopes. This type of AML code is already
|
||||
supported in all known AML interpreters, and the grammar change will
|
||||
appear in the next version of the ACPI specification. Simplifies the
|
||||
conditional runtime creation of named objects under these object types:
|
||||
|
||||
Device
|
||||
PowerResource
|
||||
Processor
|
||||
Scope
|
||||
ThermalZone
|
||||
|
||||
iASL: Implemented a new ASL extension, a "For" loop macro to add greater
|
||||
ease-of-use to the ASL language. The syntax is similar to the
|
||||
corresponding C operator, and is implemented with the existing AML While
|
||||
opcode -- thus requiring no changes to existing AML interpreters.
|
||||
|
||||
For (Initialize, Predicate, Update) {TermList}
|
||||
|
||||
Grammar:
|
||||
ForTerm :=
|
||||
For (
|
||||
Initializer // Nothing | TermArg => ComputationalData
|
||||
Predicate // Nothing | TermArg => ComputationalData
|
||||
Update // Nothing | TermArg => ComputationalData
|
||||
) {TermList}
|
||||
|
||||
|
||||
iASL: The _HID/_ADR detection and validation has been enhanced to search
|
||||
under conditionals in order to allow these objects to be conditionally
|
||||
created at runtime.
|
||||
|
||||
iASL: Fixed several issues with the constant folding feature. The
|
||||
improvement allows better detection and resolution of statements that can
|
||||
be folded at compile time. ACPICA BZ 1266.
|
||||
|
||||
iASL/Disassembler: Fixed a couple issues with the Else{If{}...}
|
||||
conversion to the ASL ElseIf operator where incorrect ASL code could be
|
||||
generated.
|
||||
|
||||
iASL/Disassembler: Fixed a problem with the ASL+ code disassembly where
|
||||
sometimes an extra (and extraneous) set of parentheses were emitted for
|
||||
some combinations of operators. Although this did not cause any problems
|
||||
with recompilation of the disassembled code, it made the code more
|
||||
difficult to read. David Box. ACPICA BZ 1231.
|
||||
|
||||
iASL: Changed to ignore the unreferenced detection for predefined names
|
||||
of resource descriptor elements, when the resource descriptor is
|
||||
created/defined within a control method.
|
||||
|
||||
iASL: Disassembler: Fix a possible fault with externally declared Buffer
|
||||
objects.
|
||||
|
||||
----------------------------------------
|
||||
18 March 2016. Summary of changes for version 20160318:
|
||||
|
||||
|
@ -32,6 +32,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/cmfsize.o\
|
||||
$(OBJDIR)/getopt.o\
|
||||
$(OBJDIR)/utalloc.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
|
@ -39,6 +39,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/osunixxf.o\
|
||||
$(OBJDIR)/tbprint.o\
|
||||
$(OBJDIR)/tbxfroot.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
$(OBJDIR)/utexcep.o\
|
||||
|
@ -131,6 +131,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/tbxfroot.o\
|
||||
$(OBJDIR)/utaddress.o\
|
||||
$(OBJDIR)/utalloc.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utcopy.o\
|
||||
|
@ -201,6 +201,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/tbxfroot.o\
|
||||
$(OBJDIR)/utaddress.o\
|
||||
$(OBJDIR)/utalloc.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utcopy.o\
|
||||
|
@ -96,6 +96,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/tbxfroot.o\
|
||||
$(OBJDIR)/utaddress.o\
|
||||
$(OBJDIR)/utalloc.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
|
@ -39,6 +39,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/oslibcfs.o\
|
||||
$(OBJDIR)/osunixdir.o\
|
||||
$(OBJDIR)/osunixxf.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
$(OBJDIR)/utexcep.o\
|
||||
$(OBJDIR)/utglobal.o\
|
||||
|
@ -33,6 +33,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/getopt.o\
|
||||
$(OBJDIR)/oslibcfs.o\
|
||||
$(OBJDIR)/osunixxf.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
$(OBJDIR)/utexcep.o\
|
||||
$(OBJDIR)/utglobal.o\
|
||||
|
@ -201,6 +201,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/tbxfload.o\
|
||||
$(OBJDIR)/utaddress.o\
|
||||
$(OBJDIR)/utalloc.o\
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utcopy.o\
|
||||
@ -274,12 +275,14 @@ include ../Makefile.rules
|
||||
# Function to safely execute yacc
|
||||
#
|
||||
safe_yacc = \
|
||||
_f=`echo $(1) | tr '[:upper:]' '[:lower:]'` &&\
|
||||
_d=`mktemp -d $(OBJDIR)/$$_f.XXXXXX` &&\
|
||||
_t=`basename $(3)` &&\
|
||||
$(YACC) $(YFLAGS) -p$(1) -o$$_d/$$_f.c -d $(2) &&\
|
||||
mv $$_d/$$_f.$${_t\#\#*.} $(3);\
|
||||
test -d $$_d && rm -fr $$_d
|
||||
_d=`mktemp -d $(OBJDIR)/$(1).XXXXXX` &&\
|
||||
cd $$_d &&\
|
||||
$(YACC) $(YFLAGS) -d -p$(1) $(abspath $(2)) &&\
|
||||
cd - &&\
|
||||
mv $$_d/y.tab$(suffix $(3)) $(3);\
|
||||
_r=$$?;\
|
||||
rm -fr $$_d;\
|
||||
exit $$_r
|
||||
|
||||
#
|
||||
# Macro processing for iASL .y files
|
||||
|
@ -112,7 +112,8 @@ AcGetAllTablesFromFile (
|
||||
FileSize = CmGetFileSize (File);
|
||||
if (FileSize == ACPI_UINT32_MAX)
|
||||
{
|
||||
return (AE_ERROR);
|
||||
Status = AE_ERROR;
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
fprintf (stderr,
|
||||
@ -123,7 +124,8 @@ AcGetAllTablesFromFile (
|
||||
|
||||
if (FileSize < sizeof (ACPI_TABLE_HEADER))
|
||||
{
|
||||
return (AE_BAD_HEADER);
|
||||
Status = AE_BAD_HEADER;
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
/* Check for an non-binary file */
|
||||
@ -156,7 +158,7 @@ AcGetAllTablesFromFile (
|
||||
}
|
||||
else if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
/* Print table header for iASL/disassembler only */
|
||||
@ -203,6 +205,7 @@ AcGetAllTablesFromFile (
|
||||
*ReturnListHead = ListHead;
|
||||
}
|
||||
|
||||
ErrorExit:
|
||||
fclose(File);
|
||||
return (Status);
|
||||
}
|
||||
@ -409,7 +412,7 @@ AcValidateTableHeader (
|
||||
|
||||
/* Validate the signature (limited ASCII chars) */
|
||||
|
||||
if (!AcpiIsValidSignature (TableHeader.Signature))
|
||||
if (!AcpiUtValidNameseg (TableHeader.Signature))
|
||||
{
|
||||
fprintf (stderr, "Invalid table signature: 0x%8.8X\n",
|
||||
*ACPI_CAST_PTR (UINT32, TableHeader.Signature));
|
||||
|
@ -1101,7 +1101,6 @@ AcpiDmEmitExternals (
|
||||
*/
|
||||
while (AcpiGbl_ExternalList)
|
||||
{
|
||||
AcpiGbl_ExternalList = AcpiGbl_ExternalList;
|
||||
if (!(AcpiGbl_ExternalList->Flags & ACPI_EXT_EXTERNAL_EMITTED))
|
||||
{
|
||||
AcpiOsPrintf (" External (%s%s)",
|
||||
|
@ -279,6 +279,7 @@ static const ACPI_RESOURCE_TAG AcpiDmGpioIoTags[] =
|
||||
static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] =
|
||||
{
|
||||
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
|
||||
{( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
|
||||
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
|
||||
{(12 * 8), ACPI_RESTAG_SPEED},
|
||||
{(16 * 8), ACPI_RESTAG_ADDRESS},
|
||||
@ -288,6 +289,7 @@ static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] =
|
||||
static const ACPI_RESOURCE_TAG AcpiDmSpiSerialBusTags[] =
|
||||
{
|
||||
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
|
||||
{( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
|
||||
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
|
||||
{( 7 * 8) + 1, ACPI_RESTAG_DEVICEPOLARITY},
|
||||
{(12 * 8), ACPI_RESTAG_SPEED},
|
||||
@ -300,7 +302,8 @@ static const ACPI_RESOURCE_TAG AcpiDmSpiSerialBusTags[] =
|
||||
|
||||
static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] =
|
||||
{
|
||||
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
|
||||
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
|
||||
{( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
|
||||
{( 7 * 8) + 0, ACPI_RESTAG_FLOWCONTROL},
|
||||
{( 7 * 8) + 2, ACPI_RESTAG_STOPBITS},
|
||||
{( 7 * 8) + 4, ACPI_RESTAG_LENGTH},
|
||||
|
@ -58,15 +58,6 @@ AcpiAhGetTableInfo (
|
||||
char *Signature);
|
||||
|
||||
|
||||
/* Local Prototypes */
|
||||
|
||||
static void
|
||||
AcpiDmCheckAscii (
|
||||
UINT8 *Target,
|
||||
char *RepairedName,
|
||||
UINT32 Count);
|
||||
|
||||
|
||||
/* Common format strings for commented values */
|
||||
|
||||
#define UINT8_FORMAT "%2.2X [%s]\n"
|
||||
@ -255,6 +246,7 @@ static const char *AcpiDmPcctSubnames[] =
|
||||
{
|
||||
"Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
|
||||
"HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
|
||||
"HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
|
||||
"Unknown Subtable Type" /* Reserved */
|
||||
};
|
||||
|
||||
@ -1059,7 +1051,7 @@ AcpiDmDumpTable (
|
||||
|
||||
case ACPI_DMT_SIG:
|
||||
|
||||
AcpiDmCheckAscii (Target, RepairedName, 4);
|
||||
AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
|
||||
AcpiOsPrintf ("\"%.4s\" ", RepairedName);
|
||||
|
||||
TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
|
||||
@ -1075,19 +1067,19 @@ AcpiDmDumpTable (
|
||||
|
||||
case ACPI_DMT_NAME4:
|
||||
|
||||
AcpiDmCheckAscii (Target, RepairedName, 4);
|
||||
AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
|
||||
AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
|
||||
break;
|
||||
|
||||
case ACPI_DMT_NAME6:
|
||||
|
||||
AcpiDmCheckAscii (Target, RepairedName, 6);
|
||||
AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
|
||||
AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
|
||||
break;
|
||||
|
||||
case ACPI_DMT_NAME8:
|
||||
|
||||
AcpiDmCheckAscii (Target, RepairedName, 8);
|
||||
AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
|
||||
AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
|
||||
break;
|
||||
|
||||
@ -1490,42 +1482,3 @@ AcpiDmDumpTable (
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmCheckAscii
|
||||
*
|
||||
* PARAMETERS: Name - Ascii string
|
||||
* Count - Number of characters to check
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Ensure that the requested number of characters are printable
|
||||
* Ascii characters. Sets non-printable and null chars to <space>.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
AcpiDmCheckAscii (
|
||||
UINT8 *Name,
|
||||
char *RepairedName,
|
||||
UINT32 Count)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
for (i = 0; i < Count; i++)
|
||||
{
|
||||
RepairedName[i] = (char) Name[i];
|
||||
|
||||
if (!Name[i])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isprint (Name[i]))
|
||||
{
|
||||
RepairedName[i] = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2897,6 +2897,11 @@ AcpiDmDumpPcct (
|
||||
InfoTable = AcpiDmTableInfoPcct1;
|
||||
break;
|
||||
|
||||
case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
|
||||
|
||||
InfoTable = AcpiDmTableInfoPcct2;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
AcpiOsPrintf (
|
||||
|
@ -218,6 +218,7 @@
|
||||
#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
|
||||
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
|
||||
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
|
||||
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
|
||||
#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
|
||||
#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
|
||||
#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
|
||||
@ -279,6 +280,7 @@
|
||||
#define ACPI_NFIT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o)
|
||||
#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
|
||||
#define ACPI_PCCT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
|
||||
#define ACPI_PCCT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
|
||||
#define ACPI_PMTTH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
|
||||
#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
|
||||
#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
|
||||
@ -2339,6 +2341,29 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[] =
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (DoorbellInterrupt), "Doorbell Interrupt", 0},
|
||||
{ACPI_DMT_UINT8, ACPI_PCCT2_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
|
||||
{ACPI_DMT_FLAG0, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Polarity", 0},
|
||||
{ACPI_DMT_FLAG1, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Mode", 0},
|
||||
{ACPI_DMT_UINT8, ACPI_PCCT2_OFFSET (Reserved), "Reserved", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (BaseAddress), "Base Address", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (Length), "Address Length", 0},
|
||||
{ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (DoorbellRegister), "Doorbell Register", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (PreserveMask), "Preserve Mask", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (WriteMask), "Write Mask", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (Latency), "Command Latency", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (MaxAccessRate), "Maximum Access Rate", 0},
|
||||
{ACPI_DMT_UINT16, ACPI_PCCT2_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
|
||||
{ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (DoorbellAckRegister), "Doorbell ACK Register", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckPreserveMask), "ACK Preserve Mask", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckWriteMask), "ACK Write Mask", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
@ -50,6 +50,15 @@
|
||||
ACPI_MODULE_NAME ("aslanalyze")
|
||||
|
||||
|
||||
/* Local Prototypes */
|
||||
|
||||
static ACPI_STATUS
|
||||
ApDeviceSubtreeWalk (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 Level,
|
||||
void *Context);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AnIsInternalMethod
|
||||
@ -577,6 +586,108 @@ ApCheckRegMethod (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ApFindNameInDeviceTree
|
||||
*
|
||||
* PARAMETERS: Name - Name to search for
|
||||
* Op - Current parse op
|
||||
*
|
||||
* RETURN: TRUE if name found in the same scope as Op.
|
||||
*
|
||||
* DESCRIPTION: Determine if a name appears in the same scope as Op, as either
|
||||
* a Method() or a Name(). "Same scope" can mean under an If or
|
||||
* Else statement.
|
||||
*
|
||||
* NOTE: Detects _HID/_ADR in this type of construct (legal in ACPI 6.1+)
|
||||
*
|
||||
* Scope (\_SB.PCI0)
|
||||
* {
|
||||
* Device (I2C0)
|
||||
* {
|
||||
* If (SMD0 != 4) {
|
||||
* Name (_HID, "INT3442")
|
||||
* } Else {
|
||||
* Name (_ADR, 0x400)
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
ApFindNameInDeviceTree (
|
||||
char *Name,
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
|
||||
ApDeviceSubtreeWalk, NULL, Name);
|
||||
|
||||
if (Status == AE_CTRL_TRUE)
|
||||
{
|
||||
return (TRUE); /* Found a match */
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
||||
/* Callback function for interface above */
|
||||
|
||||
static ACPI_STATUS
|
||||
ApDeviceSubtreeWalk (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 Level,
|
||||
void *Context)
|
||||
{
|
||||
char *Name = ACPI_CAST_PTR (char, Context);
|
||||
|
||||
|
||||
switch (Op->Asl.ParseOpcode)
|
||||
{
|
||||
case PARSEOP_DEVICE:
|
||||
|
||||
/* Level 0 is the starting device, ignore it */
|
||||
|
||||
if (Level > 0)
|
||||
{
|
||||
/* Ignore sub-devices */
|
||||
|
||||
return (AE_CTRL_DEPTH);
|
||||
}
|
||||
break;
|
||||
|
||||
case PARSEOP_NAME:
|
||||
case PARSEOP_METHOD:
|
||||
|
||||
/* These are what we are looking for */
|
||||
|
||||
if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
|
||||
{
|
||||
return (AE_CTRL_TRUE);
|
||||
}
|
||||
return (AE_CTRL_DEPTH);
|
||||
|
||||
case PARSEOP_SCOPE:
|
||||
case PARSEOP_FIELD:
|
||||
case PARSEOP_OPERATIONREGION:
|
||||
|
||||
/*
|
||||
* We want to ignore these, because either they can be large
|
||||
* subtrees or open a scope to somewhere else.
|
||||
*/
|
||||
return (AE_CTRL_DEPTH);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ApFindNameInScope
|
||||
|
@ -207,8 +207,8 @@ CmDoCompile (
|
||||
|
||||
if (Gbl_FoldConstants)
|
||||
{
|
||||
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
|
||||
OpcAmlConstantWalk, NULL, NULL);
|
||||
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
|
||||
NULL, OpcAmlConstantWalk, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -287,6 +287,10 @@ ApFindNameInScope (
|
||||
char *Name,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
BOOLEAN
|
||||
ApFindNameInDeviceTree (
|
||||
char *Name,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
/*
|
||||
* aslerror - error handling/reporting
|
||||
@ -709,6 +713,11 @@ ExDoExternal (
|
||||
#define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
|
||||
|
||||
|
||||
void
|
||||
TrSetParent (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_PARSE_OBJECT *ParentOp);
|
||||
|
||||
ACPI_PARSE_OBJECT *
|
||||
TrAllocateNode (
|
||||
UINT32 ParseOpcode);
|
||||
|
@ -332,6 +332,7 @@ NamePathTail [.]{NameSeg}
|
||||
"GpioInt" { count (1); return (PARSEOP_GPIO_INT); }
|
||||
"GpioIo" { count (1); return (PARSEOP_GPIO_IO); }
|
||||
"I2cSerialBus" { count (1); return (PARSEOP_I2C_SERIALBUS); }
|
||||
"I2cSerialBusV2" { count (1); return (PARSEOP_I2C_SERIALBUS_V2); }
|
||||
"Interrupt" { count (1); return (PARSEOP_INTERRUPT); }
|
||||
"IO" { count (1); return (PARSEOP_IO); }
|
||||
"IRQ" { count (1); return (PARSEOP_IRQ); }
|
||||
@ -344,9 +345,11 @@ NamePathTail [.]{NameSeg}
|
||||
"QWordSpace" { count (1); return (PARSEOP_QWORDSPACE); }
|
||||
"Register" { count (1); return (PARSEOP_REGISTER); }
|
||||
"SpiSerialBus" { count (1); return (PARSEOP_SPI_SERIALBUS); }
|
||||
"SpiSerialBusV2" { count (1); return (PARSEOP_SPI_SERIALBUS_V2); }
|
||||
"StartDependentFn" { count (1); return (PARSEOP_STARTDEPENDENTFN); }
|
||||
"StartDependentFnNoPri" { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); }
|
||||
"UartSerialBus" { count (1); return (PARSEOP_UART_SERIALBUS); }
|
||||
"UartSerialBusV2" { count (1); return (PARSEOP_UART_SERIALBUS_V2); }
|
||||
"VendorLong" { count (1); return (PARSEOP_VENDORLONG); }
|
||||
"VendorShort" { count (1); return (PARSEOP_VENDORSHORT); }
|
||||
"WordBusNumber" { count (1); return (PARSEOP_WORDBUSNUMBER); }
|
||||
@ -672,9 +675,14 @@ NamePathTail [.]{NameSeg}
|
||||
|
||||
|
||||
/* printf debug macros */
|
||||
|
||||
"printf" { count (0); return (PARSEOP_PRINTF); }
|
||||
"fprintf" { count (0); return (PARSEOP_FPRINTF); }
|
||||
|
||||
/* Other macros */
|
||||
|
||||
"For" { count (0); return (PARSEOP_FOR); }
|
||||
|
||||
/* Predefined compiler names */
|
||||
|
||||
"__DATE__" { count (0); return (PARSEOP___DATE__); }
|
||||
|
@ -101,6 +101,7 @@ TrInstallReducedConstant (
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Reduce an Op and its subtree to a constant if possible.
|
||||
* Called during ascent of the parse tree.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -192,9 +193,7 @@ OpcAmlConstantWalk (
|
||||
OpcUpdateIntegerNode (Op, 0);
|
||||
}
|
||||
|
||||
/* Abort the walk of this subtree, we are done with it */
|
||||
|
||||
return (AE_CTRL_DEPTH);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -207,7 +206,7 @@ OpcAmlConstantWalk (
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Check one Op for a reducible type 3/4/5 AML opcode.
|
||||
* This is performed via a downward walk of the parse subtree.
|
||||
* This is performed via an upward walk of the parse subtree.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -373,7 +372,6 @@ OpcAmlCheckForConstant (
|
||||
goto CleanupAndExit;
|
||||
}
|
||||
|
||||
|
||||
/* Debug output */
|
||||
|
||||
DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
|
||||
@ -519,9 +517,6 @@ TrTransformToStoreOp (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
DbgPrint (ASL_PARSE_OUTPUT,
|
||||
"Reduction/Transform to StoreOp: Store(Constant, Target)\n");
|
||||
|
||||
/* Extract the operands */
|
||||
|
||||
Child1 = Op->Asl.Child;
|
||||
@ -543,6 +538,10 @@ TrTransformToStoreOp (
|
||||
}
|
||||
}
|
||||
|
||||
DbgPrint (ASL_PARSE_OUTPUT,
|
||||
"Reduction/Transform to StoreOp: Store(%s, %s)\n",
|
||||
Child1->Asl.ParseOpName, Child2->Asl.ParseOpName);
|
||||
|
||||
/*
|
||||
* Create a NULL (zero) target so that we can use the
|
||||
* interpreter to evaluate the expression.
|
||||
|
@ -207,6 +207,7 @@ LkIsObjectUsed (
|
||||
case ACPI_TYPE_POWER:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
case ACPI_TYPE_LOCAL_RESOURCE:
|
||||
case ACPI_TYPE_LOCAL_RESOURCE_FIELD: /* Names assigned to descriptor elements */
|
||||
|
||||
return (AE_OK);
|
||||
|
||||
@ -227,8 +228,8 @@ LkIsObjectUsed (
|
||||
* Issue a remark even if it is a reserved name (starts
|
||||
* with an underscore).
|
||||
*/
|
||||
sprintf (MsgBuffer, "Name is within method [%4.4s]",
|
||||
Next->Name.Ascii);
|
||||
sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
|
||||
Node->Name.Ascii, Next->Name.Ascii);
|
||||
AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
|
||||
LkGetNameOp (Node->Op), MsgBuffer);
|
||||
return (AE_OK);
|
||||
|
@ -238,6 +238,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
|
||||
/* GPIOINT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* GPIOIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* I2CSERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* I2CSERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, NODE_AML_PACKAGE, 0),
|
||||
/* INCLUDE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* INCLUDE_END */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
@ -395,6 +396,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
|
||||
/* SLAVEMODE_DEVICEINIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
|
||||
/* SLEEP */ OP_TABLE_ENTRY (AML_SLEEP_OP, 0, 0, 0),
|
||||
/* SPISERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* SPISERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* STALL */ OP_TABLE_ENTRY (AML_STALL_OP, 0, 0, 0),
|
||||
/* STARTDEPENDENTFN */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
|
||||
/* STARTDEPENDENTFN_NOPRI */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
|
||||
@ -420,6 +422,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
|
||||
/* TYPE_STATIC */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
|
||||
/* TYPE_TRANSLATION */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
|
||||
/* UART_SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* UART_SERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
|
||||
/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, 0),
|
||||
/* UNLOAD */ OP_TABLE_ENTRY (AML_UNLOAD_OP, 0, 0, 0),
|
||||
/* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0),
|
||||
|
@ -406,10 +406,8 @@ MtMethodAnalysisWalkBegin (
|
||||
|
||||
case PARSEOP_DEVICE:
|
||||
|
||||
Next = Op->Asl.Child;
|
||||
|
||||
if (!ApFindNameInScope (METHOD_NAME__HID, Next) &&
|
||||
!ApFindNameInScope (METHOD_NAME__ADR, Next))
|
||||
if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
|
||||
!ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
|
||||
{
|
||||
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
|
||||
"Device object requires a _HID or _ADR in same scope");
|
||||
|
@ -58,7 +58,7 @@
|
||||
* each list element and possibly overflow on very large lists (>4000 items).
|
||||
* This dramatically reduces use of the parse stack overall.
|
||||
*
|
||||
* ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
|
||||
* ArgList, TermList, ByteList, DWordList, PackageList,
|
||||
* ResourceMacroList, and FieldUnitList
|
||||
*/
|
||||
|
||||
@ -99,7 +99,7 @@ AslLocalAllocate (
|
||||
* These shift/reduce conflicts are expected. There should be zero
|
||||
* reduce/reduce conflicts.
|
||||
*/
|
||||
%expect 89
|
||||
%expect 101
|
||||
|
||||
/*! [Begin] no source code translation */
|
||||
|
||||
|
@ -454,8 +454,8 @@ ApCheckForPredefinedName (
|
||||
|
||||
if (Name[0] == 0)
|
||||
{
|
||||
AcpiOsPrintf ("Found a null name, external = %s\n",
|
||||
Op->Asl.ExternalName);
|
||||
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
|
||||
"zero length name found");
|
||||
}
|
||||
|
||||
/* All reserved names are prefixed with a single underscore */
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static void
|
||||
static ACPI_PARSE_OBJECT *
|
||||
ApCheckPackageElements (
|
||||
const char *PredefinedName,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
@ -88,6 +88,11 @@ ApPackageTooLarge (
|
||||
UINT32 Count,
|
||||
UINT32 ExpectedCount);
|
||||
|
||||
static void
|
||||
ApCustomPackage (
|
||||
ACPI_PARSE_OBJECT *ParentOp,
|
||||
const ACPI_PREDEFINED_INFO *Predefined);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -168,6 +173,11 @@ ApCheckPackage (
|
||||
|
||||
switch (Package->RetInfo.Type)
|
||||
{
|
||||
case ACPI_PTYPE_CUSTOM:
|
||||
|
||||
ApCustomPackage (ParentOp, Predefined);
|
||||
break;
|
||||
|
||||
case ACPI_PTYPE1_FIXED:
|
||||
/*
|
||||
* The package count is fixed and there are no subpackages
|
||||
@ -380,6 +390,86 @@ PackageTooSmall:
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ApCustomPackage
|
||||
*
|
||||
* PARAMETERS: ParentOp - Parse op for the package
|
||||
* Predefined - Pointer to package-specific info for
|
||||
* the method
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Validate packages that don't fit into the standard model and
|
||||
* require custom code.
|
||||
*
|
||||
* NOTE: Currently used for the _BIX method only. When needed for two or more
|
||||
* methods, probably a detect/dispatch mechanism will be required.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
ApCustomPackage (
|
||||
ACPI_PARSE_OBJECT *ParentOp,
|
||||
const ACPI_PREDEFINED_INFO *Predefined)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
UINT32 Count;
|
||||
UINT32 ExpectedCount;
|
||||
UINT32 Version;
|
||||
|
||||
|
||||
/* First child is the package length */
|
||||
|
||||
Op = ParentOp->Asl.Child;
|
||||
Count = (UINT32) Op->Asl.Value.Integer;
|
||||
|
||||
/* Get the version number, must be Integer */
|
||||
|
||||
Op = Op->Asl.Next;
|
||||
Version = (UINT32) Op->Asl.Value.Integer;
|
||||
if (Op->Asl.ParseOpcode != PARSEOP_INTEGER)
|
||||
{
|
||||
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Validate count (# of elements) */
|
||||
|
||||
ExpectedCount = 21; /* Version 1 */
|
||||
if (Version == 0)
|
||||
{
|
||||
ExpectedCount = 20; /* Version 0 */
|
||||
}
|
||||
|
||||
if (Count < ExpectedCount)
|
||||
{
|
||||
ApPackageTooSmall (Predefined->Info.Name, ParentOp,
|
||||
Count, ExpectedCount);
|
||||
return;
|
||||
}
|
||||
else if (Count > ExpectedCount)
|
||||
{
|
||||
ApPackageTooLarge (Predefined->Info.Name, ParentOp,
|
||||
Count, ExpectedCount);
|
||||
}
|
||||
|
||||
/* Validate all elements of the package */
|
||||
|
||||
Op = ApCheckPackageElements (Predefined->Info.Name, Op,
|
||||
ACPI_RTYPE_INTEGER, 16,
|
||||
ACPI_RTYPE_STRING, 4);
|
||||
|
||||
/* Version 1 has a single trailing integer */
|
||||
|
||||
if (Version > 0)
|
||||
{
|
||||
ApCheckPackageElements (Predefined->Info.Name, Op,
|
||||
ACPI_RTYPE_INTEGER, 1, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ApCheckPackageElements
|
||||
@ -391,7 +481,9 @@ PackageTooSmall:
|
||||
* Type2 - Object type for second group
|
||||
* Count2 - Count for second group
|
||||
*
|
||||
* RETURN: None
|
||||
* RETURN: Next Op peer in the parse tree, after all specified elements
|
||||
* have been validated. Used for multiple validations (calls
|
||||
* to this function).
|
||||
*
|
||||
* DESCRIPTION: Validate all elements of a package. Works with packages that
|
||||
* are defined to contain up to two groups of different object
|
||||
@ -399,7 +491,7 @@ PackageTooSmall:
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
static ACPI_PARSE_OBJECT *
|
||||
ApCheckPackageElements (
|
||||
const char *PredefinedName,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
@ -431,6 +523,8 @@ ApCheckPackageElements (
|
||||
ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1));
|
||||
Op = Op->Asl.Next;
|
||||
}
|
||||
|
||||
return (Op);
|
||||
}
|
||||
|
||||
|
||||
|
@ -865,16 +865,19 @@ RsDoOneResourceDescriptor (
|
||||
break;
|
||||
|
||||
case PARSEOP_I2C_SERIALBUS:
|
||||
case PARSEOP_I2C_SERIALBUS_V2:
|
||||
|
||||
Rnode = RsDoI2cSerialBusDescriptor (Info);
|
||||
break;
|
||||
|
||||
case PARSEOP_SPI_SERIALBUS:
|
||||
case PARSEOP_SPI_SERIALBUS_V2:
|
||||
|
||||
Rnode = RsDoSpiSerialBusDescriptor (Info);
|
||||
break;
|
||||
|
||||
case PARSEOP_UART_SERIALBUS:
|
||||
case PARSEOP_UART_SERIALBUS_V2:
|
||||
|
||||
Rnode = RsDoUartSerialBusDescriptor (Info);
|
||||
break;
|
||||
|
@ -392,6 +392,7 @@ ResourceMacroTerm
|
||||
| GpioIntTerm {}
|
||||
| GpioIoTerm {}
|
||||
| I2cSerialBusTerm {}
|
||||
| I2cSerialBusTermV2 {}
|
||||
| InterruptTerm {}
|
||||
| IOTerm {}
|
||||
| IRQNoFlagsTerm {}
|
||||
@ -404,9 +405,11 @@ ResourceMacroTerm
|
||||
| QWordSpaceTerm {}
|
||||
| RegisterTerm {}
|
||||
| SpiSerialBusTerm {}
|
||||
| SpiSerialBusTermV2 {}
|
||||
| StartDependentFnNoPriTerm {}
|
||||
| StartDependentFnTerm {}
|
||||
| UartSerialBusTerm {}
|
||||
| UartSerialBusTermV2 {}
|
||||
| VendorLongTerm {}
|
||||
| VendorShortTerm {}
|
||||
| WordBusNumberTerm {}
|
||||
@ -630,11 +633,30 @@ I2cSerialBusTerm
|
||||
OptionalResourceType /* 12: ResourceType */
|
||||
OptionalNameString /* 13: DescriptorName */
|
||||
OptionalBuffer_Last /* 14: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,9,$4,$5,$7,$8,$10,$11,$12,$13,$14);}
|
||||
')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
|
||||
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
|
||||
| PARSEOP_I2C_SERIALBUS '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
I2cSerialBusTermV2
|
||||
: PARSEOP_I2C_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);}
|
||||
WordConstExpr /* 04: SlaveAddress */
|
||||
OptionalSlaveMode /* 05: SlaveMode */
|
||||
',' DWordConstExpr /* 07: ConnectionSpeed */
|
||||
OptionalAddressingMode /* 08: AddressingMode */
|
||||
',' StringData /* 10: ResourceSource */
|
||||
OptionalByteConstExpr /* 11: ResourceSourceIndex */
|
||||
OptionalResourceType /* 12: ResourceType */
|
||||
OptionalNameString /* 13: DescriptorName */
|
||||
OptionalShareType /* 14: Share */
|
||||
OptionalBuffer_Last /* 15: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
|
||||
$14,$15);}
|
||||
| PARSEOP_I2C_SERIALBUS_V2 '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
InterruptTerm
|
||||
: PARSEOP_INTERRUPT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
|
||||
OptionalResourceType_First
|
||||
@ -815,11 +837,34 @@ SpiSerialBusTerm
|
||||
OptionalResourceType /* 19: ResourceType */
|
||||
OptionalNameString /* 20: DescriptorName */
|
||||
OptionalBuffer_Last /* 21: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,13,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21);}
|
||||
')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
|
||||
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
|
||||
| PARSEOP_SPI_SERIALBUS '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
SpiSerialBusTermV2
|
||||
: PARSEOP_SPI_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);}
|
||||
WordConstExpr /* 04: DeviceSelection */
|
||||
OptionalDevicePolarity /* 05: DevicePolarity */
|
||||
OptionalWireMode /* 06: WireMode */
|
||||
',' ByteConstExpr /* 08: DataBitLength */
|
||||
OptionalSlaveMode /* 09: SlaveMode */
|
||||
',' DWordConstExpr /* 11: ConnectionSpeed */
|
||||
',' ClockPolarityKeyword /* 13: ClockPolarity */
|
||||
',' ClockPhaseKeyword /* 15: ClockPhase */
|
||||
',' StringData /* 17: ResourceSource */
|
||||
OptionalByteConstExpr /* 18: ResourceSourceIndex */
|
||||
OptionalResourceType /* 19: ResourceType */
|
||||
OptionalNameString /* 20: DescriptorName */
|
||||
OptionalShareType /* 21: Share */
|
||||
OptionalBuffer_Last /* 22: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
|
||||
$21,$22);}
|
||||
| PARSEOP_SPI_SERIALBUS_V2 '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
StartDependentFnNoPriTerm
|
||||
: PARSEOP_STARTDEPENDENTFN_NOPRI '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
|
||||
')' '{'
|
||||
@ -854,11 +899,35 @@ UartSerialBusTerm
|
||||
OptionalResourceType /* 19: ResourceType */
|
||||
OptionalNameString /* 20: DescriptorName */
|
||||
OptionalBuffer_Last /* 21: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21);}
|
||||
')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
|
||||
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
|
||||
| PARSEOP_UART_SERIALBUS '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
UartSerialBusTermV2
|
||||
: PARSEOP_UART_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);}
|
||||
DWordConstExpr /* 04: ConnectionSpeed */
|
||||
OptionalBitsPerByte /* 05: BitsPerByte */
|
||||
OptionalStopBits /* 06: StopBits */
|
||||
',' ByteConstExpr /* 08: LinesInUse */
|
||||
OptionalEndian /* 09: Endianess */
|
||||
OptionalParityType /* 10: Parity */
|
||||
OptionalFlowControl /* 11: FlowControl */
|
||||
',' WordConstExpr /* 13: Rx BufferSize */
|
||||
',' WordConstExpr /* 15: Tx BufferSize */
|
||||
',' StringData /* 17: ResourceSource */
|
||||
OptionalByteConstExpr /* 18: ResourceSourceIndex */
|
||||
OptionalResourceType /* 19: ResourceType */
|
||||
OptionalNameString /* 20: DescriptorName */
|
||||
OptionalShareType /* 21: Share */
|
||||
OptionalBuffer_Last /* 22: VendorData */
|
||||
')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
|
||||
$21,$22);}
|
||||
| PARSEOP_UART_SERIALBUS_V2 '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
VendorLongTerm
|
||||
: PARSEOP_VENDORLONG '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
|
||||
OptionalNameString_First
|
||||
|
@ -734,6 +734,11 @@ RsDoI2cSerialBusDescriptor (
|
||||
Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE;
|
||||
Descriptor->I2cSerialBus.TypeDataLength = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength;
|
||||
|
||||
if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_I2C_SERIALBUS_V2)
|
||||
{
|
||||
Descriptor->I2cSerialBus.RevisionId = 2;
|
||||
}
|
||||
|
||||
/* Build pointers to optional areas */
|
||||
|
||||
VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_I2C_SERIALBUS));
|
||||
@ -803,7 +808,18 @@ RsDoI2cSerialBusDescriptor (
|
||||
UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
|
||||
break;
|
||||
|
||||
case 8: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
case 8:
|
||||
/*
|
||||
* Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
|
||||
* Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
|
||||
* the ASL parser)
|
||||
*/
|
||||
RsSetFlagBits (&Descriptor->I2cSerialBus.Flags, InitializerOp, 2, 0);
|
||||
RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 2);
|
||||
break;
|
||||
|
||||
case 9: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
|
||||
RsGetVendorData (InitializerOp, VendorData,
|
||||
CurrentByteOffset + sizeof (AML_RESOURCE_I2C_SERIALBUS));
|
||||
@ -877,6 +893,11 @@ RsDoSpiSerialBusDescriptor (
|
||||
Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE;
|
||||
Descriptor->SpiSerialBus.TypeDataLength = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength;
|
||||
|
||||
if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_SPI_SERIALBUS_V2)
|
||||
{
|
||||
Descriptor->I2cSerialBus.RevisionId = 2;
|
||||
}
|
||||
|
||||
/* Build pointers to optional areas */
|
||||
|
||||
VendorData = ACPI_ADD_PTR (UINT8, Descriptor,
|
||||
@ -975,7 +996,18 @@ RsDoSpiSerialBusDescriptor (
|
||||
UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
|
||||
break;
|
||||
|
||||
case 12: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
case 12:
|
||||
/*
|
||||
* Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
|
||||
* Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
|
||||
* the ASL parser)
|
||||
*/
|
||||
RsSetFlagBits (&Descriptor->SpiSerialBus.Flags, InitializerOp, 2, 0);
|
||||
RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.Flags), 2);
|
||||
break;
|
||||
|
||||
case 13: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
|
||||
RsGetVendorData (InitializerOp, VendorData,
|
||||
CurrentByteOffset + sizeof (AML_RESOURCE_SPI_SERIALBUS));
|
||||
@ -1049,6 +1081,11 @@ RsDoUartSerialBusDescriptor (
|
||||
Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE;
|
||||
Descriptor->UartSerialBus.TypeDataLength = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength;
|
||||
|
||||
if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_UART_SERIALBUS_V2)
|
||||
{
|
||||
Descriptor->I2cSerialBus.RevisionId = 2;
|
||||
}
|
||||
|
||||
/* Build pointers to optional areas */
|
||||
|
||||
VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_UART_SERIALBUS));
|
||||
@ -1163,7 +1200,18 @@ RsDoUartSerialBusDescriptor (
|
||||
UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
|
||||
break;
|
||||
|
||||
case 13: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
case 13:
|
||||
/*
|
||||
* Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
|
||||
* Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
|
||||
* the ASL parser)
|
||||
*/
|
||||
RsSetFlagBits (&Descriptor->UartSerialBus.Flags, InitializerOp, 2, 0);
|
||||
RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.Flags), 2);
|
||||
break;
|
||||
|
||||
case 14: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
|
||||
|
||||
RsGetVendorData (InitializerOp, VendorData,
|
||||
CurrentByteOffset + sizeof (AML_RESOURCE_UART_SERIALBUS));
|
||||
|
@ -74,6 +74,10 @@ AslCode
|
||||
* {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
|
||||
* original use of {TermList} instead (see below.) This allows the use
|
||||
* of Type1 and Type2 opcodes at module level.
|
||||
*
|
||||
* 04/2016: The module-level code is now allowed in the following terms:
|
||||
* DeviceTerm, PowerResTerm, ProcessorTerm, ScopeTerm, ThermalZoneTerm.
|
||||
* The ObjectList term is obsolete and has been removed.
|
||||
*/
|
||||
DefinitionBlockTerm
|
||||
: PARSEOP_DEFINITION_BLOCK '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);}
|
||||
@ -189,12 +193,6 @@ FieldUnitEntry
|
||||
AmlPackageLengthTerm {$$ = TrLinkChildNode ($1,$3);}
|
||||
;
|
||||
|
||||
ObjectList
|
||||
: {$$ = NULL;}
|
||||
| ObjectList Object {$$ = TrLinkPeerNode ($1,$2);}
|
||||
| error {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
Object
|
||||
: CompilerDirective {}
|
||||
| NamedObject {}
|
||||
@ -489,6 +487,7 @@ Type1Opcode
|
||||
| BreakPointTerm {}
|
||||
| ContinueTerm {}
|
||||
| FatalTerm {}
|
||||
| ForTerm {}
|
||||
| ElseIfTerm {}
|
||||
| LoadTerm {}
|
||||
| NoOpTerm {}
|
||||
@ -697,7 +696,7 @@ BreakPointTerm
|
||||
|
||||
BufferTerm
|
||||
: PARSEOP_BUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
|
||||
OptionalTermArg
|
||||
OptionalBufferLength
|
||||
')' '{'
|
||||
BufferTermData '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
|
||||
| PARSEOP_BUFFER '('
|
||||
@ -878,7 +877,7 @@ DeviceTerm
|
||||
: PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
|
||||
NameString
|
||||
')' '{'
|
||||
ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
| PARSEOP_DEVICE '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
@ -989,6 +988,23 @@ FindSetRightBitTerm
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
|
||||
/* Convert a For() loop to a While() loop */
|
||||
ForTerm
|
||||
: PARSEOP_FOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
|
||||
OptionalTermArg ',' {}
|
||||
OptionalPredicate ','
|
||||
OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
|
||||
TrSetParent ($9,$<n>3);} /* New parent is WHILE */
|
||||
')' '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
|
||||
{$<n>$ = TrLinkPeerNode ($13,$9);
|
||||
$$ = $<n>10;}
|
||||
;
|
||||
|
||||
OptionalPredicate
|
||||
: {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
|
||||
| TermArg {$$ = $1;}
|
||||
;
|
||||
|
||||
FprintfTerm
|
||||
: PARSEOP_FPRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
|
||||
TermArg ','
|
||||
@ -1361,7 +1377,7 @@ PowerResTerm
|
||||
',' ByteConstExpr
|
||||
',' WordConstExpr
|
||||
')' '{'
|
||||
ObjectList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
|
||||
TermList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
|
||||
| PARSEOP_POWERRESOURCE '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
@ -1389,7 +1405,7 @@ ProcessorTerm
|
||||
OptionalDWordConstExpr
|
||||
OptionalByteConstExpr
|
||||
')' '{'
|
||||
ObjectList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
|
||||
TermList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
|
||||
| PARSEOP_PROCESSOR '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
@ -1444,7 +1460,7 @@ ScopeTerm
|
||||
: PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
|
||||
NameString
|
||||
')' '{'
|
||||
ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
| PARSEOP_SCOPE '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
@ -1533,7 +1549,7 @@ ThermalZoneTerm
|
||||
: PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
|
||||
NameString
|
||||
')' '{'
|
||||
ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
|
||||
| PARSEOP_THERMALZONE '('
|
||||
error ')' {$$ = AslDoError(); yyclearin;}
|
||||
;
|
||||
@ -1715,6 +1731,11 @@ OptionalSerializeRuleKeyword
|
||||
;
|
||||
|
||||
OptionalTermArg
|
||||
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
|
||||
| TermArg {$$ = $1;}
|
||||
;
|
||||
|
||||
OptionalBufferLength
|
||||
: {$$ = NULL;}
|
||||
| TermArg {$$ = $1;}
|
||||
;
|
||||
|
@ -166,6 +166,7 @@ NoEcho('
|
||||
%token <i> PARSEOP_GPIO_INT
|
||||
%token <i> PARSEOP_GPIO_IO
|
||||
%token <i> PARSEOP_I2C_SERIALBUS
|
||||
%token <i> PARSEOP_I2C_SERIALBUS_V2
|
||||
%token <i> PARSEOP_IF
|
||||
%token <i> PARSEOP_INCLUDE
|
||||
%token <i> PARSEOP_INCLUDE_END
|
||||
@ -323,6 +324,7 @@ NoEcho('
|
||||
%token <i> PARSEOP_SLAVEMODE_DEVICEINIT
|
||||
%token <i> PARSEOP_SLEEP
|
||||
%token <i> PARSEOP_SPI_SERIALBUS
|
||||
%token <i> PARSEOP_SPI_SERIALBUS_V2
|
||||
%token <i> PARSEOP_STALL
|
||||
%token <i> PARSEOP_STARTDEPENDENTFN
|
||||
%token <i> PARSEOP_STARTDEPENDENTFN_NOPRI
|
||||
@ -348,6 +350,7 @@ NoEcho('
|
||||
%token <i> PARSEOP_TYPE_STATIC
|
||||
%token <i> PARSEOP_TYPE_TRANSLATION
|
||||
%token <i> PARSEOP_UART_SERIALBUS
|
||||
%token <i> PARSEOP_UART_SERIALBUS_V2
|
||||
%token <i> PARSEOP_UNICODE
|
||||
%token <i> PARSEOP_UNLOAD
|
||||
%token <i> PARSEOP_UPDATERULE_ONES
|
||||
@ -457,8 +460,11 @@ NoEcho('
|
||||
%left <i> PARSEOP_EXP_INDEX_LEFT
|
||||
%right <i> PARSEOP_EXP_INDEX_RIGHT
|
||||
|
||||
/* Macros */
|
||||
|
||||
%token <i> PARSEOP_PRINTF
|
||||
%token <i> PARSEOP_FPRINTF
|
||||
%token <i> PARSEOP_FOR
|
||||
|
||||
/* Specific parentheses tokens are not used at this time */
|
||||
/* PARSEOP_EXP_PAREN_OPEN */
|
||||
|
@ -56,6 +56,29 @@ TrGetNextNode (
|
||||
void);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: TrSetParent
|
||||
*
|
||||
* PARAMETERS: Op - To be set to new parent
|
||||
* ParentOp - The parent
|
||||
*
|
||||
* RETURN: None, sets Op parent directly
|
||||
*
|
||||
* DESCRIPTION: Change the parent of a parse op.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
TrSetParent (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_PARSE_OBJECT *ParentOp)
|
||||
{
|
||||
|
||||
Op->Asl.Parent = ParentOp;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: TrGetNextNode
|
||||
|
@ -62,7 +62,6 @@ NoEcho('
|
||||
%type <n> NamedObject
|
||||
%type <n> NameSpaceModifier
|
||||
%type <n> Object
|
||||
%type <n> ObjectList
|
||||
%type <n> PackageData
|
||||
%type <n> ParameterTypePackage
|
||||
%type <n> ParameterTypePackageList
|
||||
@ -295,6 +294,7 @@ NoEcho('
|
||||
%type <n> PrintfArgList
|
||||
%type <n> PrintfTerm
|
||||
%type <n> FprintfTerm
|
||||
%type <n> ForTerm
|
||||
|
||||
/* Resource Descriptors */
|
||||
|
||||
@ -312,6 +312,7 @@ NoEcho('
|
||||
%type <n> GpioIntTerm
|
||||
%type <n> GpioIoTerm
|
||||
%type <n> I2cSerialBusTerm
|
||||
%type <n> I2cSerialBusTermV2
|
||||
%type <n> InterruptTerm
|
||||
%type <n> IOTerm
|
||||
%type <n> IRQNoFlagsTerm
|
||||
@ -326,9 +327,11 @@ NoEcho('
|
||||
%type <n> QWordSpaceTerm
|
||||
%type <n> RegisterTerm
|
||||
%type <n> SpiSerialBusTerm
|
||||
%type <n> SpiSerialBusTermV2
|
||||
%type <n> StartDependentFnNoPriTerm
|
||||
%type <n> StartDependentFnTerm
|
||||
%type <n> UartSerialBusTerm
|
||||
%type <n> UartSerialBusTermV2
|
||||
%type <n> VendorLongTerm
|
||||
%type <n> VendorShortTerm
|
||||
%type <n> WordBusNumberTerm
|
||||
@ -347,6 +350,7 @@ NoEcho('
|
||||
%type <n> OptionalAddressRange
|
||||
%type <n> OptionalBitsPerByte
|
||||
%type <n> OptionalBuffer_Last
|
||||
%type <n> OptionalBufferLength
|
||||
%type <n> OptionalByteConstExpr
|
||||
%type <n> OptionalCount
|
||||
%type <n> OptionalDecodeType
|
||||
@ -366,6 +370,7 @@ NoEcho('
|
||||
%type <n> OptionalParameterTypePackage
|
||||
%type <n> OptionalParameterTypesPackage
|
||||
%type <n> OptionalParityType
|
||||
%type <n> OptionalPredicate
|
||||
%type <n> OptionalQWordConstExpr
|
||||
%type <n> OptionalRangeType
|
||||
%type <n> OptionalReference
|
||||
|
@ -758,6 +758,11 @@ DtCompilePcct (
|
||||
InfoTable = AcpiDmTableInfoPcct1;
|
||||
break;
|
||||
|
||||
case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
|
||||
|
||||
InfoTable = AcpiDmTableInfoPcct2;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "PCCT");
|
||||
|
@ -844,28 +844,39 @@ const unsigned char TemplateMtmr[] =
|
||||
|
||||
const unsigned char TemplatePcct[] =
|
||||
{
|
||||
0x50,0x43,0x43,0x54,0xAC,0x00,0x00,0x00, /* 00000000 "PCCT...." */
|
||||
0x01,0xCF,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
|
||||
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
|
||||
0x50,0x43,0x43,0x54,0x06,0x01,0x00,0x00, /* 00000000 "PCCT...." */
|
||||
0x01,0xE3,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
|
||||
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
|
||||
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
|
||||
0x27,0x06,0x14,0x20,0x01,0x00,0x00,0x00, /* 00000020 "'.. ...." */
|
||||
0x18,0x03,0x16,0x20,0x01,0x00,0x00,0x00, /* 00000020 "... ...." */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
|
||||
0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 ".>......" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
|
||||
0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
|
||||
0x01,0x32,0x00,0x03,0x00,0x00,0x00,0x00, /* 00000048 ".2......" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
|
||||
0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF, /* 00000058 "........" */
|
||||
0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00, /* 00000060 "........" */
|
||||
0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x3E, /* 00000068 ".......>" */
|
||||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000070 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00, /* 00000078 "........" */
|
||||
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, /* 00000038 "........" */
|
||||
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, /* 00000040 """""""""" */
|
||||
0x01,0x32,0x00,0x03,0x33,0x33,0x33,0x33, /* 00000048 ".2..3333" */
|
||||
0x33,0x33,0x33,0x33,0x44,0x44,0x44,0x44, /* 00000050 "3333DDDD" */
|
||||
0x44,0x44,0x44,0x44,0x55,0x55,0x55,0x55, /* 00000058 "DDDDUUUU" */
|
||||
0x55,0x55,0x55,0x55,0x66,0x66,0x66,0x66, /* 00000060 "UUUUffff" */
|
||||
0x77,0x77,0x77,0x77,0x88,0x88,0x01,0x3E, /* 00000068 "wwww...>" */
|
||||
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000070 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x32, /* 00000080 ".......2" */
|
||||
0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
|
||||
0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* 00000098 "........" */
|
||||
0xFF,0xFF,0x01,0x00,0x00,0x00,0x01,0x00, /* 000000A0 "........" */
|
||||
0x00,0x00,0x01,0x00 /* 000000A8 "...." */
|
||||
0x00,0x03,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000088 "..DDDDDD" */
|
||||
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 00000090 "DDDDDDDD" */
|
||||
0x44,0x44,0x55,0x55,0x55,0x55,0x55,0x55, /* 00000098 "DDUUUUUU" */
|
||||
0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77, /* 000000A0 "UUffffww" */
|
||||
0x77,0x77,0x88,0x88,0x02,0x5A,0x01,0x00, /* 000000A8 "ww...Z.." */
|
||||
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
|
||||
0x00,0x00,0x00,0x00,0x01,0x32,0x00,0x03, /* 000000C0 ".....2.." */
|
||||
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000C8 "DDDDDDDD" */
|
||||
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, /* 000000D0 "DDDDDDDD" */
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, /* 000000D8 "UUUUUUUU" */
|
||||
0x66,0x66,0x66,0x66,0x77,0x77,0x77,0x77, /* 000000E0 "ffffwwww" */
|
||||
0x88,0x88,0x01,0x32,0x00,0x03,0x33,0x33, /* 000000E8 "...2..33" */
|
||||
0x33,0x33,0x33,0x33,0x33,0x33,0x44,0x44, /* 000000F0 "333333DD" */
|
||||
0x44,0x44,0x44,0x44,0x44,0x44,0x55,0x55, /* 000000F8 "DDDDDDUU" */
|
||||
0x55,0x55,0x55,0x55,0x55,0x55 /* 00000100 "UUUUUU" */
|
||||
};
|
||||
|
||||
const unsigned char TemplatePmtt[] =
|
||||
|
@ -798,7 +798,7 @@ AcpiDbIntegrityWalk (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if (!AcpiUtValidAcpiName (Node->Name.Ascii))
|
||||
if (!AcpiUtValidNameseg (Node->Name.Ascii))
|
||||
{
|
||||
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
|
||||
return (AE_OK);
|
||||
|
@ -215,6 +215,7 @@ AcpiDmCheckForSymbolicOpcode (
|
||||
|
||||
Child1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
|
||||
Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
|
||||
|
||||
/* Save symbol string in the next child (not peer) */
|
||||
|
||||
@ -378,7 +379,7 @@ AcpiDmCheckForSymbolicOpcode (
|
||||
|
||||
/* Convert operator to compound assignment */
|
||||
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
|
||||
Child1->Common.OperatorSymbol = NULL;
|
||||
return (TRUE);
|
||||
}
|
||||
@ -406,7 +407,7 @@ AcpiDmCheckForSymbolicOpcode (
|
||||
|
||||
/* Convert operator to compound assignment */
|
||||
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
|
||||
Child1->Common.OperatorSymbol = NULL;
|
||||
return (TRUE);
|
||||
}
|
||||
@ -522,6 +523,19 @@ AcpiDmCheckForSymbolicOpcode (
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
|
||||
* output here. We also need to check the parent to see if this op
|
||||
* is part of a compound test (!=, >=, <=).
|
||||
*/
|
||||
if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
|
||||
((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
|
||||
(Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX)))
|
||||
{
|
||||
/* Do Nothing. Paren already generated */
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
/* All other operators, emit an open paren */
|
||||
|
||||
AcpiOsPrintf ("(");
|
||||
@ -547,6 +561,7 @@ void
|
||||
AcpiDmCloseOperator (
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
BOOLEAN IsCStyleOp = FALSE;
|
||||
|
||||
/* Always emit paren if ASL+ disassembly disabled */
|
||||
|
||||
@ -578,7 +593,7 @@ AcpiDmCloseOperator (
|
||||
|
||||
/* Emit paren only if this is not a compound assignment */
|
||||
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND)
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND_ASSIGNMENT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -589,6 +604,8 @@ AcpiDmCloseOperator (
|
||||
{
|
||||
AcpiOsPrintf (")");
|
||||
}
|
||||
|
||||
IsCStyleOp = TRUE;
|
||||
break;
|
||||
|
||||
case AML_INDEX_OP:
|
||||
@ -616,7 +633,21 @@ AcpiDmCloseOperator (
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
|
||||
* output here. We also need to check the parent to see if this op
|
||||
* is part of a compound test (!=, >=, <=).
|
||||
*/
|
||||
if (IsCStyleOp &&
|
||||
((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
|
||||
((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
|
||||
(Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX))))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiOsPrintf (")");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -249,11 +249,11 @@ AcpiDmPredefinedDescription (
|
||||
|
||||
/* Ensure that the comment field is emitted only once */
|
||||
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEFINED_CHECKED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEFINED_CHECKED;
|
||||
|
||||
/* Predefined name must start with an underscore */
|
||||
|
||||
@ -385,11 +385,11 @@ AcpiDmFieldPredefinedDescription (
|
||||
|
||||
/* Ensure that the comment field is emitted only once */
|
||||
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEFINED_CHECKED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEFINED_CHECKED;
|
||||
|
||||
/*
|
||||
* Op must be one of the Create* operators: CreateField, CreateBitField,
|
||||
@ -1051,10 +1051,16 @@ AcpiDmConvertToElseIf (
|
||||
ACPI_PARSE_OBJECT *ElseOp;
|
||||
|
||||
|
||||
/* Examine the first child of the Else */
|
||||
|
||||
/*
|
||||
* To be able to perform the conversion, two conditions must be satisfied:
|
||||
* 1) The first child of the Else must be an If statement.
|
||||
* 2) The If block can only be followed by an Else block and these must
|
||||
* be the only blocks under the original Else.
|
||||
*/
|
||||
IfOp = OriginalElseOp->Common.Value.Arg;
|
||||
if (!IfOp || (IfOp->Common.AmlOpcode != AML_IF_OP))
|
||||
if (!IfOp ||
|
||||
(IfOp->Common.AmlOpcode != AML_IF_OP) ||
|
||||
(IfOp->Asl.Next && (IfOp->Asl.Next->Common.AmlOpcode != AML_ELSE_OP)))
|
||||
{
|
||||
/* Not an Else..If sequence, cannot convert to ElseIf */
|
||||
|
||||
|
@ -500,7 +500,7 @@ AcpiDmI2cSerialBusDescriptor (
|
||||
/* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n",
|
||||
AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
|
||||
Resource->I2cSerialBus.SlaveAddress,
|
||||
AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
|
||||
Resource->I2cSerialBus.ConnectionSpeed);
|
||||
@ -529,7 +529,11 @@ AcpiDmI2cSerialBusDescriptor (
|
||||
/* Insert a descriptor name */
|
||||
|
||||
AcpiDmDescriptorName ();
|
||||
AcpiOsPrintf (",\n");
|
||||
|
||||
/* Share */
|
||||
|
||||
AcpiOsPrintf (", %s,\n",
|
||||
AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 2)]);
|
||||
|
||||
/* Dump the vendor data */
|
||||
|
||||
@ -570,7 +574,7 @@ AcpiDmSpiSerialBusDescriptor (
|
||||
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
|
||||
AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
|
||||
Resource->SpiSerialBus.DeviceSelection,
|
||||
AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
|
||||
AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
|
||||
@ -608,7 +612,11 @@ AcpiDmSpiSerialBusDescriptor (
|
||||
/* Insert a descriptor name */
|
||||
|
||||
AcpiDmDescriptorName ();
|
||||
AcpiOsPrintf (",\n");
|
||||
|
||||
/* Share */
|
||||
|
||||
AcpiOsPrintf (", %s,\n",
|
||||
AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
|
||||
|
||||
/* Dump the vendor data */
|
||||
|
||||
@ -649,7 +657,7 @@ AcpiDmUartSerialBusDescriptor (
|
||||
/* ConnectionSpeed, BitsPerByte, StopBits */
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
|
||||
AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
|
||||
Resource->UartSerialBus.DefaultBaudRate,
|
||||
AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
|
||||
AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
|
||||
@ -690,7 +698,11 @@ AcpiDmUartSerialBusDescriptor (
|
||||
/* Insert a descriptor name */
|
||||
|
||||
AcpiDmDescriptorName ();
|
||||
AcpiOsPrintf (",\n");
|
||||
|
||||
/* Share */
|
||||
|
||||
AcpiOsPrintf (", %s,\n",
|
||||
AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 2)]);
|
||||
|
||||
/* Dump the vendor data */
|
||||
|
||||
|
@ -279,8 +279,8 @@ AcpiDmCommaIfListMember (
|
||||
}
|
||||
}
|
||||
|
||||
if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
|
||||
(!(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)))
|
||||
if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
|
||||
(!(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
@ -295,8 +295,8 @@ AcpiDmCommaIfListMember (
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
else if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
|
||||
(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
|
||||
else if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
|
||||
(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
|
||||
{
|
||||
AcpiOsPrintf (", ");
|
||||
return (TRUE);
|
||||
|
@ -460,24 +460,24 @@ AcpiDmDescendingOp (
|
||||
NextOp = AcpiPsGetDepthNext (NULL, Op);
|
||||
if (NextOp)
|
||||
{
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
}
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
|
||||
/*
|
||||
* A Zero predicate indicates the possibility of one or more
|
||||
* External() opcodes within the If() block.
|
||||
*/
|
||||
if (NextOp->Common.AmlOpcode == AML_ZERO_OP)
|
||||
{
|
||||
NextOp2 = NextOp->Common.Next;
|
||||
|
||||
if (NextOp2 &&
|
||||
(NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
|
||||
/*
|
||||
* A Zero predicate indicates the possibility of one or more
|
||||
* External() opcodes within the If() block.
|
||||
*/
|
||||
if (NextOp->Common.AmlOpcode == AML_ZERO_OP)
|
||||
{
|
||||
/* Ignore the If 0 block and all children */
|
||||
NextOp2 = NextOp->Common.Next;
|
||||
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
|
||||
return (AE_CTRL_DEPTH);
|
||||
if (NextOp2 &&
|
||||
(NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
|
||||
{
|
||||
/* Ignore the If 0 block and all children */
|
||||
|
||||
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
|
||||
return (AE_CTRL_DEPTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -514,7 +514,7 @@ AcpiDmDescendingOp (
|
||||
}
|
||||
}
|
||||
else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_ELSEIF)) &&
|
||||
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
|
||||
{
|
||||
@ -668,10 +668,10 @@ AcpiDmDescendingOp (
|
||||
|
||||
AcpiOsPrintf (", ");
|
||||
NextOp = AcpiPsGetDepthNext (NULL, Op);
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
|
||||
NextOp = NextOp->Common.Next;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
return (AE_OK);
|
||||
|
||||
case AML_PROCESSOR_OP:
|
||||
@ -680,13 +680,13 @@ AcpiDmDescendingOp (
|
||||
|
||||
AcpiOsPrintf (", ");
|
||||
NextOp = AcpiPsGetDepthNext (NULL, Op);
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
|
||||
NextOp = NextOp->Common.Next;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
|
||||
NextOp = NextOp->Common.Next;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
return (AE_OK);
|
||||
|
||||
case AML_MUTEX_OP:
|
||||
@ -745,12 +745,12 @@ AcpiDmDescendingOp (
|
||||
* Bank Value. This is a TermArg in the middle of the parameter
|
||||
* list, must handle it here.
|
||||
*
|
||||
* Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMLIST
|
||||
* Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMETER_LIST
|
||||
* eliminates newline in the output.
|
||||
*/
|
||||
NextOp = NextOp->Common.Next;
|
||||
|
||||
Info->Flags = ACPI_PARSEOP_PARAMLIST;
|
||||
Info->Flags = ACPI_PARSEOP_PARAMETER_LIST;
|
||||
AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
|
||||
AcpiDmAscendingOp, Info);
|
||||
Info->Flags = 0;
|
||||
@ -812,7 +812,7 @@ AcpiDmDescendingOp (
|
||||
|
||||
/* Normal Buffer, mark size as in the parameter list */
|
||||
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
return (AE_OK);
|
||||
|
||||
case AML_IF_OP:
|
||||
@ -824,7 +824,7 @@ AcpiDmDescendingOp (
|
||||
NextOp = AcpiPsGetDepthNext (NULL, Op);
|
||||
if (NextOp)
|
||||
{
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
}
|
||||
return (AE_OK);
|
||||
|
||||
@ -835,7 +835,7 @@ AcpiDmDescendingOp (
|
||||
NextOp = AcpiPsGetDepthNext (NULL, Op);
|
||||
if (NextOp)
|
||||
{
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
|
||||
}
|
||||
return (AE_OK);
|
||||
|
||||
@ -934,14 +934,14 @@ AcpiDmAscendingOp (
|
||||
if (!AcpiDmCommaIfListMember (Op))
|
||||
{
|
||||
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
|
||||
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
|
||||
{
|
||||
/*
|
||||
* This is a first-level element of a term list
|
||||
* start a new line
|
||||
*/
|
||||
if (!(Info->Flags & ACPI_PARSEOP_PARAMLIST))
|
||||
if (!(Info->Flags & ACPI_PARSEOP_PARAMETER_LIST))
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
@ -996,7 +996,7 @@ AcpiDmAscendingOp (
|
||||
if (!AcpiDmCommaIfListMember (Op))
|
||||
{
|
||||
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
|
||||
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
|
||||
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
|
||||
{
|
||||
/*
|
||||
@ -1013,7 +1013,7 @@ AcpiDmAscendingOp (
|
||||
case AML_PACKAGE_OP:
|
||||
case AML_VAR_PACKAGE_OP:
|
||||
|
||||
if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
|
||||
if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
@ -1027,17 +1027,17 @@ AcpiDmAscendingOp (
|
||||
break;
|
||||
}
|
||||
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)
|
||||
if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)
|
||||
{
|
||||
if ((Op->Common.Next) &&
|
||||
(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
|
||||
(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* The parent Op is guaranteed to be valid because of the flag
|
||||
* ACPI_PARSEOP_PARAMLIST -- which means that this op is part of
|
||||
* ACPI_PARSEOP_PARAMETER_LIST -- which means that this op is part of
|
||||
* a parameter list and thus has a valid parent.
|
||||
*/
|
||||
ParentOp = Op->Common.Parent;
|
||||
|
@ -460,6 +460,9 @@ AcpiDsBeginMethodExecution (
|
||||
{
|
||||
ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
|
||||
ObjDesc->Method.Mutex->Mutex.SyncLevel;
|
||||
|
||||
ObjDesc->Method.Mutex->Mutex.ThreadId =
|
||||
AcpiOsGetThreadId ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -946,20 +946,9 @@ AcpiExInsertIntoField (
|
||||
|
||||
AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
|
||||
|
||||
/*
|
||||
* Create the bitmasks used for bit insertion.
|
||||
* Note: This if/else is used to bypass compiler differences with the
|
||||
* shift operator
|
||||
*/
|
||||
if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
|
||||
{
|
||||
WidthMask = ACPI_UINT64_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth);
|
||||
}
|
||||
/* Create the bitmasks used for bit insertion */
|
||||
|
||||
WidthMask = ACPI_MASK_BITS_ABOVE_64 (AccessBitWidth);
|
||||
Mask = WidthMask &
|
||||
ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
|
||||
|
||||
|
@ -204,7 +204,7 @@ AcpiExNameSegment (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Bytes from stream:\n"));
|
||||
|
||||
for (Index = 0;
|
||||
(Index < ACPI_NAME_SIZE) && (AcpiUtValidAcpiChar (*AmlAddress, 0));
|
||||
(Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0));
|
||||
Index++)
|
||||
{
|
||||
CharBuf[Index] = *AmlAddress++;
|
||||
|
@ -54,6 +54,11 @@
|
||||
|
||||
/* Local Prototypes */
|
||||
|
||||
static UINT8
|
||||
AcpiHwGetAccessBitWidth (
|
||||
ACPI_GENERIC_ADDRESS *Reg,
|
||||
UINT8 MaxBitWidth);
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiHwReadMultiple (
|
||||
UINT32 *Value,
|
||||
@ -69,6 +74,43 @@ AcpiHwWriteMultiple (
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwGetAccessBitWidth
|
||||
*
|
||||
* PARAMETERS: Reg - GAS register structure
|
||||
* MaxBitWidth - Max BitWidth supported (32 or 64)
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Obtain optimal access bit width
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static UINT8
|
||||
AcpiHwGetAccessBitWidth (
|
||||
ACPI_GENERIC_ADDRESS *Reg,
|
||||
UINT8 MaxBitWidth)
|
||||
{
|
||||
|
||||
if (!Reg->AccessWidth)
|
||||
{
|
||||
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_IO)
|
||||
{
|
||||
return (32);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (MaxBitWidth);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return (1 << (Reg->AccessWidth + 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwValidateRegister
|
||||
@ -134,8 +176,7 @@ AcpiHwValidateRegister (
|
||||
|
||||
/* Validate the BitWidth, convert AccessWidth into number of bits */
|
||||
|
||||
AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
|
||||
AccessWidth = 1 << (AccessWidth + 2);
|
||||
AccessWidth = AcpiHwGetAccessBitWidth (Reg, MaxBitWidth);
|
||||
BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
|
||||
if (MaxBitWidth < BitWidth)
|
||||
{
|
||||
@ -198,9 +239,8 @@ AcpiHwRead (
|
||||
* into number of bits based
|
||||
*/
|
||||
*Value = 0;
|
||||
AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
|
||||
AccessWidth = 1 << (AccessWidth + 2);
|
||||
BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
|
||||
AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
|
||||
BitWidth = Reg->BitOffset + Reg->BitWidth;
|
||||
BitOffset = Reg->BitOffset;
|
||||
|
||||
/*
|
||||
@ -243,7 +283,7 @@ AcpiHwRead (
|
||||
}
|
||||
|
||||
ACPI_SET_BITS (Value, Index * AccessWidth,
|
||||
((1 << AccessWidth) - 1), Value32);
|
||||
ACPI_MASK_BITS_ABOVE_32 (AccessWidth), Value32);
|
||||
|
||||
BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
|
||||
Index++;
|
||||
@ -301,9 +341,8 @@ AcpiHwWrite (
|
||||
|
||||
/* Convert AccessWidth into number of bits based */
|
||||
|
||||
AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
|
||||
AccessWidth = 1 << (AccessWidth + 2);
|
||||
BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
|
||||
AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
|
||||
BitWidth = Reg->BitOffset + Reg->BitWidth;
|
||||
BitOffset = Reg->BitOffset;
|
||||
|
||||
/*
|
||||
@ -313,8 +352,8 @@ AcpiHwWrite (
|
||||
Index = 0;
|
||||
while (BitWidth)
|
||||
{
|
||||
NewValue32 = ACPI_GET_BITS (&Value, (Index * AccessWidth),
|
||||
((1 << AccessWidth) - 1));
|
||||
NewValue32 = ACPI_GET_BITS (&Value, Index * AccessWidth,
|
||||
ACPI_MASK_BITS_ABOVE_32 (AccessWidth));
|
||||
|
||||
if (BitOffset > AccessWidth)
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ AcpiNsInitializeDevices (
|
||||
|
||||
/*
|
||||
* Execute \_SB._INI.
|
||||
* There appears to be a strict order requirement for \_SB._INI,
|
||||
* There appears to be a strict order requirement for \_SB._INI,
|
||||
* which should be evaluated before any _REG evaluations.
|
||||
*/
|
||||
Status = AcpiGetHandle (NULL, "\\_SB", &Handle);
|
||||
|
@ -70,6 +70,12 @@ AcpiNsCheckPackageElements (
|
||||
UINT32 Count2,
|
||||
UINT32 StartIndex);
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiNsCustomPackage (
|
||||
ACPI_EVALUATE_INFO *Info,
|
||||
ACPI_OPERAND_OBJECT **Elements,
|
||||
UINT32 Count);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -148,6 +154,11 @@ AcpiNsCheckPackage (
|
||||
*/
|
||||
switch (Package->RetInfo.Type)
|
||||
{
|
||||
case ACPI_PTYPE_CUSTOM:
|
||||
|
||||
Status = AcpiNsCustomPackage (Info, Elements, Count);
|
||||
break;
|
||||
|
||||
case ACPI_PTYPE1_FIXED:
|
||||
/*
|
||||
* The package count is fixed and there are no subpackages
|
||||
@ -624,6 +635,92 @@ PackageTooSmall:
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsCustomPackage
|
||||
*
|
||||
* PARAMETERS: Info - Method execution information block
|
||||
* Elements - Pointer to the package elements array
|
||||
* Count - Element count for the package
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Check a returned package object for the correct count and
|
||||
* correct type of all sub-objects.
|
||||
*
|
||||
* NOTE: Currently used for the _BIX method only. When needed for two or more
|
||||
* methods, probably a detect/dispatch mechanism will be required.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiNsCustomPackage (
|
||||
ACPI_EVALUATE_INFO *Info,
|
||||
ACPI_OPERAND_OBJECT **Elements,
|
||||
UINT32 Count)
|
||||
{
|
||||
UINT32 ExpectedCount;
|
||||
UINT32 Version;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME (NsCustomPackage);
|
||||
|
||||
|
||||
/* Get version number, must be Integer */
|
||||
|
||||
if ((*Elements)->Common.Type != ACPI_TYPE_INTEGER)
|
||||
{
|
||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
|
||||
"Return Package has invalid object type for version number"));
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
Version = (UINT32) (*Elements)->Integer.Value;
|
||||
ExpectedCount = 21; /* Version 1 */
|
||||
|
||||
if (Version == 0)
|
||||
{
|
||||
ExpectedCount = 20; /* Version 0 */
|
||||
}
|
||||
|
||||
if (Count < ExpectedCount)
|
||||
{
|
||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
|
||||
"Return Package is too small - found %u elements, expected %u",
|
||||
Count, ExpectedCount));
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
}
|
||||
else if (Count > ExpectedCount)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
|
||||
"%s: Return Package is larger than needed - "
|
||||
"found %u, expected %u\n",
|
||||
Info->FullPathname, Count, ExpectedCount));
|
||||
}
|
||||
|
||||
/* Validate all elements of the returned package */
|
||||
|
||||
Status = AcpiNsCheckPackageElements (Info, Elements,
|
||||
ACPI_RTYPE_INTEGER, 16,
|
||||
ACPI_RTYPE_STRING, 4, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Version 1 has a single trailing integer */
|
||||
|
||||
if (Version > 0)
|
||||
{
|
||||
Status = AcpiNsCheckPackageElements (Info, Elements + 20,
|
||||
ACPI_RTYPE_INTEGER, 1, 0, 0, 20);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsCheckPackageElements
|
||||
|
@ -305,13 +305,12 @@ AcpiEvaluateObject (
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
#ifdef _FUTURE_FEATURE
|
||||
|
||||
/*
|
||||
* Begin incoming argument count analysis. Check for too few args
|
||||
* and too many args.
|
||||
*/
|
||||
|
||||
switch (AcpiNsGetType (Info->Node))
|
||||
{
|
||||
case ACPI_TYPE_METHOD:
|
||||
@ -399,69 +398,74 @@ AcpiEvaluateObject (
|
||||
* If we are expecting a return value, and all went well above,
|
||||
* copy the return value to an external object.
|
||||
*/
|
||||
if (ReturnBuffer)
|
||||
if (!ReturnBuffer)
|
||||
{
|
||||
if (!Info->ReturnObject)
|
||||
goto CleanupReturnObject;
|
||||
}
|
||||
|
||||
if (!Info->ReturnObject)
|
||||
{
|
||||
ReturnBuffer->Length = 0;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
|
||||
ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
/*
|
||||
* If we received a NS Node as a return object, this means that
|
||||
* the object we are evaluating has nothing interesting to
|
||||
* return (such as a mutex, etc.) We return an error because
|
||||
* these types are essentially unsupported by this interface.
|
||||
* We don't check up front because this makes it easier to add
|
||||
* support for various types at a later date if necessary.
|
||||
*/
|
||||
Status = AE_TYPE;
|
||||
Info->ReturnObject = NULL; /* No need to delete a NS Node */
|
||||
ReturnBuffer->Length = 0;
|
||||
}
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto CleanupReturnObject;
|
||||
}
|
||||
|
||||
/* Dereference Index and RefOf references */
|
||||
|
||||
AcpiNsResolveReferences (Info);
|
||||
|
||||
/* Get the size of the returned object */
|
||||
|
||||
Status = AcpiUtGetObjectSize (Info->ReturnObject,
|
||||
&BufferSpaceNeeded);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Validate/Allocate/Clear caller buffer */
|
||||
|
||||
Status = AcpiUtInitializeBuffer (ReturnBuffer,
|
||||
BufferSpaceNeeded);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ReturnBuffer->Length = 0;
|
||||
/*
|
||||
* Caller's buffer is too small or a new one can't
|
||||
* be allocated
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Needed buffer size %X, %s\n",
|
||||
(UINT32) BufferSpaceNeeded,
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
|
||||
ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
/*
|
||||
* If we received a NS Node as a return object, this means that
|
||||
* the object we are evaluating has nothing interesting to
|
||||
* return (such as a mutex, etc.) We return an error because
|
||||
* these types are essentially unsupported by this interface.
|
||||
* We don't check up front because this makes it easier to add
|
||||
* support for various types at a later date if necessary.
|
||||
*/
|
||||
Status = AE_TYPE;
|
||||
Info->ReturnObject = NULL; /* No need to delete a NS Node */
|
||||
ReturnBuffer->Length = 0;
|
||||
}
|
||||
/* We have enough space for the object, build it */
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Dereference Index and RefOf references */
|
||||
|
||||
AcpiNsResolveReferences (Info);
|
||||
|
||||
/* Get the size of the returned object */
|
||||
|
||||
Status = AcpiUtGetObjectSize (Info->ReturnObject,
|
||||
&BufferSpaceNeeded);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Validate/Allocate/Clear caller buffer */
|
||||
|
||||
Status = AcpiUtInitializeBuffer (ReturnBuffer,
|
||||
BufferSpaceNeeded);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/*
|
||||
* Caller's buffer is too small or a new one can't
|
||||
* be allocated
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Needed buffer size %X, %s\n",
|
||||
(UINT32) BufferSpaceNeeded,
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We have enough space for the object, build it */
|
||||
|
||||
Status = AcpiUtCopyIobjectToEobject (
|
||||
Info->ReturnObject, ReturnBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
Status = AcpiUtCopyIobjectToEobject (
|
||||
Info->ReturnObject, ReturnBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
CleanupReturnObject:
|
||||
|
||||
if (Info->ReturnObject)
|
||||
{
|
||||
/*
|
||||
|
@ -148,7 +148,7 @@ AcpiPsAllocOp (
|
||||
}
|
||||
else if (OpInfo->Flags & AML_NAMED)
|
||||
{
|
||||
Flags = ACPI_PARSEOP_NAMED;
|
||||
Flags = ACPI_PARSEOP_NAMED_OBJECT;
|
||||
}
|
||||
else if (Opcode == AML_INT_BYTELIST_OP)
|
||||
{
|
||||
|
@ -265,19 +265,20 @@ ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[4] =
|
||||
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (CommonSerialBus.Type), "Type", AcpiGbl_SbtDecode}, \
|
||||
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode}, \
|
||||
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.SlaveMode), "SlaveMode", AcpiGbl_SmDecode}, \
|
||||
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ConnectionSharing),"ConnectionSharing", AcpiGbl_ShrDecode}, \
|
||||
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (CommonSerialBus.TypeRevisionId), "TypeRevisionId", NULL}, \
|
||||
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (CommonSerialBus.TypeDataLength), "TypeDataLength", NULL}, \
|
||||
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (CommonSerialBus.ResourceSource), "ResourceSource", NULL}, \
|
||||
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (CommonSerialBus.VendorLength), "VendorLength", NULL}, \
|
||||
{ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (CommonSerialBus.VendorData), "VendorData", NULL},
|
||||
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[10] =
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[11] =
|
||||
{
|
||||
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpCommonSerialBus), "Common Serial Bus", NULL},
|
||||
ACPI_RS_DUMP_COMMON_SERIAL_BUS
|
||||
};
|
||||
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[13] =
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[14] =
|
||||
{
|
||||
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpI2cSerialBus), "I2C Serial Bus", NULL},
|
||||
ACPI_RS_DUMP_COMMON_SERIAL_BUS
|
||||
@ -286,7 +287,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[13] =
|
||||
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (I2cSerialBus.SlaveAddress), "SlaveAddress", NULL},
|
||||
};
|
||||
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[17] =
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[18] =
|
||||
{
|
||||
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpSpiSerialBus), "Spi Serial Bus", NULL},
|
||||
ACPI_RS_DUMP_COMMON_SERIAL_BUS
|
||||
@ -299,7 +300,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[17] =
|
||||
{ACPI_RSD_UINT32, ACPI_RSD_OFFSET (SpiSerialBus.ConnectionSpeed), "ConnectionSpeed", NULL},
|
||||
};
|
||||
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[19] =
|
||||
ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[20] =
|
||||
{
|
||||
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpUartSerialBus), "Uart Serial Bus", NULL},
|
||||
ACPI_RS_DUMP_COMMON_SERIAL_BUS
|
||||
|
@ -153,7 +153,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] =
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] =
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[17] =
|
||||
{
|
||||
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
|
||||
ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
|
||||
@ -179,6 +179,10 @@ ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] =
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
1},
|
||||
|
||||
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
2},
|
||||
|
||||
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
|
||||
AML_OFFSET (CommonSerialBus.TypeRevisionId),
|
||||
1},
|
||||
@ -233,7 +237,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] =
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] =
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[21] =
|
||||
{
|
||||
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
|
||||
ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
|
||||
@ -259,6 +263,10 @@ ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] =
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
1},
|
||||
|
||||
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
2},
|
||||
|
||||
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
|
||||
AML_OFFSET (CommonSerialBus.TypeRevisionId),
|
||||
1},
|
||||
@ -329,7 +337,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] =
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] =
|
||||
ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[23] =
|
||||
{
|
||||
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
|
||||
ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
|
||||
@ -355,6 +363,10 @@ ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] =
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
1},
|
||||
|
||||
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
|
||||
AML_OFFSET (CommonSerialBus.Flags),
|
||||
2},
|
||||
|
||||
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
|
||||
AML_OFFSET (CommonSerialBus.TypeRevisionId),
|
||||
1},
|
||||
|
@ -441,7 +441,7 @@ AcpiTbVerifyTempTable (
|
||||
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
|
||||
"%4.4s 0x%8.8X%8.8X"
|
||||
" Attempted table install failed",
|
||||
AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
|
||||
AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
|
||||
TableDesc->Signature.Ascii : "????",
|
||||
ACPI_FORMAT_UINT64 (TableDesc->Address)));
|
||||
|
||||
|
@ -83,7 +83,7 @@ AcpiTbFindTable (
|
||||
|
||||
/* Validate the input table signature */
|
||||
|
||||
if (!AcpiIsValidSignature (Signature))
|
||||
if (!AcpiUtValidNameseg (Signature))
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_SIGNATURE);
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ AcpiTbInstallStandardTable (
|
||||
ACPI_BIOS_ERROR ((AE_INFO,
|
||||
"Table has invalid signature [%4.4s] (0x%8.8X), "
|
||||
"must be SSDT or OEMx",
|
||||
AcpiUtValidAcpiName (NewTableDesc.Signature.Ascii) ?
|
||||
AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
|
||||
NewTableDesc.Signature.Ascii : "????",
|
||||
NewTableDesc.Signature.Integer));
|
||||
|
||||
|
@ -411,36 +411,3 @@ NextTable:
|
||||
AcpiOsUnmapMemory (Table, Length);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiIsValidSignature
|
||||
*
|
||||
* PARAMETERS: Signature - Sig string to be validated
|
||||
*
|
||||
* RETURN: TRUE if signature is has 4 valid ACPI characters
|
||||
*
|
||||
* DESCRIPTION: Validate an ACPI table signature.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsValidSignature (
|
||||
char *Signature)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Validate each character in the signature */
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++)
|
||||
{
|
||||
if (!AcpiUtValidAcpiChar (Signature[i], i))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
161
source/components/utilities/utascii.c
Normal file
161
source/components/utilities/utascii.c
Normal file
@ -0,0 +1,161 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utascii - Utility ascii functions
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2016, 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 "acpi.h"
|
||||
#include "accommon.h"
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtValidNameseg
|
||||
*
|
||||
* PARAMETERS: Name - The name or table signature to be examined.
|
||||
* Four characters, does not have to be a
|
||||
* NULL terminated string.
|
||||
*
|
||||
* RETURN: TRUE if signature is has 4 valid ACPI characters
|
||||
*
|
||||
* DESCRIPTION: Validate an ACPI table signature.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidNameseg (
|
||||
char *Name)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Validate each character in the signature */
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++)
|
||||
{
|
||||
if (!AcpiUtValidNameChar (Name[i], i))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtValidNameChar
|
||||
*
|
||||
* PARAMETERS: Char - The character to be examined
|
||||
* Position - Byte position (0-3)
|
||||
*
|
||||
* RETURN: TRUE if the character is valid, FALSE otherwise
|
||||
*
|
||||
* DESCRIPTION: Check for a valid ACPI character. Must be one of:
|
||||
* 1) Upper case alpha
|
||||
* 2) numeric
|
||||
* 3) underscore
|
||||
*
|
||||
* We allow a '!' as the last character because of the ASF! table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidNameChar (
|
||||
char Character,
|
||||
UINT32 Position)
|
||||
{
|
||||
|
||||
if (!((Character >= 'A' && Character <= 'Z') ||
|
||||
(Character >= '0' && Character <= '9') ||
|
||||
(Character == '_')))
|
||||
{
|
||||
/* Allow a '!' in the last position */
|
||||
|
||||
if (Character == '!' && Position == 3)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtCheckAndRepairAscii
|
||||
*
|
||||
* PARAMETERS: Name - Ascii string
|
||||
* Count - Number of characters to check
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Ensure that the requested number of characters are printable
|
||||
* Ascii characters. Sets non-printable and null chars to <space>.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiUtCheckAndRepairAscii (
|
||||
UINT8 *Name,
|
||||
char *RepairedName,
|
||||
UINT32 Count)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
for (i = 0; i < Count; i++)
|
||||
{
|
||||
RepairedName[i] = (char) Name[i];
|
||||
|
||||
if (!Name[i])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isprint (Name[i]))
|
||||
{
|
||||
RepairedName[i] = ' ';
|
||||
}
|
||||
}
|
||||
}
|
@ -157,86 +157,6 @@ AcpiUtPrintString (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtValidAcpiChar
|
||||
*
|
||||
* PARAMETERS: Char - The character to be examined
|
||||
* Position - Byte position (0-3)
|
||||
*
|
||||
* RETURN: TRUE if the character is valid, FALSE otherwise
|
||||
*
|
||||
* DESCRIPTION: Check for a valid ACPI character. Must be one of:
|
||||
* 1) Upper case alpha
|
||||
* 2) numeric
|
||||
* 3) underscore
|
||||
*
|
||||
* We allow a '!' as the last character because of the ASF! table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiChar (
|
||||
char Character,
|
||||
UINT32 Position)
|
||||
{
|
||||
|
||||
if (!((Character >= 'A' && Character <= 'Z') ||
|
||||
(Character >= '0' && Character <= '9') ||
|
||||
(Character == '_')))
|
||||
{
|
||||
/* Allow a '!' in the last position */
|
||||
|
||||
if (Character == '!' && Position == 3)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtValidAcpiName
|
||||
*
|
||||
* PARAMETERS: Name - The name to be examined. Does not have to
|
||||
* be NULL terminated string.
|
||||
*
|
||||
* RETURN: TRUE if the name is valid, FALSE otherwise
|
||||
*
|
||||
* DESCRIPTION: Check for a valid ACPI name. Each character must be one of:
|
||||
* 1) Upper case alpha
|
||||
* 2) numeric
|
||||
* 3) underscore
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiName (
|
||||
char *Name)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++)
|
||||
{
|
||||
if (!AcpiUtValidAcpiChar (Name[i], i))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtRepairName
|
||||
@ -286,7 +206,7 @@ AcpiUtRepairName (
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++)
|
||||
{
|
||||
if (AcpiUtValidAcpiChar (Name[i], i))
|
||||
if (AcpiUtValidNameChar (Name[i], i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -385,6 +385,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
|
||||
|
@ -1025,24 +1025,24 @@ typedef struct acpi_parse_state
|
||||
|
||||
/* Parse object flags */
|
||||
|
||||
#define ACPI_PARSEOP_GENERIC 0x01
|
||||
#define ACPI_PARSEOP_NAMED 0x02
|
||||
#define ACPI_PARSEOP_DEFERRED 0x04
|
||||
#define ACPI_PARSEOP_BYTELIST 0x08
|
||||
#define ACPI_PARSEOP_IN_STACK 0x10
|
||||
#define ACPI_PARSEOP_TARGET 0x20
|
||||
#define ACPI_PARSEOP_IN_CACHE 0x80
|
||||
#define ACPI_PARSEOP_GENERIC 0x01
|
||||
#define ACPI_PARSEOP_NAMED_OBJECT 0x02
|
||||
#define ACPI_PARSEOP_DEFERRED 0x04
|
||||
#define ACPI_PARSEOP_BYTELIST 0x08
|
||||
#define ACPI_PARSEOP_IN_STACK 0x10
|
||||
#define ACPI_PARSEOP_TARGET 0x20
|
||||
#define ACPI_PARSEOP_IN_CACHE 0x80
|
||||
|
||||
/* Parse object DisasmFlags */
|
||||
|
||||
#define ACPI_PARSEOP_IGNORE 0x01
|
||||
#define ACPI_PARSEOP_PARAMLIST 0x02
|
||||
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
|
||||
#define ACPI_PARSEOP_PREDEF_CHECKED 0x08
|
||||
#define ACPI_PARSEOP_CLOSING_PAREN 0x10
|
||||
#define ACPI_PARSEOP_COMPOUND 0x20
|
||||
#define ACPI_PARSEOP_ASSIGNMENT 0x40
|
||||
#define ACPI_PARSEOP_ELSEIF 0x80
|
||||
#define ACPI_PARSEOP_IGNORE 0x01
|
||||
#define ACPI_PARSEOP_PARAMETER_LIST 0x02
|
||||
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
|
||||
#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08
|
||||
#define ACPI_PARSEOP_CLOSING_PAREN 0x10
|
||||
#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20
|
||||
#define ACPI_PARSEOP_ASSIGNMENT 0x40
|
||||
#define ACPI_PARSEOP_ELSEIF 0x80
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -273,9 +273,21 @@
|
||||
* Bit positions start at zero.
|
||||
* MASK_BITS_ABOVE creates a mask starting AT the position and above
|
||||
* MASK_BITS_BELOW creates a mask starting one bit BELOW the position
|
||||
* MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask
|
||||
* MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask
|
||||
* Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler
|
||||
* differences with the shift operator
|
||||
*/
|
||||
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_UINT64_MAX) << ((UINT32) (position))))
|
||||
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_UINT64_MAX) << ((UINT32) (position)))
|
||||
#define ACPI_MASK_BITS_ABOVE_32(width) ((UINT32) ACPI_MASK_BITS_ABOVE(width))
|
||||
#define ACPI_MASK_BITS_BELOW_32(width) ((UINT32) ACPI_MASK_BITS_BELOW(width))
|
||||
#define ACPI_MASK_BITS_ABOVE_64(width) ((width) == ACPI_INTEGER_BIT_SIZE ? \
|
||||
ACPI_UINT64_MAX : \
|
||||
ACPI_MASK_BITS_ABOVE(width))
|
||||
#define ACPI_MASK_BITS_BELOW_64(width) ((width) == ACPI_INTEGER_BIT_SIZE ? \
|
||||
(UINT64) 0 : \
|
||||
ACPI_MASK_BITS_BELOW(width))
|
||||
|
||||
/* Bitfields within ACPI registers */
|
||||
|
||||
@ -291,10 +303,10 @@
|
||||
/* Generic bitfield macros and masks */
|
||||
|
||||
#define ACPI_GET_BITS(SourcePtr, Position, Mask) \
|
||||
((*SourcePtr >> Position) & Mask)
|
||||
((*(SourcePtr) >> (Position)) & (Mask))
|
||||
|
||||
#define ACPI_SET_BITS(TargetPtr, Position, Mask, Value) \
|
||||
(*TargetPtr |= ((Value & Mask) << Position))
|
||||
(*(TargetPtr) |= (((Value) & (Mask)) << (Position)))
|
||||
|
||||
#define ACPI_1BIT_MASK 0x00000001
|
||||
#define ACPI_2BIT_MASK 0x00000003
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20160318
|
||||
#define ACPI_CA_VERSION 0x20160422
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
@ -131,7 +131,8 @@ enum AcpiReturnPackageTypes
|
||||
ACPI_PTYPE2_REV_FIXED = 9,
|
||||
ACPI_PTYPE2_FIX_VAR = 10,
|
||||
ACPI_PTYPE2_VAR_VAR = 11,
|
||||
ACPI_PTYPE2_UUID_PAIR = 12
|
||||
ACPI_PTYPE2_UUID_PAIR = 12,
|
||||
ACPI_PTYPE_CUSTOM = 13
|
||||
};
|
||||
|
||||
|
||||
@ -344,7 +345,7 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] =
|
||||
|
||||
{{"_BIX", METHOD_0ARGS,
|
||||
METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str) */
|
||||
PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING, 4,0),
|
||||
PACKAGE_INFO (ACPI_PTYPE_CUSTOM, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING, 4,0),
|
||||
|
||||
{{"_BLT", METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
|
||||
METHOD_NO_RETURN_VALUE}},
|
||||
|
@ -485,6 +485,7 @@ typedef struct acpi_resource_gpio
|
||||
UINT8 Type; \
|
||||
UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */\
|
||||
UINT8 SlaveMode; \
|
||||
UINT8 ConnectionSharing; \
|
||||
UINT8 TypeRevisionId; \
|
||||
UINT16 TypeDataLength; \
|
||||
UINT16 VendorLength; \
|
||||
|
@ -246,10 +246,6 @@ ACPI_STATUS
|
||||
AcpiTbParseRootTable (
|
||||
ACPI_PHYSICAL_ADDRESS RsdpAddress);
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsValidSignature (
|
||||
char *Signature);
|
||||
|
||||
|
||||
/*
|
||||
* tbxfload
|
||||
|
@ -563,9 +563,10 @@ typedef struct acpi_table_pcct
|
||||
|
||||
enum AcpiPcctType
|
||||
{
|
||||
ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
|
||||
ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
|
||||
ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
|
||||
ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
|
||||
ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
|
||||
ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
|
||||
ACPI_PCCT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -609,6 +610,30 @@ typedef struct acpi_pcct_hw_reduced
|
||||
|
||||
} ACPI_PCCT_HW_REDUCED;
|
||||
|
||||
|
||||
/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
|
||||
|
||||
typedef struct acpi_pcct_hw_reduced_type2
|
||||
{
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT32 DoorbellInterrupt;
|
||||
UINT8 Flags;
|
||||
UINT8 Reserved;
|
||||
UINT64 BaseAddress;
|
||||
UINT64 Length;
|
||||
ACPI_GENERIC_ADDRESS DoorbellRegister;
|
||||
UINT64 PreserveMask;
|
||||
UINT64 WriteMask;
|
||||
UINT32 Latency;
|
||||
UINT32 MaxAccessRate;
|
||||
UINT16 MinTurnaroundTime;
|
||||
ACPI_GENERIC_ADDRESS DoorbellAckRegister;
|
||||
UINT64 AckPreserveMask;
|
||||
UINT64 AckWriteMask;
|
||||
|
||||
} ACPI_PCCT_HW_REDUCED_TYPE2;
|
||||
|
||||
|
||||
/* Values for doorbell flags above */
|
||||
|
||||
#define ACPI_PCCT_INTERRUPT_POLARITY (1)
|
||||
|
@ -174,6 +174,25 @@ typedef struct acpi_pkg_info
|
||||
#define DB_QWORD_DISPLAY 8
|
||||
|
||||
|
||||
/*
|
||||
* utascii - ASCII utilities
|
||||
*/
|
||||
BOOLEAN
|
||||
AcpiUtValidNameseg (
|
||||
char *Signature);
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidNameChar (
|
||||
char Character,
|
||||
UINT32 Position);
|
||||
|
||||
void
|
||||
AcpiUtCheckAndRepairAscii (
|
||||
UINT8 *Name,
|
||||
char *RepairedName,
|
||||
UINT32 Count);
|
||||
|
||||
|
||||
/*
|
||||
* utnonansi - Non-ANSI C library functions
|
||||
*/
|
||||
@ -832,15 +851,6 @@ UtConvertBackslashes (
|
||||
char *Pathname);
|
||||
#endif
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiName (
|
||||
char *Name);
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiChar (
|
||||
char Character,
|
||||
UINT32 Position);
|
||||
|
||||
void
|
||||
AcpiUtRepairName (
|
||||
char *Name);
|
||||
|
@ -91,7 +91,7 @@ AbValidateHeader (
|
||||
ACPI_TABLE_HEADER *Header)
|
||||
{
|
||||
|
||||
if (!AcpiUtValidAcpiName (Header->Signature))
|
||||
if (!AcpiUtValidNameseg (Header->Signature))
|
||||
{
|
||||
printf ("Header signature is invalid\n");
|
||||
return (FALSE);
|
||||
|
@ -74,7 +74,7 @@ ApIsValidHeader (
|
||||
{
|
||||
/* Make sure signature is all ASCII and a valid ACPI name */
|
||||
|
||||
if (!AcpiUtValidAcpiName (Table->Signature))
|
||||
if (!AcpiUtValidNameseg (Table->Signature))
|
||||
{
|
||||
AcpiLogError ("Table signature (0x%8.8X) is invalid\n",
|
||||
*(UINT32 *) Table->Signature);
|
||||
@ -465,6 +465,13 @@ ApDumpTableFromFile (
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!AcpiUtValidNameseg (Table->Signature))
|
||||
{
|
||||
AcpiLogError (
|
||||
"No valid ACPI signature was found in input file %s\n",
|
||||
Pathname);
|
||||
}
|
||||
|
||||
/* File must be at least as long as the table length */
|
||||
|
||||
if (Table->Length > FileSize)
|
||||
|
@ -147,14 +147,14 @@ const AH_AML_OPCODE AmlOpcodeInfo[] =
|
||||
"DefOpRegion := OpRegionOp NameString RegionSpace RegionOffset RegionLen"},
|
||||
{0x5B81, 0x5B81, "0x5B81", "FieldOp", "TermObject", "NameString ByteData", "FieldList",
|
||||
"DefField := FieldOp PkgLength NameString FieldFlags FieldList"},
|
||||
{0x5B82, 0x5B82, "0x5B82", "DeviceOp", "TermObject", "NameString", "ObjectList",
|
||||
"DefDevice := DeviceOp PkgLength NameString ObjectList"},
|
||||
{0x5B83, 0x5B83, "0x5B83", "ProcessorOp", "TermObject", "NameString ByteData DWordData ByteData", "ObjectList",
|
||||
"DefProcessor := ProcessorOp PkgLength NameString ProcId PblkAddr PblkLen ObjectList"},
|
||||
{0x5B84, 0x5B84, "0x5B84", "PowerResOp", "TermObject", "NameString ByteData WordData", "ObjectList",
|
||||
"DefPowerRes := PowerResOp PkgLength NameString SystemLevel ResourceOrder ObjectList"},
|
||||
{0x5B85, 0x5B85, "0x5B85", "ThermalZoneOp", "TermObject", "NameString", "ObjectList",
|
||||
"DefThermalZone := ThermalZoneOp PkgLength NameString ObjectList"},
|
||||
{0x5B82, 0x5B82, "0x5B82", "DeviceOp", "TermObject", "NameString", "TermList",
|
||||
"DefDevice := DeviceOp PkgLength NameString TermList"},
|
||||
{0x5B83, 0x5B83, "0x5B83", "ProcessorOp", "TermObject", "NameString ByteData DWordData ByteData", "TermList",
|
||||
"DefProcessor := ProcessorOp PkgLength NameString ProcId PblkAddr PblkLen TermList"},
|
||||
{0x5B84, 0x5B84, "0x5B84", "PowerResOp", "TermObject", "NameString ByteData WordData", "TermList",
|
||||
"DefPowerRes := PowerResOp PkgLength NameString SystemLevel ResourceOrder TermList"},
|
||||
{0x5B85, 0x5B85, "0x5B85", "ThermalZoneOp", "TermObject", "NameString", "TermList",
|
||||
"DefThermalZone := ThermalZoneOp PkgLength NameString TermList"},
|
||||
{0x5B86, 0x5B86, "0x5B86", "IndexFieldOp", "TermObject", "NameString NameString ByteData", "FieldList",
|
||||
"DefIndexField := IndexFieldOp PkgLength NameString NameString FieldFlags FieldList"},
|
||||
{0x5B87, 0x5B87, "0x5B87", "BankFieldOp", "TermObject", "NameString NameString TermArg ByteData", "FieldList",
|
||||
|
@ -112,7 +112,7 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Declare a Definition Block"},
|
||||
{"DerefOf", "(Source) => Object",
|
||||
"Dereference an object reference"},
|
||||
{"Device", "(DeviceName) {ObjectList}",
|
||||
{"Device", "(DeviceName) {TermList}",
|
||||
"Declare a bus/device object"},
|
||||
{"Divide", "(Dividend, Divisor, Remainder, Result) => Integer",
|
||||
"Integer Divide"},
|
||||
@ -193,9 +193,9 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, "
|
||||
"RawDataBuffer() {VendorData}) {PinList}",
|
||||
"GPIO I/O Connection Resource Descriptor Macro"},
|
||||
{"I2cSerialBus", "(SlaveAddress, SlaveModeKeyword, ConnectionSpeed, "
|
||||
{"I2cSerialBusV2", "(SlaveAddress, SlaveModeKeyword, ConnectionSpeed, "
|
||||
"AddressingModeKeyword, ResourceSource, "
|
||||
"ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, "
|
||||
"ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, Shared, "
|
||||
"RawDataBuffer() {VendorData})",
|
||||
"I2C Serial Bus Connection Resource Descriptor Macro"},
|
||||
{"If", "(Predicate) {TermList}",
|
||||
@ -295,9 +295,9 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Integer Bitwise Or"},
|
||||
{"Package", "(NumElements) {PackageList} => Package",
|
||||
"Declare a package object"},
|
||||
{"PowerResource", "(ResourceName, SystemLevel, ResourceOrder) {ObjectList}",
|
||||
{"PowerResource", "(ResourceName, SystemLevel, ResourceOrder) {TermList}",
|
||||
"Declare a power resource object"},
|
||||
{"Processor", "(ProcessorName, ProcessorID, PBlockAddress, PblockLength) {ObjectList}",
|
||||
{"Processor", "(ProcessorName, ProcessorID, PBlockAddress, PblockLength) {TermList}",
|
||||
"Declare a processor package"},
|
||||
{"QWordIo", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, DecodeKeyword, "
|
||||
"RangeTypeKeyword, AddressGranularity, "
|
||||
@ -335,7 +335,7 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Return from method execution"},
|
||||
{"Revision", "=> Integer",
|
||||
"Constant revision object"},
|
||||
{"Scope", "(Location) {ObjectList}",
|
||||
{"Scope", "(Location) {TermList}",
|
||||
"Open named scope "},
|
||||
{"ShiftLeft", "(Source, ShiftCount, Result) => Integer",
|
||||
"Integer shift value left"},
|
||||
@ -347,11 +347,11 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Get the size of a buffer}, string}, or package"},
|
||||
{"Sleep", "(Milliseconds)",
|
||||
"Sleep n milliseconds (yields the processor)"},
|
||||
{"SpiSerialBus", "(DeviceSelection, PolarityKeyword, WireModeKeyword, "
|
||||
{"SpiSerialBusV2", "(DeviceSelection, PolarityKeyword, WireModeKeyword, "
|
||||
"DataBitLength, SlaveModeKeyword, "
|
||||
"ConnectionSpeed, ClockPolarityKeyword, ClockPhaseKeyword, "
|
||||
"ResourceSource, ResourceSourceIndex, "
|
||||
"ResourceTypeKeyword, DescriptorName, RawDataBuffer() {VendorData})",
|
||||
"ResourceTypeKeyword, DescriptorName, Shared, RawDataBuffer() {VendorData})",
|
||||
"SPI Serial Bus Connection Resource Descriptor Macro"},
|
||||
{"Stall", "(Microseconds)",
|
||||
"Delay n microseconds (does not yield the processor)"},
|
||||
@ -365,7 +365,7 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Integer Subtract"},
|
||||
{"Switch", "(Expression) {CaseTermList}",
|
||||
"Select code to execute based on expression value"},
|
||||
{"ThermalZone", "(ThermalZoneName) {ObjectList}",
|
||||
{"ThermalZone", "(ThermalZoneName) {TermList}",
|
||||
"Declare a thermal zone package"},
|
||||
{"Timer", "=> Integer",
|
||||
"Get 64-bit timer value"},
|
||||
@ -383,10 +383,10 @@ const AH_ASL_OPERATOR AslOperatorInfo[] =
|
||||
"Copy ASCII string from buffer"},
|
||||
{"ToUuid", "(AsciiString) => Buffer",
|
||||
"Convert Ascii string to UUID"},
|
||||
{"UartSerialBus", "(ConnectionSpeed, ByteLengthKeyword, StopBitsKeyword, "
|
||||
{"UartSerialBusV2", "(ConnectionSpeed, ByteLengthKeyword, StopBitsKeyword, "
|
||||
"LinesInUse, EndianKeyword, ParityKeyword, "
|
||||
"FlowControlKeyword, ReceiveBufferSize, TransmitBufferSize, ResourceSource, "
|
||||
"ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, "
|
||||
"ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, Shared, "
|
||||
"RawDataBuffer() {VendorData})",
|
||||
"UART Serial Bus Connection Resource Descriptor Macro"},
|
||||
{"Unicode", "(String) => Buffer",
|
||||
|
@ -624,6 +624,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
|
||||
{"ACPI_IORT_NODE", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IORT_ROOT_COMPLEX", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IORT_SMMU", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IORT_SMMU_V3", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IVRS_HEADER", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IVRS_HARDWARE", SRC_TYPE_STRUCT},
|
||||
{"ACPI_IVRS_DE_HEADER", SRC_TYPE_STRUCT},
|
||||
@ -666,6 +667,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
|
||||
{"ACPI_NFIT_DATA_REGION", SRC_TYPE_STRUCT},
|
||||
{"ACPI_NFIT_FLUSH_ADDRESS", SRC_TYPE_STRUCT},
|
||||
{"ACPI_PCCT_HW_REDUCED", SRC_TYPE_STRUCT},
|
||||
{"ACPI_PCCT_HW_REDUCED_TYPE2", SRC_TYPE_STRUCT},
|
||||
{"ACPI_PCCT_SHARED_MEMORY", SRC_TYPE_STRUCT},
|
||||
{"ACPI_PCCT_SUBSPACE", SRC_TYPE_STRUCT},
|
||||
{"ACPI_RSDP_COMMON", SRC_TYPE_STRUCT},
|
||||
|
@ -239,7 +239,7 @@ CleanupAndExit:
|
||||
|
||||
if (Gbl_TableCount > 1)
|
||||
{
|
||||
printf ("\n%d binary ACPI tables extracted\n",
|
||||
printf ("\n%u binary ACPI tables extracted\n",
|
||||
Gbl_TableCount);
|
||||
}
|
||||
|
||||
@ -383,7 +383,7 @@ CleanupAndExit:
|
||||
ThisSignature, ThisTableBytesWritten, Gbl_OutputFilename);
|
||||
}
|
||||
|
||||
printf ("\n%d binary ACPI tables extracted and written to %s (%u bytes)\n",
|
||||
printf ("\n%u binary ACPI tables extracted and written to %s (%u bytes)\n",
|
||||
Gbl_TableCount, Gbl_OutputFilename, TotalBytesWritten);
|
||||
|
||||
fclose (InputFile);
|
||||
@ -471,7 +471,7 @@ AxListTables (
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!AcpiIsValidSignature (TableHeader->Signature))
|
||||
if (!AcpiUtValidNameseg (TableHeader->Signature))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -148,10 +148,6 @@ void
|
||||
AxNormalizeSignature (
|
||||
char *Signature);
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsValidSignature (
|
||||
char *Signature);
|
||||
|
||||
void
|
||||
AxCheckAscii (
|
||||
char *Name,
|
||||
|
@ -44,81 +44,6 @@
|
||||
#include "acpixtract.h"
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiIsValidSignature
|
||||
*
|
||||
* PARAMETERS: Signature - Sig string to be validated
|
||||
*
|
||||
* RETURN: TRUE if signature is has 4 valid ACPI characters
|
||||
*
|
||||
* DESCRIPTION: Validate an ACPI table signature.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiIsValidSignature (
|
||||
char *Signature)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Validate each character in the signature */
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++)
|
||||
{
|
||||
if (!AcpiUtValidAcpiChar (Signature[i], i))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtValidAcpiChar
|
||||
*
|
||||
* PARAMETERS: Char - The character to be examined
|
||||
* Position - Byte position (0-3)
|
||||
*
|
||||
* RETURN: TRUE if the character is valid, FALSE otherwise
|
||||
*
|
||||
* DESCRIPTION: Check for a valid ACPI character. Must be one of:
|
||||
* 1) Upper case alpha
|
||||
* 2) numeric
|
||||
* 3) underscore
|
||||
*
|
||||
* We allow a '!' as the last character because of the ASF! table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiChar (
|
||||
char Character,
|
||||
UINT32 Position)
|
||||
{
|
||||
|
||||
if (!((Character >= 'A' && Character <= 'Z') ||
|
||||
(Character >= '0' && Character <= '9') ||
|
||||
(Character == '_')))
|
||||
{
|
||||
/* Allow a '!' in the last position */
|
||||
|
||||
if (Character == '!' && Position == 3)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AxCheckAscii
|
||||
|
Loading…
x
Reference in New Issue
Block a user