Commit Graph

85 Commits

Author SHA1 Message Date
skrll
b70033bc21 Split out the pmap_pv_track stuff for use by others.
Discussed with riastradh@
2015-11-11 08:20:22 +00:00
knakahara
8ec1d9400a add x86 MD MSI/MSI-X support code. 2015-04-27 07:03:57 +00:00
uebayasi
0895dc7210 Normalize: acpicpu depends on acpi. 2014-10-10 17:44:17 +00:00
uebayasi
46d7be3c23 Define "machdep" attribute and mark files (in amd64 and x86). 2014-10-10 09:13:21 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
soren
e943400c80 A few "isa" files are so tightly integrated into the x86 platform code
as to not really be part of the optional isa bus autoconf machinery.

Allows configuring a kernel like so:

include "arch/amd64/conf/GENERIC"
no isa
2013-07-17 21:26:28 +00:00
drochner
312c339026 Extend the CPU microcode update framework to support Intel x86 CPUs.
Contrary to the AMD implementation, it doesn't use xcalls to distribute
the update to all CPUs but relies on cpuctl(8) to bind itself to the
right CPU -- to keep it simple and avoid possible problems with
hyperthreading.
Also, it doesn't parse the vendor supplied file to pick the right
part for the present CPU model but relies on userland to prepare
files with specific filenames. I'll commit a pkg for this in a minute
(pkgsrc/sysutils/intel-microcode).
The ioctl interface changed; compatibility is provided (should be
limited to COMPAT_NETBSD6 as soon as this is available).
2012-08-29 17:13:21 +00:00
jym
8cf41b7663 Merge i386 and amd64 version of db_memrw.c.
Use this opportunity to skip calculating the VA of the page. Let the CPU
deal with the invalidation itself through invlpg + destination address to
avoid converting between canonical/non canonical forms.
2012-05-07 17:45:28 +00:00
martin
e485c8dbaa Make option CPU_UCODE global 2012-01-13 21:46:00 +00:00
cegger
a3f6c06746 Support CPU microcode loading via cpuctl(8).
Implemented and enabled via CPU_UCODE kernel config option
for x86 and Xen Dom0.
Tested on different AMD machines with different
CPU families.

ok wiz@ for the manpages
ok releng@
ok core@ via releng@
2012-01-13 16:05:14 +00:00
dyoung
c9f2f11694 Don't link pci_ranges.c with x86 kernels for now, it's using a
pcibus_attach_args member that I haven't added, yet.
2011-10-19 05:22:25 +00:00
jmcneill
268b8144da vmt needs sysmon_taskq 2011-10-17 23:24:05 +00:00
jmcneill
233dd477e3 add a port of the VMware Tools driver vmt(4) from OpenBSD 2011-10-17 22:39:22 +00:00
dyoung
50eec10ffa Add pci_ranges.c to the set of files compiled when 'pci' is configured. 2011-08-29 22:46:56 +00:00
jruoho
2ef5adcc96 Follow IA-64 with the x86-specific ACPI MD functions and move these where
they belong to. Remove an unused function. Minor KNF. No functional change.
2011-06-12 11:31:30 +00:00
jruoho
0fc4e4ab7e Move the evaluation of the _PDC control method out from the acpicpu(4)
driver to the main acpi(4) stack. Follow Linux and evaluate it early.
Should fix PR port-amd64/42895, possibly also PR kern/42583, and many
other comparable bugs.

A common sense explanation is that Intel supplies additional CPU tables to
OEMs. BIOS writers do not bother to modify their DSDTs, but instead load
these extra tables dynamically as secondary SSDT tables. The actual Load()
happens when the _PDC method is invoked, and thus namespace errors occur
when the CPU-specific ACPI methods are not yet present but referenced in the
AML by various drivers, including, but not limited to, acpitz(4).
2011-06-12 10:11:52 +00:00
rmind
e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
dyoung
0840f9ccfc Don't use the C preprocessor to configure USERCONF. Instead, either do
or do not link in subr_userconf.c and x86_userconf.c.

Provide no-op stubs for userconf_bootinfo(), userconf_init(), and
userconf_prompt().

Delete all occurrences of #include "opt_userconf.h" as well as USERCONF
and __HAVE_USERCONF_BOOTINFO #ifdef'age.
2011-05-31 23:28:52 +00:00
christos
a640264e31 Merge db_trace for x86. From: Vladimir Kirillov proger at wilab dot org dot ua 2011-04-10 20:36:48 +00:00
dyoung
fd8e7c1dbb As pointed out by Manuel Bouyer and Taylor R Campbell, I forgot to
commit the change to files.x86 that adds x86_stub.c, so do that.
2011-04-04 21:33:49 +00:00
jakllsch
43a7c6ff37 sys/arch/x86/x86/iclockmod.c has been removed. 2011-03-16 11:35:36 +00:00
jruoho
839fb5fa76 Move INTEL_ONDEMAND_CLOCKMOD -- or odcm(4) -- to the cpufeaturebus. 2011-03-04 04:48:39 +00:00
jruoho
494badeb16 Move acpicpu(4) from "acpinodebus" to "cpufeaturebus". 2011-02-27 17:10:33 +00:00
jruoho
db31212b02 Move VIA_C7TEMP to the cpufeaturebus. 2011-02-24 13:58:39 +00:00
jruoho
ad932f2c35 Move PowerNow! to the cpufeaturebus. 2011-02-24 10:56:00 +00:00
jruoho
acdf26369f Move ENHANCED_SPEEDSTEP, or henceforth est(4), to the cpufeaturebus. 2011-02-23 11:43:21 +00:00
jruoho
8cbd1d28ca Modularize coretemp(4). Ok jmcneill@. 2011-02-20 13:42:45 +00:00
jmcneill
d86215c443 modularize VIA PadLock support
- retire options VIA_PADLOCK, replace with 'padlock0 at cpu0'
 - driver supports attach & detach
 - support building as a module
