Initial import (#904843).

This commit is contained in:
Al Stone 2013-08-28 13:31:28 -06:00
parent 364a1993b1
commit afae4e7dc3
20 changed files with 4979 additions and 0 deletions

2
.gitignore vendored
View File

@ -0,0 +1,2 @@
/acpica-unix2-20130823.tar.gz
/acpitests-unix-20130823.tar.gz

339
COPYING Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

26
README.Fedora Normal file
View File

@ -0,0 +1,26 @@
Packaging Notes for Fedora
==========================
The upstream source contains documentation that may or may not be licensed
in a freely redistributable manner. In an excess of caution, the manuals in
question have been removed from the source we start with. You can still get
your own copies of the documentation from here:
https://www.acpica.org/documentation/
The two manuals affected are:
(1) ACPICA Reference Manual, describing the ACPI Component Architecture
in some detail, and
(2) ASL Compiler Reference Manual, describing how to use iasl
While there are man pages for the commands, they are very brief. The
documents above are recommended reading.
Test Cases
==========
The aapits tests do not currently build properly. They will be added to
this package once they do. In the meantime, ASL, template and misc tests
will be run as part of %check.

530
aapits-linux.patch Normal file
View File

@ -0,0 +1,530 @@
diff -urN acpica-unix2-20130626/tests/aapits/atexec.c acpica-unix2-20130626-aapits/tests/aapits/atexec.c
--- acpica-unix2-20130626/tests/aapits/atexec.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atexec.c 2013-07-25 13:44:23.023894441 -0600
@@ -530,6 +530,7 @@
}
+#if ACPI_MACHINE_WIDTH == 32
/*******************************************************************************
*
* FUNCTION: AtBuildLocalRSDT
@@ -648,8 +649,9 @@
LocalRSDT->Header.Checksum = (UINT8)~LocalRSDT->Header.Checksum;
}
}
+#endif
/*******************************************************************************
*
* FUNCTION: AtBuildLocalXSDT
@@ -1315,7 +1319,7 @@
ACPI_WARNING ((AE_INFO,
"Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, Len-%X\n",
(RegionObject->Region.Node)->Name.Ascii, (UINT32) Address,
- ByteWidth, (UINT32) BufferAddress, Length));
+ ByteWidth, (UINT32) BufferAddress, (UINT32) Length));
return (AE_AML_REGION_LIMIT);
}
@@ -1683,7 +1687,9 @@
Path, Obj.Integer.Value, Value);
#else
printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
- Path, Obj.Integer.Value, Value);
+ Path,
+ (long long unsigned int) Obj.Integer.Value,
+ (long long unsigned int) Value);
#endif
Status = AE_ERROR;
}
@@ -1762,7 +1768,7 @@
{
TestErrors++;
printf ("Test Error: cannot allocate buffer of %d bytes\n",
- Results.Length);
+ (int) Results.Length);
return (AE_NO_MEMORY);
}
Results.Pointer = Object;
@@ -1843,7 +1849,8 @@
{
printf ("AtCheckBuffer: unexpected length %d of Buffer vs"
" calculated %d bytes\n",
- Results.Length, ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length));
+ (int)Results.Length,
+ (int)(ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length)));
}
/* Initialize the return buffer structure */
@@ -1852,7 +1859,7 @@
{
TestErrors++;
printf ("Test Error: cannot allocate buffer of %d bytes\n",
- Results.Length);
+ (int) Results.Length);
return (AE_NO_MEMORY);
}
Results.Pointer = Object;
diff -urN acpica-unix2-20130626/tests/aapits/atinit.c acpica-unix2-20130626-aapits/tests/aapits/atinit.c
--- acpica-unix2-20130626/tests/aapits/atinit.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atinit.c 2013-07-25 13:20:19.706705960 -0600
@@ -2915,7 +2915,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
@@ -2937,7 +2937,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
@@ -2957,7 +2957,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
else if (OutBuffer.Pointer != &Info)
@@ -3040,7 +3040,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
else if (OutBuffer.Pointer != &Info)
@@ -3105,7 +3105,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (ACPI_SYSTEM_INFO));
+ (int) OutBuffer.Length, (int) sizeof (ACPI_SYSTEM_INFO));
return (AE_ERROR);
}
else
diff -urN acpica-unix2-20130626/tests/aapits/atmain.c acpica-unix2-20130626-aapits/tests/aapits/atmain.c
--- acpica-unix2-20130626/tests/aapits/atmain.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atmain.c 2013-07-25 13:18:22.083323948 -0600
@@ -206,7 +206,7 @@
{
printf ("ACPICA API TS err: test num %ld of test case %ld"
" is not implemented\n",
- test_num, test_case);
+ (long int) test_num, (long int) test_case);
return (AtRetNotImpl);
}
@@ -321,7 +323,7 @@
if (test_case < 1 || test_case > AT_TEST_CASE_NUM)
{
printf ("ACPICA API TS err: test case %ld is out of range 1 - %d\n",
- test_case, AT_TEST_CASE_NUM);
+ (long int) test_case, (int) AT_TEST_CASE_NUM);
return (AtRetBadParam);
}
@@ -329,7 +331,7 @@
if (test_num < 0 || test_num > AtTestCase[test_case].TestsNum)
{
printf ("ACPICA API TS err: test num %ld is out of range 0 - %d\n",
- test_num, AtTestCase[test_case].TestsNum);
+ (long int) test_num, AtTestCase[test_case].TestsNum);
return (AtRetBadParam);
}
diff -urN acpica-unix2-20130626/tests/aapits/atnamespace.c acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c
--- acpica-unix2-20130626/tests/aapits/atnamespace.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c 2013-07-25 13:24:15.366466707 -0600
@@ -2426,7 +2426,8 @@
#else
printf ("API Error: Address of %s (0x%llX) != (0x%llX)\n",
PathNames[2 * i + 1],
- Info->Address, ExpectedInfo[i].Address);
+ (long long unsigned int) Info->Address,
+ (long long unsigned int) ExpectedInfo[i].Address);
#endif
#else
printf ("API Error: Address of %s (0x%X) != (0x%X)\n",
@@ -2799,7 +2800,8 @@
TestErrors++;
printf ("AtGetNextObjectTypeCommon: different numbers of entities"
"in TypesNames (%d) and LevelTypes0000 (%d)\n",
- TypesCount, sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE));
+ TypesCount,
+ (int) (sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE)));
return (AE_ERROR);
}
@@ -4083,7 +4085,9 @@
Pathname, Obj.Integer.Value, Value);
#else
printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
- Pathname, Obj.Integer.Value, Value);
+ Pathname,
+ (long long unsigned int) Obj.Integer.Value,
+ (long long unsigned int) Value);
#endif
Status = AE_ERROR;
}
@@ -5090,7 +5094,7 @@
{
AapiErrors++;
printf ("API Error: AcpiOsAllocate(%d) returned NULL\n",
- OutName.Length);
+ (int) OutName.Length);
return (AE_ERROR);
}
}
diff -urN acpica-unix2-20130626/tests/aapits/atosxfctrl.c acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c
--- acpica-unix2-20130626/tests/aapits/atosxfctrl.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c 2013-07-25 13:30:00.375492751 -0600
@@ -622,13 +622,15 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%I64x\n",
+ Width, Address);
#else
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%llx\n",
+ Width, (long long unsigned int) Address);
#endif
#else
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%x\n",
-#endif
Width, Address);
+#endif
return (NULL);
}
@@ -649,15 +651,19 @@
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: intersection Regs (0x%I64x: 0x%x)"
" and (0x%I64x: 0x%x)\n",
+ Reg->Address, Reg->Width, Address, Width);
#else
printf("OsxfCtrlFingReg: intersection Regs (0x%llx: 0x%x)"
" and (0x%llx: 0x%x)\n",
+ (long long unsigned int) Reg->Address,
+ Reg->Width,
+ (long long unsigned int) Address, Width);
#endif
#else
printf("OsxfCtrlFingReg: intersection Regs (0x%x: 0x%x)"
" and (0x%x: 0x%x)\n",
-#endif
Reg->Address, Reg->Width, Address, Width);
+#endif
return (NULL);
}
}
@@ -671,13 +677,15 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: no memory for Reg (0x%I64x: 0x%x)\n",
+ Reg->Address, Reg->Width);
#else
printf("OsxfCtrlFingReg: no memory for Reg (0x%llx: 0x%x)\n",
+ (long long unsigned int) Reg->Address, Reg->Width);
#endif
#else
printf("OsxfCtrlFingReg: no memory for Reg (0x%x: 0x%x)\n",
-#endif
Reg->Address, Reg->Width);
+#endif
return (NULL);
}
Reg->Type = Type;
@@ -817,14 +825,19 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("%.2u (%s Address 0x%I64x: Width %.2u) r/w counts: %u/%u\n",
+ i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
+ Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
#else
printf("%.2u (%s Address 0x%llx: Width %.2u) r/w counts: %u/%u\n",
+ i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
+ (long long unsigned int) Reg->Address,
+ Reg->Width, Reg->ReadCount, Reg->WriteCount);
#endif
#else
printf("%.2u (%s Address 0x%.4x: Width %.2u) r/w counts: %u/%u\n",
-#endif
i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
+#endif
Reg = Reg->Next;
i++;
}
diff -urN acpica-unix2-20130626/tests/aapits/atresource.c acpica-unix2-20130626-aapits/tests/aapits/atresource.c
--- acpica-unix2-20130626/tests/aapits/atresource.c 2013-01-17 12:48:29.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atresource.c 2013-07-25 13:25:49.423565947 -0600
@@ -65,7 +65,7 @@
AapiErrors++;
printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -381,7 +381,7 @@
AapiErrors++;
printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -580,7 +580,7 @@
AapiErrors++;
printf ("Api Error: Resource->Length (%d) != %d\n",
CurrentResource->Length,
- ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ)));
+ (int) (ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ))));
}
if (CurrentResource->Data.Irq.Triggering != 0) /* Level-Triggered */
@@ -872,7 +872,7 @@
AapiErrors++;
printf ("API Error: AcpiGetPossibleResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -1814,7 +1814,7 @@
AapiErrors++;
printf ("API Error: AcpiGetIrqRoutingTable(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, 0xA48);
+ Pathname, (int) OutBuffer.Length, 0xA48);
return (AE_ERROR);
}
diff -urN acpica-unix2-20130626/tests/aapits/Makefile acpica-unix2-20130626-aapits/tests/aapits/Makefile
--- acpica-unix2-20130626/tests/aapits/Makefile 2013-01-17 12:48:29.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/Makefile 2013-07-25 15:17:09.309236422 -0600
@@ -20,37 +20,52 @@
../../source/components/hardware/hwxface.c \
../../source/common/getopt.c \
../../source/components/debugger/dbcmds.c \
+ ../../source/components/debugger/dbconvert.c \
../../source/components/debugger/dbdisply.c \
../../source/components/debugger/dbexec.c \
../../source/components/debugger/dbfileio.c \
../../source/components/debugger/dbhistry.c \
../../source/components/debugger/dbinput.c \
+ ../../source/components/debugger/dbmethod.c \
+ ../../source/components/debugger/dbnames.c \
../../source/components/debugger/dbstats.c \
../../source/components/debugger/dbutils.c \
../../source/components/debugger/dbxface.c \
../../source/components/disassembler/dmbuffer.c \
+ ../../source/components/disassembler/dmdeferred.c \
../../source/components/disassembler/dmnames.c \
../../source/components/disassembler/dmobject.c \
../../source/components/disassembler/dmopcode.c \
../../source/components/disassembler/dmresrc.c \
../../source/components/disassembler/dmresrcl.c \
+ ../../source/components/disassembler/dmresrcl2.c \
../../source/components/disassembler/dmresrcs.c \
../../source/components/disassembler/dmutils.c \
../../source/components/disassembler/dmwalk.c \
../../source/components/events/evevent.c \
+ ../../source/components/events/evglock.c \
../../source/components/events/evgpeblk.c \
../../source/components/events/evgpe.c \
+ ../../source/components/events/evgpeinit.c \
+ ../../source/components/events/evgpeutil.c \
+ ../../source/components/events/evhandler.c \
../../source/components/events/evmisc.c \
../../source/components/events/evregion.c \
../../source/components/events/evrgnini.c \
../../source/components/events/evsci.c \
../../source/components/events/evxface.c \
../../source/components/events/evxfevnt.c \
+ ../../source/components/events/evxfgpe.c \
../../source/components/events/evxfregn.c \
../../source/components/hardware/hwacpi.c \
+ ../../source/components/hardware/hwesleep.c \
../../source/components/hardware/hwgpe.c \
+ ../../source/components/hardware/hwpci.c \
../../source/components/hardware/hwregs.c \
../../source/components/hardware/hwsleep.c \
+ ../../source/components/hardware/hwxfsleep.c \
+ ../../source/components/dispatcher/dsargs.c \
+ ../../source/components/dispatcher/dscontrol.c \
../../source/components/dispatcher/dsfield.c \
../../source/components/dispatcher/dsinit.c \
../../source/components/dispatcher/dsmethod.c \
@@ -60,11 +75,13 @@
../../source/components/dispatcher/dsutils.c \
../../source/components/dispatcher/dswexec.c \
../../source/components/dispatcher/dswload.c \
+ ../../source/components/dispatcher/dswload2.c \
../../source/components/dispatcher/dswscope.c \
../../source/components/dispatcher/dswstate.c \
../../source/components/executer/exconfig.c \
../../source/components/executer/exconvrt.c \
../../source/components/executer/excreate.c \
+ ../../source/components/executer/exdebug.c \
../../source/components/executer/exdump.c \
../../source/components/executer/exfield.c \
../../source/components/executer/exfldio.c \
@@ -87,7 +104,9 @@
../../source/components/executer/exutils.c \
../../source/components/parser/psargs.c \
../../source/components/parser/psloop.c \
+ ../../source/components/parser/psobject.c \
../../source/components/parser/psopcode.c \
+ ../../source/components/parser/psopinfo.c \
../../source/components/parser/psparse.c \
../../source/components/parser/psscope.c \
../../source/components/parser/pstree.c \
@@ -96,6 +115,8 @@
../../source/components/parser/psxface.c \
../../source/components/namespace/nsaccess.c \
../../source/components/namespace/nsalloc.c \
+ ../../source/components/namespace/nsarguments.c \
+ ../../source/components/namespace/nsconvert.c \
../../source/components/namespace/nsdump.c \
../../source/components/namespace/nsdumpdv.c \
../../source/components/namespace/nseval.c \
@@ -105,6 +126,7 @@
../../source/components/namespace/nsobject.c \
../../source/components/namespace/nsparse.c \
../../source/components/namespace/nspredef.c \
+ ../../source/components/namespace/nsprepkg.c \
../../source/components/namespace/nsrepair.c \
../../source/components/namespace/nsrepair2.c \
../../source/components/namespace/nssearch.c \
@@ -117,26 +139,35 @@
../../source/components/resources/rscalc.c \
../../source/components/resources/rscreate.c \
../../source/components/resources/rsdump.c \
+ ../../source/components/resources/rsdumpinfo.c \
+ ../../source/components/resources/rsinfo.c \
../../source/components/resources/rsio.c \
../../source/components/resources/rsirq.c \
../../source/components/resources/rslist.c \
../../source/components/resources/rsmemory.c \
../../source/components/resources/rsmisc.c \
+ ../../source/components/resources/rsserial.c \
../../source/components/resources/rsutils.c \
../../source/components/resources/rsxface.c \
- ../../source/components/resources/rsinfo.c \
../../source/components/tables/tbfadt.c \
../../source/components/tables/tbfind.c \
../../source/components/tables/tbinstal.c \
+ ../../source/components/tables/tbprint.c \
../../source/components/tables/tbutils.c \
../../source/components/tables/tbxface.c \
+ ../../source/components/tables/tbxfload.c \
../../source/components/tables/tbxfroot.c \
+ ../../source/components/utilities/utaddress.c \
../../source/components/utilities/utalloc.c \
+ ../../source/components/utilities/utbuffer.c \
../../source/components/utilities/utcache.c \
../../source/components/utilities/utcopy.c \
../../source/components/utilities/utdebug.c \
+ ../../source/components/utilities/utdecode.c \
../../source/components/utilities/utdelete.c \
+ ../../source/components/utilities/uterror.c \
../../source/components/utilities/uteval.c \
+ ../../source/components/utilities/utexcep.c \
../../source/components/utilities/utglobal.c \
../../source/components/utilities/utids.c \
../../source/components/utilities/utinit.c \
@@ -145,17 +176,23 @@
../../source/components/utilities/utmisc.c \
../../source/components/utilities/utmutex.c \
../../source/components/utilities/utobject.c \
+ ../../source/components/utilities/utosi.c \
+ ../../source/components/utilities/utownerid.c \
+ ../../source/components/utilities/utpredef.c \
../../source/components/utilities/utresrc.c \
../../source/components/utilities/utstate.c \
+ ../../source/components/utilities/utstring.c \
../../source/components/utilities/uttrack.c \
- ../../source/components/utilities/utxface.c
+ ../../source/components/utilities/utxface.c \
+ ../../source/components/utilities/utxferror.c \
+ ../../source/components/utilities/utxfinit.c
# ../../source/components/osunixxf.c
CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../source/include
-acpiexec : $(patsubst %.c,%.o, $(SRCS))
+$(PROG) : $(patsubst %.c,%.o, $(SRCS))
$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)
CLEANFILES= $(PROG)
diff -urN acpica-unix2-20130626/tests/aapits/osunixxf.c acpica-unix2-20130626-aapits/tests/aapits/osunixxf.c
--- acpica-unix2-20130626/tests/aapits/osunixxf.c 2013-01-17 12:48:29.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/osunixxf.c 2013-07-25 15:11:08.225425856 -0600
@@ -384,7 +384,6 @@
const char *Fmt,
va_list Args)
{
- INT32 Count = 0;
UINT8 Flags;
@@ -397,7 +396,7 @@
{
/* Output file is open, send the output there */
- Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args);
+ vfprintf (AcpiGbl_DebugFile, Fmt, Args);
}
else
{
@@ -409,7 +408,7 @@
if (Flags & ACPI_DB_CONSOLE_OUTPUT)
{
- Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args);
+ vfprintf (AcpiGbl_OutputFile, Fmt, Args);
}
return;
@@ -1166,3 +1165,23 @@
return (AE_OK);
}
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiOsWaitEventsComplete
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Wait for all asynchronous events to complete. This
+ * implementation does nothing.
+ *
+ *****************************************************************************/
+
+void
+AcpiOsWaitEventsComplete (
+ void)
+{
+ return;
+}

