summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* - 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.
* MI changes:netchild2005-12-311-0/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | - provide an interface (macros) to the page coloring part of the VM system, this allows to try different coloring algorithms without the need to touch every file [1] - make the page queue tuning values readable: sysctl vm.stats.pagequeue - autotuning of the page coloring values based upon the cache size instead of options in the kernel config (disabling of the page coloring as a kernel option is still possible) MD changes: - detection of the cache size: only IA32 and AMD64 (untested) contains cache size detection code, every other arch just comes with a dummy function (this results in the use of default values like it was the case without the autotuning of the page coloring) - print some more info on Intel CPU's (like we do on AMD and Transmeta CPU's) Note to AMD owners (IA32 and AMD64): please run "sysctl vm.stats.pagequeue" and report if the cache* values are zero (= bug in the cache detection code) or not. Based upon work by: Chad David <davidc@acns.ab.ca> [1] Reviewed by: alc, arch (in 2004) Discussed with: alc, Chad David, arch (in 2004)
* Remove pcb_switchout, it has not been used for a long time.davidxu2005-12-293-8/+0
|
* Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structuresobomax2005-12-262-0/+4
| | | | | | | | | | with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so. PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl>
* Move global variable private_tss into per-cpu area.davidxu2005-12-265-10/+10
| | | | Reviewed by: jhb
* - Improve the INKERNEL macro such that it can no longer give false positives.jeff2005-12-231-1/+6
| | | | | | This fixes the stack(9) functionality. Submitted by: Antoine Brodin <antoine.brodin@laposte.net>
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-228-44/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* Move device 'cs' into i386/pc98 specific NOTES. It is broken on ppcimp2005-12-201-0/+4
| | | | | | because it uses i386 specific calls. Maybe it could be added to amd64, but I'm not so sure it would work there so I've not added it there.
* Move the hostb driver out of the i386 and amd64 PCI code (where it wasjhb2005-12-201-58/+0
| | | | | | | duplicated anyways) and into a single MI driver. Extend the driver a bit to implement the bus and PCI kobj interfaces such that other drivers can attach to it and transparently act as if their parent device is the PCI bus (for the most part).
* Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)jhb2005-12-151-1/+0
| | | | | | | | | which existed to cleanup the linux_osname mutex. Now that MTX_SYSINIT() has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here was redundant and resulted in panics in debug kernels. MFC after: 1 week Reported by: Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu
* Fix stale comment.jhb2005-12-141-2/+1
|
* MFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked brokenpeter2005-12-131-0/+15
| | | | and it has been calibrated.
* Revert previous commit. The BIOS braindamage is even worse than Ijhb2005-12-131-9/+2
| | | | | | | | originally thought. The BIOS that cleared CPUID_APIC actually managed to disable the local APIC entirely and even Windows 64 doesn't boot on it. Reported by: bz
* Don't check the CPUID_APIC bit in the cpu_features flags field to determinejhb2005-12-131-2/+9
| | | | | | | | | | | | | | if the boot CPU has a local APIC because some BIOS vendors are not competent enough to set this bit. Instead, just assume that we always have a local APIC on amd64. For i386 the check is a bit more subtle. FreeBSD requires either an MP Table or an ACPI MADT table to enumerate APICs. The only systems that have one of those tables that don't have local APICs are some presumably rare (and old) SMP 486 systems using external APICs. Thus, instead of checking the CPUID_APIC flag, check the CPU class and abort if we are running on a 486. MFC after: 1 week Reported by: bz
* Add support for 7320 and 915 PCIe chipsets.rodrigc2005-12-081-7/+11
| | | | | | Submitted by: Gavin Atkinson <gavin.atkinson at ury dot york dot ac dot uk> PR: kern/79139 Reviewed by: scottl
* Whitespace: reduce diffs with amd64.jhb2005-12-081-2/+1
|
* - Cleanup whitespace and extra ()s in vtophys() macros.jhb2005-12-061-4/+3
| | | | | | | | | | | - Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments. Reviewed by: alc
* Fix ZERO_EDX() macro from the previous commit. It was emittingjkim2005-12-061-1/+1
| | | | `xor %ecx, %ecx', not `xor %edx, %edx'.
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withru2005-12-061-7/+0
| | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
* s/M_WAITOK/M_NOWAIT/ while mutex is held.jkim2005-12-061-2/+2
| | | | Pointed out by: csjp
* - Micro-optimize `mov $0, %edx' -> `xor %edx, %edx'.jkim2005-12-062-3/+9
| | | | - Correct amd64 macro style (no functional change).
* Add experimental BPF Just-In-Time compiler for amd64 and i386.jkim2005-12-062-0/+908
| | | | | | | | | | | | | | | | | Use the following kernel configuration option to enable: options BPF_JITTER If you want to use bpf_filter() instead (e. g., debugging), do: sysctl net.bpf.jitter.enable=0 to turn it off. Currently BIOCSETWF and bpf_mtap2() are unsupported, and bpf_mtap() is partially supported because 1) no need, 2) avoid expensive m_copydata(9). Obtained from: WinPcap 3.1 (for i386)
* Change the i386 code to pass the interrupt vector as a separate argumentjhb2005-12-059-53/+27
| | | | | | | | | | | | | | | | | | | rather than embedding it in the intrframe as if_vec. This reduces diffs with amd64 somewhat. - Remove cf_vec from clockframe (it wasn't used anyway) and stop pushing dummy vector arguments for ipi_bitmap_handler() and lapic_handle_timer() since clockframe == trapframe now. - Fix ddb to handle stack traces across interrupt entry points that just have a trapframe on their stack and not a trapframe + vector. - Change intr_execute_handlers() to take a trapframe rather than an intrframe pointer. - Change lapic_handle_intr() and atpic_handle_intr() to take a vector and trapframe rather than an intrframe. - GC struct intrframe now that nothing uses it anymore. - GC CLOCK_TO_TRAPFRAME() and INTR_TO_TRAPFRAME(). Reviewed by: bde Requested by: peter
* - Move the code to deal with handling an IPI_STOP IPI out ofjhb2005-12-055-49/+34
| | | | | | | | | | ipi_nmi_handler() and into a new cpustop_handler() function. Change the Xcpustop IPI_STOP handler to call this function instead of duplicating all the same logic in assembly. - EOI the local APIC for the lapic timer interrupt in C rather than assembly. - Bump the lazypmap IPI counter if COUNT_IPIS is defined in C rather than assembly.
* Don't panic if IRQ 13 doesn't exist. On some machines (see previousjhb2005-12-051-7/+9
| | | | | | | | | | | commit to atpic.c) there may not be an IRQ 13. Instead, just keep going. If the INT16 interface doesn't work then we will eventually panic anyway. FWIW: We could probably just axe the support for IRQ 13 altogether at this point. The only thing we'd lose support for are 486sx systems with external 487 FPUs. MFC after: 1 week
* Really slam the door on mixed mode now that we don't depend on it for ajhb2005-12-051-0/+15
| | | | | | | | | | | | | working IRQ0 with APIC anymore. Previously, it was possible to have some other ATPIC IRQS "leak" through in a few edge cases. For example, on my x86 test machine, ACPI re-routes the SCI (IRQ 9) to intpin 13 on the first I/O APIC. This leaves a hole for IRQ 13 (since the APIC doesn't provide a source for IRQ 13 in that case) with the result that the ATPIC IRQ13 source was registered instead. This changes the 8259A drivers to only register their interrupt sources if none of the 16 ISA IRQs have an interrupt source already installed. MFC after: 1 week
* - Move PUSH_FRAME and POP_FRAME into machine/asmacros.h.jhb2005-12-054-102/+54
| | | | | | | | | | | | | | | - Add a new SET_KERNEL_SREGS macro that sets up %ds and %es to point to kernel data and %fs to point to per-CPU data and use the new macro in several kernel entry points including trap and interrupt handlers. - Convert the IPI_STOP handler Xcpustop to push a standard trap frame rather than an application frame. - Make the TRAP() macro private to exception.s since it is only used there. - Move the PCPU_*() macros in asmacros.h out of the middle of the profiling macros. Reviewed by: bde Requested by: bde (4, 5)
* Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.ru2005-12-051-1/+1
| | | | Reviewed by: nyan
* Fix -Wundef warnings found when compiling i386 LINT, GENERIC andru2005-12-053-6/+3
| | | | custom kernels.
* Merge DRM CVS as of 2005-12-02, adding i915 DRM support thanks to Alexey Popov,anholt2005-12-031-0/+1
| | | | and a new r300 PCI ID.
* Update DRM to CVS snapshot as of 2005-11-28. Notable changes:anholt2005-11-281-0/+1
| | | | | | | | | | | | | - S3 Savage driver ported. - Added support for ATI_fragment_shader registers for r200. - Improved r300 support, needed for latest r300 DRI driver. - (possibly) r300 PCIE support, needs X.Org server from CVS. - Added support for PCI Matrox cards. - Software fallbacks fixed for Rage 128, which used to render badly or hang. - Some issues reported by WITNESS are fixed. - i915 module Makefile added, as the driver may now be working, but is untested. - Added scripts for copying and preprocessing DRM CVS for inclusion in the kernel. Thanks to Daniel Stone for getting me started on that.
* If we get a stray interrupt, return after logging it. In the extremelyjhb2005-11-281-0/+1
| | | | | | | | | | rare case of a stray interrupt to an unregistered source (such as a stray interrupt from the 8259As when using APIC), this could result in a page fault when it tried to walk the list of interrupt handlers to execute INTR_FAST handlers. This bug was introduced with the intr_event changes, so it's not present in 5.x or 6.x. Submitted by: Mark Tinguely tinguely at casselton dot net
* - Allow duplicate "machine" directives with the same arguments.ru2005-11-274-11/+1
| | | | - Move existing "machine" directives to DEFAULTS.
* Fix typo.le2005-11-241-1/+1
|
* Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.ru2005-11-241-1/+1
|
* Garbage collect machine/smptests.h now that it is empty and no longer used.jhb2005-11-221-36/+0
|
* Make COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and takejhb2005-11-224-14/+5
| | | | them out of machine/smptests.h.
* Garbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros.jhb2005-11-221-6/+0
|
* Garbage collect the code to store diagnostics codes in a CMOS registerjhb2005-11-223-107/+0
| | | | | | | during SMP startup. We haven't had any issues with starting up the APs on i386 in quite a while now which is all this code is really useful for. If someone ever does really need it they can always dig it up out of the attic.
* Don't enable PUC_FASTINTR by default in the source. Instead, enable itjhb2005-11-211-0/+2
| | | | | | | | | | | via the DEFAULTS kernel configs. This allows folks to turn it that option off in the kernel configs if desired without having to hack the source. This is especially useful since PUC_FASTINTR hangs the kernel boot on my ultra60 which has two uart(4) devices hung off of a puc(4) device. I did not enable PUC_FASTINTR by default on powerpc since powerpc does not currently allow sharing of INTR_FAST with non-INTR_FAST like the other archs.
* Eliminate pmap_init2(). It's no longer used.alc2005-11-201-5/+0
|
* - Always print the trap number so that we have something to start with forjhb2005-11-181-5/+10
| | | | | | | | mystery traps. If we don't have a message for a given trap, just use UNKNOWN for the message. - Add trap messages for T_XMMFLT and T_RESERVED. MFC after: 1 week
* Fix spelling mistake.obrien2005-11-171-1/+1
| | | | Submitted by: kris
OpenPOWER on IntegriCloud