All functions defined for the linuxizing scripts lack "local"
declarations. This patch adds "local" for all such variables. No
functional changes. Lv Zheng.
The new ACPICA OSL override mechanism is used to solve these issues
for the Linux OSL:
1. Linux can implement OSL using macro.
2. Linux can implement OSL using inlined function.
3. Linux can leave OSL not implemented for __KERNEL__ undefined code
fragments.
4. Linux can add sparse declarators (__iomem) to OSL.
5. Linux can add memory tuning declarators (__init/__exit) to OSL.
This patch also changes the coding style used in aclinux.h to be ACPICA coding
style as long as these changes can be automatcally reverted by ACPICA release
process:
1. Extra spaces in the inline functions are revertable.
2. Extra spaces in the macros are not revertable.
3. Tab stop in the inline functions and macros are revertable.
4. Symbol names in the inline functions and macros are revertable.
NOTE: Linux symbol names are not converted. Lv Zheng.
Apparently, some BIOSs create SSDTs that contain an ACPI table header
but no other data. This change adds support to dump these tables. Any
tables shorter than the length of an ACPI table header remain in error.
(an error message is emitted.) Reported by Yi Li.
This change enables the host to redefine OSL prototypes found in the
acpiosxf.h file. This allows the host to implement OSL interfaces with
a macro or inlined function. Further, it allows the host to add any
additional required modifiers such as __iomem, __init, __exit, etc.,
as necessary on a per-interface basis. Enables maximum flexibility
for the OSL interfaces. Lv Zheng.
Fixes errors in ASLTS due to an incorrect interpretation of the
use of references for Field Units and Buffer Fields. Per the ACPI
spec, "Fields permanently retain their types and cannot be changed".
Fixes those errors that incorrectly expected the Field type to change.
David Box.
Please enter the commit message for your changes. Lines starting
During the linuxizing process, some extra white spaces are added by the
"indent" program at the beginning of the line which is an invocation of a
macro and there is no ";" at the end of the line.
This patch adds new mode to AcpiSrc to remove extra spaces inserted before
invoking such macros and add an empty line between the invocations of such
macros (like the other function declarations). This new mode is executed
after executing "indent" during the Linux release process.
The affected macros and files are:
1. ACPI_HW_DEPENDENT_RETURN (acpixf.h):
This macro is used as a wrapper for hardware dependent APIs to offer a
stub when the reduced hardware is configured during compilation.
2. ACPI_EXPORT_SYMBOL (utglobal.c):
This macro is used by Linux to export symbols to be found by Linux
modules. All such invocations are well formatted except those exported
as global variables.
This can help to reduce the source code differences between Linux and
ACPICA, and also help to automate the release process. Lv Zheng.
This macro is used in the OSL header. This change modifies the position
of this macro in each instance where it is used (AcpiDebugPrint, etc.)
to avoid build issues if the OSL defines the implementation of the interface
to be an inline stub function. Lv Zheng.
Move AcpiGbl_DebugTimeout from AcpiExec to the OSL layer so that
any new utilities linked to the OSL file(s) won't have to define
it in order to link. Lv Zheng.
Adds a portable module to perform line editing via right-arrow,
left-arrow, and the DEL key. Portability is the key here, so
we don't attempt to use readline(), etc.
This change adds a new macro for the main init and terminate external
interfaces in order to support hosts that require additional or different
processing for these functions. Changed from ACPI_EXPORT_SYMBOL to
ACPI_EXPORT_SYMBOL_INIT. Lv Zheng, Bob Moore.
It is reported by kernel build test systems that all ACPICA linuxized
files have incorrect label indentation. This patch changes default indent
option to fix this bug. Lv Zheng.
This change adds this new macro to all files that contain external
ACPICA interfaces. It can be detected and used by the host (via the
host-specific header) for any special processing required for such
modules. Lv Zheng.
The ACPI spec requires the reset register width to be 8, so we
now hardcode it and ignore the FADT value. This provides/maintains
compatibility with other ACPI implementations that have allowed
BIOS code with bad register width values to go unnoticed.
Matthew Garett, Bob Moore, Lv Zheng.
This patch includes the following fixes:
1. removes non-Linux header files from release process.
2. makes the path names in the generated divergences diff to be relative
path names.
These changes affect the scripts in the generate/linux folder. Lv Zheng.
In the common case, the ACPI_ALLOCATE and related macros now resolve
directly to their respective AcpiOs* OSL interfaces. Two options:
1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation
by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define.
2) For AcpiExec (and for debugging), the macros can optionally be
resolved to the local interfaces that track each allocation (used
to immediately detect memory leaks).
Lv Zheng.
This change adds and deploys "safe" versions of strcpy and strcat that
ensure that the target buffer does not overflow. These safe functions
are only helpful for processing user input and command lines. For most
ACPICA code however, the required buffer length is precisely calculated
before buffer allocation, so the use of these functions is unnecessary.
ACPICA BZ 1043.
This fix repairs a version of a macro that is used for the hardware
reduced case only. It adds a return statement to the macro definition
so that the AcpiSrc translation will not completely delete the second
line of the macro because it thinks that it is an empty block. It actually
clarifies the use of the macro anyway.
This change adds full history and limited line editing for Unix and
Linux systems. It does not use readline() because of portability issues.
Instead it uses the POSIX termio interface to put the terminal in raw
input mode so that the various special keys can be trapped (such as
up-arrow and down-arrow for history support).
This change adds a second UEFI table that is installed by AcpiExec,
then AcpiExec retrieves both tables via the AcpiGetTableHeader and
AcpiGetTable interfaces.
This change fixes a problem where a Store operation to an ArgX object
that contained a reference to a field object did not complete the
automatic dereference and then write to the actual field object.
Instead, the object type of the field object was inadvertently changed
to match the type of the source operand. The new behavior will actually
write to the field object (buffer field or field unit), thus matching
the correct ACPI-defined behavior.
This change increases the default width for the length from 5 to 6,
to improve alignment/readability on systems with large tables. These
are being seen more frequently, especially large DSDTs (greater than
1 MB).
Empty lines are ignored by the utility. This change allows AcpiXtract
to correctly handle lines that contain simply one or more spaces as
empty lines. ACPICA BZ 1044.
This change implements wildcard support for this option. It also
removes the local implementation of wildcard expansion. This part
affects the windows version only. Windows version is now linked
to the setargv.obj library to get this support.
This change affects windows version only; AcpiExec now is linked
to the windows setargv.obj which implements wildcards. So, all
code related to wildcards is now removed.
iASL uses oswinxf also, where the original copy of these functions exist.
Does not seem to be worthwhile at this time to split these into a
separate file, but we don't want to link oswinxf into AcpiDump.
This patch cleans up ACPI_STATUS returned in the Linux version of AcpiDump.
These changes include:
1. AE_ACCESS is added to reflect requirement of root priviledge.
2. AE_BAD_ADDRESS is used where address is 0.
3. AE_BAD_SIGNATURE is returned where root cause of the error is the
signature.
4. AE_BAD_HEADER is returned especially on a failure of ApGetTableLength().
5. AE_INVALID_TABLE_LENGTH is returned when reading table content fails
while reading table header succeeds.
6. AE_ERROR is no longer used for the Linux version.
Some error prompts are also cleaned up in this patch. Lv Zheng.