64
acpibin.1 Normal file
View File

@ -0,0 +1,64 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPIBIN 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpibin \- ACPI binary AML file utility
.SH SYNOPSIS
.B acpibin
.RI [ <option> ... ]
.SH DESCRIPTION
This manual page briefly documents the
.B acpibin
command. The option list is taken from the acpibin interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpibin
is a command provided to perform some basic and common operations on
AML binary files.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.TP
.B \-c <file1> <file2>
Compare two binary AML files
.TP
.B \-d <in> <out>
Dump AML binary to text file
.TP
.B \-e <sig> <in> <out>
Extract binary AML table from acpidump file
.TP
.B \-h <file>
Display table header for binary AML file
.TP
.B \-s <file>
Update checksum for binary AML file
.TP
.B \-t
Terse mode
.SH AUTHOR
acpibin was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

295
acpica-tools.spec Normal file
View File

@ -0,0 +1,295 @@
Name: acpica-tools
Version: 20130823
Release: 2%{?dist}
Summary: ACPICA tools for the development and debug of ACPI tables
Group: Development/Languages
License: GPLv2
URL: https://www.acpica.org/
Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz
Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
Source2: README.Fedora
Source3: iasl.1
Source4: acpibin.1
Source5: acpidump.1
Source6: acpiexec.1
Source7: acpihelp.1
Source8: acpinames.1
Source9: acpisrc.1
Source10: acpixtract.1
Source11: badcode.asl.result
Source12: grammar.asl.result
Source13: run-misc-tests.sh
Source14: COPYING
Patch0: debian-big_endian.patch
Patch1: debian-unaligned.patch
Patch2: name-miscompare.patch
Patch3: aapits-linux.patch
BuildRequires: bison patchutils flex
# The previous iasl package contained only a very small subset of these tools
# and it produced only the iasl package listed below; further, the pmtools
# package -- which provides acpidump -- also provides a /usr/sbin/acpixtract
# that we don't really want to collide with
Provides: acpixtract >= 20120913-7
Provides: iasl = %{version}-%{release}
Obsoletes: iasl < 20120913-7
# The pmtools package provides an obsolete and deprecated version of the
# acpidump command from lesswatts.org which has now been taken off-line.
# ACPICA, however, is providing a new version and we again do not want to
# conflict with the command name.
Provides: acpidump >= 20100513-5
Provides: pmtools = %{version}-%{release}
Obsoletes: pmtools < 20100513-5
%description
The ACPI Component Architecture (ACPICA) project provides an OS-independent
reference implementation of the Advanced Configuration and Power Interface
Specification (ACPI). ACPICA code contains those portions of ACPI meant to
be directly integrated into the host OS as a kernel-resident subsystem, and
a small set of tools to assist in developing and debugging ACPI tables.
This package contains only the user-space tools needed for ACPI table
development, not the kernel implementation of ACPI. The following commands
are installed:
-- iasl: compiles ASL (ACPI Source Language) into AML (ACPI Machine
Language), suitable for inclusion as a DSDT in system firmware.
It also can disassemble AML, for debugging purposes.
-- acpibin: performs basic operations on binary AML files (e.g.,
comparison, data extraction)
-- acpidump: write out the current contents of ACPI tables
-- acpiexec: simulate AML execution in order to debug method definitions
-- acpihelp: display help messages describing ASL keywords and op-codes
-- acpinames: display complete ACPI name space from input AML
-- acpisrc: manipulate the ACPICA source tree and format source files
for specific environments
-- acpixtract: extract binary ACPI tables from acpidump output (see
also the pmtools package)
This version of the tools is being released under GPLv2 license.
%prep
%setup -q -n acpica-unix2-%{version}
%setup -q -T -D -a 1 -n acpica-unix2-%{version}
gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
%patch0 -p1 -b .debian-big_endian
%patch1 -p1 -b .debian-unaligned
%patch2 -p1 -b .name-miscompare
%patch3 -p1 -b .aapits-linux
cp -p %{SOURCE2} README.Fedora
cp -p %{SOURCE3} iasl.1
cp -p %{SOURCE4} acpibin.1
cp -p %{SOURCE5} acpidump.1
cp -p %{SOURCE6} acpiexec.1
cp -p %{SOURCE7} acpihelp.1
cp -p %{SOURCE8} acpinames.1
cp -p %{SOURCE9} acpisrc.1
cp -p %{SOURCE10} acpixtract.1
cp -p %{SOURCE11} badcode.asl.result
cp -p %{SOURCE12} grammar.asl.result
cp -p %{SOURCE13} tests/run-misc-tests.sh
chmod a+x tests/run-misc-tests.sh
cp -p %{SOURCE14} COPYING
# spurious executable permissions on text files in upstream
chmod a-x changes.txt
chmod a-x source/compiler/new_table.txt
%build
make OPT_CFLAGS="%{optflags}"
%install
# Install the binaries
mkdir -p %{buildroot}%{_bindir}
install -pD generate/unix/bin*/* %{buildroot}%{_bindir}/
mv %{buildroot}%{_bindir}/acpidump %{buildroot}%{_bindir}/acpidump-acpica
mv %{buildroot}%{_bindir}/acpixtract %{buildroot}%{_bindir}/acpixtract-acpica
# Install the man pages
mkdir -p %{buildroot}%{_mandir}/man1
install -pDm 0644 -p -D *.1 %{buildroot}%{_mandir}/man1/
mv %{buildroot}%{_mandir}/man1/acpixtract.1 \
%{buildroot}%{_mandir}/man1/acpixtract-acpica.1
mv %{buildroot}%{_mandir}/man1/acpidump.1 \
%{buildroot}%{_mandir}/man1/acpidump-acpica.1
%check
cd tests
# ASL tests
./aslts.sh # relies on non-zero exit
[ $? -eq 0 ] || exit 1
# API tests
cd aapits
make
cd asl
ASL=%{buildroot}%{_bindir}/iasl make
cd ../bin
./aapitsrun
[ $? -eq 0 ] || exit 1
cd ../..
# misc tests
./run-misc-tests.sh %{buildroot}%{_bindir} %{version}
# Template tests
cd templates
make
if [ -f diff.log ]
then
if [ -s diff.log ]
then
exit 1 # implies errors occurred
fi
fi
cd ..
%post
alternatives --install %{_bindir}/acpixtract acpixtract \
%{_bindir}/acpixtract-acpica 120 \
--slave %{_mandir}/man1/acpixtract.1.gz acpixtract.1.gz \
%{_mandir}/man1/acpixtract-acpica.1
alternatives --install %{_bindir}/acpidump acpidump \
%{_bindir}/acpidump-acpica 120 \
--slave %{_mandir}/man1/acpidump.1.gz acpidump.1.gz \
%{_mandir}/man1/acpidump-acpica.1
%postun
if [ ! -e %{_bindir}/acpixtract-acpica ]
then
alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
fi
if [ ! -e %{_bindir}/acpidump-acpica ]
then
alternatives --remove acpidump %{_bindir}/acpidump-acpica
fi
%files
%doc changes.txt source/compiler/new_table.txt
%doc README.Fedora COPYING
%{_bindir}/*
%{_mandir}/*/*
%changelog
* Tue Aug 27 2013 Al Stone <ahs3@redhat.com> - 20130823-2
- Add in a copy of the GPLv2 text in order to comply with the requirement
to always redistribute the terms of the license.
* Mon Aug 26 2013 Al Stone <ahs3@redhat.com> - 20130823-1
- Update to latest upstream source.
* Tue Aug 20 2013 Al Stone <ahs3@redhat.com> - 20130725-2
- Fix several rpmlint items (listed below)
- Add versions to explicit provides for acpixtract, acpidump
- Not all setup steps used -q
- Setup executable test script (run-misc-tests.sh) differently
- Removed unneeded commented out line with macros in it
- Removed mixed use of spaces and tabs (all spaces now)
- Corrected source URLs (upstream moved)
* Sun Aug 18 2013 Al Stone <ahs3@redhat.com> - 20130725-1
- Update to latest upstream source.
* Wed Jul 24 2013 Al Stone <ahs3@redhat.com> - 20130626-1
- Update to latest upstream source.
- Move acpidump to acpidump-acpica so it be an alternative properly
- Add basic man page for acpidump
- Enable use of AAPITS tests during the check step
* Sun Jun 02 2013 Al Stone <ahs3@redhat.com> - 20130517-2
- Correct an oversight: we provide an acpidump in conflict with the
version in pmtools (which appears to be dead upstream) but had not
made it an alternative before
* Tue May 28 2013 Al Stone <ahs3@redhat.com> - 20130517-1
- Update to latest upstream source.
- Remove acpica-tools-config.patch -- now in upstream
- Remove iasl-signed-char.patch -- now in upstream
- Updated debian-big_endian.patch
- Updated debian-unaligned.patch
* Mon May 13 2013 Al Stone <ahs3@redhat.com> - 20130328-1
- Update to latest upstream source.
* Wed Mar 20 2013 Al Stone <ahs3@redhat.com> - 20130214-2
- Incorporate use of optflags macro in the build.
- Remove extraneous rm -rf of buildroot.
- Remove extraneous use of defattr in the files section.
- Incorporate use of parallel make.
- Remove extraneous use of the clean section.
- Use simpler globbing in the files section.
- Use simpler globbing in the install section.
- Remove obsolete git notes from README.Fedora.
- Remove ExcludeArch restrictions.
* Mon Feb 18 2013 Al Stone <ahs3@redhat.com> - 20130214-1
- New upstream.
- Remove most of the config file patch; still need to remove -m{32,64}.
- Clarify the licensing; this source is dual-licensed and is being released
under the GPLv2 as allowed by the original Intel license.
- Redo the misc tests so they compare results properly.
* Wed Feb 06 2013 Al Stone <ahs3@redhat.com> - 20130117-6
- Added a zero-fill to a date used in comparing testing results so that the
comparison would be correct on days numbered < 10.
* Thu Jan 31 2013 Al Stone <ahs3@redhat.com> - 20130117-5
- Simplify versioning scheme and revert to the original scheme in use by
iasl, which is use the latest official tarball date (2013017) as the
version and 1%{?dist} as the release, to be incremented for packaging
and bug fixes as needed.
* Wed Jan 30 2013 Al Stone <ahs3@redhat.com> - 20130117-4
- Do a little reset: go back to using just the original upstream tarball
instead of the latest git; the snapshot approach was more complicated
than needed.
- Upstream tarballs split commands from test suites, so had to add the
test suite back in as another Source: file.
- Change versioning scheme to include the APCI specification level (5.0),
the latest official tarball date (2013017) and a revision level (the
.1 at the end) for packaging and bug fixes as needed.
- Changed the License field to reflect the source tarball change; the release
tarball is dual-licensed, Intel ACPI or GPLv2.
- Updated patches to apply cleanly as needed.
- Corrected Obsoletes and Provides version numbers.
* Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-3
- Reconcile Fedora and Debian patches to be as alike as possible
* Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-2
- Verify ExcludeArch restrictions -- the architectures excluded can have
no use for these tools. Hardware support for ACPI is simply not
implemented for them.
- Corrected versioning to note this source came from a git pull.
- Add License file as upstream has not yet provided one (and has not for
many years).
- Insert properly versioned Provides and Obsoletes for iasl.
- Corrected files to use man.1* (vs man.1.gz) to allow flexibility in the
compression being used.
* Wed Jan 23 2013 Al Stone <ahs3@redhat.com> - 20130117-1
- Clone from the current iasl package, with the intent of replacing it
- Update source to latest upstream
- NB: ACPICA documentation would normally be included in a source tarball.
But, since it is not clearly redistributable, it is not included in the
source RPM for this package.
- Build all ACPICA tools, not just iasl (and hence the package replacement)
- Add in brief man pages
- Set up acpixtract from this package as an alternative to the same command
in the pmtools package
- Run the check step once built

