ACPI_NAME_SIZE changed to ACPI_NAMESEG_SIZE
This clarifies that this is the length of an individual
nameseg, not the length of a generic namestring/namepath.
Improves understanding of the code.
This change adds PCC operation region support in the AML interpreter
and a default handler for acpiexec. According to the specification,
the PCC operation region performs a transaction when the COMD field
is written. This allows ASL to write data to other fields before
sending the data.
In order to accommodate this protocol, a temorary buffer is added
to the regionfield object to accumulate writes. If any offset that
spans COMD is written, the temporary buffer is sent to the PCC
operation region handler to be processed.
This change also renames the PCC keyword to PlatformCommChannel.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Improve adherence to ACPI spec for implicit and explicit conversions
Adds octal support for constants in ASL code
Adds integer overflow errors for constants during ASL compilation
Eliminates most of the existing complex flags parameters
Simplify support for implicit/explicit runtime conversions
Adds one new file, utilities/utstrsuppt.c
PinGroupConfig() is analogous to PinGroupFunction() but instead of mode
(muxing), it is used to apply specific fine-grained configuration to a
set of referenced pins.
The format of this new resource is:
PinGroupConfig (Shared/Exclusive, PinConfigType, PinConfigValue,
ResourceSource, ResourceSourceIndex, ResourceSourceLabel,
ResourceUsage, DescriptorName, VendorData)
The PinConfigType/PinConfigValue are the same used by PinConfig()
resource.
Here also the combination of ResourceSource and ResourceSourceLabel is
used to specify the PinGroup() this resource refers to.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
PinGroupFunction() is a new resource introduced with ACPI 6.2. It is
used with PinGroup() to configure specific mode for a set of pins
exposed by a GPIO controller.
The format of the resource is:
PinGroupFunction (Shared/Exclusive, FunctionNumber, ResourceSource,
ResourceSourceIndex, ResourceSourceLabel,
ResourceUsage, DescriptorName, VendorData)
The ResourceSource and ResourceSourceLabel fields are used to specify
the PinGroup() resource referenced by PinGroupFunction().
Device (GPIO)
{
Name (_CRS, ResourceTemplate () {
PinGroup ("group1") {2, 3}
PinGroup ("group2") {4, 5}
...
})
}
Device (I2C)
{
Name (_CRS, ResourceTemplate () {
PinGroupFunction (Exclusive, 6, "^GPIO", 0, "mygroup2")
})
}
In the above example the PinGroupFunction() references the second
PinGroup() resource (using label "mygroup2" and configures pins 4 and 5
into mode 6.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
ACPI 6.2 introduced a new resource that is used to declare set of pins
belonging to a GPIO controller. This resource is referenced by new
PinGroupFunction() and PinGroupConfig() resources using ResourceSource
and ResourceLabel fields.
The PinGroup() resource looks like this:
PinGroup (ResourceLabel, ResourceUsage, DescriptorName,
VendorData) {Pin List}
This resource should be listed in _CRS under the GPIO/pincontroller
device providing these pins.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
ACPI 6.2 introduced a new resource that is used to specify fine-grained
configuration of a pin or set of pins used by a device. The ASL syntax of
this new resource looks like:
PinConfig (Shared/Exclusive, PinConfigType, PinConfigValue,
ResourceSource, ResourceSourceIndex, ResourceUsage,
DescriptorName, VendorData) {Pin List}
PinConfigType is an integer with following accepted values:
0x00 (Default) - No configuration is applied to the pin
0x01 (Bias Pull-up) - Pin is pulled up using certain size resistor
0x02 (Bias Pull-down) - Pin is pulled down using certain size resistor
0x03 (Bias Default) - Set to default biasing
0x04 (Bias Disable) - All bias settings will be disabled
0x05 (Bias High Impedance) - Configure the pin as HiZ
0x06 (Bias Bus Hold) - Configure the pin in a weak latch state where
it drives the last value on a tristate bus
0x07 (Drive Open Drain) - Configure the pin into open drain state
0x08 (Drive Open Source) - Configure the pin into open source state
0x09 (Drive Push Pull) - Configure the pin into push-pull state
0x0a (Drive Strength) - How much the pin can supply current
0x0b (Slew Rate) - Configure slew rate of the pin
0x0c (Input Debounce) - Enable input debouncer for the pin
0x0d (Input Schmitt Trigger) - Enable schmitt trigger for the pin
0x0e - 0x7f - Reserved
0x80 - 0xff - Vendor defined types
The PinConfigValue depends on the type and is expressed as units
suitable for that type (for example bias uses Ohms).
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
ACPI 6.2 introduced a new resource that is used to describe how certain
pins are muxed for a device. The ASL syntax of this new resource looks
like below:
PinFunction(Shared, PinConfig, FunctionNumber, ResourceSource,
ResourceSourceIndex, ResourceUsage, DescriptorName,
VendorData) {Pin List}
Which is pretty similar to GpioIo()/GpioInt() resources.
Teach ACPICA about this new resource.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Adds the dual GNU/BSD dual license to the existing Intel license.
Provides all licensing information in each source module.
Affects all ACPICA source modules.
The key feature of this utility is that the original comments within
the input ASL files are preserved during the conversion process, and
included within the converted ASL+ file -- thus creating a transparent
conversion of existing ASL files to ASL+ (ASL 2.0)
1) Make parentheses the highest precedence operators. This affects
definition of most grammar elements to reflect tokenization of
parens.
2) Grammar changes for ObjectType, RefOf, CondRefOf, DerefOf --
mostly to disallow method invocations.
This reverts commit 16fa94dfd56cabd325c40ed5aa42f42e15dbcd93.
Several serious issues remain related to the ACPI specification,
code generation, and disassembly.
This feature is on hold until such time as these issues can
be resolved (if they can be resolved).
Across all of ACPICA. Replace C library macros such as ACPI_STRLEN
with the standard names such as strlen. The original purpose for
these macros is long since obsolete.
Emit an error message if files included via the ASL Include() contain
that Include() is processed, the preprocessor has already been fully
executed. Rather than attempt to create yet another temp file (there
are already two), we just emit an error message that suggests that
Printf stores to the debug object.
Fprintf stores to any named object.
%o is the main format specifier since only very limited typechecking
can be performed at compile time.
This change creates an extension to the ASL language that introduces
the use of a C-like syntax and C symbols for both the math and
logical operations.
Note: Does not create new AML opcodes that would need to be implemented
by an AML interpreter. It simply adds new operators and related syntax
to the ASL parser.
Note: This language extension can exist concurrently with the existing ASL syntax.
Compiler support only, dissasembler support is under development.
Examples of the new syntax, each followed by the corresponding legacy ASL syntax:
(New syntax) --> (Legacy syntax)
// Math operators
Z = X + Y --> Add (X, Y, Z)
Z = X - Y --> Subtract (X, Y, Z)
Z = X * Y --> Multiply (X, Y, Z)
Z = X / Y --> Divide (X, Y, , Z)
Z = X % Y --> Mod (X, Y, Z)
Z = X << Y --> ShiftLeft (X, Y, Z)
Z = X >> Y --> ShiftRight (X, Y, Z)
Z = X & Y --> And (X, Y, Z)
Z = X | Y --> Or (X, Y, Z)
Z = X ^ Y --> Xor (X, Y, Z)
X++ --> Increment (X)
X-- --> Decrement (X)
Z = ~X --> Not (X, Z)
// Store/Assignment operations
X = Y --> Store (Y, X)
X += Y --> Add (X, Y, X)
X -= Y --> Subtract (X, Y, X)
X *= Y --> Multiply (X, Y, X)
X /= Y --> Divide (X, Y, , X)
X %= Y --> Mod (X, Y, X)
X <<= Y --> ShiftLeft (X, Y, X)
X >>= Y --> ShiftRight (X, Y, X)
X &= Y --> And (X, Y, X)
X |= Y --> Or (X, Y, X)
X ^= Y --> Xor (X, Y, X)
// Logical operators
(X == Y) --> LEqual (X, Y)
(X != Y) --> LNotEqual (X, Y)
(X < Y) --> LLess (X, Y)
(X > Y) --> LGreater (X, Y)
(X <= Y) --> LLessEqual (X, Y)
(X >= Y) --> LGreaterEqual (X, Y)
(X && Y) --> LAnd (X, Y)
(X || Y) --> LOr (X, Y)
(!X) --> LNot (X)
This macro is intended to simplify the constuction of _PLD buffers.
NOTE: Prototype only, subject to change before this macro is
added to the ACPI specification. David E. Box.
Ensure that the parse tree is deleted for each compile.
Fix other miscellaneous memory leaks per-compile.
Consistently deploy the use of the string cache.
Add tracking for multiple buffers within caches.
Ensure the cache buffers are always deleted.
Add additional braces around C conditional statements to appease
the acpisrc utility which will complain if braces are not used for
if/else statements.
Implemented for both the compiler and the disassembler.
Often, the NOOP opcode is used as padding for packages that are
changed dynamically by the BIOS. When disassembled, these NOOPs will
cause syntax errors. This option causes the disassembler to ignore
the NOOP opcode, and it also causes the compiler to ignore NOOP statements
as well.