summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2018-05-04Initialize st_count in db_save_stack_trace().Visa Hankala
OK guenther@
2018-05-01vmmci(4) depends on pvbus(4) being available, unbreakPeter Hessler
from mlarkin@
2018-04-30vmd(8): unbreak i386Mike Larkin
2018-04-28replace add_*_randomness with enqueue_randomness()Jasper Lievisse Adriaanse
this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
2018-04-27use nitems()Jasper Lievisse Adriaanse
verified md5 sum on amd64 ok mlarkin@
2018-04-27-fretpoline for non-RAMDISK kernels. Skylake product needs it, andTheo de Raadt
therefore all other x86 cpus must pay the performance price of the hazard workaround until Skylake disappears from the ecosystem eventually like 486. This returns your cpu's performance to pre-inflated performance. ok mlarkin guenther
2018-04-26Oups, we only need vmmci(4) for the ramdisk, not the whole vmm(4).Peter Hessler
noticed by deraadt@ and mlarkin@
2018-04-26enable vmmci(4) on the ramdisks, so bsd.rd plays nicer when it powers offPeter Hessler
OK mlarkin@
2018-04-20grammar fixes PTE's -> PTEsMike Larkin
ok guenther, jmc, tom, millert, deraadt
2018-04-17- Make rnd hints avoid the brk area. The rnd allocator refuses to allocate inOtto Moerbeek
the brk area anyway. - Use a larger hint bound to spread the allocations more for the 32-bit case - Simplified the overy abstracted brs/stack allocator and switch of guard pages for the brk case. This allows i386 some extra space, depending on memory usage patterns. - Reduce brk area on i386 to give the rnd space more room ok stefan@ sthen@
2018-04-12Implement MAP_STACK option for mmap(). Synchronous faults (pagefault andTheo de Raadt
syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer ok kettenis
2018-04-11More steps for i386 Meltdown fix:Alexander Bluhm
- provide struct cpu_info_full - prepare K-U sections - reorganize interrupt, trap, syscall entry to use K-U trampoline - prepare pmap for entering special mappings, the mappings are not setup yet This code will already trigger performance issues. We do more tlb flushes, but we do not unmap the kernel yet. The latter will be needed to prevent Meltdown. from hshoexer@; input guenther@; OK mlarkin@ deraadt@
2018-03-31Change ci_dev.dv_xname to ci_dev->dv_xname in debugging printf()Alexander Bluhm
to make it compile when enabled. from hshoexer@
2018-03-31Fix a hang on i386 vmware guest that was happening on copyout() ofAlexander Bluhm
arguments for /sbin/init. For CPU 0 identifycpu() originally got called twice, once very early from cpu_startup(), then again from cpu_attach(). Now we call identifycpu() only from cpu_attach() with CPUF_PRIMARY set. So make sure, that for CPU 0 nothing is skipped. Otherwise, cpu_info might have different features set for CPU 0 than for all other CPUs. This is similar to what amd64 does. from hshoexer@; reported and fix tested by Emilio Perea; OK mlarkin@
2018-03-31Recommit preparation for i386 Meltdown fix after OpenBSD 6.3 release.Alexander Bluhm
Switching from per PCB TSS to per CPU TSS broke kvm86 calls to the BIOS. This change fixes the issues. from hshoexer@; reported and tested by semarie@; OK deraadt@
2018-03-31Recommit preparation for i386 Meltdown fix after OpenBSD 6.3 release.Alexander Bluhm
- provide a cpu_softc for cpu_attach() etc. - replace per PCB TSS with per CPU TSS The first change prepares for cpu_info being embedded in a cpu_full_info. Therefore during autoconf/cpu_attach we hand down a softc. The second change removes the per PCB TSS. We now have one TSS per CPU, thus in cpu_switchto() we only have to patch the ring 0 stack pointer instead of loading a new TSS. This also allows for cleaning up the GDT, so we only have a single slot for the TSS. from hshoexer@; OK deraadt@
2018-03-27Add acpicmos(4), a driver that implements SystemCMOS OperationRegionMark Kettenis
access support. This fixes machines where the AML doesn't check whether support for this OperationRegion type has been registered by the OS. ok mlarkin@
2018-03-22iBackout the preparations for fixing Meltdown on i386. The task wasAlexander Bluhm
only halfway done and the current state does not help anybody. For OpenBSD 6.3 release go back to the original code before 2018/03/13. This gives us a stable release and the changes will come back later. discussed with guenther@ deraadt@ hshoexer@
2018-03-20Switching from per PCB TSS to per CPU TSS broke kvm86 calls to the BIOS.Alexander Bluhm
This change fixes the issues. from hshoexer@; reported and tested by semarie@; OK deraadt@
2018-03-20Do not panic from ddb(4) when a lock requirement isn't fulfilled.Martin Pieuchot
Extend the logic already present for panic() to any DDB-related operation such that if ddb(4) is entered because of a fault or other trap it is still possible to call 'boot reboot'. While here stop printing splassert() messages as well, to not fill the buffer. ok visa@, deraadt@
2018-03-20Add hibernate IO path for sdmmc(4). This requires some help from theJonathan Matthew
sdmmc chipset driver, currently only implemented in sdhc(4), but mostly uses the regular path. sdhc(4) also needed the ability to perform IO while cold. ok deraadt@
2018-03-13Preparation for i386 Meltdown fix:Alexander Bluhm
- provide a cpu_softc for cpu_attach() etc. - replace per PCB TSS with per CPU TSS The first change prepares for cpu_info being embedded in a cpu_full_info. Therefore during autoconf/cpu_attach we hand down a softc. The second change removes the per PCB TSS. We now have one TSS per CPU, thus in cpu_switchto() we only have to patch the ring 0 stack pointer instead of loading a new TSS. This also allows for cleaning up the GDT, so we only have a single slot for the TSS. from hshoexer@; OK deraadt@
2018-03-05#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an archTheo de Raadt
needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan
2018-03-01Protect the calls to trapsignal() and psignal() with a kernel lockAlexander Bluhm
when processing an npx interrupt. This fixes a kernel locked assertion in postsig_done() during the libc ieeefp/except regression test. OK visa@
2018-02-21Mark VIA padlock as capable of dealing with ESNMike Belopuhov
There are no actual changes to the driver since the software crypto driver is called to handle authentication operations. This enabled padlock to be used when tunnels are setup with iked(8). Tested by and OK fcambus
2018-02-20Convert key length from bits to bytesMike Belopuhov
Reported by Renaud Allard, fix tested by Renaud (i386) and fcambus@ (amd64). OK visa, fcambus
2018-02-19Remove almost unused `flags' argument of suser().Martin Pieuchot
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
2018-02-16Add sizes for free() in the i386 version of the Enhanced SpeedStep driver.Frederic Cambus
It was already done on amd64, but not on i386. Tested on an Atom N270. OK mpi@
2018-02-10Additional AMD CPUID bits documented inJonathan Gray
"Processor Programming Reference (PPR) for AMD Family 17h Model 01h, Revision B1 Processors" ok mlarkin@ deraadt@
2018-02-10Remove now unused assembly mutex code.Martin Pieuchot
ok mlarkin@, deraadt@
2018-02-10Add a mapping from grandparent driver name to hibernate io function to reduceJonathan Matthew
the number of ->dv_parent->dv_parent chains and make this more readable. ok deraadt@ phessler@
2018-02-09Check for the existence of /bsd before trying to back it up to /obsd.Theo Buehler
Fixes 'make install' when /bsd is not present for some reason. ok rob florian, "fine with me" deraadt
2018-02-07Reporting the PXE boot interface we identified is independent of settingChristian Weisgerber
the boot device. We do the latter only for NFSCLIENT, but always the former. While here, modernize the interface matching loop. ok deraadt@
2018-02-07Use M_WAITOK to show we don't need to check for NULL.Kenneth R Westerback
ok deraadt@
2018-01-27Sync the nam2blk entries with the bdevsw table, which is theChristian Weisgerber
definitive list of block devices supported on an architecture. ok kettenis@ deraadt@
2018-01-25Remove mutex implementations that now live in MI code.Martin Pieuchot
2018-01-25Move common mutex implementations to a MI place.Martin Pieuchot
Archs not yet converted can to the jump by defining __USE_MI_MUTEX. ok visa@
2018-01-25Use a new LDFLAGS variable to pass "-melf_i386_obsd" on amd64.Martin Pieuchot
Makes the linker generate a correct i386 gap.o file. ok kettenis@, deraadt@
2018-01-22<machine/mutex.h> -> <sys/mutex.h>Martin Pieuchot
2018-01-22Always grab the KERNEL_LOCK() for !IPL_MPSAFE handlers.Martin Pieuchot
Suggested by kettenis@, ok visa@
2018-01-13Define and use IPL_MPFLOOR in our common mutex implementation.Martin Pieuchot
ok kettenis@, visa@
2018-01-12Unify <machine/mutex.h> a bit further.Martin Pieuchot
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64. ok visa@
2018-01-04Unify <machine/mutex.h> a bit further.Martin Pieuchot
Remove `mtx_lock' from i386, add volatile before `mtx_owner' where it was missing. Inputs from kettenis@, ok visa@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-29Remove unnecessary includes in the i386 version of the VIA PadLockFrederic Cambus
driver. OK visa@, mlarkin@
2017-12-27Add sizes for free() in the Geode LX Security Block crypto accelerator.Frederic Cambus
OK visa@
2017-12-24Somes fixes for the VIA PadLock drivers.Frederic Cambus
- Do not ignore the return value of m_copyback() on i386 - Always free sc->op_buf before returning on both amd64 and i386, pointed out by mikeb@, thanks! OK mikeb@
2017-12-20Switch x86 architectures to the common C mutex implementation.Martin Pieuchot
This is a step towards MI mutexes. ok kettenis@
2017-12-18Add sizes for free() in libsa for amd64 and i386.Frederic Cambus
OK tom@, deraadt@
2017-12-14Change bcopy to memcpy in the i386 version of the VIA PadLock driver.Frederic Cambus
It was done a while ago in the amd64 version. OK mlarkin@, deraadt@, dlg@