Commit Graph

112 Commits

Author SHA1 Message Date
njl
77564d0366 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
njl
07b5b836aa Update man page for supported table types.
MFC after:	1 day
2004-08-18 05:50:32 +00:00
njl
66cefd549e 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
a406731c49 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
njl
bfd36d7253 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
fdae0159aa 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
ru
685e85196c Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
njl
f177dbfc4d Also print out the standard header for FADT since it has one. 2004-06-30 03:23:51 +00:00
ru
f0f9daab94 Assorted markup, grammar, and spelling fixes. 2004-06-13 18:03:44 +00:00
ru
962daf3d9f Tidy up markup. 2004-06-06 17:49:57 +00:00
ru
e5b1eef7aa Expand contraction. 2004-06-04 19:21:06 +00:00
ru
e30779038c Markup nit: make the list of options look better. 2004-06-04 19:20:43 +00:00
njl
437e060180 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
njl
da3dfc91fe 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
njl
8073f73c3d Add suspend/resume support to the debugger. 2004-05-25 02:56:55 +00:00
njl
e12c0abc81 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
njl
a329dd8687 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
njl
42d5e13ab9 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
des
57ec29cedf Minor style issues. 2004-05-10 21:18:03 +00:00
njl
136d58e504 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
takawata
efbf315692 Fix style breakage.
Noticed by: njl
2004-03-05 02:48:22 +00:00
takawata
59f121ae30 Make unprivilaged user can see battery info. 2004-03-04 17:03:49 +00:00
des
c14c32c409 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
ru
f3b80a684b - 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
ru
b8ac80a588 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
njl
f98e8ac5be 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
njl
2ed04cfc61 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
njl
0c907eb7e8 Add a newline even if IAPC_BOOT_ARCH == 0. 2003-10-29 17:59:05 +00:00
njl
1856a9b030 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
njl
5d0c7f7155 Correct typo in comment. 2003-09-14 00:40:24 +00:00
njl
60408e601f 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
njl
eac7db74cb Add the -i flag to acpiconf(8) to retrieve battery information.
Rename a few structure elements.
2003-09-13 20:13:01 +00:00
njl
3fa7bf3b29 C2/C3 latency is in microseconds (us), not ms. 2003-09-13 18:47:49 +00:00
njl
1c0d389da1 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
njl
fffb4b8b3e Reduce the default width for IO port GAS printing.
Courtesy of:	rwatson's chart presentation
2003-09-13 17:32:45 +00:00
njl
a8b408c851 Add dumping of the ECDT table.
Courtesy of:	USENIX hall track
2003-09-10 23:52:12 +00:00
njl
319525f1e6 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
njl
dace461b09 Add support for ACPI 2.x and the XSDT.
Submitted by:	marcel
2003-09-09 08:54:04 +00:00
njl
7fc3ac1504 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
njl
1d18af24bc 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
njl
e7e980afc3 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
njl
fb10042e36 Remove the band-aid to make these compile on amd64/ia64. 2003-08-11 15:49:14 +00:00
marcel
b1bbe3bbaa 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
79953774d1 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
njl
07b110ff82 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
njl
e3013ac55a Add man pages for acpidb and iasl 2003-08-07 18:09:17 +00:00
njl
ce53144d40 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
8a3977b2db Hoo sed I kan spel? 2003-08-02 01:58:33 +00:00
peter
4ad3126c21 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
njl
b140516293 Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).
2003-07-28 16:22:45 +00:00