Import ACPICA 20120215.
This commit is contained in:
parent
234358d949
commit
5437485bdb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-sys/acpica/dist/; revision=231798 svn path=/vendor-sys/acpica/20120215/; revision=231799; tag=vendor/acpica/20120215
4
README
4
README
@ -14,8 +14,8 @@ Documentation is available at acpica.org:
|
||||
http://www.acpica.org/documentation/
|
||||
|
||||
The acpica/source/tools directory contains the following utilities.
|
||||
Note: These utilities are tested and supported as 32-bit versions
|
||||
only.
|
||||
Note: These utilities are tested and supported in both 32-bit
|
||||
and 64-bit versions.
|
||||
|
||||
acpibin
|
||||
acpiexec
|
||||
|
92
changes.txt
92
changes.txt
@ -1,3 +1,95 @@
|
||||
----------------------------------------
|
||||
15 February 2012. Summary of changes for version 20120215:
|
||||
|
||||
This release is available at www.acpica.org/downloads.
|
||||
The ACPI 5.0 specification is available at www.acpi.info.
|
||||
|
||||
1) ACPICA Core Subsystem:
|
||||
|
||||
There have been some major changes to the sleep/wake support code, as
|
||||
described below (a - e).
|
||||
|
||||
a) The AcpiLeaveSleepState has been split into two interfaces, similar to
|
||||
AcpiEnterSleepStatePrep and AcpiEnterSleepState. The new interface is
|
||||
AcpiLeaveSleepStatePrep. This allows the host to perform actions between the
|
||||
time the _BFS method is called and the _WAK method is called. NOTE: all hosts
|
||||
must update their wake/resume code or else sleep/wake will not work properly.
|
||||
Rafael Wysocki.
|
||||
|
||||
b) In AcpiLeaveSleepState, now enable all runtime GPEs before calling the _WAK
|
||||
method. Some machines require that the GPEs are enabled before the _WAK method
|
||||
is executed. Thomas Renninger.
|
||||
|
||||
c) In AcpiLeaveSleepState, now always clear the WAK_STS (wake status) bit.
|
||||
Some BIOS code assumes that WAK_STS will be cleared on resume and use it to
|
||||
determine whether the system is rebooting or resuming. Matthew Garrett.
|
||||
|
||||
d) Move the invocations of _GTS (Going To Sleep) and _BFS (Back From Sleep) to
|
||||
match the ACPI specification requirement. Rafael Wysocki.
|
||||
|
||||
e) Implemented full support for the ACPI 5.0 SleepStatus and SleepControl
|
||||
registers within the V5 FADT. This support adds two new files:
|
||||
hardware/hwesleep.c implements the support for the new registers. Moved all
|
||||
sleep/wake external interfaces to hardware/hwxfsleep.c.
|
||||
|
||||
|
||||
Added a new OSL interface for ACPI table overrides,
|
||||
AcpiOsPhysicalTableOverride. This interface allows the host to override a
|
||||
table via a physical address, instead of the logical address required by
|
||||
AcpiOsTableOverride. This simplifies the host implementation. Initial
|
||||
implementation by Thomas Renninger. The ACPICA implementation creates a single
|
||||
shared function for table overrides that attempts both a logical and a
|
||||
physical override.
|
||||
|
||||
Expanded the OSL memory read/write interfaces to 64-bit data
|
||||
(AcpiOsReadMemory, AcpiOsWriteMemory.) This enables full 64-bit memory
|
||||
transfer support for GAS register structures passed to AcpiRead and AcpiWrite.
|
||||
|
||||
Implemented the ACPI_REDUCED_HARDWARE option to allow the creation of a custom
|
||||
build of ACPICA that supports only the ACPI 5.0 reduced hardware (SoC) model.
|
||||
See the ACPICA reference for details. ACPICA BZ 942. This option removes about
|
||||
10% of the code and 5% of the static data, and the following hardware ACPI
|
||||
features become unavailable:
|
||||
PM Event and Control registers
|
||||
SCI interrupt (and handler)
|
||||
Fixed Events
|
||||
General Purpose Events (GPEs)
|
||||
Global Lock
|
||||
ACPI PM timer
|
||||
FACS table (Waking vectors and Global Lock)
|
||||
|
||||
Updated the unix tarball directory structure to match the ACPICA git source
|
||||
tree. This ensures that the generic unix makefiles work properly (in
|
||||
generate/unix). Also updated the Linux makefiles to match. ACPICA BZ 867.
|
||||
|
||||
Updated the return value of the _REV predefined method to integer value 5 to
|
||||
reflect ACPI 5.0 support.
|
||||
|
||||
Moved the external ACPI PM timer interface prototypes to the public acpixf.h
|
||||
file where they belong.
|
||||
|
||||
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.
|
||||
|
||||
Previous Release:
|
||||
Non-Debug Version: 92.8K Code, 24.9K Data, 117.7K Total
|
||||
Debug Version: 171.7K Code, 72.9K Data, 244.5K Total
|
||||
Current Release:
|
||||
Non-Debug Version: 93.0K Code, 25.0K Data, 118.0K Total
|
||||
Debug Version: 172.5K Code, 73.2K Data, 245.7K Total
|
||||
|
||||
|
||||
2) iASL Compiler/Disassembler and Tools:
|
||||
|
||||
Disassembler: Fixed a problem with the new ACPI 5.0 serial resource
|
||||
descriptors (I2C, SPI, UART) where the resource produce/consumer bit was
|
||||
incorrectly displayed.
|
||||
|
||||
AcpiHelp: Add display of ACPI/PNP device IDs that are defined in the ACPI
|
||||
specification.
|
||||
|
||||
----------------------------------------
|
||||
11 January 2012. Summary of changes for version 20120111:
|
||||
|
||||
|
487
generate/release/build.sh
Executable file
487
generate/release/build.sh
Executable file
@ -0,0 +1,487 @@
|
||||
#!/bin/bash
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# ACPICA package generation script for Cygwin/Windows execution
|
||||
#
|
||||
# Requires cygwin be installed - http://www.cygwin.com
|
||||
# and its /bin be *first* in your path.
|
||||
#
|
||||
# Windows packages require pkzip25 (free, and is available from numerous
|
||||
# sources - search for "pkzip25" or "pkzip25.exe")
|
||||
#
|
||||
# Execute this script from the acpica/generate/release directory.
|
||||
#
|
||||
# Constructed packages are placed in the acpica/generate/release/current
|
||||
# directory.
|
||||
#
|
||||
# Line Terminators: Windows source packages leave the CR/LF terminator.
|
||||
# Unix packages convert the CR/LF terminators to LF only.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# build <package_type> <target_type>
|
||||
#
|
||||
# where:
|
||||
# <package_type> is one of:
|
||||
# source - Build an ACPICA source package (core and all tools)
|
||||
# test - Build an ACPICA test suite package
|
||||
# binary - Build an ACPICA binary tools package
|
||||
#
|
||||
# <target_type> is one of:
|
||||
# win - Generate Windows package (Intel license, CRLF line terminators)
|
||||
# unix - Generate Unix package (Intel license, LF line terminators)
|
||||
# unix2 - Generate Unix package (dual license, LF line terminators)
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
# Configuration
|
||||
|
||||
ZIP_UTILITY="c:/windows/pkzip25.exe"
|
||||
ACPISRC="libraries/acpisrc.exe"
|
||||
DOS2UNIX="dos2unix"
|
||||
UNIX2DOS="unix2dos"
|
||||
|
||||
# Filenames and paths
|
||||
|
||||
TARGET_DIR="generate/release/current"
|
||||
TEMP_DIR=acpitemp
|
||||
TEST_PREFIX=acpitests
|
||||
SOURCE_PREFIX=acpica
|
||||
BINARY_PREFIX=iasl
|
||||
PACKAGE_SUFFIX=`date +%Y%m%d`
|
||||
|
||||
NPARAM=$#
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# Miscellaneous utility functions
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "$1"
|
||||
echo
|
||||
echo "Low-level build script for ACPICA release packages"
|
||||
echo "Usage:"
|
||||
echo " $0 source <win | unix | unix2>"
|
||||
echo " $0 test <win | unix>"
|
||||
echo " $0 binary <win>"
|
||||
}
|
||||
|
||||
banner()
|
||||
{
|
||||
echo
|
||||
echo "$1"
|
||||
echo
|
||||
}
|
||||
|
||||
check_zip_utility_exists()
|
||||
{
|
||||
#
|
||||
# Need pkzip (or similar) to build the windows packages
|
||||
#
|
||||
if [ ! -e "$ZIP_UTILITY" ]; then
|
||||
echo "ZIP_UTILITY ($ZIP_UTILITY) does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
convert_to_unix_line_terminators()
|
||||
{
|
||||
#
|
||||
# Convert all CR/LF pairs to Unix format (LF only)
|
||||
#
|
||||
cd $TEMP_DIR
|
||||
echo Starting CR/LF to LF Conversion
|
||||
find . -name "*" | xargs $DOS2UNIX
|
||||
echo Completed CR/LF to LF Conversion
|
||||
cd ..
|
||||
}
|
||||
|
||||
convert_to_dos_line_terminators()
|
||||
{
|
||||
#
|
||||
# Convert all lone LF terminators to CR/LF
|
||||
# Note: Checks shell scripts only (*.sh)
|
||||
#
|
||||
cd $TEMP_DIR
|
||||
echo Starting LF to CR/LF Conversion
|
||||
find . -name "*.sh" | xargs $UNIX2DOS
|
||||
echo Completed LF to CR/LF Conversion
|
||||
cd ..
|
||||
}
|
||||
|
||||
insert_dual_license_headers()
|
||||
{
|
||||
#
|
||||
# Need acpisrc utility to insert the headers
|
||||
#
|
||||
if [ ! -e "$ACPISRC" ]; then
|
||||
echo "acpisrc ($ACPISRC) does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Insert the dual license into *.c and *.h files
|
||||
#
|
||||
echo "Inserting dual-license into all source files"
|
||||
$ACPISRC -h -y $TEMP_DIR
|
||||
}
|
||||
|
||||
build_unix_package()
|
||||
{
|
||||
convert_to_unix_line_terminators
|
||||
|
||||
#
|
||||
# Build release package
|
||||
#
|
||||
rm -r -f $PACKAGE_FILENAME
|
||||
mv $TEMP_DIR $PACKAGE_FILENAME
|
||||
tar czf $PACKAGE_FILENAME.tar.gz $PACKAGE_FILENAME
|
||||
|
||||
#
|
||||
# Move the completed package
|
||||
#
|
||||
mv $PACKAGE_FILENAME.tar.gz $TARGET_DIR
|
||||
mv $PACKAGE_FILENAME $TEMP_DIR
|
||||
}
|
||||
|
||||
build_windows_package()
|
||||
{
|
||||
convert_to_dos_line_terminators
|
||||
|
||||
#
|
||||
# Build release package
|
||||
#
|
||||
cd $TEMP_DIR
|
||||
rm -r -f ../$TARGET_DIR/$PACKAGE_FILENAME
|
||||
$ZIP_UTILITY -add -max -dir -sort=name ../$TARGET_DIR/$PACKAGE_FILENAME
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# generate_source_package
|
||||
#
|
||||
# Generates the ACPICA source code packages (core and all tools)
|
||||
#
|
||||
# Arguments:
|
||||
# %1 - Target type (win or unix or unix2)
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
generate_source_package ()
|
||||
{
|
||||
#
|
||||
# Parameter evaluation
|
||||
#
|
||||
if [ $1 == win ]; then
|
||||
PACKAGE_NAME=Windows
|
||||
PACKAGE_TYPE=Win
|
||||
LICENSE=Intel
|
||||
check_zip_utility_exists
|
||||
|
||||
elif [ $1 == unix ]; then
|
||||
PACKAGE_NAME="Unix (Intel License)"
|
||||
PACKAGE_TYPE=Unix
|
||||
LICENSE=Intel
|
||||
|
||||
elif [ $1 == unix2 ]; then
|
||||
PACKAGE_NAME="Unix (Dual License)"
|
||||
PACKAGE_TYPE=Unix
|
||||
LICENSE=Dual
|
||||
|
||||
else
|
||||
usage "Invalid argument ($1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_FILENAME=$SOURCE_PREFIX-$1-$PACKAGE_SUFFIX
|
||||
banner "ACPICA - Generating $PACKAGE_NAME source code package ($PACKAGE_FILENAME)"
|
||||
|
||||
#
|
||||
# Make directories common to all source packages
|
||||
#
|
||||
mkdir $TEMP_DIR
|
||||
mkdir $TEMP_DIR/libraries
|
||||
mkdir $TEMP_DIR/generate
|
||||
mkdir $TEMP_DIR/generate/lint
|
||||
mkdir $TEMP_DIR/generate/release
|
||||
mkdir $TEMP_DIR/generate/unix
|
||||
mkdir $TEMP_DIR/generate/unix/acpibin
|
||||
mkdir $TEMP_DIR/generate/unix/acpiexec
|
||||
mkdir $TEMP_DIR/generate/unix/acpihelp
|
||||
mkdir $TEMP_DIR/generate/unix/acpinames
|
||||
mkdir $TEMP_DIR/generate/unix/acpisrc
|
||||
mkdir $TEMP_DIR/generate/unix/acpixtract
|
||||
mkdir $TEMP_DIR/generate/unix/iasl
|
||||
mkdir $TEMP_DIR/tests
|
||||
mkdir $TEMP_DIR/tests/misc
|
||||
mkdir $TEMP_DIR/tests/templates
|
||||
mkdir -p $TEMP_DIR/source/os_specific/service_layers
|
||||
|
||||
#
|
||||
# Copy ACPICA subsystem source code
|
||||
#
|
||||
cp -r documents/changes.txt $TEMP_DIR/changes.txt
|
||||
cp -r source/common $TEMP_DIR/source/common
|
||||
cp -r source/components $TEMP_DIR/source/
|
||||
cp -r source/include $TEMP_DIR/source/include
|
||||
cp -r generate/release/*.sh $TEMP_DIR/generate/release
|
||||
|
||||
#
|
||||
# Copy iASL compiler and tools source
|
||||
#
|
||||
cp -r source/compiler $TEMP_DIR/source/compiler
|
||||
cp -r source/tools $TEMP_DIR/source/tools
|
||||
|
||||
#
|
||||
# Copy iASL/ACPICA miscellaneous tests (not full test suites)
|
||||
#
|
||||
cp -r tests/misc/*.asl $TEMP_DIR/tests/misc
|
||||
cp -r tests/templates/Makefile $TEMP_DIR/tests/templates
|
||||
cp -r tests/templates/templates.sh $TEMP_DIR/tests/templates
|
||||
|
||||
#
|
||||
# Copy all OS-specific interfaces
|
||||
#
|
||||
cp source/os_specific/service_layers/*.c $TEMP_DIR/source/os_specific/service_layers
|
||||
|
||||
#
|
||||
# Copy generic UNIX makefiles
|
||||
#
|
||||
cp generate/unix/readme.txt $TEMP_DIR/generate/unix/readme.txt
|
||||
cp generate/unix/Makefile* $TEMP_DIR/generate/unix
|
||||
cp generate/unix/acpibin/Makefile $TEMP_DIR/generate/unix/acpibin
|
||||
cp generate/unix/acpiexec/Makefile $TEMP_DIR/generate/unix/acpiexec
|
||||
cp generate/unix/acpihelp/Makefile $TEMP_DIR/generate/unix/acpihelp
|
||||
cp generate/unix/acpinames/Makefile $TEMP_DIR/generate/unix/acpinames
|
||||
cp generate/unix/acpisrc/Makefile $TEMP_DIR/generate/unix/acpisrc
|
||||
cp generate/unix/acpixtract/Makefile $TEMP_DIR/generate/unix/acpixtract
|
||||
cp generate/unix/iasl/Makefile $TEMP_DIR/generate/unix/iasl
|
||||
|
||||
#
|
||||
# Copy Lint directory
|
||||
#
|
||||
cp -r generate/lint $TEMP_DIR/generate
|
||||
rm -f $TEMP_DIR/generate/lint/co*
|
||||
rm -f $TEMP_DIR/generate/lint/env*
|
||||
rm -f $TEMP_DIR/generate/lint/lib*
|
||||
rm -f $TEMP_DIR/generate/lint/LintOut.txt
|
||||
|
||||
if [ $PACKAGE_TYPE == Unix ]; then
|
||||
#
|
||||
# Unix/Linux-specific activities
|
||||
#
|
||||
|
||||
# Copy Linux/UNIX utility generation makefiles
|
||||
|
||||
cp generate/linux/Makefile.acpibin $TEMP_DIR/source/tools/acpibin/Makefile
|
||||
cp generate/linux/Makefile.acpiexec $TEMP_DIR/source/tools/acpiexec/Makefile
|
||||
cp generate/linux/Makefile.acpihelp $TEMP_DIR/source/tools/acpihelp/Makefile
|
||||
cp generate/linux/Makefile.acpinames $TEMP_DIR/source/tools/acpinames/Makefile
|
||||
cp generate/linux/Makefile.acpisrc $TEMP_DIR/source/tools/acpisrc/Makefile
|
||||
cp generate/linux/Makefile.acpixtract $TEMP_DIR/source/tools/acpixtract/Makefile
|
||||
cp generate/linux/Makefile.iasl $TEMP_DIR/source/compiler/Makefile
|
||||
cp generate/linux/README.acpica-unix $TEMP_DIR/README
|
||||
|
||||
#
|
||||
# For Unix2 case, insert the dual license header into all source files
|
||||
#
|
||||
if [ $LICENSE == Dual ]; then
|
||||
insert_dual_license_headers
|
||||
fi
|
||||
|
||||
build_unix_package
|
||||
|
||||
else
|
||||
#
|
||||
# Windows-specific activities
|
||||
#
|
||||
|
||||
# Copy project files for MS Visual Studio 2008 (VC++ 9.0)
|
||||
|
||||
mkdir $TEMP_DIR/generate/msvc9
|
||||
cp -r generate/msvc9/*.sln $TEMP_DIR/generate/msvc9/
|
||||
cp -r generate/msvc9/*.vcproj $TEMP_DIR/generate/msvc9/
|
||||
|
||||
build_windows_package
|
||||
fi
|
||||
|
||||
banner "ACPICA - Completed $PACKAGE_NAME source code package ($PACKAGE_FILENAME)"
|
||||
}
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# generate_test_package
|
||||
#
|
||||
# Generates the ACPICA test suite packages
|
||||
#
|
||||
# Arguments:
|
||||
# %1 - Target type (win or unix)
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
generate_test_package()
|
||||
{
|
||||
#
|
||||
# Parameter evaluation
|
||||
#
|
||||
if [ $1 == win ]; then
|
||||
PACKAGE_NAME=Windows
|
||||
PACKAGE_TYPE=Win
|
||||
check_zip_utility_exists
|
||||
|
||||
elif [ $1 == unix ]; then
|
||||
PACKAGE_NAME="Unix"
|
||||
PACKAGE_TYPE=Unix
|
||||
|
||||
else
|
||||
usage "Invalid argument ($1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_FILENAME=$TEST_PREFIX-$1-$PACKAGE_SUFFIX
|
||||
banner "ACPICA - Generating $PACKAGE_NAME test suite package ($PACKAGE_FILENAME)"
|
||||
|
||||
#
|
||||
# Copy the ASL Test source
|
||||
#
|
||||
mkdir $TEMP_DIR
|
||||
cp -r tests $TEMP_DIR/tests
|
||||
|
||||
#
|
||||
# Delete extraneous files
|
||||
#
|
||||
cd $TEMP_DIR
|
||||
find . -name "tmp" | xargs rm -r -f
|
||||
find . -name "aml" | xargs rm -r -f
|
||||
find . -name "CVS" | xargs rm -r -f
|
||||
cd ..
|
||||
|
||||
if [ $PACKAGE_TYPE == Unix ]; then
|
||||
#
|
||||
# Unix/Linux-specific activities
|
||||
#
|
||||
build_unix_package
|
||||
|
||||
else
|
||||
#
|
||||
# Windows-specific activities
|
||||
#
|
||||
build_windows_package
|
||||
fi
|
||||
|
||||
banner "ACPICA - Completed $PACKAGE_NAME test suite package ($PACKAGE_FILENAME)"
|
||||
}
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# generate_binary_package
|
||||
#
|
||||
# Generates the ACPICA binary package (Currently Windows only)
|
||||
#
|
||||
# Arguments:
|
||||
# %1 - Target type (win)
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
generate_binary_package()
|
||||
{
|
||||
#
|
||||
# Parameter evaluation
|
||||
#
|
||||
if [ $1 == win ]; then
|
||||
PACKAGE_NAME=Windows
|
||||
PACKAGE_TYPE=Win
|
||||
check_zip_utility_exists
|
||||
|
||||
else
|
||||
usage "Invalid argument ($1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_FILENAME=$BINARY_PREFIX-$1-$PACKAGE_SUFFIX
|
||||
banner "ACPICA - Generating $PACKAGE_NAME binary tools package ($PACKAGE_FILENAME)"
|
||||
|
||||
#
|
||||
# Copy executables and documentation
|
||||
#
|
||||
mkdir $TEMP_DIR
|
||||
cp -r documents/changes.txt $TEMP_DIR/changes.txt
|
||||
cp documents/aslcompiler.pdf $TEMP_DIR
|
||||
cp libraries/acpibin.exe $TEMP_DIR
|
||||
cp libraries/acpiexec.exe $TEMP_DIR
|
||||
cp libraries/acpihelp.exe $TEMP_DIR
|
||||
cp libraries/acpinames.exe $TEMP_DIR
|
||||
cp libraries/acpisrc.exe $TEMP_DIR
|
||||
cp libraries/acpixtract.exe $TEMP_DIR
|
||||
cp libraries/iasl.exe $TEMP_DIR
|
||||
cp tests/misc/badcode.asl $TEMP_DIR
|
||||
|
||||
build_windows_package
|
||||
banner "ACPICA - Completed $PACKAGE_NAME binary tools package ($PACKAGE_FILENAME)"
|
||||
}
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# main
|
||||
#
|
||||
# Arguments:
|
||||
# $1 (package_type) is one of:
|
||||
# source - Build an ACPICA source package (core and all tools)
|
||||
# test - Build an ACPICA test suite package
|
||||
# binary - Build an ACPICA binary tools package
|
||||
#
|
||||
# $2 (target_type) is one of:
|
||||
# win - Generate Windows package (Intel license, CRLF line terminators)
|
||||
# unix - Generate Unix package (Intel license, LF line terminators)
|
||||
# unix2 - Generate Unix package (dual license, LF line terminators)
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
set -e # Abort on any error
|
||||
|
||||
if [ $NPARAM -ne 2 ]; then
|
||||
usage "Wrong argument count ($NPARAM)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# cd from acpica/generate/release to acpica
|
||||
#
|
||||
cd ../..
|
||||
|
||||
#
|
||||
# Ensure that the temporary directory is created fresh
|
||||
#
|
||||
rm -rf $TEMP_DIR
|
||||
|
||||
#
|
||||
# Parameter evaluation
|
||||
#
|
||||
if [ $1 == source ]; then
|
||||
generate_source_package $2
|
||||
|
||||
elif [ $1 == test ]; then
|
||||
generate_test_package $2
|
||||
|
||||
elif [ $1 == binary ]; then
|
||||
generate_binary_package $2
|
||||
|
||||
else
|
||||
usage "Invalid argument ($1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Remove temporary directory
|
||||
#
|
||||
rm -rf $TEMP_DIR
|
146
generate/release/release.sh
Executable file
146
generate/release/release.sh
Executable file
@ -0,0 +1,146 @@
|
||||
#!/bin/bash
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# ACPICA release generation script for Cygwin/Windows execution
|
||||
#
|
||||
# front end for build.sh
|
||||
#
|
||||
# Copies any existing packages to the archive directory.
|
||||
#
|
||||
# Generates 3 types of package:
|
||||
# 1) Standard ACPICA source, everything except test suites
|
||||
# 2) ACPICA test suites (very large)
|
||||
# 3) Windows binary tools (Windows does not include generation tools)
|
||||
#
|
||||
# Note: "unix" generation builds the source with the standard Intel license
|
||||
# in each file header. "unix2" builds the source with the dual license instead.
|
||||
# this has been requested by some OS vendors, notably FreeBSD.
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
# Configuration
|
||||
|
||||
NPARAM=$#
|
||||
BUILD_TESTS=1
|
||||
|
||||
# Filenames and paths
|
||||
|
||||
ARCHIVE_DIR=archive
|
||||
RELEASE_DIR=current
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# Miscellaneous utility functions
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "$1"
|
||||
echo
|
||||
echo "Master script to create ACPICA release packages"
|
||||
echo "Usage:"
|
||||
echo " $0 [notest]"
|
||||
}
|
||||
|
||||
move_all_files_to_archive()
|
||||
{
|
||||
cd $RELEASE_DIR
|
||||
|
||||
for file in *
|
||||
do
|
||||
if [ -d $file ]; then
|
||||
rm -r -f ../$ARCHIVE_DIR/$file
|
||||
mv -f $file ../$ARCHIVE_DIR
|
||||
echo "Moved directory $file to $ARCHIVE_DIR directory"
|
||||
else
|
||||
cp $file ../$ARCHIVE_DIR
|
||||
echo "Moved $file ($(ls -al $file | awk '{print $5}') bytes) to $ARCHIVE_DIR directory"
|
||||
rm $file
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# main
|
||||
#
|
||||
# Arguments:
|
||||
# $1 (optional) notest - do not generate the ACPICA test suite packages
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
set -e # Abort on any error
|
||||
|
||||
#
|
||||
# Parameter evaluation
|
||||
#
|
||||
if [ $NPARAM -gt 1 ]; then
|
||||
usage "Wrong argument count ($NPARAM)"
|
||||
exit 1
|
||||
|
||||
elif [ $NPARAM -eq 1 ]; then
|
||||
if [ $1 == notest ]; then
|
||||
BUILD_TESTS=0
|
||||
else
|
||||
usage "Invalid argument ($1)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Move and preserve any previous versions of the various release packages
|
||||
#
|
||||
if [ -e $RELEASE_DIR ]; then
|
||||
|
||||
# Create archive directory if necessary
|
||||
|
||||
mkdir -p $ARCHIVE_DIR
|
||||
|
||||
#
|
||||
# Save any older versions of the release packages
|
||||
#
|
||||
if [ "$(ls -A $RELEASE_DIR)" ]; then
|
||||
echo "Moving previous packages to $ARCHIVE_DIR directory"
|
||||
|
||||
move_all_files_to_archive
|
||||
echo "Completed move of previous packages to $ARCHIVE_DIR directory"
|
||||
fi
|
||||
|
||||
else
|
||||
# Just create the release directory
|
||||
mkdir -p $RELEASE_DIR
|
||||
fi
|
||||
|
||||
# ACPICA source code (core subsystem and all tools/utilities)
|
||||
|
||||
bash build.sh source win
|
||||
bash build.sh source unix
|
||||
bash build.sh source unix2
|
||||
|
||||
# Optionally build the test suite packages (built by default)
|
||||
|
||||
if [ $BUILD_TESTS -eq 1 ]; then
|
||||
|
||||
# ACPICA test suites (A unix2 build has not been requested by users)
|
||||
|
||||
bash build.sh test win
|
||||
bash build.sh test unix
|
||||
|
||||
else
|
||||
echo "**** Test suites not built because the notest option was used"
|
||||
fi
|
||||
|
||||
# ACPICA binary tools (Windows only)
|
||||
|
||||
bash build.sh binary win
|
||||
|
||||
echo
|
||||
echo "ACPICA - Summary of generated packages:"
|
||||
echo
|
||||
ls $RELEASE_DIR -g -G -t
|
@ -117,12 +117,14 @@ OBJECTS = \
|
||||
$(OBJDIR)/exutils.o \
|
||||
$(OBJDIR)/getopt.o \
|
||||
$(OBJDIR)/hwacpi.o \
|
||||
$(OBJDIR)/hwesleep.o \
|
||||
$(OBJDIR)/hwgpe.o \
|
||||
$(OBJDIR)/hwpci.o \
|
||||
$(OBJDIR)/hwregs.o \
|
||||
$(OBJDIR)/hwsleep.o \
|
||||
$(OBJDIR)/hwvalid.o \
|
||||
$(OBJDIR)/hwxface.o \
|
||||
$(OBJDIR)/hwxfsleep.o \
|
||||
$(OBJDIR)/nsaccess.o \
|
||||
$(OBJDIR)/nsalloc.o \
|
||||
$(OBJDIR)/nsdump.o \
|
||||
|
@ -1,9 +1,8 @@
|
||||
#
|
||||
# iASL compiler/disassembler
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
# NOTE: This makefile is intended to be used within the native
|
||||
# ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
@ -21,19 +20,21 @@ HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ..
|
||||
ACPICA_INCLUDE = $(ACPICA_SRC)/include
|
||||
ACPICA_SRC = ../../source
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
ACPICA_CORE = $(ACPICA_SRC)/components
|
||||
ACPICA_INCLUDE = $(ACPICA_SRC)/include
|
||||
ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
|
||||
ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
|
||||
ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
|
||||
ACPICA_EVENTS = $(ACPICA_CORE)/events
|
||||
ACPICA_EXECUTER = $(ACPICA_CORE)/executer
|
||||
ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
|
||||
ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
|
||||
ACPICA_PARSER = $(ACPICA_CORE)/parser
|
||||
ACPICA_RESOURCES = $(ACPICA_CORE)/resources
|
||||
ACPICA_TABLES = $(ACPICA_CORE)/tables
|
||||
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
|
||||
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
@ -192,7 +192,7 @@ RsGetVendorData (
|
||||
UINT16 ActualLength = 0;
|
||||
|
||||
|
||||
/* VendorData field is always optional */
|
||||
/* Vendor Data field is always optional */
|
||||
|
||||
if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
|
||||
{
|
||||
@ -374,7 +374,7 @@ RsDoGpioIntDescriptor (
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
|
||||
break;
|
||||
|
||||
case 4: /* DebounceTimeout [WORD] (_DBT) */
|
||||
case 4: /* Debounce Timeout [WORD] (_DBT) */
|
||||
|
||||
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
||||
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
||||
@ -405,7 +405,7 @@ RsDoGpioIntDescriptor (
|
||||
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
||||
break;
|
||||
|
||||
case 8: /* ResourceTag (Descriptor Name) */
|
||||
case 8: /* Resource Tag (Descriptor Name) */
|
||||
|
||||
UtAttachNamepathToOwner (Op, InitializerOp);
|
||||
break;
|
||||
@ -566,7 +566,7 @@ RsDoGpioIoDescriptor (
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
|
||||
break;
|
||||
|
||||
case 2: /* DebounceTimeout [WORD] (_DBT) */
|
||||
case 2: /* Debounce Timeout [WORD] (_DBT) */
|
||||
|
||||
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
||||
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
||||
@ -611,7 +611,7 @@ RsDoGpioIoDescriptor (
|
||||
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
||||
break;
|
||||
|
||||
case 8: /* ResourceTag (Descriptor Name) */
|
||||
case 8: /* Resource Tag (Descriptor Name) */
|
||||
|
||||
UtAttachNamepathToOwner (Op, InitializerOp);
|
||||
break;
|
||||
@ -762,14 +762,14 @@ RsDoI2cSerialBusDescriptor (
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 0);
|
||||
break;
|
||||
|
||||
case 2: /* ConnectionSpeed [DWORD] (_SPE) */
|
||||
case 2: /* Connection Speed [DWORD] (_SPE) */
|
||||
|
||||
Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
||||
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
|
||||
break;
|
||||
|
||||
case 3: /* Addresssing Mode [Flag] (_MOD) */
|
||||
case 3: /* Addressing Mode [Flag] (_MOD) */
|
||||
|
||||
RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
||||
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
||||
@ -800,7 +800,7 @@ RsDoI2cSerialBusDescriptor (
|
||||
RsSetFlagBits (&Descriptor->I2cSerialBus.Flags, InitializerOp, 1, 1);
|
||||
break;
|
||||
|
||||
case 7: /* ResourceTag (Descriptor Name) */
|
||||
case 7: /* Resource Tag (Descriptor Name) */
|
||||
|
||||
UtAttachNamepathToOwner (Op, InitializerOp);
|
||||
break;
|
||||
@ -929,7 +929,7 @@ RsDoSpiSerialBusDescriptor (
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.Flags), 0);
|
||||
break;
|
||||
|
||||
case 5: /* ConnectionSpeed [DWORD] (_SPE) */
|
||||
case 5: /* Connection Speed [DWORD] (_SPE) */
|
||||
|
||||
Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
||||
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
||||
@ -974,7 +974,7 @@ RsDoSpiSerialBusDescriptor (
|
||||
RsSetFlagBits (&Descriptor->SpiSerialBus.Flags, InitializerOp, 1, 1);
|
||||
break;
|
||||
|
||||
case 11: /* ResourceTag (Descriptor Name) */
|
||||
case 11: /* Resource Tag (Descriptor Name) */
|
||||
|
||||
UtAttachNamepathToOwner (Op, InitializerOp);
|
||||
break;
|
||||
@ -1068,7 +1068,7 @@ RsDoUartSerialBusDescriptor (
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: /* ConnectionSpeed (Baud Rate) [DWORD] (_SPE) */
|
||||
case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
|
||||
|
||||
Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
|
||||
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
||||
@ -1165,7 +1165,7 @@ RsDoUartSerialBusDescriptor (
|
||||
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.Flags), 0);
|
||||
break;
|
||||
|
||||
case 12: /* ResourceTag (Descriptor Name) */
|
||||
case 12: /* Resource Tag (Descriptor Name) */
|
||||
|
||||
UtAttachNamepathToOwner (Op, InitializerOp);
|
||||
break;
|
@ -127,13 +127,6 @@ AcpiDsStoreObjectToLocal (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvDeleteGpeBlock (
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvQueueNotifyRequest (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
@ -149,6 +142,14 @@ AcpiEvIsNotifyObject (
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
ACPI_STATUS
|
||||
AcpiEvDeleteGpeBlock (
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvAcquireGlobalLock (
|
||||
UINT16 Timeout)
|
||||
@ -162,6 +163,7 @@ AcpiEvReleaseGlobalLock (
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInitializeRegion (
|
@ -161,28 +161,49 @@ AcpiDbSleep (
|
||||
UINT8 SleepState;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiDbSleep);
|
||||
|
||||
|
||||
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
|
||||
|
||||
AcpiOsPrintf ("**** Prepare to sleep ****\n");
|
||||
Status = AcpiEnterSleepStatePrep (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("**** Going to sleep ****\n");
|
||||
Status = AcpiEnterSleepState (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("**** returning from sleep ****\n");
|
||||
AcpiOsPrintf ("**** Prepare to return from sleep ****\n");
|
||||
Status = AcpiLeaveSleepStatePrep (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("**** Returning from sleep ****\n");
|
||||
Status = AcpiLeaveSleepState (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
return (Status);
|
||||
|
||||
|
||||
ErrorExit:
|
||||
|
||||
ACPI_EXCEPTION ((AE_INFO, Status, "During sleep test"));
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDisplayLocks
|
||||
@ -1019,6 +1040,7 @@ AcpiDbDisplayResources (
|
||||
}
|
||||
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbGenerateGpe
|
||||
@ -1057,5 +1079,6 @@ AcpiDbGenerateGpe (
|
||||
|
||||
(void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber);
|
||||
}
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
#endif /* ACPI_DEBUGGER */
|
@ -770,6 +770,7 @@ AcpiDbDisplayArgumentObject (
|
||||
}
|
||||
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDisplayGpes
|
||||
@ -932,6 +933,7 @@ AcpiDbDisplayGpes (
|
||||
GpeXruptInfo = GpeXruptInfo->Next;
|
||||
}
|
||||
}
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -1011,6 +1013,8 @@ AcpiDbDisplayHandlers (
|
||||
}
|
||||
}
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
|
||||
/* Fixed event handlers */
|
||||
|
||||
AcpiOsPrintf ("\nFixed Event Handlers:\n");
|
||||
@ -1029,6 +1033,8 @@ AcpiDbDisplayHandlers (
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
/* Miscellaneous global handlers */
|
||||
|
||||
AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
|
@ -662,12 +662,15 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_ENABLEACPI:
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
|
||||
Status = AcpiEnable();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
|
||||
return (Status);
|
||||
}
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
break;
|
||||
|
||||
case CMD_EVENT:
|
@ -503,7 +503,7 @@ AcpiDmI2cSerialBusDescriptor (
|
||||
AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
|
||||
|
||||
AcpiOsPrintf ("%s, ",
|
||||
AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags & 1)]);
|
||||
AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags >> 1) & 1]);
|
||||
|
||||
/* Insert a descriptor name */
|
||||
|
||||
@ -578,7 +578,7 @@ AcpiDmSpiSerialBusDescriptor (
|
||||
AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
|
||||
|
||||
AcpiOsPrintf ("%s, ",
|
||||
AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags & 1)]);
|
||||
AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags >> 1) & 1]);
|
||||
|
||||
/* Insert a descriptor name */
|
||||
|
||||
@ -656,7 +656,7 @@ AcpiDmUartSerialBusDescriptor (
|
||||
AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
|
||||
|
||||
AcpiOsPrintf ("%s, ",
|
||||
AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags & 1)]);
|
||||
AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags >> 1) & 1]);
|
||||
|
||||
/* Insert a descriptor name */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user