106
acpidump.1 Normal file
View File

@ -0,0 +1,106 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPIDUMP 1 "July 24, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpidump \- ACPI table dump utility
.SH SYNOPSIS
.B acpidump
.RI [ <option> ... ]
.SH DESCRIPTION
This manual page briefly documents the
.B acpidump
command. The option list is taken from the interactive help.
.PP
The
.B acpidump
command extracts the ACPI tables currently in use from the running
kernel in a form usable for later processing by the
.B acpixtract
command.
.PP
Invocation of
.B acpidump
without parameters will dump all available ACPI tables. Multiple mixed
instances of the
.B \-a
,
.B \-f
, and
.B \-n
parameters can be used.
.SH OPTIONS
.PP
.TP
.B \-b
Dump tables in binary format (versus the default human-readable form)
.PP
.TP
.B \-h | \-?
Display this help message
.PP
.TP
.B \-o <file>
Redirect output to a file. This file can be used later by
.B acpixtract
to examine the contents of the ACPI tables.
.PP
.TP
.B \-s
Print table summaries only.
.PP
.TP
.B \-v
Print the version of this utility.
.PP
.TP
.B \-z
Verbose mode.
.PP
.TP
.B \-a <address>
Get a table from a physical address (must be superuser and you must be
careful which address you use -- dmesg will typically report the addresses
for the various tables).
.PP
.TP
.B \-f <binary-file>
Get a table from a binary file (see the
.B \-b
option).
.PP
.TP
.B \-n <signature>
Get a table via it's name or signature (e.g., MADT or SSDT).
.SH SEE ALSO
.B acpixtract(1)
.SH AUTHOR
acpidump was written by Robert Moore <robert.moore@intel.com> and
Chao Guan <chao.guan@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