2011-02-19 13:52:27 +00:00
yamt
facea15793 decouple tprof and its backends. 2011-02-05 14:00:34 +00:00
jruoho
4d861e5bb4 Merge a driver for ACPI CPUs with basic support for processor power states,
also known as C-states. The code is modular and provides an easy way to add
the remaining functionality later (namely throttling and P-states).

Remarks:

  1.	Commented out in the GENERICs; more testing exposure is needed.

  2.	The C3-state is disabled for the time being because it turns off
	timers, among them the local APIC timer. This may not be universally
	true on all x86 processors; define ACPICPU_ENABLE_C3 to test.

  3.	The algorithm used to choose a power state may need tuning. When
	evaluating the appropriate state, the implementation uses the
	previous sleep time as an indicator. Additional hints would include
	for example the system load.

	Also bus master activity is evaluated when choosing a state. The
	usb(4) stack is notorious for such activity even when unused.
	Typically it must be disabled in order to reach the C3-state,
	but it may also prevent the use of C2.

  4.	While no extensive empirical measurements have been carried out, the
	power savings are somewhere between 1-2 W with C1 and C2, depending
	on the processor, firmware, and load. With C3 even up to 4 W can be
	saved.  The less something ticks, the more power is saved.

ok jmcneill@, joerg@, and discussed with various people.
2010-07-18 09:29:11 +00:00
rmind
7c940b718e Unify i386 and amd64 procfs MD code into x86. 2010-07-08 11:24:59 +00:00
rmind
b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
jmcneill
574c128daa Add support for VIA C7 temperature sensors (options VIA_C7TEMP) 2009-10-02 18:50:03 +00:00
rmind
cc8d7ff411 Move x86 CPU topology detection code into the separate file (as it was originally).
OK by <yamt>.
2009-04-30 00:07:23 +00:00
dyoung
c94ffba5d6 Introduce sys/arch/x86/x86/mp.c for common x86 MP configuration code.
mpacpi_scan_pci() and mpbios_scan_pci() are identical code, so replace
them with mp_pci_scan().

Introduce mp_pci_childdetached(), which helps us to detach root PCI
buses that were enumerated either by MP BIOS or by ACPI.

Let us detach and re-attach PCI buses from mainbus0 on i386.  This is
necessarily a work-in-progress, because testing detach and re-attach
is very difficult: to detach and re-attach the entire PCI tree on most
x86 computers that I own is not possible because some essential device
attaches under the PCI subtree: the console, com0, NIC, or storage
controller always attaches in the PCI tree.
2009-04-17 21:07:58 +00:00
rmind
3de18e79b4 - Add macros to handle (some) trapframe registers for common x86 code.
- Merge i386 and amd64 syscall.c into x86.  No functional changes intended.

Proposed on (port-i386 & port-amd64).  Unfortunately, I cannot merge these
lists into the single port-x86. :(
2009-04-16 15:34:23 +00:00
dyoung
720a7dca79 Add opt_intrdebug.h for the INTRDEBUG option, and #include it here and
there.  Fixes GENERIC/i386 compilation with 'options INTRDEBUG'.
2009-04-07 18:24:23 +00:00
rmind
70456c4d9e Merge i386 and amd64 vm_machdep.c into x86. No functional changes intended.
Note: some #ifdefs will be removed with macros.
2009-03-30 22:20:55 +00:00
rmind
74a033c8eb Merge/move core_machdep.c into x86, no difference between i386 and amd64. 2009-03-30 22:13:42 +00:00
yamt
4b64c2cb3d - rewrite x86 nmi dispatcher so that establish and disesablish are safe
on a running system.
- adapt existing users of the api.  (elan)
- adapt tprof_pmi driver to use the api.
2009-02-24 06:03:54 +00:00
jmcneill
26168b4071 PR# port-i386/37026: userconf(4) doesn't work with vesafb(4)
Add early console support for x86 genfb.
2009-02-17 01:42:51 +00:00
joerg
9ae4651601 Move some MD declarations from x86/pci/files.pci to x86/conf/files.x86,
so that Xen can use the former.

Drop Xen's pcib.c in favor of the x86 code and thereby unbreak ichlpcib.
2008-08-03 19:32:03 +00:00
ad
50d8ae9d14 Simplify x86 identcpu code, and share between i386/amd64. 2008-05-11 14:44:53 +00:00
joerg
a790b941e6 Make cpu_idle a macro calling a function pointer on x86.
Select the Xen idle routine for Xen, mwait if supported by the CPU and
it is not AMD and halt otherwise. As reported by Christoph Egger,
AMD Barcelona keeps the CPU in C0 state with MWAIT, contrary to HLT,
which uses C1 and therefore much less power.
2008-05-09 18:11:28 +00:00
ad
1a1d0b7f30 Include null IPI functions if !MULTIPROCESSOR. 2008-04-25 13:26:27 +00:00
yamt
cfb66876d1 try to detect processor resource sharing topologies. ie. package/core/smt IDs. 2008-01-01 20:32:10 +00:00
yamt
2cbcb46f49 - share idt entry allocation code among x86.
- introduce a function to reserve an idt entry and use it instead of
  manipulating idt_allocmap directly.
- rename idt to xen_idt for amd64 xen.  add missing #ifdef XEN.
2007-12-26 11:51:10 +00:00
joerg
9a98cd19ff Add initial version of calling VGA POST from vga_resume. This is the
equivalent to "vbetool post" using x86emu in the kernel.
2007-12-25 14:22:25 +00:00
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
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00