mycroft
d94e36f311
Add another one.
2003-11-02 19:42:03 +00:00
matt
0c6f824d5a
Fix LP64 bug.
2003-11-02 18:29:46 +00:00
jdolecek
076f4674a8
acpi_res_parse_ioport(): if the added entry is next to a previous I/O port
...
entry, just expand the previous entry instead of adding separate mapping
apparently some BIOSes make separate I/O port entries like this, and
some drivers then fail to attach; this change fixes mappings like
fdc0: io 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 drq 2
to
fdc0: io 0x3f2-0x3f5,0x3f7 irq 6 drq 2
change tested by Bernd Ernesti
2003-11-02 11:12:53 +00:00
mycroft
e45065a344
Dropped a word...
2003-11-01 23:22:54 +00:00
mycroft
c4330d824f
A small list of things needed here.
2003-11-01 23:22:21 +00:00
mycroft
4b29327094
Don't bothering reinitializing the sensor name strings when the battery info
...
is updated. Do print out the battery manufacturer info, though. (It's too
bad we can't return this through envsys........)
2003-11-01 22:55:53 +00:00
mycroft
31806f9f22
One more spot for a structure change.
2003-11-01 20:58:33 +00:00
yamt
64f5a4d263
make this compilable again with ACPI_DEBUG.
2003-11-01 19:24:42 +00:00
mycroft
efe8779bb3
Provide percentages for the threshold values too.
2003-11-01 10:55:12 +00:00
mycroft
7be875cdd8
Whoops, made a typo there.
2003-11-01 10:25:35 +00:00
mycroft
cf1951c350
Split "load" into "charge rate" and "discharge rate", depending on the state
...
of the battery.
2003-11-01 10:24:17 +00:00
mycroft
5c001506f5
Small change to use the "last full capacity" as the capacity maximum.
2003-11-01 09:49:45 +00:00
mycroft
007e2cd3b4
There's no need to clear the data_s fields now that the VALID bits are correct.
2003-11-01 09:41:25 +00:00
mycroft
be8e41d93a
sc_lockhandle is garbage.
2003-11-01 08:34:54 +00:00
mycroft
10e36668fc
Remove an unnecessary call to AcpiGlearGpe().
2003-11-01 08:27:37 +00:00
mycroft
b596969039
Correct arguments to AcpiClearGpe().
2003-11-01 08:14:39 +00:00
mycroft
ff9f7d764c
Do not install address handlers before calling AcpiEnableSubsystem() -- this
...
is done by AcpiInitializeObjects() anyway.
2003-11-01 08:03:24 +00:00
mycroft
6831bfd482
Remove some unused #defines.
2003-11-01 03:45:58 +00:00
mycroft
8dc2532a4f
Update copyright.
2003-11-01 03:45:48 +00:00
mycroft
63bc27bf55
Correct arguments to AcpiInstallGpeHandler, as per Linux and FreeBSD.
2003-11-01 01:38:25 +00:00
mycroft
8632b558b7
Move a declaration.
2003-11-01 01:03:23 +00:00
mycroft
0ec2bd2926
Whoops, forgot the /10 in the default case.
2003-10-31 21:52:11 +00:00
mycroft
3c3855c148
Print out the polling interval, and display a less confusing message if _TZP
...
is not defined.
2003-10-31 21:44:50 +00:00
mycroft
fbd3c995b1
Remove an outdated comment.
2003-10-31 21:39:51 +00:00
mycroft
fec4c11f9e
Catch up with ABI changes in ACPI-CA. Some additional changes to acpi_bat to
...
set the VALID bits correctly, so we don't report garbage for missing batteries.
2003-10-31 20:54:18 +00:00
mycroft
3970401fd9
Add a file.
2003-10-31 20:52:47 +00:00
mycroft
ded1804c79
Catch up with changes to the AcpiOs*() interfaces.
2003-10-31 20:52:30 +00:00
mycroft
6c29cf39bb
Merge acpica-unix-20031029.
2003-10-31 20:51:07 +00:00
mycroft
0314a111c1
Import latest ACPI-CA.
2003-10-31 20:47:38 +00:00
mycroft
31273d1288
We were passing flags to AcpiEnableSubsystem() that aren't even used there.
...
Call AcpiInitializeObjects() to create global variables and run _INI methods.
2003-10-31 17:22:28 +00:00
mycroft
f0b481ee05
Swap the order of buffer initialization and _STA/_INI execution. _INI methods
...
sometimes want to store data in global buffers (e.g. on the Inspiron 8500, to
remember initial battery status).
2003-10-31 17:21:01 +00:00
mycroft
68a1d153b6
Use ratecheck() to prevent envstat(1) doing many ACPI calls at once. Now my
...
MP3 player doesn't skip...
2003-10-30 22:12:02 +00:00
mycroft
95dfd3bd55
Use AcpiEvulateObjectTyped() to simplify some code.
2003-10-30 20:29:54 +00:00
mycroft
9e419e7a10
Check to see if we have valid status info before looking at it.
2003-10-30 19:33:24 +00:00
mycroft
208fa12050
Remove another extra AcpiGetObjectInfo().
2003-10-30 18:15:35 +00:00
mycroft
97fa5fbf36
Minor tweaks:
...
* Only fetch the object info a second time if we activated the device.
* Do not attempt to activate a device with no HID.
2003-10-30 18:13:38 +00:00
mycroft
3dc763c88b
Patches from Christos to fix double-frees and error handling.
2003-10-30 17:46:08 +00:00
simonb
b6abb6ab1d
Remove some assigned-to but otherwise unused variables.
2003-10-30 01:58:17 +00:00
christos
50459b4529
Fix uninitialized variable warnings.
2003-10-27 06:15:52 +00:00
christos
7e494b3ce8
Add a Quirk for my Appro, where it does not find all its busses in ACPI
2003-10-02 16:05:33 +00:00
christos
7da4d27c12
imake this compile again.
2003-09-25 21:55:49 +00:00
mycroft
864b96269c
Modify the fdcattach() interface again, splitting it into two parts, so that
...
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
mycroft
3d7395ab71
Update for new attach method.
2003-09-25 01:12:43 +00:00
gson
144519b826
The unit displayed when printing battery capacities and
...
charge/discharge rates was incorrect - the value printed is actually
in A, W, Ah, or Wh, not in mA, mW, mAh, or mWh (assuming as we must
that the period is interpreted as a decimal point, not a thousands
separator).
2003-08-31 01:36:12 +00:00
kochi
42ade8383d
check return value of AcpiEnterSleepStatePrep() to catch
...
any failure
2003-08-17 03:45:19 +00:00
kochi
e7df232658
'struct acpi_resources' will have references to malloc'ed memory.
...
So it's better to not to allocate on stack.
2003-08-15 17:22:23 +00:00
kochi
77db8900ab
Correct calculation of timeout.
2003-08-15 17:07:04 +00:00
kochi
645984364d
Workaround for AcpiOsGetThreadId: can be called with curlwp == NULL
2003-08-03 08:19:58 +00:00
kochi
28e9389fdb
Fix a wrong handling of clearing a flag
2003-08-03 08:16:07 +00:00
christos
ec3e43edf4
appease gcc-3 by adding ULL to constants that do not fit in longs
2003-08-03 03:49:29 +00:00
lukem
365cbd9428
add missing __KERNEL_RCSID()
2003-07-14 15:47:00 +00:00
kochi
61634e9a74
Don't compile db*.c & dm*.c unless ACPI_DEBUG and DDB are specified
2003-07-08 15:34:32 +00:00
itojun
a706d499a1
function prototype must not have variable name
2003-07-08 09:07:15 +00:00
kochi
473dc8a475
make bootup messages prettier
2003-07-06 05:24:18 +00:00
kochi
9ab543513d
o cleanup usage of ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP
...
o delete usage of ENABLE_DEBUGGER
As ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP are defflag'ed in files.acpi,
these options don't have to have a value.
2003-07-06 04:03:21 +00:00
kochi
03c72d8b24
Fix typo.
2003-07-06 03:50:07 +00:00
kochi
3c3271accf
Cleanup usage of ENABLE_DEBUGGER/ACPI_DEBUGGER/DDB.
...
By this change, ACPI debugger/disassembler are only
compiled when both DDB and ACPI_DEBUG options are
specified. This change also reduces the kernel size
a little when ACPI_DEBUG is not specified.
2003-07-03 14:37:34 +00:00
kochi
7a37dbe54d
cleanup usage of ACPI_ALLOCATE_BUFFER/AcpiOsFree combination
2003-07-02 12:23:25 +00:00
kochi
735150f269
print ACPI CA version
2003-07-02 11:54:43 +00:00
kochi
68dae3c110
Implement AcpiOsDerivePciId
2003-07-02 11:45:08 +00:00
kochi
862f80594c
Bugfix from FreeBSD tree:
...
>Fix a bug in register access. This should fix warning messages of:
> ACPI-0340: *** Error: Could not release ACPI Global Lock, AE_BAD_PARAMETER
Thanks for jhb@freebsd to find out this problem.
2003-07-01 17:49:57 +00:00
fvdl
d5aece61d6
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
...
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
...
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner
1a03e79900
don't #include <sys/dkstat.h> where it is (appearently) unused
2003-06-18 08:58:34 +00:00
gson
f60f21cf0b
The remaining capacity percentage was incorrect for batteries larger than
...
21.47 Wh becaue of integer overflow.
2003-05-29 02:47:49 +00:00
kochi
0cb6714769
Backport a bugfix from the latest ACPI CA.
...
This will fix false AE_NOT_FOUND messages, reported in
port-i386/20897.
2003-05-25 10:08:24 +00:00
kochi
0d6c5a668c
* make use of NetBSD ACPI APIs (acpi_eval_{struct,integer})
...
* minor cleanups
2003-05-22 15:35:51 +00:00
christos
a2f80a1464
size_t != unsigned int all the time.
2003-05-21 17:23:55 +00:00
fvdl
c0b6986667
Add quirk handling to ACPI. First quirk entry is "PTLTD " rev 0x06040000,
...
which gives problems with PCI bus finding; the object hierarchy doesn't
match the real world for some systems, most notably SuperMicro boards.
Linux has this one blacklisted as well.
2003-05-15 21:29:49 +00:00
kochi
bf026fa41a
Fix a reference count problem that may cause unexpected memory free etc.
...
This is a backport of the latest ACPI CA that has a fix for this.
2003-05-13 13:29:00 +00:00
kochi
19e73853da
Fix parent-child loop problem found by Takashi Yamamoto.
2003-05-13 13:07:13 +00:00
fvdl
f0e810d923
Always use 32bit-wide header pointers for an RSDT (ACPI 1.0). The comment
...
in the code talks about "machine-dependent length", but my copy of
the spec clearly says "an array of 32-bit physical addresses".
2003-05-12 00:19:17 +00:00
fvdl
26f04d0979
Avoid a strict-alias warning.
2003-05-11 21:21:16 +00:00
fvdl
3d7030e668
Avoid some strict-alias warnings.
2003-05-11 21:20:23 +00:00
fvdl
c99f4a15ba
s/UINT32/ACPI_SIZE/ to match function prototypes.
2003-05-11 19:08:37 +00:00
wiz
1ffa7b76c4
DMA, not dma nor Dma.
2003-05-03 18:10:37 +00:00
yamt
545cae513c
this doesn't need to include callout.h anymore.
2003-04-26 16:38:00 +00:00
thorpej
9dd2908b35
Use sysmon_taskq.
2003-04-20 20:21:29 +00:00
tron
6d26862b28
Fix for ACPI poweroff problem provided by Takayoshi Kochi. This resolves
...
PR kern/20614 by myself.
2003-04-19 16:09:16 +00:00
thorpej
5a20f4be3c
* Add a generic power management event API, defined in <sys/power.h>.
...
Right now, only power switch state change events are supported. This
is a work-in-progress.
* Add support to sysmon for delivering power mangement events to userland.
Add poll, kqueue, and read entry points to sysmon.
* Adapt ACPI to use the new generic <sys/power.h> event types.
This provides the kernel support for a forthcoming powerd(8) which can
do nice things like gracefully shut the system down when an ACPI power
button is pressed.
2003-04-18 01:31:34 +00:00
matt
062bcd3204
acpi.c needs sysmon_power too.
2003-04-17 20:56:29 +00:00
thorpej
b7394dfe47
Adapt to the sysmon_pswitch interface.
2003-04-17 01:34:14 +00:00
thorpej
ea45f2ccc1
Oops, remove a debugging define.
2003-04-17 01:26:41 +00:00
thorpej
59ea64b6f0
* Don't do the ACPI_PCI_FIXUP unless it is explicitly enabled in
...
the kernel config file. That code makes a total mess of any
system with multiple PCI busses.
* Rework the way buttons are handled; register them with sysmon,
and let it take the appropriate action. This lets us gracefully
shut down when the power button is pressed.
2003-04-17 01:22:21 +00:00
kanaoka
5c5aa9ba83
Make sure this compiles with ACPI_DEBUG.
...
Pointed out by Patrick Welche <prlw1@newn.cam.ac.uk>.
2003-03-07 15:17:44 +00:00
christos
1fbc199e4e
use M_ACPI where appropriate.
2003-03-05 23:00:56 +00:00
kochi
7629f23bb8
Fix a bug that affects machines which has non-zero base GPE blocks.
...
This bug is already reported to Intel ACPICA people.
2003-03-05 15:13:01 +00:00
kochi
b1b04fbfdf
Update for acpica-unix-20030228.
2003-03-04 17:28:00 +00:00
kochi
589c0d70ae
Resolve conflicts from acpica-20030228-2 import.
2003-03-04 17:25:09 +00:00
kochi
f874599c20
Import the Intel ACPICA 20030228 release.
2003-03-04 17:07:34 +00:00
kochi
f93b318be7
import the Intel ACPICA 20030228 release
2003-03-04 16:43:14 +00:00
kochi
e2b5c0723f
Remove unexpectedly imported ACPI CA files and obsolete files
2003-02-26 17:06:40 +00:00
christos
580397c542
back-out previous; it was wrong.
2003-02-24 20:03:02 +00:00
christos
29cd3b6180
fix memory leaks.
2003-02-24 19:58:09 +00:00
yamt
148af81ca0
initialize a simple_lock in softc.
2003-02-19 11:32:13 +00:00
tshiozak
d62eb597a2
fix a few problems in the last commit:
...
- make sure that the driver checks the battery presence at acpibat_update()
if the battery has been not present, because the driver sometimes
(i.e. boot time or resuming time) miss to sense the presence.
- make sure that the driver always update the status at acpibat_gtredata();
I misunderstood about ACPI_NOTIFY_BatteryStatusChanged event.
2003-02-17 14:37:57 +00:00
tshiozak
f27a62da88
- reduce the frequency of updating informations on the power sources;
...
it is very slow to access to EC on some machines (i.e. CASIO FIVA 2xx).
- clean the flags up.
- add locks while updating informations.
- some cosmetic changes.
2003-02-16 16:50:09 +00:00
tshiozak
e077f7a7d9
- add acpi_acquire_global_lock()/acpi_release_global_lock()/
...
acpi_is_global_locked() functions.
AcpiGlobalLock() API should be used to acquire lock between BIOS and OS.
This API cannot be used to lock between threads of the OS side,
because this function immediately returns if the lock is already acquired
by the OS. c.f. AcpiEvAcquireGlobalLock()@evmisc.c
- make sure that acpiec driver uses above functions.
- use ACPI_ALLOCATE_BUFFER instead of twice calls of AcpiEvaluateObject(),
in acpi_eval_string()/acpi_eval_struct().
Twice AcpiEvaluateObject() calls may cause twice side effects
to ACPI machine / hardware and this may be wrong in some cases.
2003-02-14 11:05:39 +00:00
kanaoka
47b9a825ab
Resolve conflict from acpica-unix-20030123.
2003-02-13 14:16:13 +00:00
kanaoka
34d90725e0
Import INTEL 20030123 release.
2003-02-13 13:51:55 +00:00