summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2020-06-17add a dumb pci_intr_establish_cpu().David Gwynne
i386 doesnt support msix, and the interrupt code assumes that it only ties stuff to cpu0. this mostly exists so the api exists for multiq drivers to compile against, but fail with when they try to use it. tested with a hacked up vmx(4).
2020-06-15Check rdrand for success and try up to ten times, as recommended by Intel.Christian Weisgerber
Do the same for rdseed. ok deraadt@
2020-06-14do not need assym.hTheo de Raadt
2020-06-14crank version numberTheo de Raadt
2020-06-14asm versions of mdrandom() no longer neededTheo de Raadt
2020-06-14rewrite mdrandom() in C. previously this XOR'd against rdrand if available,Theo de Raadt
and alternatively XOR'd against TSC. now always run both sequences, and also support rdseed as a third procedure. ok kettenis naddy
2020-06-08update drm to linux 5.7Jonathan Gray
adds kernel support for amdgpu: vega20, raven2, renoir, navi10, navi14 inteldrm: icelake, tigerlake Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping, patrick@ for helping adapt rockchip drm and many developers for testing.
2020-05-31introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.David Gwynne
rnd.c uses nanotime to get access to some bits that change quickly between events that it can mix into the entropy pool. it doesn't use nanotime to get a monotonically increasing set or ordered and accurate timestamps, it just wants something with bits that change. there's been discussions for years about letting rnd use a clock that's super fast to read, but not necessarily accurate, but it wasn't until recently that i figured out it wasn't interested in time at all, so things like keeping a fast clock coherent between cpu cores or correct according to ntp is unecessary. this means we can just let rnd read the cycle counters on cpus and things will be fine. cpus with cycle counters that vary in their speed and arent kept consistent between cores may even be desirable in this context. so this is the first step in converting rnd.c to reading cycle counter. it copies the nanotime backend to each arch, and they can replace it with something MD as a second step later on. djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits. thanks to visa for his eyes. ok deraadt@ visa@ deraadt@ says he will help handle any MD fallout that occurs.
2020-05-29dev/rndvar.h no longer has statistical interfaces (removed during variousTheo de Raadt
conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
2020-05-27Retire <machine/varargs.h>.Visa Hankala
Nothing uses the header anymore. OK deraadt@ mpi@
2020-05-27don't limit clflush to Intel CPUsJonathan Gray
discussed with deraadt@
2020-05-26increment version numbers, due to recent RB_GOODSEED and fchmod +T changesTheo de Raadt
2020-05-25Adjust mdrandom() to also return 0 for success, -1 for failureTheo de Raadt
2020-05-25Kill unused cdev_pc_init().Martin Pieuchot
ok kettenis@, visa@
2020-05-17Put setjmp+longjmp inside #ifdef DDB the only kernel-side user.Theo de Raadt
This shrinks the ramdisks a tiny bit.
2020-05-16Make inittodr() and resettodr() MI.Mark Kettenis
ok deraadt@, mpi@, visa@ ok cheloha@ as well (would have preferred in new file for this code)
2020-05-14Use '/t' on all architectures to get a trace via TID.Martin Pieuchot
ok sthen@, patrick@
2020-05-13Kill biospoll/pctrpoll defines and use `seltrue' directly in cdev_*_init().Martin Pieuchot
While here use the kqfilter equivalent to `seltrue' to ensure both interfaces are coherent. ok visa@
2020-05-02Fix buglet in previous commit; use time from the struct timeval that wasMark Kettenis
passed in when setting the RTC time instead of the global time_second. ok mpi@
2020-04-29Use the same inittodr()/resettodr() implementation as onMark Kettenis
amd64/arm64/armv7/sparc64 and move it to the end of machdep.c. Rework the actual implementation for the MC14818 compatible RTC into something that can be used as a todr_handle just like on amd64. ok sthen@
2020-04-18Sync existing stacktrace_save() implementationsVisa Hankala
Upgrade stacktrace_save() to stacktrace_save_at() on architectures where the latter is missing. Define stacktrace_save() as an inline function in header <sys/stacktrace.h> to reduce duplication of code. OK mpi@
2020-04-12Add support for the _CCA method. This method indicates whether DMA isMark Kettenis
cache-coherent or not. To implement this, acpi(4) gets two bus_dma tags and passes the appropriate one when attaching devices based on _CCA. On i386/amd64, where for all practical purpose DMA is always cache-coherent, the two tags are the same. But on arm64 they are distinct. ok patrick@
2020-04-07Abstract the head of knote lists. This allows extending the lists,Visa Hankala
for example, with locking assertions. OK mpi@, anton@
2020-04-03Fix incoherencies of errors returned by various *kqfilter routines.Martin Pieuchot
EOPNOTSUPP is returned when there's no "filterops" for a given fd. EINVAL when the requested filter isn't supported by the "filterops". ENXIO means the underlying device is no longer valid/present. ok visa@
2020-03-29Prevent stack trace saving from inspecting untrusted data. On amd64,Visa Hankala
arm64 and i386, the chain of call frames is continuous from kernel to userspace. The unwinder has to stop at the latest when it reaches the start of the kernel stack. OK mpi@
2020-03-25Introduce stacktrace_save_at() and make use of it in dt(4).Martin Pieuchot
This variant of stacktrace_save() takes an aditionnal argument to skip an arbitrary number of frame. This allows to skip recording frames used to execute the profiling code and produces outputs easier to understand. Inputs from and ok visa@
2020-03-24cope with growth, sighTheo de Raadt
2020-03-21Teach i386 boot98) and friends about ffs2. fdboot(8) is the exception:Otto Moerbeek
ffs2 support does not fit there. But the the kernel loaded by the floppy ramdisk does support ffs2.
2020-03-20Disable apm(4) on the floppy ramdisk and keep the cd one in sync.Otto Moerbeek
This allows FFS2 to be enabled. Has been in snaps for quite some days. With and ok deraadt@
2020-03-20Declare pci_intr_map_msix() as static inline instead of using a define.Martin Pieuchot
This makes compiler no longer complain about unused variables. ok kettenis@, patrick@
2020-03-09Recommit, now that we found out how to fix the BIOS related issues: goOtto Moerbeek
back to a 4 byte add instruction. We do not know *why* though, so if somebody likes a challenge... Lots of help from semarie@ who has a few systems showing the issue. ok deraadt@
2020-03-07Revert previous, there are BIOS that do not like these changes.Otto Moerbeek
Sorry for the inconvenience. With help from semarie@.
2020-02-28Adapt biosboot(8) so it can read boot(8) from an ffs2 filesystem.Otto Moerbeek
To do this, installboot(8) patches an extra value into biosboot(8). Code originally from Pedro Martelletto with a twist from myself and kettenis@; ok jsing@ kettenis@
2020-02-28oops, tsc value is 64 bit.Theo de Raadt
pointed out by naddy
2020-02-28oops some snapshot tests fell inTheo de Raadt
2020-02-28syncTheo de Raadt
2020-02-27in rdrand() timeout, if the rdrand instruction fails to fetch entropyTheo de Raadt
(valid == 0) we can also inject that failure an entropic event, so xor in that bit and proceed with submission. the rdrand instruction can vmexit, so perform an additional rdtsc afterwards measuring the vmexit latency (which due to caches is highly unlikely to be constant), that's also worthwhile entropy to blend. This works on the fundamental concept that the input-side of entropy collection can accept bad or weak data. entropypool ^= weakdata is not saturative or attackable, the entropy pool either remains as good or becomes better. ok djm jsg
2020-02-20Replace field f_isfd with field f_flags in struct filterops to allowVisa Hankala
adding more filter properties without cluttering the struct. OK mpi@, anton@
2020-02-20controler -> controllerJonathan Gray
2020-02-10When attempting to disabe TSX avoid uninitialised var use for Intel cpusJonathan Gray
with cpuid_level < 7. Problem reported by Anthony Steinhauser.
2020-01-24cleanup unused headers generated by configJonathan Gray
ok tedu@ krw@ deraadt@
2020-01-23wire up pppac(4) to some majors on each arch.David Gwynne
i was lazy and just put them at the end of the existing set. fyi, i think major 51 is free on all archs if anyone is looking for another one. ok claudio@
2020-01-22rm rtfps driver. disabled and man page doesn't inspire much confidence.Ted Unangst
ok deraadt
2020-01-21Import dt(4) a driver and framework for Dynamic Profiling.Martin Pieuchot
The design is fairly simple: events, in the form of descriptors on a ring, are being produced in any kernel context and being consumed by a userland process reading /dev/dt. Code and hooks are all guarded under '#if NDT > 0' so this commit shouldn't introduce any change as long as dt(4) is disable in GENERIC. ok kettenis@, visa@, jasper@, deraadt@
2020-01-20remove esp at pcmcia attachment. it doesn't even compile.Ted Unangst
ok deraadt krw
2020-01-20Separate the stack trace saving interface from ddb. The saving does notVisa Hankala
require the debugger on most architectures, and the separation makes the code easier to use from other subsystems. The function definitions are still conditional to DDB. However, that should not matter for now. OK deraadt@, mpi@
2020-01-05consistently uppercase pci product definesJonathan Gray
ok mpi@
2020-01-04remove AMD64 strings from pcidevsJonathan Gray
ok mortimer@ mpi@ deraadt@
2019-12-31Use C99 designated initializers with struct filterops. In addition,Visa Hankala
make the structs const so that the data are put in .rodata. OK mpi@, deraadt@, anton@, bluhm@
2019-12-23The boot loader allows to inspect memory with the hexdump command.Alexander Bluhm
Document the new feature in boot(8) man page. OK jmc@ deraadt@