Commit Graph

112 Commits

Author SHA1 Message Date
njl
0b7bb0599c 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
83f40b7711 Update man page for supported table types.
MFC after:	1 day
2004-08-18 05:50:32 +00:00
njl
0e6427381e 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
df7926e569 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
5e2ceaef26 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
a202a07472 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
4b39413aeb Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
njl
df4b7b1ecb Also print out the standard header for FADT since it has one. 2004-06-30 03:23:51 +00:00
ru
dc54ee200d Assorted markup, grammar, and spelling fixes. 2004-06-13 18:03:44 +00:00
ru
ee4a7e8b45 Tidy up markup. 2004-06-06 17:49:57 +00:00
ru
3cf80505ca Expand contraction. 2004-06-04 19:21:06 +00:00
ru
5e3e611342 Markup nit: make the list of options look better. 2004-06-04 19:20:43 +00:00
njl
570d897aff 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
a26da2bf55 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
20762a623d Add suspend/resume support to the debugger. 2004-05-25 02:56:55 +00:00
njl
e37a9f86ef 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
826ff6bea7 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
adf833a830 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
31cd8c7867 Minor style issues. 2004-05-10 21:18:03 +00:00
njl
6e5024f5b5 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
75cdec46df Fix style breakage.
Noticed by: njl
2004-03-05 02:48:22 +00:00
takawata
88a283005e Make unprivilaged user can see battery info. 2004-03-04 17:03:49 +00:00
des
42f562f3a8 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
5af89f4e3a - 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
ad83565985 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
3092e49246 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
dc92f60c73 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
6a559fd9e1 Add a newline even if IAPC_BOOT_ARCH == 0. 2003-10-29 17:59:05 +00:00
njl
1343b60a86 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
430e8af165 Correct typo in comment. 2003-09-14 00:40:24 +00:00
njl
5a3c5ce9aa 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
31d2c70e5e 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
2978054385 C2/C3 latency is in microseconds (us), not ms. 2003-09-13 18:47:49 +00:00
njl
05db443aaf 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
2d2b8d3823 Reduce the default width for IO port GAS printing.
Courtesy of:	rwatson's chart presentation
2003-09-13 17:32:45 +00:00
njl
e0b3f83077 Add dumping of the ECDT table.
Courtesy of:	USENIX hall track
2003-09-10 23:52:12 +00:00
njl
a77d2b18b1 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
af72a7d7ba Add support for ACPI 2.x and the XSDT.
Submitted by:	marcel
2003-09-09 08:54:04 +00:00
njl
69df64797d 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
b061e7d26c 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
f51148df74 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
b984cea442 Remove the band-aid to make these compile on amd64/ia64. 2003-08-11 15:49:14 +00:00
marcel
e97cb4c9d9 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
af63867e64 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
4b26ed59de 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
29ad90976f Add man pages for acpidb and iasl 2003-08-07 18:09:17 +00:00
njl
c425e70132 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
120ded5cfe Hoo sed I kan spel? 2003-08-02 01:58:33 +00:00
peter
fa1757a156 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
1e480ac87f Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).
2003-07-28 16:22:45 +00:00