summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2015-06-04enable rtwn(4) on i386Stefan Sperling
2015-05-30Remove commented out DRMDEBUG/DRM_DEBUG lines. Other drivers don't haveJonathan Gray
similiar lines so drm shouldn't either.
2015-05-30Native atomic operations for i386.Mark Kettenis
ok deraadt@, guenther@, dlg@
2015-05-29Nuke annoying whitespace nits to shrink some future diffs.Kenneth R Westerback
2015-05-28when machdep.allowaperture sysctl is set to 3, allow concurrent accessJoshua Stein
2015-05-28Save the cpuid(6) eax bits in the cpu_info and report the SENSOR and ARATPhilip Guenther
bits from it. ok krw@ kettenis@
2015-05-09Cleanup/rejig GPT code to be more readable, support different endianKenneth R Westerback
archs and different sized disk sectors. Make MBR have higher priority than GPT. Add many paranoia checks and associated DPRINTF's to make further development easier. Keep everything hidden behind #ifdef GPT. Tested and ok doug@ mpi@. Nothing bad seen by millert@.
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-04-29Move a variable's initialisation so a panic will work as intended.Jonathan Gray
ok guenther@ deraadt@
2015-04-26Disable PAE when switching to the hibernate resume pagetables. This involvesMark Kettenis
a slightly conmplicated dance where we stash the PAE PDPTEs into the hibernate resume pagetables and use those before turning off PAE. Makes (un)hibernate work with the new PAE pmap. ok mlarkin@
2015-04-26Enable NX support in the resume path. Makes suspend/resume work with theMark Kettenis
PAE pmap. ok deraadt@, mlarkin@
2015-04-26Only enable PAE if the CPU we're running on has NX support. Without NXMark Kettenis
support we're only wasting memory on the larger PAE page tables without any real benefit. This allows some simplifications of the low-level assembly code. ok mlarkin@, deraadt@
2015-04-26bump i386 MAXDSIZ to 3GB. - "If you're running this, and presumably actuallyStuart Henderson
using that much memory, go for it" tedu@ "I don't see any immediate downsides" kettenis@
2015-04-25We now following the ABI and always clear cld on function entry, so removePhilip Guenther
the extra CLD instructions from when that wasn't true testing miod@ krw@
2015-04-24Enable PAE mode for those CPUs that support it. This allows us to use theMike Larkin
NX bit for userland and kernel W^X. Unlike the previous c.2008 PAE experiment, this does not provide > 4GB phys ram on i386 - PAE is solely being used for NX capability this time. If you need > 4GB phys, use amd64. Userland W^X was committed yesterday by kettenis@, and we will shortly start reworking the kernel like we did for amd64 a few months back to get kernel W^X. This has been in snaps for a few days and tested by kettenis and myself as well. ok deraadt@, kettenis@
2015-04-24Make sure we keep the whole recursive mapping of the PDP instead of just theMark Kettenis
mapping for the first page when tearing things down. Seems to fix the last bug mlarkin@ has been chasing for a while. ok mlarkin@
2015-04-24Enable the NX bit and use it in the PAE pmap code. PAE is still disabledMark Kettenis
while we're chasing at least one remaining bug. ok mlarkin@, deraadt@
2015-04-22Reduce differences between pae and no-pae modes.Mike Larkin
discussed with deraadt
2015-04-21Remove an extra lcr3 that snuck into pmap_switch during yesterday'sMike Larkin
cleanup, responsible for various reaper panics pointed out on bugs@ this morning. ok deraadt@
2015-04-21Remove a duplicate variable and #define that snuck in, in a previousMike Larkin
commit. ok deraadt@
2015-04-21Reduce differences between i386 pmap modes.Mike Larkin
ok kettenis@
2015-04-19Remove emulation of oss audio ioctls from linux emulation.Alexandre Ratchov
ok armani, guenther, sthen
2015-04-19Binary code patching on i386Stefan Fritsch
This commit ports the infrastructure to do binary code patching from amd64. The existing code patching for SMAP is converted to the new infrastruture. ok kettenis@ "should go in" deraadt@
2015-04-18It seems that the CPUID lies about the monitor-line size, or at least ourMark Kettenis
interpretation of it isn't quite right. So instead of allocating memory and slicing it based on the parameters returned by CPUID, simply use a member in struct cpu_info like basically all other OSes out there do. Our struct cpu_info is large enough to never cause any overlap. This makes the mwait-based idle loop actually work. We still execute the CPUID instruction to make sure monitor/mwait is properly supported by the hardware we're running on. ok sthen@, deraadt@, guenther@
2015-04-18i386 and amd64 have only one syscall entry point now, so simply thePhilip Guenther
EIP/RIP adjustment for ERESTART ok mlarkin@
2015-04-16Enable ualea(4) where we have uhub(4), these USB device lists cry forMartin Pieuchot
unification...
2015-04-14Reduce differences between non-PAE and PAE pmaps. This diff removes anMike Larkin
unneeded disable/enable_intr sequence around the PTE unmap operation.
2015-04-12Fix some KNF, spacing, and typo issues. Moving the deck chairs around toMike Larkin
reduce differences between PAE and no-PAE i386 pmaps.
2015-04-12Fix some typos in comments, and remove an outdated comment about howMike Larkin
certain pmap structures are allocated. No functional change.
2015-04-12Bring PAE code back to life, in a different form. This diff (via bluhm thenMike Larkin
to deraadt, then myself) brings the PAE pmap on i386 (not touched in any significant way for years) closer to the current non-PAE pmap and allows us to take a big next step toward better i386 W^X in the kernel (similar to what we did a few months ago on amd64). Unlike the original PAE pmap, this diff will not be supporting > 4GB physical memory on i386 - this effort is specifically geared toward providing W^X (via NX) only. There still seems to be a bug removing certain pmap entries when PAE is enabled, so I'm leaving PAE mode disabled for the moment until we can figure out what is going on, but with this diff in the tree hopefully others can help. The pmap functions now operate through function pointers, due to the need to support both non-PAE and PAE forms. My unscientific testing showed less than 0.3% (a third of a percent) slowdown with this approach during a base build. Discussed for months with guenther, kettenis, and deraadt. ok kettenis@, deraadt@
2015-04-02use correct capitalization of 'BlackBerry'Jasper Lievisse Adriaanse
"sure" deraadt@
2015-04-01Add cpu_pae variable (which will be later used to determine if PAE mode isMike Larkin
in use) now so that libkvm can be fixed before the rest of the bulk of PAE support is committed. requested by and ok deraadt@
2015-03-31zero the frame pointer of the kernel stack of new threads to make ddb tracePhilip Guenther
happier ok dlg@ jsing@ kettenis@ mlarkin@
2015-03-25Mark CPUID_LEAF inline asm as volatile to prevent the compiler from reorderingMark Kettenis
it with respect to other instructions. ok gunether@, mlarkin@
2015-03-24unwire lmc(4) and san(4).David Gwynne
they do "interesting" things with APIs i want to change, and i can't find any evidence anyone uses them anymore. instead of burning time on changes i cant test, ill take a chance that noone will miss them. no objections from anyone ok mpi@ deraadt@ henning@ sthen@
2015-03-20Fix an outdated comment, spotted by mpi@Mike Larkin
2015-03-16Reduce use of SMALL_KERNEL in acpi, bringing acpiec driver and more gpeTheo de Raadt
handling into RAMDISK. This is now possible because the install media has ample room. The goal is to reduce special cases where we may be skipping (unknown) important operations... ok mlarkin kettenis
2015-03-13move some deck chairs around in preparation for i386 PAE. no functionalMike Larkin
change, just moving a few hundred lines of comments from one place to another. Note that some of these comments are giant lies that will get rewritten later. ok deraadt@
2015-03-09Switch pv entries over to a pool in preparation for making the i386 (more)Mark Kettenis
mpsafe. Most (all?) other architectures now use pools for this, including non-direct pmap architetcures like sparc and sparc64. Use a special back-end allocator for pool pages to solve bootstrapping problems. This back-end allocator allocates the initial pages from kernel_map, switching to the uvm_km_page allocator once the pmap has been fully initialized. The old pv entry allocator allocated pages from kmem_map. Using the uvm_km_page allocator avoids certain locking issues, but might change behaviour under kva pressure. Time will tell if that's a good or a bad thing. ok mlarkin@, deraadt@
2015-02-27Fix uvm_fault() seen with bwi (and some other devices?) on older non-apic i386Philip Guenther
reported by Michael (lesniewskister (at) gmail.com) ok miod@ (who did all the hard work)
2015-02-15Change pmap_remove_holes() to take a vmspace instead of a map as its argument.Miod Vallat
Use this on vax to correctly pick the end of the stack area now that the stackgap adjustment code will no longer guarantee it is a fixed location.
2015-02-11deprecate use of sys/lock.h and replace it with sys/atomic.h orDavid Gwynne
machine/lock.h as appropriate.
2015-02-11zero ecx before cpuid(1), for some Cyrix processors do not reallyMiod Vallat
support cpuid with other values than zero, and leave the ecx register unchanged. ok kettenis@
2015-02-11make the rwlock implementation MI.David Gwynne
each arch used to have to provide an rw_cas operation, but now we have the rwlock code build its own version. on smp machines it uses atomic_cas_ulong. on uniproc machines it avoids interlocked instructions by using straight loads and stores. this is safe because rwlocks are only used from process context and processes are currently not preemptible in our kernel. so alpha/ppc/etc might get a benefit. ok miod@ kettenis@ deraadt@
2015-02-10Convert to uiomove().Miod Vallat
ok guenther@
2015-02-10Switch uiomovei(..., sizeof whatever, ...) to uiomove().Miod Vallat
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
2015-02-08enable iwm(4) in big ramdisks for easy upgradesPeter Hessler
tested with and without firmware files. OK stsp@ deraadt@
2015-02-08Only attach cpu-based sensors on the primary cpu, for two reasonsTheo de Raadt
- The sensor framework cannot fetch values on the right cpu - sensor_task_register() calls malloc, and calling it is inapproapriate ok guenther