Commit Graph

481 Commits

Author SHA1 Message Date
ad
6a310e099d Back out part of patch that got merged accidentally. 2007-12-02 20:34:41 +00:00
ad
3ce0f72397 Use atomics to adjust ci_flags. 2007-12-02 19:33:31 +00:00
jmcneill
e501c34199 SILENCE! I kill you! 2007-12-02 06:51:52 +00:00
ad
4e780c2f88 Shh 2007-12-01 16:45:35 +00:00
jmcneill
a0d3b0d7a8 aprintify 2007-12-01 14:35:51 +00:00
jmcneill
1b940a02fa aprintify 2007-12-01 06:05:18 +00:00
jmcneill
4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
ad
4517da3861 x86_mb_nop is now unused. 2007-11-28 18:19:20 +00:00
ad
a0b58b4601 Remove remaining CPUCLASS_386 tests. 2007-11-28 16:44:46 +00:00
ad
6def667f04 Use the new atomic ops. 2007-11-28 16:28:43 +00:00
ad
0cddf536c0 Hook in the atomic ops from libkern. 2007-11-28 15:26:00 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
markd
80601465c6 Add Intel Q35/G33/Q33 bridges. 2007-11-24 02:18:48 +00:00
bouyer
62b95d1250 Put back part of revision 1.1.4.8: the L4 page has to be pinned as L4
before before being mapped by APDP_PDE.
2007-11-23 16:33:25 +00:00
xtraeme
2c375380d5 tcotimer_setmode: convert seconds to ticks after the value has been
checked with the limits. We can use now the max timeout value on ICH6
or newer (i.e 613 seconds and not the half of it as previously).
2007-11-23 11:21:14 +00:00
xtraeme
54d41c7770 Use the returned value of xc_unicast() on xc_wait(), that will wait
for completion on the CPU running the xcall thread.

Tested on a 8-way Xeon by Greg Oster.
2007-11-22 16:27:06 +00:00
bouyer
4e54134323 Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.
2007-11-22 16:16:40 +00:00
yamt
38d5e34116 make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
2007-11-21 10:19:06 +00:00
ad
2795528241 #include <sys/atomic.h> instead of local prototypes. 2007-11-18 18:09:10 +00:00
xtraeme
31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
ad
e4df9c1dd8 Disable TLB shootdown IPIs while in the debugger. Crashdumps may try to
use them, and all but one CPU is paused. Reported and tested by martin@.
2007-11-15 19:46:44 +00:00
ad
deae4f32c5 Remove support for 80386 level CPUs. PR port-i386/36163. 2007-11-15 19:18:32 +00:00
ad
9014362808 - Remove I486_CPU, I586_CPU, I686_CPU options. They buy us nothing and
clutter the code significantly.
- Remove pccons.
2007-11-14 17:54:56 +00:00
joerg
64dcc1f587 Merge from jmcneill-pm:
Add some more defines from the spec. Remove some old ones not
existing in the current Intel Architecture Guide. Use some more
understandable names.

ANSIfy and use uintXX_t to hurt my eyes less.

Further improve readability by exploiting __HAVE_TIMECOUNTER as
invariance on x86 platforms.
2007-11-14 15:54:22 +00:00
ad
a8bd124ebf cpu_hatch: change lapic initialization order. 2007-11-14 14:59:28 +00:00
ad
cf96d257bf Use i8254_delay(). 2007-11-14 14:50:33 +00:00
ad
1e3209066c +LAPIC_DLMODE_EXTINT 2007-11-14 14:45:50 +00:00
joerg
fa98d432c4 Force all interrupts to notify the primary CPU's APIC by default,
independent on what the BIOS programmed the IOAPIC for.
2007-11-13 21:45:40 +00:00
ad
61bbd00d33 In cpu_hatch(), recompute ci_tsc_freq instead of using the boot CPU's value. 2007-11-13 18:41:59 +00:00
ad
a8a8de7393 When running uniprocessor, patch _kernel_lock() and _kernel_unlock() to
do nothing more than "nop; ret".
2007-11-13 18:38:58 +00:00
joerg
0bed2981dc Add Intel 82965PM bridge from jmcneill-pm. 2007-11-12 19:40:49 +00:00
ad
6856a132b2 Merge cpu_need_resched() from vmlocking:
- Always do an aston(), even if not sending an IPI. May help with xine.
- Post asts on cpu_onproc, not ci_curlwp.
2007-11-12 19:02:26 +00:00
ad
1207625f42 - cpu_vendor was both an int and char[] on amd64 - fix it.
- Run the errata check/patch on all CPUs, not just the boot processor.
2007-11-12 18:44:42 +00:00
ad
7d979d5024 pmap_load: pmap_reference() can no longer block. 2007-11-11 01:30:55 +00:00
ad
7aaa70d105 fsbase/gsbase:
- Fix a few bugs with it, in particular fork/exec handling.
- Store the descriptors in the PCB, not in the LWP.
2007-11-10 23:04:28 +00:00
ad
7135f4bde9 - When computing the TSC frequency, call i8254_delay() and not DELAY().
- Use atomics to adjust the pmap reference count, instead of taking locks.
- Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used
  as per-thread registers. This is compatible with FreeBSD.
