summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* MFC r273701, r274556alc2015-01-022-3/+20
| | | | | | | | | | | By the time that pmap_init() runs, vm_phys_segs[] has been initialized. Obtaining the end of memory address from vm_phys_segs[] is a little easier than obtaining it from phys_avail[]. Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default on i386 PAE. (The use of VM_PHYSSEG_SPARSE on i386 PAE saves us some precious kernel virtual address space that would have been wasted on unused vm_page structures.)
* MFC: r272492nyan2014-12-231-4/+305
| | | | Merge pc98's machdep.c into i386/i386/machdep.c.
* MFC 275035:jhb2014-12-221-1/+7
| | | | | MFamd64: Check for invalid flags in the machine context in sigreturn() and setcontext().
* MFC 273988,273989,273995,274057:jhb2014-12-2215-289/+818
| | | | | MFamd64: Add support for extended FPU states on i386. This includes support for AVX on i386.
* MFC 273991:jhb2014-12-224-4/+2
| | | | | MFamd64: Move extern declaration of _ucodesel and _udatasel to <machine/md_var.h>
* MFC 271405,271408,271409,272658:jhb2014-12-225-54/+79
| | | | | | MFamd64: Use initializecpu() to set various model-specific registers on AP startup and AP resume (it was already used for BSP startup and BSP resume).
* MFC 260557,271076,271077,271082,271083,271098:jhb2014-12-225-1633/+36
| | | | | | | | | | - Remove spaces from boot messages when we print the CPU ID/Family/Stepping - Move prototypes for various functions into out of C files and into <machine/md_var.h>. - Reduce diffs between i386 and amd64 initcpu.c and identcpu.c files. - Move blacklists of broken TSCs out of the printcpuinfo() function and into the TSC probe routine. - Merge the amd64 and i386 identcpu.c into a single x86 implementation.
* MFC 273871:jhb2014-12-181-0/+2
| | | | | Skip the smap sysctl instead of panicing if no kernel metadata can be found.
* MFC r273515, r274055, r274063, r274215, r274065, r274502:bryanv2014-11-291-0/+1
| | | | Add VirtIO console driver.
* Merge the fueword(9) and casueword(9). In particular,kib2014-11-182-14/+27
| | | | | | | | | | | | | | | | | | | | | | | MFC r273783: Add fueword(9) and casueword(9) functions. MFC note: ia64 is handled like arm, with NO_FUEWORD define. MFC r273784: Replace some calls to fuword() by fueword() with proper error checking. MFC r273785: Convert kern_umtx.c to use fueword() and casueword(). MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not converted, they are removed from HEAD, and not used. The do_sem2*() family is not yet merged to stable/10, corresponding chunk will be merged after do_sem2* are committed. MFC r273788 (by jkim): Actually install casuword(9) to fix build. MFC r273911: Add type qualifier volatile to the base (userspace) address argument of fuword(9) and suword(9).
* MFC r272761:kib2014-10-154-19/+28
| | | | | | | | | Add an argument to the x86 pmap_invalidate_cache_range() to request forced invalidation of the cache range regardless of the presence of self-snoop feature. MFC r272943: MFi386 r272761.
* MFC 270828,271487,271495:jhb2014-10-102-0/+44
| | | | | Add sysctls to export the BIOS SMAP and EFI memory maps along with handlers in the sysctl(8) binary to format them.
* This is a direct commit rather than an MFC of r271744.bz2014-09-235-8/+13
| | | | | | | | Re-gen after r272020 (r271743 in head) implementing most of timer_{create,settime,gettime,getoverrun,delete}. Approved by: re (gjb) Sponsored by: DARPA/AFRL
* MFC r271743:bz2014-09-233-32/+6
| | | | | | | | | | | | | | | Implement most of timer_{create,settime,gettime,getoverrun,delete} for amd64/linux32. Fix the entirely bogus (untested) version from r161310 for i386/linux using the same shared code in compat/linux. It is unclear to me if we could support more clock mappings but the current set allows me to successfully run commercial 32bit linux software under linuxolator on amd64. Reviewed by: jhb Differential Revision: D784 Sponsored by: DARPA, AFRL Approved by: re (gjb)
* MFC 270850,271053,271192,271717:jhb2014-09-225-45/+48
| | | | | | | | | | | | Save and restore FPU state across suspend and resume on i386. - Create a separate structure for per-CPU state saved across suspend and resume that is a superset of a pcb. - Store the FPU state for suspend and resume in the new structure (for amd64, this moves it out of the PCB) - On both i386 and amd64, all of the FPU suspend/resume handling is now done in C. Approved by: re (hrs)
* MFC r271716:kib2014-09-201-1/+2
| | | | | | | Presence of any VM_PROT bits in the permission argument on x86 implies that the entry is readable and valid. Approved by: re (gjb)
* MFC r271149:pfg2014-09-131-0/+2
| | | | | | | | | | | | Apply known workarounds for less modern MacBooks. The legacy USB circuit tends to give trouble on older MacBooks. While the original report covered MacBook4, extend the fix preemptively for the newer MacBookPro4 too. PR: 191693 Reviewed by: emaste Approved by: re
* MFC r271137:markj2014-09-071-0/+1
| | | | | | Add mrsas(4) to GENERIC for i386 and amd64. Approved by: re (gjb)
* MFC 270826:jhb2014-09-061-0/+4
| | | | | | | | MFamd64: Add a machdep.bootmethod sysctl to inform the installer which firmware method was used for booting. This is hardcoded to BIOS on i386. PR: 192962 Approved by: re (gjb)
* MFC r263005 by royger: howto_names: unify declarationemaste2014-09-041-18/+1
|
* MFC r270844:pfg2014-09-042-12/+12
| | | | | | | | | | Minor space/tab cleanups. Most of them were ripped from the GSoC 2104 SMAP + kpatch project (but unrelated). Only cosmetic changes. Taken from: Oliver Pinter (op@)
* Fix a leak of the wired pages when unwiring of the PROT_NONE-mappedkib2014-09-012-60/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level. All commits below are by alc. MFC r268327: Introduce pmap_unwire(). MFC r268591: Implement pmap_unwire() for powerpc. MFC r268776: Implement pmap_unwire() for arm. MFC r268806: pmap_unwire(9) man page. MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed. MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic. MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.) MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used. MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized. MFC r269485: Retire pmap_change_wiring(). Reviewed by: alc
* MFC r270038:kib2014-08-242-4/+1
| | | | Complete r254667, do not destroy pmap lock if KVA allocation failed.
* Merge the changes to pmap_enter(9) for sleep-less operation (requestedkib2014-08-242-49/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head. MFC r269368 (by alc): Retire PVO_EXECUTABLE. MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused). MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728. MFC r269822 (by alc): Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation. MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r266826, r266827markj2014-08-091-22/+0
| | | | | Move some duplicated hook definitions from machine-dependent files to kern_dtrace.c.
* MFC r263329:markj2014-07-291-19/+21
| | | | | | | Only invoke fasttrap hooks for traps from user mode, and ensure that they're called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts disabled can lead to deadlock if fasttrap writes to the process' address space.
* MFC: r269050marius2014-07-291-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | - Copying and zeroing pages via temporary mappings involves updating the corresponding page tables followed by accesses to the pages in question. This sequence is subject to the situation exactly described in the "AMD64 Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23, "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing the INVLPG right after modifying the PTE bits is crucial. For pmap_copy_page(), this has been broken in r124956 and later on carried over to pmap_copy_pages() derived from the former, while all other places in the i386 PMAP code use the correct order of instructions in this regard. Fixing the latter breakage solves the problem of data corruption seen with unmapped I/O enabled when running at least bare metal on AMD R-268D APUs. However, this might also fix similar corruption reported for virtualized environments. - In pmap_copy_pages(), correctly set the cache bits on the source page being copied. This change is thought to be a NOP for the real world, though. [2] 1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf Submitted by: kib [2] Reviewed by: alc, kib Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC r267213 (by alc):kib2014-07-241-2/+1
| | | | | | Add a page size field to struct vm_page. Approved by: alc
* MFC 260847,264055,264867:jhb2014-07-211-0/+1
| | | | | | | - Add a very simple virtio_random(4) driver for FreeBSD guests to harvest entropy from hypervisors. - Add support to bhyve for the virtio RNG entropy-source device to provide entry to bhyve guests.
* MFC r263749,267146:imp2014-07-172-2/+2
| | | | | | | | | | | | | | | | | | | | | >r267146 | imp | 2014-06-05 22:08:55 -0600 (Thu, 05 Jun 2014) | 4 lines >Restore comments accidentally removed. >r263749 | imp | 2014-03-25 16:08:31 -0600 (Tue, 25 Mar 2014) | 18 lines >Rather than require a makeoptions DEBUG to get debug correct, >add it in kern.mk, but only if we're using clang. While this >option is supported by both clang and gcc, in the future there >may be changes to clang which change the defaults that require >a tweak to build our kernel such that other tools in our tree >will work. Set a good example by forcing -gdwarf-2 only for >clang builds, and only if the user hasn't specified another >dwarf level already. Update UPDATING to reflect the changed >state of affairs. This also keeps us from having to update >all the ARM kernels to add this, and also keeps us from >in the future having to update all the MIPS kernels and is >one less place the user will have to know to do something >special for clang and one less thing developers will need >to do when moving an architecture to clang.
* MFC r268383:kib2014-07-151-0/+4
| | | | Correct si_code for the SIGBUS signal generated by the alignment trap.
* 267622 Log:ray2014-07-072-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename vt(4) vga module to dismiss interference with syscons(4) vga module. 267623 Log: Remove stale link to deleted vt(4) xboxfb driver. 267624 Log: syscons(4) and vt(4) can be built together now. 267625 Log: Allow to disable syscons(4) if "hw.syscons.disable" kenv is set. 267626 Log: Suspend vt(4) initialization if "kern.vt.disable" kenv is set. 267965 by emaste@ Log: Use a common tunable to choose between vt(4)/sc(4) With this change and previous work from ray@ it will be possible to put both in GENERIC, and have one enabled by default, but allow the other to be selected via the loader. (The previous implementation had separate kern.vt.disable and hw.syscons.disable tunables, and would panic if both drivers were compiled in and neither was explicitly disabled.) 268175 by emaste@ Log: Fix vt(4) detection in kbdcontrol and vidcontrol As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence of a vt(4) sysctl is not sufficient to determine that vt(4) is in use. Reported by: Trond Endrestøl 268045 by emaste@ Log: Add vt(4) to GENERIC and retire the separate VT config vt(4) and sc(4) can now coexist in the same kernel. To choose the vt driver, set the loader tunable kern.vty=vt . Sponsored by: The FreeBSD Foundation
* MFC r267767:kib2014-06-302-0/+8
| | | | | | Add FPU_KERN_KTHR flag to fpu_kern_enter(9). Apply the flag to padlock(4) and aesni(4). In aesni_cipher_process(), do not leak FPU context state on error.
* MFC 261781:jhb2014-06-274-11/+9
| | | | | | Don't waste a page of KVA for the boot-time memory test on x86. For amd64, reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386, remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.
* MFC r267492:kib2014-06-221-24/+6
| | | | | Fix some cosmetic issues with the use of kmem_malloc() in the i386 LDT sysarch(2) code.
* Revert MFC r266925 because it can lead to instant panic at fexecve():dchagin2014-06-171-2/+2
| | | | | | To allow to run interpreter itself add a new ELF branding type. Pointed out by: kib, mjg
* Fix mismerge in r267049 and put makeoptions DEBUG=-gdwarf-2 instead ofmarius2014-06-051-1/+1
| | | | | | DEBUG=-g back. Still, the original comment should be restored in head and then be MFCed along with r263749.
* MFC: r266821 (partial)marius2014-06-041-4/+2
| | | | | | | | - Actually, modules are built correctly when compiled along the kernel as they then pick up an opt_global.h from KERNBUILDDIR having PAE defined. Thus, build all modules by default except those which still really are defective as of r267043. - Minor style cleanup.
* MFC: r266820 (partial)marius2014-06-041-5/+4
| | | | | | - Shrink the list of excluded modules to what actually still doesn't build as of r267043. - Some style cleanups.
* MFC r266925:dchagin2014-06-031-2/+2
| | | | | To allow to run the interpreter itself add a new ELF branding type. Allow Linux ABI to run ELF interpreter.
* MFC 263301ian2014-05-172-4/+4
| | | | | | In kernel config files, it is supposed to be 'options<space><tab>' not 'options<tab><tab>', per long standing (but recently not so strictly enforced) convention.
* MFC 263246: Align all comments in config files on same column.ian2014-05-171-197/+197
|
* MFC 263036, 263059: delete advertising clause in licenses, renumber.ian2014-05-171-1/+1
|
* MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds.ian2014-05-161-0/+3
|
* MFC r257854 (discussed with alc@)ian2014-05-161-11/+10
| | | | | | | | | | | | | As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional. Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity.
* Merge r264984scottl2014-05-073-3/+1
| | | | | | | | | Retire smp_active. It was racey and caused demonstrated problems with the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well. Obtained from: Netflix, Inc.
* MFC r262338alc2014-05-071-5/+11
| | | | | | | | | | | | | | | | | | When the kernel is running in a virtual machine, it cannot rely upon the processor family to determine if the workaround for AMD Family 10h Erratum 383 should be enabled. To enable virtual machine migration among a heterogeneous collection of physical machines, the hypervisor may have been configured to report an older processor family with a reduced feature set. Effectively, the reported processor family and its features are like a "least common denominator" for the collection of machines. Therefore, when the kernel is running in a virtual machine, instead of relying upon the processor family, we now test for features that prove that the underlying processor is not affected by the erratum. (The features that we test for are unlikely to ever be emulated in software on an affected physical processor.) PR: 186061
* MFC the mpr(4) driver for LSI's 12Gb SAS cards.ken2014-05-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes r265236, r265237, r265241 and r265261: ------------------------------------------------------------------------ r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers. This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108. Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver. o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface. o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists. Thanks to LSI for developing and testing this driver for FreeBSD. share/man/man4/mpr.4: mpr(4) man page. sys/dev/mpr/*: mpr(4) driver files. sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver. sys/conf/files: Add the mpr(4) driver. sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver. sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file. sys/i386/conf/XEN: Exclude the mpr module from building here. Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines Add the mpr(4) man page to the man4 Makefile. This should have been included in r265236. Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> MFC after: 3 days Sponsored by: LSI, Spectra Logic ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines Use our standard SYNOPSIS wording; perform some cleanup while here. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines Add a missing colon. ------------------------------------------------------------------------ Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
* MFC r263912:kib2014-04-051-1/+2
| | | | Clear the kernel grab of the FPU state on fork.
* MFC r263001royger2014-04-044-119/+121
| | | | | | | | Move asm IPIs handlers to C code, so both Xen and native IPI handlers share the same code. Approved by: gibbs Sponsored by: Citrix Systems R&D
OpenPOWER on IntegriCloud