Commit Graph

109 Commits

Author SHA1 Message Date
Nate Lawson
5cf6d493ab When one entry in the RSDT is corrupted, just skip it instead of bailing out.
This gets us the info we need on systems which have proprietary tables that
don't match the standard.  For instance, an AMI system has a table of type
"OEMB" with an invalid checksum.

Tested by:	Maxim Maximov <mcsi_at_mcsi.pp.ru>
MFC after:	1 day
2004-08-18 05:56:07 +00:00
Nate Lawson
64f3d62cda Update man page for supported table types.
MFC after:	1 day
2004-08-18 05:50:32 +00:00
Nate Lawson
e079f9491a Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all
callers.  These ioctls attempted to enable and disable the ACPI
interpreter at runtime.  In practice, it is not possible to boot with
ACPI and then disable it on many systems and trying to do so can cause
crashes, interrupt storms, etc.  Binary compatibility with userland is
retained.

MFC after:	2 days
2004-08-18 05:48:24 +00:00
Marcel Moolenaar
7611a6dcd6 We now handle SSDT tables. Remove a reference from the BUGS section
and explicitly mention SSDT when we talk about the DSDT so that people
don't have to guess whether it includes the SSDT.
While here, touch date.

Pointed out by: le@
2004-08-16 20:33:20 +00:00
Nate Lawson
c5fe547333 Comment out the ability to enable/disable ACPI at runtime. This appears
to not work reliably and crash some systems.  It is not supported at all
on others.  Pending discussion, the underlying ioctls will be removed.
2004-08-15 23:39:37 +00:00
Marcel Moolenaar
bfa3f012cd Add support for SSDT tables. Dumping or disassembling the DSDT will
now include the contents if any SSDT table as well. This makes use
of the property that one can concatenate the body of SSDT tables to
the DSDT, updating the DSDT header (length and checksum) and end up
with a larger and valid DSDT table. Hence, this also works with -f.

Reviewed by: njl@
2004-08-13 22:59:09 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Nate Lawson
2177d4e68d Also print out the standard header for FADT since it has one. 2004-06-30 03:23:51 +00:00
Ruslan Ermilov
9cdb6ee164 Assorted markup, grammar, and spelling fixes. 2004-06-13 18:03:44 +00:00
Ruslan Ermilov
037ac99f39 Tidy up markup. 2004-06-06 17:49:57 +00:00
Ruslan Ermilov
f4e1e42f4b Expand contraction. 2004-06-04 19:21:06 +00:00
Ruslan Ermilov
444d819f63 Markup nit: make the list of options look better. 2004-06-04 19:20:43 +00:00
Nate Lawson
a773b841f2 Unify the start/size parameters for the RSDP search area. Don't bother
trying to exclude the top end of the range since it should hurt to overlap
by 4 bytes in the off-chance the RSDP signature appears incorrectly at the
very top of our search space.
2004-05-28 07:25:23 +00:00
Nate Lawson
2c0d74e8e8 Use the correct location of the EBDA for searching for the RSDP.
The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.

Pointed out by:	robert.moore AT intel.com
2004-05-25 05:52:48 +00:00
Nate Lawson
f0dfade9f7 Add suspend/resume support to the debugger. 2004-05-25 02:56:55 +00:00
Nate Lawson
07c8b2af05 If the revision is 0, don't trust the length in the RSDP. Instead assume
an ACPI version 1.0 length.
2004-05-16 18:02:47 +00:00
Nate Lawson
2ff84d1485 Read in the entire RSDP but only run the standard checksum over the
version 1 header.  Add comments to explain what we're doing here better.

Reported by:	Alex Vasylenko <lxv@omut.org>
2004-05-16 05:31:40 +00:00
Nate Lawson
8fc0f4c675 Instead of scanning the entire lower 1 MB of RAM, only scan locations
where the RSD PTR can actually occur.  According to section 5.2.2
of the ACPI spec, we only consider two regions for the base address:

    1. EBDA (0x0 - 0x3FF)
    2. High memory (0xE0000 - 0xFFFFF)

I don't know whether this fixes any actual problems but is more correct.
2004-05-14 16:52:39 +00:00
Dag-Erling Smørgrav
476daaec24 Minor style issues. 2004-05-10 21:18:03 +00:00
Nate Lawson
c2962974d0 Instead of using a static, check for the FADT revision before using it.
This fixes a bug where acpidump -d crashed (but not -t -d).

Submitted by:	Alex Vasylenko <lxv@omut.org>
2004-04-18 05:21:36 +00:00
Takanori Watanabe
8aabbec241 Fix style breakage.
Noticed by: njl
2004-03-05 02:48:22 +00:00
Takanori Watanabe
fe27a95e90 Make unprivilaged user can see battery info. 2004-03-04 17:03:49 +00:00
Dag-Erling Smørgrav
09e0653941 I don't normally use my middle name, so remove it from attributions in
man pages (though not from copyright notices).  While I'm here, add email
addresses where appropriate.
2004-01-25 11:39:42 +00:00
Ruslan Ermilov
76b0ae588c - Use the standard .y and .l transformation rules -- this fixes
the usual parallel make race in custom .y rules.

- Fixed some style bugs.

- Removed -v from YFLAGS.

Prodded by:     bde
Reviewed by:    bde, njl
2004-01-13 20:53:56 +00:00
Ruslan Ermilov
c3d0f96a5a Use my newly acquired magic stick and put aslcompiler.y.h into
SRCS to teach make(1) that many .c sources are dependent on it.
This fixes parallel (-j) builds and makes it possible to build
individual .o files separately.