- Run patches after we have attached CPUs, since we then know if the
  system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR
  and makes running MP kernels on UP systems cheaper.
- Patch out many of the 'lock' prefixes to nops if uniprocessor.
- Do a wbinvd after patching to ensure that the trace/instruction cache
  is up to date.
2007-11-10 20:06:23 +00:00
ad
ceb9d03641 __cpu_simple_locks really should be simple, otherwise they can cause
problems for e.g. profiling.
2007-11-07 16:02:27 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
jnemeth
d7d1da9b0d PR/37201 - Yasushi Oshima -- Intel 82965G chipset support 2007-10-30 12:20:03 +00:00
xtraeme
e3b08fdabe Add coretemp(4). A new driver for Intel Core's on-die thermal sensor,
available on Intel Core or newer CPUs.

Ported from FreeBSD. Tested by rmind on i386 and joerg on amd64.

Enabled with "options INTEL_CORETEMP".
2007-10-29 00:42:28 +00:00
joerg
b6c45f0dfa More debugging reveals that the U7600 really wants to use the same
voltage for different frequencies. The fake table can be computed as
driven by the frequency here as well, but don't recompute the voltage as
it would result in an underflow.

Fix argument order in a debug message to match the format string.
2007-10-28 15:15:35 +00:00
xtraeme
7e8be191f1 Share pcib(4) and amdpcib(4) between i386 and amd64; one copy is enough. 2007-10-26 22:17:13 +00:00
xtraeme
3338a139da - Share pchb(4) between i386 and amd64; one copy is enough for both.
- Move some of the x86 PCI devices into x86/pci/files.pci.
- Add more x86 stuff into x86/conf/files.x86.

ok joerg.
2007-10-26 21:49:50 +00:00
joerg
930e1f6e1d Match delay/DELAY on x86 with delay(9). It takes an unsigned int as
argument. Use this and replace the inline assembly (mul + div using the
64bit intermediate result) with normal 32bit multiplication and
division. The compiler can turn the division into a multiplication and
shift, making it even cheaper then the original assembly. For extreme
long delays, just use 64bit arithmetic.
2007-10-26 13:24:39 +00:00
joerg
1b3b209f70 Remove code that was never meant to hit the tree in first place. 2007-10-24 10:12:34 +00:00
joerg
25f1319b9a Before faking up a state table, make sure that neither frequency nor
voltage difference is 0. This avoids a divide by zero.
2007-10-24 06:21:32 +00:00
pavel
99f7676452 The control registers (notably CR3 and CR4) are 64-bit on amd64 (see
"AMD64 Architecture Programmer's Manual"). Declare the variables
holding them as vaddr_t, otherwise the upper bits are lost.

(CR0 is actually 64-bit too, but the upper bits are unused, so I am
not changing it now.)

Should fix the reboot caused by X11. From Arto Huusko in
PR port-amd64/37043.
2007-10-19 21:34:56 +00:00
yamt
24a1632cb3 merge yamt-x86pmap branch.
- reduce differences between amd64 and i386.  notably, share pmap.c
  between them.  it makes several i386 pmap improvements available to
  amd64, including tlb shootdown reduction and bug fixes from Stephan Uphoff.
- implement deferred pmap switching for amd64.
- remove LARGEPAGES option.  always use large pages if available.
  also, make it work on amd64.
2007-10-18 15:28:31 +00:00
joerg
02ed2a3988 Add ioapic_dump_raw, which dumps the full IOAPIC register set. 2007-10-17 21:18:18 +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