102
acpiexec.1 Normal file
View File

@ -0,0 +1,102 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPIEXEC 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpiexec \- ACPI AML execution and debug utility
.SH SYNOPSIS
.B acpiexec
.RI [ <option> ... ]
.RI <aml-file>
.B ...
.SH DESCRIPTION
This manual page briefly documents the
.B acpiexec
command. The option list is taken from the acpiexec interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpiexec
provides a simulated execution environment for AML code so that it
can be more easily tested and debugged.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.TP
.B \-?
Display the help message
.TP
.B \-b "command-line"
Batch mode command line execution (cmd1;cmd2;...)
.TP
.B \-M [<method>]
Batch mode method execution (Default: MAIN)
.TP
.B \-da
Disable method abort on error
.TP
.B \-di
Disable execution of _STA/_INI methods during init
.TP
.B \-do
Disable Operation Region address simulation
.TP
.B \-dr
Disable repair of method return values
.TP
.B \-dt
Disable allocation tracking (performance)
.TP
.B \-ef
Enable display of final memory statistics
.TP
.B \-ei
Enable additional tests for ACPICA interfaces
.TP
.B \-em
Enable interpreter Serialized mode
.TP
.B \-es
Enable interpreter Slack mode
.TP
.B \-et
Enable debug semaphore timeour
.TP
.B \-f <value>
Operation Region initialization fill value
.TP
.B \-r
Use hardware-reduced FADT V5
.TP
.B \-vi
Verbose initialization output
.TP
.B \-vr
Verbose region handler output
.TP
.B \-x <debug-level>
Debug output level
.SH AUTHOR
acpiexec was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