While here, removed PROG from CLEANFILES -- it's taken care of
already by bsd.prog.mk.
2004-01-11 19:26:33 +00:00
Nate Lawson
c83f0f992a Clean up the check for invalid X_DSDT and X_FACS portions of the FADT.
Add fadt_revision for telling if the FADT has correct 64 bit addresses,
separate from whether the XSDT has legal 64 bit addresses.
2004-01-04 22:27:53 +00:00
Nate Lawson
e776370e2b Add support for /etc/rc.suspend and /etc/rc.resume for ACPI. They are
called directly from acpiconf(8).  Change both scripts to take a
subsystem (apm|acpi) and sleep level (suspend,standby|1-5) argument.
2003-12-30 17:28:06 +00:00
Nate Lawson
4e36f5a1b9 Add a newline even if IAPC_BOOT_ARCH == 0. 2003-10-29 17:59:05 +00:00
Nate Lawson
69a9febdc2 Only print an end '}' if the field was non-zero (i.e. there were some flags
to print).
2003-09-21 03:51:48 +00:00
Nate Lawson
5cd10ac5d9 Correct typo in comment. 2003-09-14 00:40:24 +00:00
Nate Lawson
2e71eb1257 For dumping the DSDT (-o option), be sure to use the X_DSDT address if
appropriate.  This should be the last change to make ia64 work.
2003-09-14 00:37:52 +00:00
Nate Lawson
64fdad2352 Add the -i flag to acpiconf(8) to retrieve battery information.
Rename a few structure elements.
2003-09-13 20:13:01 +00:00
Nate Lawson
51c1824f80 C2/C3 latency is in microseconds (us), not ms. 2003-09-13 18:47:49 +00:00
Nate Lawson
c08c4e81fc Only print various optional fields if they are non-zero. Always print the
required fields, no matter what their value.
2003-09-13 18:44:05 +00:00
Nate Lawson
e47f1780cd Reduce the default width for IO port GAS printing.
Courtesy of:	rwatson's chart presentation
2003-09-13 17:32:45 +00:00
Nate Lawson
55d7ff9ea2 Add dumping of the ECDT table.
Courtesy of:	USENIX hall track
2003-09-10 23:52:12 +00:00
Nate Lawson
773b6454af o Workaround a bug where my T23 reports that it is ACPI 2.0x compatible
but has invalid 64 bit pointers for FACS and DSDT.
o Finish work to print all of the FADT and FACS.
o Resort the comment generating functions.  Submitted by: marcel

Courtesy of:	BSDcon back wall
2003-09-10 22:00:45 +00:00
Nate Lawson
a74172ab68 Add support for ACPI 2.x and the XSDT.
Submitted by:	marcel
2003-09-09 08:54:04 +00:00
Nate Lawson
8e6a8737d7 Rename FACP to FADT throughout.
Update FADT for new fields including pm_profile, pstate_cnt, and cst_cnt.
Add acpi_print_gas() for printing various address formats.
Print FACS contents.
Remove unused code.
2003-09-09 08:31:58 +00:00
Nate Lawson
1f5b6306c2 Now that amldb(8) is no longer needed by acpidump, remove the last vestiges
of the original userland ACPI implementation.  amldb is still available from
the devel/acpicatools port.
2003-08-28 03:38:18 +00:00
Nate Lawson
945137d9b4 Modify acpidump to use iasl(8) as the backend for disassembling AML.
Also clean up the output of dumped tables.  Update the man page for the
new usage.  Make WARNS=6 clean.
2003-08-28 03:33:07 +00:00
Nate Lawson
c0efcff271 Remove the band-aid to make these compile on amd64/ia64. 2003-08-11 15:49:14 +00:00
Marcel Moolenaar
f88faa54e4 Apparently I limited my testing of the ductape and bubblegum solution
to acpidb. The same problem exists in iasl. Add JIT patching there
too.
Add a comment to both makefiles to increase the chance that both
kludges are removed when a real solution is committed.
2003-08-09 19:11:20 +00:00
Marcel Moolenaar
67fdc6b784 Perform first-aid: unbreak the build for amd64 and ia64 by patching
osunixxf.c on the fly. This avoids having to pull it from the vendor
branch or otherwise pollute the repository with new short-lived files.

This should hold until the real fix arrives.
2003-08-09 07:06:09 +00:00
Nate Lawson
3e0387b483 Hook acpidb(8) and iasl(8) up to the build and unhook amldb(8). It will
be going away after a short while but still available in ports.
2003-08-08 03:20:59 +00:00
Nate Lawson
8285491e78 Add man pages for acpidb and iasl 2003-08-07 18:09:17 +00:00
Nate Lawson
a42b754313 Add the acpidb and iasl utilities. This is not yet hooked up to the build.
Obtained from:	acpicatools port by Iwasaki-san
2003-08-07 16:51:50 +00:00
Peter Wemm
55da3c73ae Hoo sed I kan spel? 2003-08-02 01:58:33 +00:00
Peter Wemm
79d7565c5a Dump the HPET information block.
What is the HPET I hear you ask?  It is the High Precision Event Timer
that is supposed to supplement and eventually replace the 8254 timer and
the RTC periodic interrupts.  Among other things, it is 64 bit (can be
run in 32 bit mode for 32 bit cpus), and is suitable as a replacement for
the ACPI timer on SMP systems (the specs are much better) and as a
replacement for the ITC based synthetic clock for on ia64 systems.

It seems IA64 and AMD64 systems tend to have this.  It is likely to start
showing up in i386 systems if it isn't already on some of them.
2003-08-02 01:55:03 +00:00
Nate Lawson
d886fcc23e Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).
2003-07-28 16:22:45 +00:00