for table layouts, etc. rather than homerolling our own structures and
constants in acpidump.h.
- Verify the extended checksum on the RSDP.
- Handle new ACPI 3.0 fields in MADT including X2APIC entries and
UIDs for local SAPICs.
- Add handling for new ACPI 3.0 flags in the FADT.
Reviewed by: jkim
MFC after: 1 month
doesn't use the default CFLAGS which contain -fno-strict-aliasing.
Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
variable bug that's hidden by the precense of the hint_acpi_0_rsdp
hint on 386 and amd64. There's never a need for such hint on ia64.
Approved by: re (kensmith)
Improvements:
* /etc/rc.suspend,rc.resume are always run, no matter the source of the
suspend request (user or kernel, apm or acpi)
* suspend now requires positive user acknowledgement. If a user program
wants to cancel the suspend, they can. If one of the user programs
hangs or doesn't respond within 10 seconds, the system suspends anyway.
* /dev/apm is clonable, allowing multiple listeners for suspend events.
In the future, xorg-server can use this to be informed about suspend
even if there are other listeners (i.e. apmd).
Changes:
* Two new ACPI ioctls: REQSLPSTATE and ACKSLPSTATE. Request begins the
process of suspending by notifying all listeners. acpi is monitored by
devd(8) and /dev/apm listener(s) are also counted. Users register their
approval or disapproval via Ack. If anyone disapproves, suspend is vetoed.
* Old user programs or kernel modules that used SETSLPSTATE continue to
work. A message is printed once that this interface is deprecated.
* acpiconf gains the -k flag to ack the suspend request. This flag is
undocumented on purpose since it's only used by /etc/rc.suspend. It is
not intended to be a permanent change and will be removed once a better
power API is implemented.
* S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z.
This restores previous behavior of halt/shutdown -p being the interface.
* Miscellaneous improvements to error reporting
Approved by: re
Rate units are mA/mW, not mAh/mWh. Get full battery status and time
remaining from ACPIIO_BATT_GET_BATTINFO instead of BST.
PR: bin/83672
MFC after: 2 days
units (as specified in _BIF). (noted by Bruno Ducrot)
o In looking in the standard, if the cap numbers are 0xffffffff, then acpi
is reporting unknown for that field. Report unknown numbers properly.
o Update the state to reflect charging, discharging and critical.
my patches for this information. Commit my more complete version.
This version isn't complete yet, since some details aren't handled
right just yet.
Poaching by: phk
Since we can only override the DSDT, a custom ASL dumped previously that
contained SSDTs would result in lots of multiple definition errors.
A longer-term fix involves adding the ability to override SSDTs to ACPI-CA.
MFC after: 3 days
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
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
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@
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@
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.
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.
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.
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
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.
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.
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.
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.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
acpi parse tree.
* AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
override the value for _OS.
Ideas from: takawata, jhb
Reviewed by: takawata, marcel
Tested on: i386, ia64
RSDP. Scan the first 1MB on i386 if the sysctl fails,
o Extend struct ACPIrsdp with the ACPI 2.0 fields which involves
changing a prior reserved field into the ACPI revision,
o Only calculate the RSDP checksum on the first 20 bytes to remain
compatible with ACPI 1.0 tables; we don't check the extended
checksum covering the whole table,
o Use the length field in the RSDP to map the RSDP into the address
space so that we don't have to know about future extensions here.
ports/devel/acpitools (iasl).
- Merge AML parser to build ACPI namespace
- Comment header info. out so that ASL compiler ignore them
- Fix DSDT header size to be discarded when DSDT file is specified
for input (acpidump and amldb)
- Write DSDT header as well into DSDT file for output
- Fix some trivial typo (Concatenate and SizeOf)
- Remove DEBUG_FLAGS from Makefile (acpidump and amldb)
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
The usr.sbin/acpi/ utilities should be compiled non-static.
It just followed the usr.sbin/pccard/Makefile.inc way last time.
Pointed out by: ru and msmith
Committed at: BSD HANAMI in Japan 2001