80
acpihelp.1 Normal file
View File

@ -0,0 +1,80 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPIHELP 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpihelp \- ACPI help utility
.SH SYNOPSIS
.B acpihelp
.RI <option> ...
.RI [<name-prefix>|<hex-value>]
.SH DESCRIPTION
This manual page briefly documents the
.B acpihelp
command. The option list is taken from the acpihelp interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpihelp
provides descriptive text for AML and ASL keywords, methods, and opcodes.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.PP
If neither a <name-prefix> or a <hex-value> is provided,
.B acpihelp
will do the logical equivalent of a "display all."
.PP
A default search (that is, a search with no options) and a <name-prefix>
can mean two different things: (1) if <name-prefix> does not start with
an underscore, find ASL operator names, or (2) if <name-prefix> does start
with an underscore, find ASL predefined method names.
.SH OPTIONS
.PP
.SS ACPI Names and Symbols
.TP
.B \-k [<name-prefix>]
Find/Display ASL non-operator keyword(s)
.TP
.B \-m [<name-prefix>]
Find/Display AML opcode name(s)
.TP
.B \-p [<name-prefix>]
Find/Display ASL predefined method name(s)
.TP
.B \-s [<name-prefix>]
Find/Display ASL operator name(s)
.PP
.SS ACPI Values
.TP
.B \-e [<hex-value>]
Decode ACPICA exception code
.TP
.B \-i
Display known ACPI Device IDs (_HID)
.TP
.B \-i [<hex-value>]
Decode hex AML opcode
.SH AUTHOR
acpihelp was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

49
acpinames.1 Normal file
View File

@ -0,0 +1,49 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPINAMES 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpinames \- ACPI name space dump utility
.SH SYNOPSIS
.B acpinames
.RI <option> ...
.RI <aml-file>
.SH DESCRIPTION
This manual page briefly documents the
.B acpinames
command. The option list is taken from the acpinames interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpinames
prints out the complete ACPI name space for an AML file.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.TP
.B \-? [<name-prefix>]
Display this help message
.SH AUTHOR
acpinames was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

72
acpisrc.1 Normal file
View File

@ -0,0 +1,72 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPISRC 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpisrc \- ACPICA source code conversion utility
.SH SYNOPSIS
.B acpisrc
.RI [ -c | -l | -u] [-d] [-s] [-v] [-y] <source-dir> <dest-dir>
.RI <aml-file>
.SH DESCRIPTION
This manual page briefly documents the
.B acpisrc
command. The option list is taken from the acpisrc interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpisrc
converts the ACPICA into various forms for use with different operating
systems.
Source for ACPICA may be obtained from http://www.acpica.org/source/.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.TP
.B \-c
Generate cleaned version of the source
.TP
.B \-h
Insert dual-license header into all module
.TP
.B \-l
Generate Linux version of the source
.TP
.B \-u
Generate custom source translation
.TP
.B \-d
Leave debug statements in code
.TP
.B \-s
Generate source statistics only
.TP
.B \-v
Verbose mode
.TP
.B \-y
Suppress file overwrite prompts
.SH AUTHOR
acpisrc was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

60
acpixtract.1 Normal file
View File

@ -0,0 +1,60 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ACPIXTRACT 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
acpixtract \- ACPICA source code conversion utility
.SH SYNOPSIS
.B acpixtract
.RI [ <option> ... ]
.RI <acpidump-file>
.SH DESCRIPTION
This manual page briefly documents the
.B acpixtract
command. The option list is taken from the acpixtract interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B acpixtract
extracts binary ACPI tables from the output of the
.B acpidump
command (see the
.B pm-tools
package). A default invocation will extract the DSDT and
all SSDTs.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.TP
.B \-a
Extract all tables, not just DSDT/SSDT
.TP
.B \-l
List table summaries, do not extract
.TP
.B \-s <signature>
Extract all tables with <signature>
.SH AUTHOR
acpixtract was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Al Stone <ahs3@redhat.com> for the
Fedora project (but may be used by others).

221
badcode.asl.result Normal file
View File

