summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 isjhb2004-06-103-9/+3
| | | | | | | present and thus that the PnPBIOS probe should be skipped instead of having ACPI zero out the PnPBIOStable pointer. - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is the only place it is used.
* Remove atdevbase and replace it's remaining uses with direct references tojhb2004-06-1010-6/+9
| | | | KERNBASE instead.
* Completely ignore disabled CPU entries as their APIC IDs tend to bejhb2004-06-101-13/+8
| | | | invalid.
* Remove filename+line number from panic messages.phk2004-06-061-9/+3
|
* Fixed misclassification of npx interrupts caused by npx_probe().bde2004-06-061-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dividing by 0 in order to check for irq13/exception16 delivery apparently always causes an irq13 even if we have configured for exception16 (by setting CR0_NE). This was expected, but the timing of the irq13 was unexpected. Without CR0_NE, the irq13 is delivered synchronously at least on my test machine, but with CR0_NE it is delivered a little later (about 250 nsec) in PIC mode and much later (5000-10000 nsec) in APIC mode. So especially in APIC mode, the irq13 may arrive after it is supposed to be shut down. It should then be masked, but the shutdown is incomplete, so the irq goes to a null handler that just reports it as stray. The fix is to wait a bit after dividing by 0 to give a good chance of the irq13 being handled by its proper handler. Removed the hack that was supposed to recover from the incomplete shutdown of irq13. The shutdown is now even more incomplete, or perhaps just incomplete in a different way, but the hack now has no effect because irq13 is edge triggered and handling of edge triggered interrupts is now optimized by skipping their masking. The hack only worked due to it accidentally not losing races. The incomplete shutdown of irq13 still allows unprivileged users to generate a stray irq13 (except on systems where irq13 is actually used) by unmasking an npx exception and causing one. The exception gets handled properly by the exception 16 handler. A spurious irq13 is delivered asynchronously but is harmless (as in the probe) because it is almost perfectly not handled by the null interrupt handler. Perfectly not handling it involves mainly not resetting the npx busy latch. This prevents further irq13's despite them not being masked in the [A]PIC.
* Change the types of vn_rdwr_inchunks()'s len and aresid arguments totjr2004-06-051-1/+1
| | | | | | size_t and size_t *, respectively. Update callers for the new interface. This is a better fix for overflows that occurred when dumping segments larger than 2GB to core files.
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.phk2004-06-041-2/+1
|
* Machine generated patch which changes linedisc calls from accessingphk2004-06-041-5/+5
| | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit.
* Use ttymalloc() instead of ttyregister().phk2004-06-044-15/+12
|
* Automatically recognize the WRAP.1C and Soekris 4801 platforms and configurephk2004-06-031-14/+35
| | | | LEDS accordingly.
* Add new bios_string() which will hunt for a string inside a given rangephk2004-06-032-0/+23
| | | | | of the BIOS. This can be used for finding arbitrary magic in the BIOS in order to recognize particular platforms.
* The NatSemi (now AMD) Geode SC1100 needs special treatment here and therephk2004-06-033-0/+9
| | | | | because it is an embedded gadget. Give it it's own value for the "cpu" variable and add code to reset it lacking a keyboard controller.
* Remove checks for curthread == NULL - it can't happen.tjr2004-06-031-5/+3
|
* Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoidtjr2004-06-031-9/+4
| | | | | | | having to acquire sched_lock when manipulating it in lockmgr(), uiomove(), and uiomove_fromphys(). Reviewed by: jhb
* Move TDF_SA from td_flags to td_pflags (and rename it accordingly)tjr2004-06-021-1/+1
| | | | | | | so that it is no longer necessary to hold sched_lock while manipulating it. Reviewed by: davidxu
* - Add a function ioapic_program_intpin() that completely programs an I/Ojhb2004-06-011-69/+91
| | | | | | | | | APIC interrupt pin based on the settings in the corresponding interrupt source structure. - Use ioapic_program_intpin() in place of manual frobbing of the intpin configuration in ioapic_program_destination() and ioapic_register(). - Use ioapic_program_intpin() to implement suspend/resume support for I/O APICs.
* Allow the pir0 device add to fail since pir0 may already exist. This shouldjhb2004-06-011-2/+2
| | | | | fix the panics in device_set_ivars() that people were seeing on boxes with multiple Host-PCI bridges but not using ACPI.
* Fix legacy_add_child() to properly handle the case wherejhb2004-06-011-7/+9
| | | | | device_add_child_ordered() fails (due to a duplicate device add for example) and properly cleanup and return NULL.
* Use the local APIC ID rather than the ACPI Processor ID to index the arrayjhb2004-06-011-28/+30
| | | | of CPUs since local APIC IDs are bounded but ACPI IDs are not bounded.
* Gainfully employ the new ttyioctl in the trivial cases.phk2004-06-011-8/+1
|
* Remove debugging printf that never triggered because acpi is the firstnjl2004-06-011-2/+0
| | | | user of nexus::bus_get_resource.
* Bring in mbuma to replace mballoc.bmilekic2004-05-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mbuma is an Mbuf & Cluster allocator built on top of a number of extensions to the UMA framework, all included herein. Extensions to UMA worth noting: - Better layering between slab <-> zone caches; introduce Keg structure which splits off slab cache away from the zone structure and allows multiple zones to be stacked on top of a single Keg (single type of slab cache); perhaps we should look into defining a subset API on top of the Keg for special use by malloc(9), for example. - UMA_ZONE_REFCNT zones can now be added, and reference counters automagically allocated for them within the end of the associated slab structures. uma_find_refcnt() does a kextract to fetch the slab struct reference from the underlying page, and lookup the corresponding refcnt. mbuma things worth noting: - integrates mbuf & cluster allocations with extended UMA and provides caches for commonly-allocated items; defines several zones (two primary, one secondary) and two kegs. - change up certain code paths that always used to do: m_get() + m_clget() to instead just use m_getcl() and try to take advantage of the newly defined secondary Packet zone. - netstat(1) and systat(1) quickly hacked up to do basic stat reporting but additional stats work needs to be done once some other details within UMA have been taken care of and it becomes clearer to how stats will work within the modified framework. From the user perspective, one implication is that the NMBCLUSTERS compile-time option is no longer used. The maximum number of clusters is still capped off according to maxusers, but it can be made unlimited by setting the kern.ipc.nmbclusters boot-time tunable to zero. Work should be done to write an appropriate sysctl handler allowing dynamic tuning of kern.ipc.nmbclusters at runtime. Additional things worth noting/known issues (READ): - One report of 'ips' (ServeRAID) driver acting really slow in conjunction with mbuma. Need more data. Latest report is that ips is equally sucking with and without mbuma. - Giant leak in NFS code sometimes occurs, can't reproduce but currently analyzing; brueffer is able to reproduce but THIS IS NOT an mbuma-specific problem and currently occurs even WITHOUT mbuma. - Issues in network locking: there is at least one code path in the rip code where one or more locks are acquired and we end up in m_prepend() with M_WAITOK, which causes WITNESS to whine from within UMA. Current temporary solution: force all UMA allocations to be M_NOWAIT from within UMA for now to avoid deadlocks unless WITNESS is defined and we can determine with certainty that we're not holding any locks when we're M_WAITOK. - I've seen at least one weird socketbuffer empty-but- mbuf-still-attached panic. I don't believe this to be related to mbuma but please keep your eyes open, turn on debugging, and capture crash dumps. This change removes more code than it adds. A paper is available detailing the change and considering various performance issues, it was presented at BSDCan2004: http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf Please read the paper for Future Work and implementation details, as well as credits. Testing and Debugging: rwatson, brueffer, Ketrien I. Saihr-Kesenchedra, ... Reviewed by: Lots of people (for different parts)
* Add missing #include <sys/module.h>phk2004-05-308-0/+8
|
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-309-0/+9
| | | | one on death-row in <sys/kernel.h>
* struct cpu_nameclass is a private to identcpu.c, move it there.phk2004-05-302-6/+4
|
* Remove a broken micro-optimization from pmap_enter(). The ill effectalc2004-05-281-8/+0
| | | | | | | | | | | | | | | | | | | | | of this micro-optimization occurs when we call pmap_enter() to wire an already mapped page. Because of the micro-optimization, we fail to mark the PTE as wired. Later, on teardown of the address space, pmap_remove_pages() destroys the PTE before vm_fault_unwire() has unwired the page. (pmap_remove_pages() is not supposed to destroy wired PTEs. They are destroyed by a later call to pmap_remove().) Thus, the page becomes lost. Note: The page is not lost if the application called munlock(2), only if it relies on teardown of the address space to unwire its pages. For the historically inclined, this bug was introduced by a megacommit, revision 1.182, roughly six years ago. Leak observed by: green@ and dillon independently Patch submitted by: dillon at backplane dot com Reviewed by: tegge@ MFC after: 1 week
* Reenable ithread preemption for interrupts that occur while executing injhb2004-05-281-2/+2
| | | | | | | the kernel. I accidentally broke this with the new interrupt code that came in prior to 5.2. Submitted by: bde
* First release of ixgb driver for the Intel(R) PRO/10GbE Family of Adapters. ↵tackerman2004-05-281-0/+1
| | | | | | | | | | | This driver has been developed for use with FreeBSD, version 4.8 and later. Submitted by: Hema Joyce Reviewed by: Prafulla Deuskar Approved by: Prafulla Deuskar MFC after: 1 week
* Retire cpu_sched_exit(); it is not used any more.tmm2004-05-261-6/+0
|
* Quick fix for overflow when tsc_freq >= 2^31. "int profrate" in structbde2004-05-261-3/+10
| | | | | | | | | | gmon and struct gmonhdr was originally just to represent the kernel (profiling) clock frequency and it remains poorly suited to representing the frequencies of fast counters like the TSC. It broke a year or two ago. This quick fix keeps it working for another year or month or two until TSC frequencies can exceed 2^32, by dividing the frequency by 2. Dividing the frequency by 4 would work for a little longer but would lose a little too much precision.
* MFamd64:bde2004-05-263-8/+32
| | | | | | | | | | | | | | | | | | | | Fixed profiling of trap, syscall and interrupt handlers and some ordinary functions, essentially by backing out half of rev.1.106 of i386/exception.s. The handlers must be between certain labels for the purposes of profiling, and this was broken by scattering them in separately compiled .s files, especially for ordinary functions that ended up between the labels. Merge the files by #including them as before, except with different pathnames and better comments and organization. Changes to the scattered files are minimal -- just move the labels to the file that does the #includes. This also partly fixes profiling of IPIs -- all IPI handlers are now correctly classified as interrupt handlers, but many are still missing mcount calls. vm86bios.s is included as before, but it is now between the labels for interrupt handlers again, which seems to be wrong since half of it is for a non-interrupt handler.
* Revert part of rev 1.230 and assume that all EISA IRQs use active highjhb2004-05-241-8/+1
| | | | | | | | | polarity rather than assuming that level triggered IRQs use active low and edge triggered IRQs use active high. Both the MultiProcessor 1.4 and ACPI 2.0 Specifications state in their examples that level triggered EISA IRQs are active low, but in practice they seem to be active high. Reported by: Nik Azim Azam nskyline_r35 at yahoo dot com
* MFamd64 (1.117: made the FAKE_MCOUNT() in doreti work non-accidentally,bde2004-05-231-2/+1
| | | | and removed buggy unnecessary FAKE_MCOUNT() in calltrap).
* MFamd64 (put TF_EIP in assym.s and use it instead of a magic offset inbde2004-05-234-7/+8
| | | | FAKE_MCOUNT()s).
* MFamd64 (1.111: fixed missing call to .mexitcount in lgdt()).bde2004-05-231-0/+1
|
* Updated and reorganized the comments for the fetch and store families ofbde2004-05-211-21/+10
| | | | functions.
* Fixed high resoultion profiling of fuword32() and suword32(). Use thebde2004-05-211-6/+2
| | | | | standard macro ALTENTRY() instead of a home made incomplete version of it.
* Moved i386 asms to an i386 header. The asms are for calibration ofbde2004-05-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | high resolution kernel profiling (options GUPROF. "U" in GUPROF stands for microseconds resolution, but the resolution is now smaller than 1 nanosecond on multi-GHz machines and the accuracy is heading towards 1 nanosecond too). Arches that support GUPROF must now provide certain macros for the calibration. GUPROF is now only supported for i386's, so the absence of the new macros for other arches doesn't break anything that wasn't already broken. amd64's have uncommitted support for GUPROF, and sparc64's have support that seems to be complete except here (there was an #error for non-i386 cases; now there are undefined macros). Changed the asms a little: - declare them as __volatile. They must not be moved, and exporting a label across asms is technically incorrect, so try harder to stop gcc moving them. - don't put the non-clobbered register "bx" in the clobber list. The clobber lists are still more conservative than necessary. - drop the non-support for gcc-1. It just gave a better error message, and this is not useful since compiling with gcc-1 would cause thousands of worse error messages. - drop the support for aout.
* Fixed some style bugs (mainly misalignment of backslashes).bde2004-05-191-8/+8
|
* Moved most of the "MI" definitions and declarations from <machine/profile.h>bde2004-05-191-30/+0
| | | | | | to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version.
* <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN isstefanf2004-05-181-1/+1
| | | | | | | | defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all. PR: 64956 Approved by: das (mentor)
* Add Cronyx Tau-PCI sync WAN adapters family entry.rik2004-05-171-0/+5
|
* Spell Cronyx Tau and Sigma families correctly.rik2004-05-171-2/+2
| | | | MFC after: 3 days
* Make a small revision to the api between the elf linker core and thepeter2004-05-161-9/+11
| | | | | | elf_reloc() backends for two reasons. First, to support the possibility of there being two elf linkers in the kernel (eg: amd64), and second, to pass the relocbase explicitly (for relocating .o format kld files).
* - Move some macros from icu.h into atpic.c as that is the only place theyjhb2004-05-112-61/+19
| | | | | | | | are used. - Reduce duplication of a couple of macros removing the duplicates from ich.h. - Remove unused macros from icu.h as well as locore protection as this header is no longer included in assembly sources.
* Trim unused includes.jhb2004-05-113-8/+0
|
* - Remove a spurious blank line.jhb2004-05-111-2/+1
| | | | - Add a missing static keyword.
* Fixup a few bogons in a comment.jhb2004-05-111-3/+3
|
* Rework the APIC mixed mode support a bit:jhb2004-05-105-19/+42
| | | | | | | | | | | | | | | | | - Require the APIC enumerators to explicitly enable mixed mode by calling ioapic_enable_mixed_mode(). Calling this function tells the apic driver that the PC-AT 8259A PICs are present and routable through the first I/O APIC via an ExtINT pin. The mptable enumerator always calls this function for now. The MADT enumerator only enables mixed mode if the PC-AT compatability flag is set in the MADT header. - Allow mixed mode to be enabled or disabled via a 'hw.apic.mixed_mode' tunable. By default this tunable is set to 1 (true). The kernel option NO_MIXED_MODE changes the default to 0 to preserve existing behavior, but adding 'hw.apic.mixed_mode=0' to loader.conf achieves the same effect. - Only use mixed mode to route IRQ 0 if it is both enabled by the APIC enumerator and activated by the loader tunable. Note that both conditions must be true, so if the APIC enumerator does not enable mixed mode, then you can't set the tunable to try to override the enumerator.
* - Simplify the sizeof expression in the CTASSERT() for NUM_ISA_IRQS.jhb2004-05-101-3/+3
| | | | | | - Fixup grammar in a comment. Submitted by: bde (1)
OpenPOWER on IntegriCloud