Commit Graph

91 Commits

Author SHA1 Message Date
joerg
870cffb0ab Add new IPI for saving CPU state explicitly, share high-level part of
ACPI wakeup code and teach it how to start the APs again. As a side
effect the CPU_START interface allows choosing between different
bootstrap codes more easily now.
2007-12-18 07:17:08 +00:00
christos
6d8587f061 from jmcneill: suspend and resume handlers for spic. 2007-12-17 19:51:09 +00:00
joerg
9ba317469f Move mapping of the real mode location for the ACPI wakeup code into a
separate function called from acpi_md_callback.
2007-12-15 11:26:40 +00:00
joerg
261292569c Steal some rope from innocent users and disallow ACPI suspend if more
than one CPU was found.
2007-12-15 09:15:37 +00:00
jmcneill
c44d13d630 No longer required after jmcneill-pm merge. 2007-12-11 23:07:30 +00:00
lukem
a4914dc7f9 Use __KERNEL_RCSID(). For these .S files, the following style was
adopted, a la .C files and <sys/cdefs.h>:
  *  move <machine/asm.h> to the top
  *  use __KERNEL_RCSID() immediately after it
2007-12-11 23:06:11 +00:00
dogcow
646b6c65c5 sometimes we don't have MTRR. (thanks, taca!) 2007-12-10 03:12:46 +00:00
smb
55755eddc3 Change pnp_get_platform to pmf_get_platform 2007-12-09 21:52:05 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
ad
9c412e0cbf x86 changes for pcc and LKMs.
- Replace most inline assembly with proper functions. As a side effect
  this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
  smaller amount. Nearly all of the inlines did something slow, or something
  that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
  In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.
2007-09-26 19:48:34 +00:00
jmcneill
fa02ff9185 Pull in i82489var.h in the NLAPIC > 0 case, from Geoff Wing. 2007-08-02 11:23:35 +00:00
jmcneill
cedc871a24 Explicitly reinitialize lapic on resume; gets the clock ticking on the
Lenovo T60 and probably many others.
2007-08-01 22:41:59 +00:00
joerg
22ee755a55 Make the beep on resume optional. It gets controlled by
machdep.acpi_beep_on_reset.
2007-04-28 14:03:00 +00:00
rmind
4e3ec8a076 vald_acpi_libright_get_bus: Plug a possible memory leak.
CID: 4358
2007-04-04 01:34:44 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
tshiozak
72fabe35a2 In acpi_restorecpu, "pushl ret_addr" was wrong.
this decrease esp unsuitably.  this may crash the kernel while leaving
acpi_md_sleep().  (rely on the code generation options passed to cc)
2007-01-24 20:32:45 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
0e5129986f fix print formatting. 2006-10-29 19:05:36 +00:00
christos
1fb46e1531 handle NPX_CPUID. reported by Takahiro Kambe 2006-10-29 16:11:54 +00:00
dogcow
f7bd540aee cargo-cult copy changes from npx_isa.c so that GENERIC.MPACPI builds again.
(hi, christos!)
2006-10-29 09:24:47 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
03a48a92ca Coverity CID 4027: Initialize oldphys (from Arnaud Lacombe) 2006-09-29 14:41:32 +00:00
christos
2e36d566f6 If we the current process is a kernel proc, then we don't need to play with
the pmap, because the wakecode is already mapped. Makes the acpi based apm
shim work.
2006-07-01 21:42:39 +00:00
jmcneill
f86d875a7a Add an 'uninit' callback to PCI ICU drivers. This allows (for example) the
PIIX support to release its mapping on the edge/level control registers.

Now that these are guaranteed to be unmapped, capture and restore the
registers in piixpcib(4)'s powerhook. The same will need to be done on a
per-chipset basis.

Concerns were raised about calling pci_intr_fixup on resume WRT hotplug
devices, so this has been removed.

Ok cube@.
2006-06-22 16:24:34 +00:00
jmcneill
58e47b4c68 Only call pci_intr_fixup if both PCI_INTR_FIXUP and PCIBIOS options are
defined.
2006-06-22 13:05:28 +00:00
jmcneill
c6b709de73 Call pci_intr_fixup on resume if options PCI_INTR_FIXUP is enabled. Solves
interrupt sharing issues on my Vaio PCG-Z505LEK after a suspend/resume
cycle.
2006-06-21 18:12:47 +00:00
jmcneill
92a6d96206 Regen. 2006-06-20 22:37:14 +00:00
jmcneill
93305d7b62 Make resetting the video BIOS in the ACPI wakecode optional. It can be
configured via sysctl machdep.acpi_vbios_reset. Defaults to 1 -- reset vbios
on resume.
2006-06-20 22:36:58 +00:00
jmcneill
6df1267b6f Enable interrupts in the error path also. 2006-06-19 02:33:19 +00:00
christos
99d15da99a Don't dick with cr3. It pisses pmap.c off. 2006-06-17 20:14:26 +00:00
jmcneill
e1b3711024 More ACPI wakecode changes:
* Enable VBIOS hack by default
	* Beep while calling VBIOS, for debugging.
	* Fix a DIAGNOSTIC error in the sleep path.
	* Remove the erroneous mutex not locked error message.
2006-06-17 17:11:53 +00:00
jmcneill
d651f09fd7 Regen. 2006-06-15 18:09:14 +00:00
jmcneill
fe984d2ec9 Do not restore task registers in wakecode. 2006-06-15 18:07:58 +00:00
kardel
09b51ec920 convert to timecounters (from branch simonb-timecounters) 2006-06-07 22:37:14 +00:00
jmcneill
5e2e06bb91 We shouldn't have to manually edit acpi_wakecode.h after it has been
regenerated. Pad wakecode with "0x00" rather than "0x  ".
2006-03-11 00:31:42 +00:00
thorpej
a9beff9534 Use aprint_*(). 2006-02-19 14:59:22 +00:00
kochi
7e7584688f define phys_wakeup as static 2006-02-16 09:22:51 +00:00
kochi
9e72fe1e5e adapt for ACPI-CA 20060113 2006-01-29 03:12:22 +00:00
perry
68da44823c u_intN_t -> uintN_t 2005-12-26 19:23:59 +00:00
perry
50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos
cde8d91b30 always set the value, don't shortcut when val == oval.
From Sami Kantoluoto
2005-12-13 16:54:21 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos
e87cf683ad PR/32276: Sami Kantoluoto: Add driver to handle brightness control on Sony
VAIO.
2005-12-11 02:40:25 +00:00
kochi
42773dd406 Merge changes for ACPI-CA 20050408. 2005-05-02 14:54:46 +00:00
yamt
7301e7ab7b sprinkle __used so that variables referenced from asm code don't get
optimized out.
2005-04-21 14:03:24 +00:00
jmcneill
109219993b Fixup ACPI wakecode on i386. This (along with some PCI power management
hooks) allows my Latitude D600 to recover from S3 sleep.

acpi_wakeup.c changes from lha@:
  http://people.su.se/~lha/patches/netbsd/acpi-wakeup-1
2005-01-26 21:46:38 +00:00
thorpej
523f87a2ce PTDpaddr -> PDPpaddr 2004-08-27 03:51:34 +00:00