| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This doesn't break anything on my laptop and some claim it helps them.
|
|
|
|
|
|
|
| |
ushort. In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
| |
|
| |
|
|
|
|
|
| |
EcEventWait(). If you get AE_HARDWARE_NO_RESPONSE errors, please enable
this info by setting hw.acpi.verbose=1 in loader.conf.
|
|
|
|
|
|
|
|
|
|
| |
namespace. To compensate for it only being used in the !ECDT case, use
a more robust approach to indicate a device was probed via ECDT by setting
the private ivar to be &acpi_ec_devclass. Without the acpi_MatchHid() call
now, it might have been possible for a non-EC device to have had its magic
match our previous flag.
Pointed out by: takawata
|
|
|
|
|
|
|
|
|
|
|
| |
to EcGpeQueryHandler on to any waiting threads through the softc. Similar
behavior was in the original version.
Also:
* Merge EcQuery into EcGpeQueryHandler to simplify locking
* Hold EcLock from the initial read of the CSR down to the wakeup or
until after the query command has been processed.
* ec_gpebit only needs to be a UINT8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
namespace has been evaluated. Machines with ACPI 2.0 expect this behavior
and have AML which calls EC functions early in the boot process. If the
ECDT is not available, fall back to original probe behavior.
Other minor changes:
* Add GPE bit and GLK usage to the device announcement
* Always use the global lock in the ECDT case, but potentially downgrade to
not using it if _GLK is 0 once the namespace is available. This is
announced with "Changing GLK from 1 to 0"
* Remove the acpi_object_list definitions which were earlier deprecated
Ideas from: takawata
|
|
|
|
|
|
| |
devices, we have to allow for the case when the isab0 device is ourselves.
Tested by: markm
|
|
|
|
|
|
|
| |
problem that for some very slow ECs (~6 ms occasionally) causes a
timeout. Also finish resource cleanup in the error case in attach.
Tested by: ume
|
| |
|
|
|
|
| |
and AcpiOsWritable() have type ACPI_SIZE and not UINT32.
|
|
|
|
|
|
|
|
| |
* Use ACPI_BUFFER as the type for AcpiGetObjectInfo
* Remove AcpiEnableEvent/AcpiClearEvent for ACPI_EVENT_FIXED (power/sleep
buttons) as they are no longer needed
* Change calls to use the new GPE functions
* Add AcpiOs*Lock functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Always use polled mode. The intr approach did not work for many
controllers and required the hw.acpi.ec.event_driven workaround.
* Only use an edge (not level) triggered GPE handler
* Add sc->ec_mtx for locking operations to a single EC. There were
many race conditions earlier between an SCI event and EcRead/Write.
* Use 1 ms as the global lock timeout
* Only acquire global lock if _GLK != 0
* Update EcWaitEvent to use an incremental backoff delay in its
poll loop. Wait 50 ms max instead of 10. Most ECs respond
in < 5 us (50 us when heavily loaded). However, some time out
occasionally even with a 10 ms timeout. For delays past 1 ms, use
msleep instead of DELAY to give SCI interrupts a chance to occur.
* Add EcCommand to send a command and wait for the appropriate event.
* The hw.acpi.ec.event_driven tunable is no longer applicable and
has been removed.
Ideas from: Linux
|
|
|
|
|
|
|
|
|
| |
extra trailing space.
- Don't bother probing a generic ISA bus device if isab0 already exists.
Some BIOSes place an ACPI psuedo-device with the HID of a generic ISA bus
device under the PCI-ISA bridge device. This is not the best solution
but will work for now. The isa bus driver only allows for one ISA bus
anyways.
|
|
|
|
|
|
|
|
|
| |
ACPI nodes with the plug and play ID's defined for a "Generic ISA Bus
Device" as defined in section 10.7 of the ACPI 2.0 specification. This
gives machines like the Libretto that contain a fake ISA bus that is not
connected via a PCI-ISA bridge an ISA bus for ISA devices to attach to.
Tested by: markm
|
|
|
|
|
|
|
|
|
|
|
|
| |
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
see if the device is disabled in the identify routine instead of in the
probe routine. This way if the device is disabled it is never created.
Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled". If this is a big problem, resource_disabled() can always be
changed to honor both names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interrupt to be used for a device. This is intended solely for internal
use of PCI bus implementations, and exists so that PCI bus drivers
implementing special interrupt assignment methods which require
additional work at the bus level to work right can be easily derived
from the generic driver (or any other one) without resorting to hacks.
It will be used in the sparc64 ofw_pcibus driver, which will be
committed shortly.
Make use of this method in the generic implementation, and add it to
the method table of bus drivers derived from the PCI one.
Reviewed by: imp, -hackers
|
|
|
|
|
| |
Also clarify a macro expansion with an XXX. I will be fixing access to
Acpi Global Lock in a subsequent commit.
|
|
|
|
| |
Approved by: re ("safe" amd64 support)
|
|
|
|
| |
Approved by: re (rwatson/bmah)
|
|
|
|
| |
Approved by: re (bmah)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at all (ie reads yield constant values). Display the width as the
difference between max and min so that constant timers have width
zero.
o Get the address of the timer from the XPmTmrBlk field instead of
the V1_PmTmrBlk field. The former is a generic address and can
specify a memory mapped I/O address. Remove <machine/bus_pio.h>
to account for this. The timer is now properly configured on
machines with ACPI v2 tables, whether PIO or MEMIO. Note that
the acpica code converts v1 tables into v2 tables so the address
is always present in XPmTmrBlk.
o Replace the TIMER_READ macro with a call to the read_counter()
function and add a barrier to make sure that we observe proper
ordering of the reads.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
the list of supported sleep state.
This should help people understand what following message means.
acpi0: AcpiGetSleepTypeData failed - AE_NOT_FOUND
MFC after: 3 days
|
|
|
|
| |
Sponsored by: DARPA, Network Associates Laboratories
|
|
|
|
|
|
|
| |
If _CID is string, it will need more complicated
handling to distinguish bus other than ISA.
Submitted by: Paul Wankadia <junyer@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
|
| |
|
|
|
|
|
|
|
|
|
| |
pci busses implement this.
Also minor comment smithing in cardbus. Fix copyright to this year
with my name on it since I've been doing a lot to this file.
Reviewed by: jhb
|
|
|
|
| |
Reviewed by: rwatson
|
| |
|
|
|
|
| |
Requested by: many
|
|
|
|
| |
especially in troff files.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than hard-coded uids and gids.
Switch the device to a group of wheel instead of operator.
Narrow down the permissions on the device to require root privilege
to manipulate the system power state. It may be that we can broaden
access to the device after review of the access control in ACPI.
Submitted by: kris
Reviewed by: takawata
|
|
|
|
|
|
|
|
|
|
| |
I/O port range, then we should ignore a resource if it's NOT
a memory range AND NOT an I/O port range.
The OR in the condition caused us to ignore perfectly valid
memory addresses.
While here, remove redundant parenthesis and reindent the
debug print to avoid long lines.
|
|
|
|
| |
Approved by: re(jhb)
|
| |
|
|
|
|
|
|
|
|
|
| |
There were no serious problem reports on this in spite of my concern.
To get debug output from acpi_pci_link, just enable bootverbose flag
in usual manner (boot -v).
Approved by: re
|
|
|
|
|
|
|
|
| |
This was effectively rendering _BBN useless.
- Cleanup handling of the busok variable a bit.
Submitted by: marcel (1)
Approved by: re (rwatson)
|
|
|
|
|
|
|
| |
Loading acpi.ko with kldload is disallowed, however some
functions were executed unexpectedly.
Approved by: re
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to PCI bridge can be read be evaluating the _BBN method of the host to PCI
device. Unfortunately, there appear to be some lazy/ignorant/moronic/
whatever BIOS writers that return 0 for _BBN for all host to PCI bridges in
the system. On a system with a single host to PCI bridge this is not a
problem as the child bus of that single bridge will be bus 0 anyway.
However, on systems with multiple host to PCI bridges and l/i/m/w BIOS
writers this is a major problem resulting in all but the first host to
PCI bridge failing to attach. So, this adds a workaround.
If the _BBN of a host to PCI bridge is zero and pcib0 already exists
and is not us, the we use _ADR to look up our PCI function and slot
(we currently assume we are on bus 0) and use that to call
host_pcib_get_busno() to try and extract our bus number from config
registers on the host to PCI bridge device. If that fails, then we make
an evil assumption that ACPI's _SB_ namespace lays out the host to PCI
bridges in ascending order and use our pcib unit number as our bus
number.
Approved by: re
|
|
|
|
|
|
|
|
| |
acpi_cmbat_init_battery() and acpi_cmbat_init_acline() respectively.
Call acpi_cmbat_init_battery() from acpi_cmbat_resume() too just in
case.
This is a workaround for embedded controller operations which is
unstable for about a minute (typically 30 or 40 sec.) at boot time.
|
|
|
|
|
|
|
|
|
|
| |
state. Instead, use ACPI_STA_PRESENT and ACPI_STA_FUNCTIONAL for it.
In some ACPI BIOS implementations, boot disabled devices don't have
ACPI_STA_ENABLE bit in _STA object.
Also it is not fatal if getting current IRQ of boot disabled devices
is failed in initial state.
And minor fixes.
|
|
|
|
| |
verbose mode on at boot time.
|
|
|
|
|
|
| |
not defined.
To make previous default behavior (ACPI_MAX_THREADS undefined), define
option ACPI_MAX_THREADS as 0.
|
|
|
|
| |
Reported by: Michael G. Petry <petry@NetMasters.Com>
|
|
|
|
|
|
| |
EcWaitEventIntr()'s behavior.
Some EC controllers require this for working properly (including
sleep/wakeup).
|