Age | Commit message (Collapse) | Author |
|
|
|
a low power S0 idle state. Since we register the EC GPE as a wakeup GPE
this means we'll wake up immediately. Unfortunately we have to register
that GPE as a wakeup GPE otherwise many laptops won't wake up when the
user opens the lid (and some laptops won't wake up at all). So add some
code to handle EC events while suspended and introduce the concept of
wakeup AML notify handlers. Register the acpibtn(4) notify handlers as
wakeup notify handlers such that we wake up. We'll go back to sleep
immediately if we wake up for any other EC event.
ok mlarkin@, deraadt@
|
|
ok mglocker@
|
|
|
|
ok mpi@
|
|
no functional change, found by smatch warnings
ok miod@ bluhm@
|
|
booting OpenBSD on some (ancient?) Hyper-V version.
Tested by Henryk Paluch
ok mlarkin@
|
|
are caught by our ACPI parser. Unfortunately in such cases our reaction was
to start parsing AML somewhere outside our current scope. The intention was
to clamp down the inner scope to the maximum of the outer one. So, rectify it.
This issue has shown up in EDK2's QEMU SBSA target, where the SSDT table was
generated incorrectly. Surprisingly neither Linux nor ACPICA's iASL noticed
that the table was broken.
ok kettenis@ millert@
|
|
wrong and the buffer size is implied by the field attribute instead of the
field length like for normal OpRegion fields. Fixes various laptops
where reading multiple bytes from AML over an i2c bus would overflow
the buffer. Still fixes the Dell Precision 3640.
ok tb@
|
|
GenericSerialBus operating regions witout checking whether they're really
available. This needs to work on RAMDISK kernels as well. Since we
don't want to pull in the i2c subsystem on those, provide a separate
and much simpler dummy implementation of the GenericSerialBus access code
when SMALL_KERNEL is defined.
ok tb@
|
|
found and test by Rafael Avila de Espindola
ok kettenis
|
|
caused by the reference handling change from December.
ok kettenis@ patrick@
|
|
These are not in a printable format, hence printing them as string is
wrong. Additionally, aml_searchrel()/aml_searchname() expect the name
to be passed in a printable format as well. Passing a nameref can lead
to an out-of-bounds read, and the comparison can fail. Hence make sure
that namerefs are passed to aml_getname() first, which returns printable
strings. Note that aml_getname() uses a static buffer, so there are a
few restrictions how the string can be used.
ok kettenis@
|
|
LocalX. In that case, resolving the reference must be done before
resetting the LocalX variable. test daniel
ok kettenis
|
|
These references need to be resolved at runtime rather than when
they're parsed such that they pick up the right values for those nodes
which can be changed when for example _INI methods run.
The current approach is to replace these reference with a string that
names the node in question. The problem with that is that packages
can also contain normal strings. Which means that we need special
code that depends on the context where the package is used.
This diff takes a different approach by retaining a reference when
parsing. Code that uses a package will need to resolve this reference
but there is no ambiguiety anymore.
ok patrick@
|
|
ToHexString() on a Package. Should probably be replaced by a better solution
after release.
ok deraadt@
|
|
On a HP ProBook 650 G1 acpivout backlight brightness control only works
if we don't claim to be Windows 8. If we don't claim to be Windows 8
_BCL gives 21 levels with increments of 5, otherwise 101 levels (0-100)
and a _BCM that does nothing. This is related to requirements Microsoft
has for Windows 8 and later hardware certification.
Having acpivout not fully attach lets inteldrm handle brightness ioctls.
Brightness control via physical buttons will require a new acpi driver
for the HP flavour of WMI.
Add Windows 10 2004 _OSI value to the list while here.
ok mpi@ kmos@ on an earlier version
tested by kmos@ on 6460b and 6470b ProBooks which had the same problem
feedback and ok kettenis@
|
|
ok jmatthew@
|
|
OK deraadt@, mpi@
|
|
later processing. The use of a high interrupt will predate suspend/resume
efforts, we had to redesign acpi to be non-reentrant obviously
discussed with kettenis, in snaps for more than a week
|
|
Avoids an uninitialized variable warning. ok kettenis@
|
|
kettenis@ notes that ACPI integers are supposed to be unsigned, but
ours are signed. This is a much deeper problem than what I'm looking
to change with this conversion. To work around the issue for now we
can round the sleep interval up to 1 millisecond.
There is a very nasty-looking rwsleep(9) call elsewhere in
dev/acpi/dsdt.c that I'm going to leave as-is for now to avoid
breaking something.
With input from pirofti@, kettenis@, and mortimer@.
Tested by Lucas Raab, Moises Simon, mortimer@, and gkoehler@.
ok kettenis@
|
|
Early in the release cycle is the right time to do this.
"yes please" jcs@. ok deraadt@
|
|
Several machines have broken AML which reads past the end the end
of an array. Previously this was an aml_die/panic. acpica just warns
on such accesses, so this diff makes us do the same.
ok kettenis, jcs, deraadt
|
|
|
|
recursing into child devices looking for matches.
This ensures that when walking nodes with acpi_inidev, a method like
\_SB_.PCI0._INI will be executed before \_SB_.PCI0.I2C1.TPL1._INI.
This matches how ACPICA walks nodes and a commonly-used DSDT
template assumes that \OSYS has been initialized in \_SB_.PCI0._INI
before being used by other device _INI methods.
This should also help to execute \_INI and \_SB_._INI first, if
present, which ACPICA does explicitly.
Tested in snaps, ok deraadt
|
|
operators can take a data argument of Integer, String, or Buffer
types, not just Integer.
ok kettenis, deraadt
|
|
ok mpi@, tedu@, deraadt@
|
|
for now as amd64/i386 firmware still caters for legacy OSes that only
support a single PCI segment.
ok patrick@
|
|
ok mpi@, jung@, krw@, deraadt@
|
|
pocket which has a questionable BIOS. The code will now simply printf
and return to the caller without doing any I/O in this case. The spec
defines this to be undefined behaviour anyway.
ok kettenis, deraadt, pirofti
|
|
ok mlarkin@
|
|
pointed out by stsp@
|
|
ok mlarkin@
|
|
ok mlarkin@
|
|
provide the OEM defined regions that are used by the AML on some
Cherryview-based machines.
ok mlarkin@
|
|
|
|
assignment outside of the conditional.
ok stsp@
|
|
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
|
|
|
|
The DSDT on at MacBooks takes many different and beneficial code
paths when the OS reports to be Darwin, but due to the way it checks
OSI, we can't just add Darwin to the aml_valid_osi array since later
checks for Windows variants will supersede the Darwin check.
Fixes suspend and keeps Thunderbolt ports powered up after resume.
One regression is that the acpibat driver no longer attaches and
will require an ACPI Smart Battery driver, which is in the works.
Adapted from a similar change in the Linux kernel from 2014.
ok deraadt
|
|
before.
|
|
uses the mapping between AML nodes and PCI devices that we establish.
Because _INIT methods may end up calling aml_rdpciaddr(), make sure we
create that mapping early. Also handle devices that aren't actually present.
These devices are now included in the mapping and reads will return an
all-ones patterm whereas writes are a no-op..
ok mlarkin@
|
|
ok jca@ (a while back)
|
|
This is needed by an upcoming acpiec commit that handles machines breaking
the current ACPI specifications.
Change suggested by and ok kettenis@, guenther@
|
|
ok kettenis@
|
|
these occurring recently.
|
|
The second argument of aml_showvalue() was probably supposed to set
the verbosity level through dnprintf() but in fact it does nothing.
OK deraadt@
|
|
|
|
AML to peek and poke at GPIO pins as if it were reading and writing
registers. For now this only implements peeking at pins. It will print
a message if AML attempt to poke at a pin. And it will panic if the
assumptions made in the code are violated.
ok mlarkin@
|