summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Modify TLB invalidation handling.ups2007-04-211-27/+71
| | | | | Reviewed by: alc@, peter@ MFC after: 1 week
* Add support for specifying a minimal size for vm.kmem_size in the loader viasepotvin2007-04-211-1/+2
| | | | | | | | vm.kmem_size_min. Useful when using ZFS to make sure that vm.kmem size will be at least 256mb (for example) without forcing a particular value via vm.kmem_size. Approved by: njl (mentor) Reviewed by: alc
* style nitphk2007-04-191-1/+2
|
* On AMD's Geode LX: Force the TSC to run through core-suspension so we canphk2007-04-181-0/+8
| | | | | | use it as a timecounter. Sponsored by: Soekris Engineering
* Honor the BUS_DMA_NOCACHE flag to bus_dmamem_alloc() on amd64 and i386 byjhb2007-04-171-0/+5
| | | | | | | | mapping the pages as UC (uncacheable) using pmap_change_attr(). MFC after: 1 week Requested by: ariff Reviewed by: scottl
* Eliminate the misuse of PG_FRAME to truncate a virtual address to a virtualalc2007-04-131-3/+3
| | | | | | page boundary. Reviewed by: ru@
* MFamd64alc2007-04-121-0/+1
| | | | Define PGEX_RSV.
* Fix PAE on SMP by enabling EFER_NXE on all APs.ru2007-04-121-0/+10
| | | | | Reported by: kris Diagnosed by: alc
* Remove trailing '.' for consistency!pjd2007-04-101-1/+1
|
* Add UFS_GJOURNAL options to the GENERIC kernel.pjd2007-04-101-0/+1
| | | | Approved by: re (kensmith)
* Add the PG_NX support for i386/PAE.ru2007-04-068-34/+135
| | | | Reviewed by: alc
* MFP4: Turn emul_lock into a mutex.jkim2007-04-021-2/+2
| | | | Submitted by: rdivacky
* Optimize sx locks to use simple atomic operations for the common cases ofjhb2007-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | obtaining and releasing shared and exclusive locks. The algorithms for manipulating the lock cookie are very similar to that rwlocks. This patch also adds support for exclusive locks using the same algorithm as mutexes. A new sx_init_flags() function has been added so that optional flags can be specified to alter a given locks behavior. The flags include SX_DUPOK, SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature to the similar flags for mutexes. Adaptive spinning on select locks may be enabled by enabling the ADAPTIVE_SX kernel option. Only locks initialized with the SX_ADAPTIVESPIN flag via sx_init_flags() will adaptively spin. The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock() are now performed inline in non-debug kernels. As a result, <sys/sx.h> now requires <sys/lock.h> to be included prior to <sys/sx.h>. The new kernel option SX_NOINLINE can be used to disable the aforementioned inlining in non-debug kernels. The size of struct sx has changed, so the kernel ABI is probably greatly disturbed. MFC after: 1 month Submitted by: attilio Tested by: kris, pjd
* Correct BB-profiling and adjust comments.jkim2007-03-311-24/+23
| | | | | Pointed out by: bde Reviewed by: bde
* Fix off-by-4 error in address validation for i386, reduce PCB reloading, andjkim2007-03-301-15/+10
| | | | | | | | fix more style(9) nits. Pointed out by: bde Discussed with: kib Reviewd by: bde
* Fix more style(9) nits[1] and remove unnecessary use of '#if !defined(_KERNEL)'.jkim2007-03-301-39/+39
| | | | Pointed out by: bde[1]
* Use the same wisdom of sys/i386/i386/support.s 1.97 to remove obfuscation.jkim2007-03-301-9/+8
| | | | Pointed out by: bde
* MFP4: Linux futex support for amd64.jkim2007-03-301-61/+2
| | | | | | | Initial patch was submitted by kib and additional work was done by Divacky Roman. Tested by: emulation
* Implement the openat() linux syscalljulian2007-03-295-5/+11
| | | | | Submitted by: Roman Divacky (rdivacky@) MFC after: 2 weeks
* Revisit the watchdogs: Resetting the error to EINVAL after failing to set then_hibma2007-03-272-4/+5
| | | | | | | | watchdog might hide the succesful arming of an earlier one. Accept that on failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is returned instead of the more appropriate EINVAL. MFC after: 3 days
* Remove unnecessary giant acquisition around panic in #ifdef DIAGNOSTICkris2007-03-261-2/+0
| | | | | | | | | | code. # There is some question about whether this code is even relevant any # longer (it dates back to prehistoric times, i.e. present in r1.1), # especially on amd64. Reviewed by: jhb
* Add an interface for drivers to be notified of changes to CPU frequency.njl2007-03-263-16/+154
| | | | | | | | | | | | | | | | | | cpufreq_pre_change is called before the change, giving each driver a chance to revoke the change. cpufreq_post_change provides the results of the change (success or failure). cpufreq_levels_changed gives the unit number of the cpufreq device whose number of available levels has changed. Hook in all the drivers I could find that needed it. * TSC: update TSC frequency value. When the available levels change, take the highest possible level and notify the timecounter set_cputicker() of that freq. This gets rid of the "calcru: runtime went backwards" messages. * identcpu: updates the sysctl hw.clockrate value * Profiling: if profiling is active when the clock changes, let the user know the results may be inaccurate. Reviewed by: bde, phk MFC after: 1 month
* Fix a silly bogon that broke ibcs2_rename().jhb2007-03-261-1/+1
| | | | | | CID: 1065 Found by: Coverity Prevent (tm) Reported by: netchild
* In order to satisfy ACPI's need for an identity mapping, modify thealc2007-03-242-32/+40
| | | | | | temporary mapping created by locore so that the lowest two to four megabytes can become a permanent identity mapping. This implementation avoids any use of a large page mapping.
* Catch up with ACPI-CA 20070320 import.jkim2007-03-225-170/+162
|
* Change the amd64, i386, and ia64 nexus drivers to setup bus space tags andjhb2007-03-211-41/+34
| | | | | | | | | | | handles when activating a resource via bus_activate_resource() rather than doing some of the work in bus_alloc_resource() and some of it in bus_activate_resource(). One note is that when using isa_alloc_resourcev() on PC-98, drivers now need to just use bus_release_resource() without explicitly calling bus_deactivate_resource() first. nyan@ has already fixed all of the PC-98 drivers.
* Add a new apic0 psuedo-device to claim memory resources for the memoryjhb2007-03-203-0/+85
| | | | | | | address ranges used by local and I/O APICs in the system. Some systems also reserve these ranges as system resources via either PnPBIOS or ACPI, so this device currently attaches after acpi0 and legacy0 so that the system resources are given precedence.
* Add a new ram0 pseudo-device that claims memory resouces for physicaljhb2007-03-201-0/+78
| | | | | | | addresses corresponding to system RAM. On amd64 ram0 uses the SMAP and claims all the type 1 SMAP regions. On i386 ram0 uses the dump_avail[] array. Note that on i386 we have to ignore regions above 4G in PAE kernels since bus resources use longs.
* - Add macros for newly added CPUID bits in the corresponding header files.jkim2007-03-202-2/+4
| | | | | - Use correct capticalization in xTPR as Intel uses in their documents. - Use proper description instead of vendor code name in comment.
* Tweak the probe/attach order of devices on the x86 nexus devices.jhb2007-03-204-6/+6
| | | | | Various BIOS-related psuedo-devices are added at an order of 5. acpi0 is added at an order of 10, and legacy0 is added at an order of 11.
* display two new Intel feature bitssam2007-03-191-2/+2
| | | | | Submitted by: "Rui Paulo" <rpaulo@gmail.com> MFC after: 2 weeks
* Eliminate an unused parameter.alc2007-03-173-3/+3
|
* Create an identity mapping (V=P) super page for the low memory region onnjl2007-03-142-11/+13
| | | | | | | | | | | | | | boot. Then, just switch to the kernel pmap when suspending instead of allocating/freeing our own mapping every time. This should solve a panic of pmap_remove() being called with interrupts disabled. Thanks to Alan Cox for developing this patch. Note: this means that ACPI requires super page (PG_PS) support in the CPU. This has been present since the Pentium and first documented in the Pentium Pro. However, it may need to be revisited later. Submitted by: alc MFC after: 1 month
* Add another CPUID for AMD CPUs and fix style(9) while I am here.jkim2007-03-122-113/+114
|
* Push down the implementation of PCPU_LAZY_INC() into the machine-dependentalc2007-03-111-0/+25
| | | | | | | header file. Reimplement PCPU_LAZY_INC() on amd64 and i386 making it atomic with respect to interrupts. Reviewed by: bde, jhb
* Defer calling lapic_init() until we've completed the 'MPTable: <...>'jhb2007-03-091-2/+4
| | | | | printf. Otherwise, printfs inside of lapic_init() (such as during a verbose boot) can uglify the output.
* Over NFS, an open() call could result in multiple over-the-wiremohans2007-03-091-0/+2
| | | | | | | | | | | | GETATTRs being generated - one from lookup()/namei() and the other from nfs_open() (for cto consistency). This change eliminates the GETATTR in nfs_open() if an otw GETATTR was done from the namei() path. Instead of extending the vop interface, we timestamp each attr load, and use this to detect whether a GETATTR was done from namei() for this syscall. Introduces a thread-local variable that counts the syscalls made by the thread and uses <pid, tid, thread syscalls> as the attrload timestamp. Thanks to jhb@ and peter@ for a discussion on thread state that could be used as the timestamp with minimal overhead.
* Don't increment total_bounced when doing no-op dmamap_sync ops.scottl2007-03-061-1/+2
|
* Change the x86 interrupt code to use FreeBSD CPU IDs (i.e. PCPU_GET(cpuid))jhb2007-03-065-21/+26
| | | | | rather than local APIC IDs to keep track of CPUs which can handle interrupts.
* Trim trailing whitespace.jhb2007-03-051-8/+8
|
* Acquiring smp_ipi_mtx on every call to pmap_invalidate_*() is wasteful.alc2007-03-053-68/+17
| | | | | | | | | | | | For example, during a buildworld more than half of the calls do not generate an IPI because the only TLB entry invalidated is on the calling processor. This revision pushes down the acquisition and release of smp_ipi_mtx into smp_tlb_shootdown() and smp_targeted_tlb_shootdown() and instead uses sched_pin() and sched_unpin() in pmap_invalidate_*() so that thread migration doesn't lead to a missed TLB invalidation. Reviewed by: jhb MFC after: 3 weeks
* Use vm_paddr_t rather than uintptr_t when passing the physical address ofjhb2007-03-056-13/+12
| | | | APICs to lapic_init() and ioapic_create().
* Add a simple device driver to "eat" any I/O APICs that show up as PCIjhb2007-03-051-1/+48
| | | | | | devices. MFC after: 1 week
* Partial fix for a bug in rev.1.231. If suspend/resume clobbers thebde2007-03-051-0/+1
| | | | | | | | | | | | | | | | | RTC state, then it may clobber the RTC index register, so the index register must be restored before using it to restore control registers in rtc_restore(). The following problems remain: - rtc_restore() is only called if pmtimer is configured. Buggy suspend/resumes are more likely to clobber the index register than a control register, so pmtimer is more needed than it used to be. - pmtimer doesn't exist for amd64. - Restoring of the RTC state may race with rtcintr(). If an RTC interrupt is handled before the state is restored, then rtcin(RTC_INTR) in rtcintr() may read from the wrong register, so rtcintr() may spin forever. This may be mitigated by the most common state clobbering being to turn off RTC interrupts.
* style(9).nyan2007-03-041-2/+2
|
* MFP4: 115220, 115222jkim2007-03-022-175/+187
| | | | | - Fix style(9) and reduce diff between amd64 and i386. - Prefix Linuxulator macros with LINUX_ to prevent future collision.
* Use pause() rather than tsleep() on stack variables and function pointers.jhb2007-02-271-2/+1
|
* MFP4: 115094jkim2007-02-271-3/+4
| | | | | | | | Linux does not check file descriptor when MAP_ANONYMOUS is set. This should fix recent LTP test regressions. Reported by: Scot Hetzel (swhetzel at gmail dot com) netchild
* Partial MFp4 of 114977:netchild2007-02-243-19/+23
| | | | | | Whitespace commit: Fix grammar, spelling and punctuation. Submitted by: "Scot Hetzel" <swhetzel@gmail.com>
* MFp4 (114193 (i386 part), 114194, 114195, 114200):netchild2007-02-231-39/+42
| | | | | | | | | | | | | - Dont "return" in linux_clone() after we forked the new process in a case of problems. - Move the copyout of p2->p_pid outside the emul_lock coverage in linux_clone(). - Cache the em->pdeath_signal in a local variable and move the copyout out of the emul_lock coverage. - Move the free() out of the emul_shared_lock coverage in a preparation to switch emul_lock to non-sleepable lock (mutex). Submitted by: rdivacky
OpenPOWER on IntegriCloud