@ -0,0 +1,221 @@
badcode.asl 25: Mutex (MTX1, 32)
Error 6125 - ^ SyncLevel must be in the range 0-15
badcode.asl 29: Name (BIG, 0x1234567887654321)
Warning 3038 - ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2)
badcode.asl 33: Name (PKG1, Package(5) {0,1})
Remark 2063 - ^ Initializer list shorter than declared package length
badcode.asl 37: Name (PATH, Buffer() {"\_SB_.PCI2._CRS"})
Warning 3046 - ^ Invalid or unknown escape sequence
badcode.asl 41: Name (ESC1, "abcdefg\x00hijklmn")
Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL
badcode.asl 49: FLD1, 8
Error 6030 - ^ Access width of Field Unit extends beyond region limit
badcode.asl 55: Field (OPR2, DWordAcc, NoLock, Preserve)
Error 6100 - ^ Host Operation Region requires ByteAcc access
badcode.asl 60: Field (OPR3, WordAcc, NoLock, Preserve)
Error 6099 - ^ Host Operation Region requires BufferAcc access
badcode.asl 67: Method (MTH1, 0, NotSerialized, 32)
Error 6125 - SyncLevel must be in the range 0-15 ^
badcode.asl 71: Store (Arg3, Local0)
Error 6006 - ^ Method argument is not initialized (Arg3)
badcode.asl 71: Store (Arg3, Local0)
Remark 2087 - ^ Not a parameter, used as local only (Arg3)
badcode.asl 72: Store (Local1, Local2)
Error 6066 - ^ Method local variable is not initialized (Local1)
badcode.asl 76: Subtract (MTX1, 4, Local3)
Error 6058 - Invalid type ^ ([Mutex|Reference] found, Subtract operator requires [Integer|String|Buffer])
badcode.asl 80: CreateField (BUF1, 0, Subtract (4, 4), FLD1)
Error 6083 - Operand evaluates to zero ^
badcode.asl 84: Acquire (MTX1, 100)
Warning 3130 - ^ Result is not used, possible operator timeout will be missed
badcode.asl 85: Wait (EVT1, 1)
Warning 3130 - ^ Result is not used, possible operator timeout will be missed
badcode.asl 89: Add (INT1, 8)
Error 6114 - ^ Result is not used, operator has no effect
badcode.asl 94: Store (5, INT1)
Warning 3134 - ^ Statement is unreachable
badcode.asl 97: Method (MTH2)
Remark 2119 - ^ Control Method marked Serialized (Due to use of Switch operator)
badcode.asl 97: Method (MTH2)
Warning 3115 - ^ Not all control paths return a value (MTH2)
badcode.asl 101: Switch (ToInteger (INT1))
Error 6078 - ^ No Case statements under Switch
badcode.asl 120: Store (MTH2 (), Local0)
Warning 3122 - ^ Called method may not always return a value
badcode.asl 126: Method (MTH5) {Store (MTH4(), Local0)}
Error 6080 - Called method returns no value ^
badcode.asl 132: Name (_HID, "*PNP0C0A")
Error 6061 - Invalid leading asterisk ^ (*PNP0C0A)
badcode.asl 136: Name (_HID, "PNP")
Error 6033 - ^ _HID string must be exactly 7 or 8 characters (PNP)
badcode.asl 140: Name (_HID, "MYDEVICE01")
Error 6033 - ^ _HID string must be exactly 7 or 8 characters (MYDEVICE01)
badcode.asl 144: Name (_HID, "acpi0001")
Error 6034 - ^ _HID prefix must be all uppercase or decimal digits (acpi0001)
badcode.asl 148: Name (_HID, "PNP-123")
Error 6002 - ^ String must be entirely alphanumeric (PNP-123)
badcode.asl 152: Name (_HID, "")
Error 6091 - ^ Invalid zero-length (null) string
badcode.asl 153: Name (_CID, "")
Error 6091 - ^ Invalid zero-length (null) string
badcode.asl 158: Name (_PRW, 4)
Error 6105 - ^ Invalid object type for reserved name (_PRW: found Integer, Package required)
badcode.asl 159: Name (_FDI, Buffer () {0})
Error 6105 - ^ Invalid object type for reserved name (_FDI: found Buffer, Package required)
badcode.asl 164: Method (_OSC, 5)
Warning 3101 - ^ Reserved method has too many arguments (_OSC requires 4)
badcode.asl 164: Method (_OSC, 5)
Warning 3107 - ^ Reserved method must return a value (Buffer required for _OSC)
badcode.asl 170: Name (_L01, 1)
Error 6103 - ^ Reserved name must be a control method (with zero arguments)
badcode.asl 171: Name (_E02, 2)
Error 6103 - ^ Reserved name must be a control method (with zero arguments)
badcode.asl 172: Name (_Q03, 3)
Error 6103 - ^ Reserved name must be a control method (with zero arguments)
badcode.asl 173: Name (_ON, 0)
Error 6103 - ^ Reserved name must be a control method (with zero arguments)
badcode.asl 174: Name (_INI, 1)
Error 6103 - ^ Reserved name must be a control method (with zero arguments)
badcode.asl 175: Name (_PTP, 2)
Error 6103 - ^ Reserved name must be a control method (with arguments)
badcode.asl 184: Method (_E1D)
Error 6032 - ^ Name conflicts with a previous GPE method (_L1D)
badcode.asl 193: Return (Buffer(1){0x33})
Warning 3104 - ^ Reserved method should not return a value (_FDM)
badcode.asl 197: Return ("Unexpected Return Value")
Warning 3104 - Reserved method should not return a value ^ (_Q22)
badcode.asl 205: Method (_REG, 2)
Warning 3079 - ^ _REG has no corresponding Operation Region
badcode.asl 219: StartDependentFn (0, 0)
Error 6019 - ^ Dependent function macros cannot be nested
badcode.asl 225: })
Error 6070 - ^ Missing EndDependentFn() macro in dependent resource list
badcode.asl 242: 0x00002000,
Error 6049 - ^ Length is larger than Min/Max window
badcode.asl 247: 0x00001001,
Error 6001 - ^ Must be a multiple of alignment/granularity value
badcode.asl 248: 0x00002002,
Error 6001 - ^ Must be a multiple of alignment/granularity value
badcode.asl 255: 0xFFFF,
Warning 3060 - ^ Maximum 10-bit ISA address (0x3FF)
badcode.asl 264: 0x05
Error 6042 - ^ Invalid AccessSize (Maximum is 4 - QWord access)
badcode.asl 268: QWordSpace (0xB0, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5,
Error 6139 - Constant out of range ^ (0xB0, allowable: 0xC0-0xFF)
badcode.asl 279: 0x0200,
Error 6051 - ^ Address Min is greater than Address Max
badcode.asl 291: 0x00001002,
Error 6049 - ^ Length is larger than Min/Max window
badcode.asl 296: 0x00000010,
Error 6048 - ^ Granularity must be zero or a power of two minus one
badcode.asl 305: 0x0000000000000B02,
Error 6001 - ^ Must be a multiple of alignment/granularity value
badcode.asl 315: 0x00000000002FFFFE,
Error 6001 - ^ Must be a multiple of alignment/granularity value (-1)
badcode.asl 326: 0x00000000,
Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags
badcode.asl 335: 0x00000100,
Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags
badcode.asl 344: 0x00000200,
Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags
badcode.asl 349: 0x0000000F,
Error 6047 - ^ Granularity must be zero for fixed Min/Max
badcode.asl 358: DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
Error 6090 - ^ Min/Max/Length/Gran are all zero, but no resource tag
badcode.asl 368: EndDependentFn ()
Error 6071 - ^ Missing StartDependentFn() macro in dependent resource list
badcode.asl 388: CreateWordField (RSC3, \DWI1._LEN, LEN)
Warning 3128 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 16 bits)
badcode.asl 389: CreateByteField (RSC3, \DWI1._MIN, MIN)
Warning 3128 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 8 bits)
badcode.asl 390: CreateBitField (RSC3, \DWI1._RNG, RNG1)
Warning 3128 - ResourceTag larger than Field ^ (Size mismatch, Tag: 2 bits, Field: 1 bit)
badcode.asl 394: CreateQWordField (RSC3, \DWI1._MAX, MAX)
Warning 3129 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 32 bits, Field: 64 bits)
badcode.asl 395: CreateBitField (RSC3, \DWI1._GRA, GRA)
Warning 3128 - ResourceTag larger than Field ^ (Size mismatch, Tag: 32 bits, Field: 1 bit)
badcode.asl 396: CreateField (RSC3, \DWI1._MIF, 5, MIF)
Warning 3129 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 1 bit, Field: 5 bits)
badcode.asl 397: CreateField (RSC3, \DWI1._RNG, 3, RNG2)
Warning 3129 - ResourceTag smaller than Field ^ (Size mismatch, Tag: 2 bits, Field: 3 bits)
Intel ACPI Component Architecture
ASL Optimizing Compiler version VVVVVVVV-YYYY [XXXXXXXXXXX]
Copyright (c) 2000 - 2013 Intel Corporation
Ignoring all errors, forcing AML file generation
ASL Input: badcode.asl - 401 lines, 6935 bytes, 79 keywords
AML Output: badcode.aml - 1184 bytes, 60 named objects, 19 executable opcodes
Compilation complete. 46 Errors, 21 Warnings, 3 Remarks, 16 Optimizations

