summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Take the functionality contained in the former "options TDFX_LINUX"yar2006-03-031-3/+2
| | | | | | | | | | | into a separate module. Accordingly, convert the option into a device named similarly. Note for MFC: Perhaps the option should stay in RELENG_6 for POLA reasons. Suggested by: scottl Reviewed by: cokane MFC after: 5 days
* - use a more common style to print memory sizesnetchild2006-03-031-78/+133
| | | | | | | - add some more cache sizes (2nd and 3rd level) [1] Submitted by: HATANOU Tomomi <hatanou@infolab.ne.jp> [1] PR: 91328 [1]
* Committed the xbox syscons(8)-able console driver.rink2006-03-033-256/+519
| | | | | Reviewed by: arch@ (no comments) Approved by: imp (mentor)
* iir works on PAE now.scottl2006-03-031-1/+0
|
* Rework how we wire up interrupt sources to CPUs:jhb2006-02-287-135/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Throw out all of the logical APIC ID stuff. The Intel docs are somewhat ambiguous, but it seems that the "flat" cluster model we are currently using is only supported on Pentium and P6 family CPUs. The other "hierarchy" cluster model that is supported on all Intel CPUs with local APICs is severely underdocumented. For example, it's not clear if the OS needs to glean the topology of the APIC hierarchy from somewhere (neither ACPI nor MP Table include it) and setup the logical clusters based on the physical hierarchy or not. Not only that, but on certain Intel chipsets, even though there were 4 CPUs in a logical cluster, all the interrupts were only sent to one CPU anyway. - We now bind interrupts to individual CPUs using physical addressing via the local APIC IDs. This code has also moved out of the ioapic PIC driver and into the common interrupt source code so that it can be shared with MSI interrupt sources since MSI is addressed to APICs the same way that I/O APIC pins are. - Interrupt source classes grow a new method pic_assign_cpu() to bind an interrupt source to a specific local APIC ID. - The SMP code now tells the interrupt code which CPUs are avaiable to handle interrupts in a simpler and more intuitive manner. For one thing, it means we could now choose to not route interrupts to HT cores if we wanted to (this code is currently in place in fact, but under an #if 0 for now). - For now we simply do static round-robin of IRQs to CPUs when the first interrupt handler just as before, with the change that IRQs are now bound to individual CPUs rather than groups of up to 4 CPUs. - Because the IRQ to CPU mapping has now been moved up a layer, it would be easier to manage this mapping from higher levels. For example, we could allow drivers to specify a CPU affinity map for their interrupts, or we could allow a userland tool to bind IRQs to specific CPUs. The MFC is tentative, but I want to see if this fixes problems some folks had with UP APIC kernels on 6.0 on SMP machines (an SMP kernel would work fine, but a UP APIC kernel (such as GENERIC in RELENG_6) would lose interrupts). MFC after: 1 week
* Add frequency-voltage tables for Intel 778, 758, 773, 753, and 733Jcperciva2006-02-251-0/+210
| | | | | | processors. Obtained from: Intel Datasheet 302189-008
* guard function decls with _KERNEL so user code can include this filesam2006-02-221-1/+2
| | | | MFC after: 1 week
* Close some races between procfs/ptrace and exit(2):jhb2006-02-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reorder the events in exit(2) slightly so that we trigger the S_EXIT stop event earlier. After we have signalled that, we set P_WEXIT and then wait for any processes with a hold on the vmspace via PHOLD to release it. PHOLD now KASSERT()'s that P_WEXIT is clear when it is invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops to zero. - Change proc_rwmem() to require that the processing read from has its vmspace held via PHOLD by the caller and get rid of all the junk to screw around with the vmspace reference count as we no longer need it. - In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it doesn't exist. - Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem() to clear an earlier single-step simualted via a breakpoint). We only do one to avoid races. Also, by making the EINVAL error for unknown requests be part of the default: case in the switch, the various switch cases can now just break out to return which removes a _lot_ of duplicated PRELE and proc unlocks, etc. Also, it fixes at least one bug where a LWP ptrace command could return EINVAL with the proc lock still held. - Changed the locking for ptrace_single_step(), ptrace_set_pc(), and ptrace_clear_single_step() to always be called with the proc lock held (it was a mixed bag previously). Alpha and arm have to drop the lock while the mess around with breakpoints, but other archs avoid extra lock release/acquires in ptrace(). I did have to fix a couple of other consumers in kern_kse and a few other places to hold the proc lock and PHOLD. Tested by: ps (1 mostly, but some bits of 2-4 as well) MFC after: 1 week
* Rounding addr upwards to next 4M or 2M boundary in pmap_growkernel() couldtegge2006-02-161-0/+14
| | | | | | | cause addr to become 0, resulting in an early return without populating the last PDE. Reviewed by: alc
* It seems bit 5 of cpu_feature2 is the VMX (Virtual Machine Extensions)dwmalone2006-02-151-2/+2
| | | | | bit. While I'm here, delete a comment that was cut and past from the cpu_features code that doesn't belong here.
* CPU time accounting speedup (step 2)phk2006-02-112-0/+16
| | | | | | | | | | | | | | | | | | | Keep accounting time (in per-cpu) cputicks and the statistics counts in the thread and summarize into struct proc when at context switch. Don't reach across CPUs in calcru(). Add code to calibrate the top speed of cpu_tickrate() for variable cpu_tick hardware (like TSC on power managed machines). Don't enforce monotonicity (at least for now) in calcru. While the calibrated cpu_tickrate ramps up it may not be true. Use 27MHz counter on i386/Geode. Use TSC on amd64 & i386 if present. Use tick counter on sparc64
* Cleaned the memory initialization up, moved some defines from the framebufferrink2006-02-103-20/+18
| | | | | | | to an include file. Reviewed by: imp Approved by: imp (mentor)
* Avoid calling CPUID function 0x02 if the CPU reports no support foryar2006-02-091-48/+23
| | | | | | | | | | | it. The former code used to hang older Intel CPUs by trying to get non-existent TLB info 2^32 times. Reduce code duplication around the calls to CPUID 0x02 by using do-while loops. PR: i386/92977 Tested by: cy
* Simplify system time accounting for profiling.phk2006-02-081-6/+4
| | | | | | | | | | Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int. Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument.
* Modify the way we account for CPU time spent (step 1)phk2006-02-071-1/+1
| | | | | | | | | | | | | | | | Keep track of time spent by the cpu in various contexts in units of "cputicks" and scale to real-world microsec^H^H^H^H^H^H^H^Hclock_t only when somebody wants to inspect the numbers. For now "cputicks" are still derived from the current timecounter and therefore things should by definition remain sensible also on SMP machines. (The main reason for this first milestone commit is to verify that hypothesis.) On slower machines, the avoided multiplications to normalize timestams at every context switch, comes out as a 5-7% better score on the unixbench/context1 microbenchmark. On more modern hardware no change in performance is seen.
* Regenerate.rwatson2006-02-061-49/+49
|
* Assign audit event identifiers to ibcs2 system calls.rwatson2006-02-061-50/+50
| | | | Obtained from: TrustedBSD Project
* - Always call exec_free_args() in kern_execve() instead of doing it in alljhb2006-02-062-3/+0
| | | | | | the callers if the exec either succeeds or fails early. - Move the code to call exit1() if the exec fails after the vmspace is gone to the bottom of kern_execve() to cut down on some code duplication.
* Add a kern_eaccess() function and use it to implement xenix_eaccess()jhb2006-02-061-1/+1
| | | | | | rather than kern_access(). Suggested by: rwatson
* Regenerate.rwatson2006-02-063-164/+164
|
* Assign audit event identifiers to Linux i386 system calls.rwatson2006-02-061-169/+177
| | | | Obtained from: TrustedBSD Project
* Regenerate.rwatson2006-02-053-13/+13
|
* Assign audit event identfiers to Xenix system calls. Note: AUE_EACCESSrwatson2006-02-051-10/+10
| | | | | | | | | is assigned to xenix_eaccess() instead of AUE_ACCESS, as that is the intended meaning of the system call. xenix_eaccess() should be reimplemented using our native eaccess() implementation so that it works as intended. Obtained from: TrustedBSD Project
* Correct help line: list targets, not names of files generated by targetsrwatson2006-02-051-1/+1
| | | | | | when no argument is provided to make. MFC after: 1 week
* Regenerate (accidentally also committed in commit that updatedrwatson2006-02-052-2/+2
| | | | syscalls.isc).
* Assign audit event identifiers to ibcs2 ISC system calls.rwatson2006-02-052-28/+29
| | | | Obtained from: TrustedBSD Project
* Move asr driver from global NOTES to i386-specific NOTES. Requestorkensmith2006-02-051-0/+6
| | | | | | reports it is neither endian-clean or 64-bit clean. :-) Requested by: scottl
* Hook up the audit system to system call entry and exit. System calls willwsalamon2006-02-041-0/+3
| | | | | | | now be audited. Obtained from: TrustedBSD Project Approved by: rwatson (mentor)
* Patch to allow XBox-users to use the onboard nve(4) nForce ethernet driver.rink2006-02-042-1/+29
| | | | | | | | | | | | | | The patch crudely forces the NIC out of operating mode before the nve(4) driver can initialize it; this is required to properly initialize the NIC. It is XBox-specific, as this condition can only occur on XBoxes (Most loaders will simply leave the NIC running, forcing us to use a crude workaround like this to get it in a workable condition). Due to the XBox-only aspect, this has been solved in XBox-specific initialization code and not within nve(4). Reviewed by: imp Approved by: imp (mentor) No objection: bz@, obrien@, q@ontheweb.com.au
* Clear carry flag in get_mcontext so that setcontext does notdavidxu2006-02-031-1/+2
| | | | | | return a bogus error. PR: misc/92110
* Under verbose mode, correctly report L2 cache informationdavidxu2006-02-021-1/+7
| | | | | | for CPU which supports CPUID function 8000_0006h. Tested on: Pentum-M 750
* Fix bug in L2 cache size detection code for CPU which supports CPUIDdavidxu2006-02-021-3/+8
| | | | | | function 8000_0006h. Tested on: Pentum-M 750
* Correctly report L2 cache size according to its code comment.davidxu2006-02-021-2/+2
| | | | Tested on my Dual PIII machine.
* Attach ce(4) to the build.rik2006-01-311-0/+4
| | | | MFC after: 3 days
* Prepare for sconfig(8) update.rik2006-01-301-4/+74
| | | | Change also my e-mail.
* Call WITNESS_CHECK() in the page fault handler and immediately assume itjhb2006-01-271-3/+11
| | | | | | | | | | | is a fatal fault if we are holding any non-sleepable locks. This should cut down on the number of bogus LORs we currently get when the kernel panics due to a NULL (or bogus) pointer dereference that goes wandering off into the VM system which tries to acquire locks and then kicks off the spurious LORs. This should probably be ported to all the archs at some point. Tested on: i386
* Fix race conditions.ups2006-01-231-33/+57
| | | | | Tested by: kris@ MFC after: 3 days
* Remove the commented out entry of the old ISA-only le(4) driver whichmarius2006-01-211-3/+0
| | | | | | was retired 22 months ago. MFC after: 1 day
* Eliminate a stale instruction introduced in revision 1.136.davidxu2006-01-181-1/+0
|
* Free the newtag if we exit with a failure from alloc_bounce_zone().scottl2006-01-141-1/+6
| | | | Found by: Coverity Prevent(tm)
* Move the old BSD4.3 tty compatibility from (!BURN_BRIDGES && COMPAT_43)phk2006-01-101-0/+1
| | | | | | | | | | | | to COMPAT_43TTY. Add COMPAT_43TTY to NOTES and */conf/GENERIC Compile tty_compat.c only under the new option. Spit out #warning "Old BSD tty API used, please upgrade." if ioctl_compat.h gets #included from userland.
* By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT intoimp2006-01-092-2/+3
| | | | | | | | param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __. Submitted by: bde, jhb, scottl, many others.
* - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all thejhb2006-01-062-28/+13
| | | | | | | various pcib drivers to use their own private devclass_t variables for their modules. - Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib drivers while I'm here.
* Fix various places that were testing td_critnest to see if interruptsjhb2006-01-061-3/+3
| | | | | should remain disabled during a trap or not to check td_md.md_spinlock_count instead.
* We don't support I386_CPU in 6.0 and later. This file can be cleanednetchild2006-01-041-16/+0
| | | | | | | | up some to assume that '#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)' is true. Suggested by: jhb Reviewed by: jhb
* - Make sure the cpu_exthigh variable is initialized (page coloring case). [1]netchild2006-01-041-19/+39
| | | | | | | | - Remove a conditional in the AMD cache detection, it's always false. [2] - Don't try to detect a cache if only compiled for i386. Analyzed by: Antoine Brodin <antoine.brodin@laposte.net> [1] Submitted by: Antoine Brodin <antoine.brodin@laposte.net> [2]
* Use ttyalloc() instead of ttymalloc()phk2006-01-042-3/+4
|
* Fix a couple of issues with the ibcs2 module event handler. First, returnjhb2006-01-031-1/+4
| | | | | | | | | | | | success instead of EOPNOTSUPP when being loaded. Secondly, if there are no ibcs2 processes running when a MOD_UNLOAD request is made, break out to return success instead of falling through into the default case which returns EOPNOTSUPP. With these fixes, I can now kldload and subsequently kldunload the ibcs2 module. PR: kern/82026 (and several duplicates) Reported by: lots of folks MFC after: 1 week
* - Explicitly validate an empty filter to match bpf_filter() comment[1].jkim2006-01-031-0/+4
| | | | | | - Do not use BPF JIT compiler for an empty filter. [1] Pointed out by: darrenr
* Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate forimp2006-01-011-0/+2
| | | | | each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now.
OpenPOWER on IntegriCloud