2490
debian-big_endian.patch Normal file

File diff suppressed because it is too large Load Diff

163
debian-unaligned.patch Normal file
View File

@ -0,0 +1,163 @@
Patch carried over from the prior iasl package and updated. This allows
for builds on systems requiring aligned memory access. Please see
http://lists.acpica.org/pipermail/devel/2010-July/000159.html. Resolves
BZ#865013 and BZ#856856.
--
Add more platforms to the list of the ones requiring aligned memory access.
Also fix callsites where wrong assumptions where made in terms of aligment.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
source/compiler/asltree.c | 15 ++++++++++-----
source/components/executer/exoparg2.c | 12 +++++++++---
source/include/actypes.h | 26 +++++++++++++-------------
3 file modificati, 32 inserzioni(+), 21 rimozioni(-)
diff --git a/source/compiler/asltree.c b/source/compiler/asltree.c
index ebf87f3..fd859d7 100644
--- a/source/compiler/asltree.c
+++ b/source/compiler/asltree.c
@@ -577,28 +577,31 @@ TrCreateValuedLeafNode (
"\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X ",
Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
ACPI_FORMAT_UINT64 (Value));
- Op->Asl.Value.Integer = Value;
switch (ParseOpcode)
{
case PARSEOP_STRING_LITERAL:
- DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
+ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
+ DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Op->Asl.Value.String);
break;
case PARSEOP_NAMESEG:
- DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
+ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Op->Asl.Value.String);
break;
case PARSEOP_NAMESTRING:
- DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
+ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Op->Asl.Value.String);
break;
case PARSEOP_EISAID:
- DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
+ Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
+ DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Op->Asl.Value.String);
break;
case PARSEOP_METHOD:
@@ -608,11 +610,13 @@ TrCreateValuedLeafNode (
case PARSEOP_INTEGER:
+ Op->Asl.Value.Integer = Value;
DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
break;
default:
+ Op->Asl.Value.Integer = Value;
break;
}
diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
index e55f40c..ed5b1fd 100644
--- a/source/components/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
@@ -175,6 +176,8 @@ AcpiExOpcode_2A_2T_1R (
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *ReturnDesc1 = NULL;
ACPI_OPERAND_OBJECT *ReturnDesc2 = NULL;
+ UINT64 ReturnValue1 = 0;
+ UINT64 ReturnValue2 = 0;
ACPI_STATUS Status;
@@ -208,8 +211,10 @@ AcpiExOpcode_2A_2T_1R (
Status = AcpiUtDivide (Operand[0]->Integer.Value,
Operand[1]->Integer.Value,
- &ReturnDesc1->Integer.Value,
- &ReturnDesc2->Integer.Value);
+ &ReturnValue1, &ReturnValue2);
+ ReturnDesc1->Integer.Value = ReturnValue1;
+ ReturnDesc2->Integer.Value = ReturnValue2;
+
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -283,6 +285,7 @@ AcpiExOpcode_2A_1T_1R (
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
UINT64 Index;
+ UINT64 ReturnValue = 0;
ACPI_STATUS Status = AE_OK;
ACPI_SIZE Length = 0;
@@ -326,7 +333,8 @@ AcpiExOpcode_2A_1T_1R (
Status = AcpiUtDivide (Operand[0]->Integer.Value,
Operand[1]->Integer.Value,
NULL,
- &ReturnDesc->Integer.Value);
+ &ReturnValue);
+ ReturnDesc->Integer.Value = ReturnValue;
break;
case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */
diff --git a/source/include/actypes.h b/source/include/actypes.h
index 07fb7d5..08bdf2f 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -142,6 +142,19 @@ typedef COMPILER_DEPENDENT_INT64 INT64;
*/
#define ACPI_THREAD_ID UINT64
+/*
+ * In the case of the Itanium Processor Family (IPF), the hardware does not
+ * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
+ * to indicate that special precautions must be taken to avoid alignment faults.
+ * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
+ *
+ * Note: EM64T and other X86-64 processors support misaligned transfers,
+ * so there is no need to define this flag.
+ */
+#if defined (__IA64__) || defined (__ia64__) || defined(__alpha__) || defined(__sparc__) || defined(__hppa__) || defined(__arm__)
+#define ACPI_MISALIGNMENT_NOT_SUPPORTED
+#endif
+
/*******************************************************************************
*
@@ -168,19 +181,6 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS;
#define ACPI_SIZE_MAX ACPI_UINT64_MAX
#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
-/*
- * In the case of the Itanium Processor Family (IPF), the hardware does not
- * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
- * to indicate that special precautions must be taken to avoid alignment faults.
- * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
- *
- * Note: EM64T and other X86-64 processors support misaligned transfers,
- * so there is no need to define this flag.
- */
-#if defined (__IA64__) || defined (__ia64__)
-#define ACPI_MISALIGNMENT_NOT_SUPPORTED
-#endif
-
/*******************************************************************************
*
--
1.7.12.1

68
grammar.asl.result Normal file
View File

@ -0,0 +1,68 @@
grammar.asl 199: Name (_NPK, Package ()
Warning 3133 - ^ Unknown reserved name (_NPK)
grammar.asl 522: NAME (ESC1, "abcdefg\x00hijklmn")
Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL
grammar.asl 523: NAME (ESC2, "abcdefg\000hijklmn")
Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL
grammar.asl 620: RCIV (Subtract (Arg0, 1))
Remark 2098 - ^ Recursive method call (RCIV)
grammar.asl 733: Method(_SRS)
Warning 3102 - ^ Reserved method has too few arguments (_SRS requires 1)
grammar.asl 949: Method (_ERR, 2)
Warning 3102 - ^ Reserved method has too few arguments (_ERR requires 3)
grammar.asl 1389: Store (0x1234567887654321, QWD2)
Warning 3038 - ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2)
grammar.asl 1391: if (LNotEqual (Local0, 0x1234567887654321))
Warning 3038 - ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2)
grammar.asl 1471: SizeOf (BUFO)
Error 6114 - ^ Result is not used, operator has no effect
grammar.asl 1497: Acquire (MTX2, 1)
Warning 3130 - ^ Result is not used, possible operator timeout will be missed
grammar.asl 1645: Add (Local0, Local1)
Error 6114 - ^ Result is not used, operator has no effect
grammar.asl 1816: Method (COND)
Warning 3115 - ^ Not all control paths return a value (COND)
grammar.asl 2990: Name (_CRS,0)
Error 6105 - ^ Invalid object type for reserved name (_CRS: found Integer, Buffer required)
grammar.asl 6024: Name (_HID, "*PNP0A06")
Error 6061 - Invalid leading asterisk ^ (*PNP0A06)
grammar.asl 6163: Name (C18C, Package (2)
Remark 2063 - ^ Initializer list shorter than declared package length
grammar.asl 6475: Name (_CRS, Buffer(26) {"\_SB_.PCI2._CRS..........."})
Warning 3046 - Invalid or unknown escape sequence ^
grammar.asl 6814: And (Local0, 1, Local0)
Error 6066 - ^ Method local variable is not initialized (Local0)
grammar.asl 6900: Name (_HID, "*PNP0C0A")
Error 6061 - Invalid leading asterisk ^ (*PNP0C0A)
grammar.asl 8717: Name (PKG2, Package (4)
Remark 2063 - ^ Initializer list shorter than declared package length
Intel ACPI Component Architecture
ASL Optimizing Compiler version VVVVVVVV-YYYY [XXXXXXXXXXX]
Copyright (c) 2000 - 2013 Intel Corporation
Ignoring all errors, forcing AML file generation
ASL Input: grammar.asl - 10281 lines, 228124 bytes, 4818 keywords
AML Output: grammar.aml - 43476 bytes, 670 named objects, 4148 executable opcodes
Compilation complete. 6 Errors, 10 Warnings, 3 Remarks, 1105 Optimizations

231
iasl.1 Normal file
View File

@ -0,0 +1,231 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH IASL 1 "January 23, 2013"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
iasl \- ACPI Source Language compiler/decompiler
.SH SYNOPSIS
.B iasl
.RI [ <option> ... ]
.RI <input-file>
.B ...
.SH DESCRIPTION
This manual page briefly documents the
.B iasl
command. The option list is taken from the iasl interactive help.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B iasl
is an ASL compiler and decompiler. This command provides both the ability
to translate one or more ASL source files to their corresponding AML binary
files, and the ability to translate AML binary files back to readable
ASL source.
.PP
Much more detailed documentation may be found at
http://www.acpica.org/documentation/.
.SH OPTIONS
.PP
.SS Global
.TP
.B \-@ <file>
Specify command file
.TP
.B \-I <dir>
Specify additional include directory
.TP
.B \-T <sig>|ALL|*
Create table template file for ACPI <sig>
.TP
.B \-v
Display compiler version
.PP
.SS Preprocessor
.TP
.B \-D <symbol>
Define sybol for preprocessor use
.TP
.B \-li
Create prepocessed output file (*.i)
.TP
.B \-P
Preprocess only and create preprocessor output file (*.i)
.TP
.B \-Pn
Disable preprocessor
.PP
.SS General Output
.TP
.B \-p <prefix>
Specify path/filename prefix for all output files
.TP
.B \-va
Disable all errors and warnings (summary only)
.TP
.B \-vi
Less verbose errors and warnings for use with IDEs
.TP
.B \-vo
Enable optimization comments
.TP
.B \-vr
Disable remarks
.TP
.B \-vs
Disable signon
.TP
.B \-w{1|2|3}
Set warning reporting level
.TP
.B \-we
Report warnings as errors
.PP
.SS AML and Data Output Files
.TP
.B \-s{a|c}
Create assembler or C source file (*.asm or *.c)
.TP
.B \-i{a|c}
Create assembler or C include file (*.inc or *.h)
.TP
.B \-t{a|c|s}
Create assembler, C, or ASL hex table (*.hex)
.PP
.SS AML Code Generation
.TP
.B \-oa
Disable all optimizations (compatibility mode)
.TP
.B \-of
Disable constant folding
.TP
.B \-oi
Disable integer optimization to Zero/One/Ones
.TP
.B \-on
Disable named reference string optimization
.TP
.B \-cr
Disable Resource Descriptor error checking
.TP
.B \-in
Ignore NoOp operators
.TP
.B \-r <revision>
Override table header Revision (1-255)
.PP
.SS ASL Listing Files
.TP
.B \-l
Create mixed listing file (ASL source and AML) (*.lst)
.TP
.B \-ln
Create namespace file (*.nsp)
.TP
.B \-ls
Create combined source file (expanded includes) (*.src)
.PP
.SS ACPI Data Tables
.TP
.B \-G
Compile custom table containing generic operators
.TP
.B \-vt
Create verbose templates (full disassembly)
.PP
.SS AML Disassembler
.TP
.B \-d [<file>]
Disassemble AML to ASL source code file (*.dsl)
.TP
.B \-da [<file1>,<file2>]
Disassemble multiple tables from single namespace
.TP
.B \-db
Do not translate Buffers to Resource Templates
.TP
.B \-dc [<file>]
Disassemble AML and immediately compile it
.br
(Obtain DSDT from current system if no input file)
.TP
.B \-e [<file1>,<file2>]
Include ACPI table(s) for external symbol resolution
.TP
.B \-g
Get ACPI tables and write to files (*.dat)
.TP
.B \-in
Ignore NoOp opcodes
.TP
.B \-vt
Dump binary table date in hex format within output file
.PP
.SS Help
.TP
.B \-h
Additional help and compiler debug options
.TP
.B \-hc
Display operators allowed in constant expressions
.TP
.B \-hf
Display help for output file name generation
.TP
.B \-hr
Display ACPI reserved method names
.TP
.B \-ht
Display currently supported ACPI table names
.PP
.SS Debug
.TP
.B \-b{f|t}
Create debug file (full or parse tree only) (*.txt)
.TP
.B \-f
Ignore errors, force creation of AML output file(s)
.TP
.B \-n
Parse only, no output generation
.TP
.B \-ot
Display compiles times and statistics
.TP
.B \-x <level>
Set debug level for trace output
.TP
.B \-z
Do not insert new compiler ID for DataTables
.SH AUTHOR
iasl was written by Robert Moore <robert.moore@intel.com>.
.PP
This manual page was written by Mattia Dongili <malattia@debian.org>,
for the Debian project (but may be used by others). It was updated for
the Fedora project by Al Stone <ahs3@redhat.com> (and may also be used
by others).

27
name-miscompare.patch Normal file
View File

@ -0,0 +1,27 @@
On big-endian machines, a test case looking for the methods _L1D and _E1D
in the same scope would fail (see tests/misc/badcode.asl:184). The names
to be compared were being treated as 32-bit ints, and not strings. Hence,
the characters were re-ordered incorrectly, mismatching the assumptions
made in the remainder of the function.
diff -urN acpica-unix2-20130214/source/compiler/aslanalyze.c acpica-unix2-20130214-names/source/compiler/aslanalyze.c
--- acpica-unix2-20130214/source/compiler/aslanalyze.c 2013-03-21 17:31:25.803324990 -0600
+++ acpica-unix2-20130214-names/source/compiler/aslanalyze.c 2013-03-21 17:43:45.357616802 -0600
@@ -446,7 +446,7 @@
/* Need a null-terminated string version of NameSeg */
- ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
+ ACPI_MOVE_NAME (Name, &Op->Asl.NameSeg);
Name[ACPI_NAME_SIZE] = 0;
/*
@@ -473,7 +473,7 @@
* We are now sure we have an _Lxx or _Exx.
* Create the target name that would cause collision (Flip E/L)
*/
- ACPI_MOVE_32_TO_32 (Target, Name);
+ ACPI_MOVE_NAME (Target, Name);
/* Inject opposite letter ("L" versus "E") */

52
run-misc-tests.sh Normal file
View File

@ -0,0 +1,52 @@
#!/bin/bash
#
# run the misc tests: we need to do this in a script since
# these are expected to fail which would normally cause %check
# to stop. however, this is expected behavior. we are running
# iasl precisely because we expect it to stop when presented with
# faulty ASL.
#
# this script assumes it is in the source 'tests' directory at
# start.
#
set -x
BINDIR="$1"
VERSION="$2"
# create files to compare against
$BINDIR/iasl -h
m=`uname -m`
case $m in
*64) BITS=64
;;
*) BITS=32
;;
esac
WHEN=`date +"%b %_d %Y"`
sed -e "s/XXXXXXXXXXX/$WHEN/" \
-e "s/YYYY/$BITS/" \
-e "s/VVVVVVVV/$VERSION/" \
../badcode.asl.result > misc/badcode.asl.result
sed -e "s/XXXXXXXXXXX/$WHEN/" \
-e "s/YYYY/$BITS/" \
-e "s/VVVVVVVV/$VERSION/" \
../grammar.asl.result > misc/grammar.asl.result
cd misc
# see if badcode.asl failed as expected
# NB: the -f option is required so we can see all of the errors
$BINDIR/iasl -f badcode.asl 2>&1 | tee badcode
diff badcode badcode.asl.result >/dev/null 2>&1
[ $? -eq 0 ] || exit 1
# see if grammar.asl failed as expected
# NB: the -f option is required so we can see all of the errors
$BINDIR/iasl -f -of grammar.asl 2>&1 | tee grammar
diff grammar grammar.asl.result >/dev/null 2>&1
[ $? -eq 0 ] || exit 1
exit 0

View File

@ -0,0 +1,2 @@
6694a6a5baa4a23fba892b8ad23f3959 acpica-unix2-20130823.tar.gz
04f41a2d2da4458e0afeed1a51baa684 acpitests-unix-20130823.tar.gz