Age | Commit message (Collapse) | Author |
|
keyboard is a pseudo device which is used to expose audio and
application launch keys. My prime motivation is to get the volume mute,
increment and decrement keys to just work on my keyboard without the
need to use usbhidaction(1).
Looks reasonable to kettenis@ mpi@ and ok jcs@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The loongson bootblocks are compiled with -mno-abicalls and do not use
gp-relative addressing.
A similar change has been made to the mips64 kernels recently.
|
|
On OpenBSD/mips64, the kernel is compiled with -mno-abicalls. This
disables gp-relative addressing and essentially makes gp a spare
register in the kernel. Hence it is unnecessary to initialize gp when
entering the kernel. The _gp symbol is not needed either.
Suggested by miod@
|
|
exposing battery sensors for HID++ 2.0 devices. Most of the code is
derived from the hid-logitech-hidpp Linux driver.
Thanks to Ville Valkonen <weezeldinga at gmail dot com> for testing.
ok mglocker@
|
|
SMALL_KERNEL specific variations.
ok espie jsg
|
|
This includes ujoy_hid_is_collection() to work around limitations of
hid_is_collection() until this can be combined without fallout.
input, testing with 8bitdo controller, and ok brynet@
PS4 controller testing, fix for hid_is_collection, and ok mglocker@
|
|
From Yifei ZHAN on tech@
|
|
LM9002/9003 is very similar to LM9001 since it works just fine on LM9002
with the codebase for LM9001.
LM9013 on the other hand is fairly different from LM9001 and is more like
Yeeloong 8089 when it comes to hardware design. More work might be needed
to make it fully functional.
From Yifei ZHAN on tech@
|
|
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
OK deraadt@
|
|
At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks.
More daddr32_t terminations with extreme prejudice to follow.
Tested by various, in snaps for a few days.
ok deraadt@
|
|
|
|
|
|
gcc has generated unaligned loads with the original code.
|
|
System include file <bsd.lib.mk> includes ../Makefile.inc if it exists.
This avoids repetition of certain compile options.
|
|
|
|
This might fix some boot-time hangs.
|
|
Normally we set hz(9) at compile-time in sys/conf/param.c to the value
of HZ. HZ is one of the fundamental compilation options(4). However,
sometimes we need to reset hz(9) at runtime.
Whenever we reset hz(9) we need to recompute tick and tick_nsec.
Otherwise a variety of "time stuff" in the kernel will not work
correctly. For example, most timeouts will expire "too slow" or "too
fast". There are a bunch of other places we use tick and tick_nsec
that will exhibit similar problems.
Test-compiled by deraadt@.
|
|
platforms than just loongson. Rename it to mfokrtc(4) for consistency with
other RTC drivers. Make it match on st,m41t83, since that was the chip for
which the driver was written for. More compatible strings can be added for
each chip of the series verified to behave the same.
Discussed with kettenis@
Compile tested on loongson by kn@
Tested on loongson by and ok visa@
|
|
deraadt@: looks fine
|
|
OK deraadt@, mpi@
|
|
The interrupt dispatcher interrupt() keeps interrupts disabled anyway.
Also, the IPI code should not allow nesting of interrupts.
|
|
Not enabled for now.
OK deraadt@
|
|
|
|
OK naddy@; no objections from kettenis@
|
|
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
"looks right" deraadt@
|
|
functionality is provided by <sys/stdarg.h> using compiler builtins.
Tested in a ports bulk build on amd64 by naddy@
OK naddy@ mpi@
|
|
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs
polishing; most of this work done during h2k9 last month, although the
porting effort started earlier this year.
|
|
time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.
This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).
There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.
There is no performance cost on 64-bit (__LP64__) platforms.
With input from visa@, dlg@, and tedu@.
Several bugs squashed by visa@.
ok kettenis@
|
|
Use CP0 Count as a basis. Also take noise from virtual memory activity
by including BadVAddr.
OK deraadt@ dlg@
|
|
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.
|
|
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.
|
|
Nothing uses the header anymore.
OK deraadt@ mpi@
|
|
If rsize is NULL, do not update the variable. Otherwise the bootloader
will crash when it invokes libsa's fchmod().
This lets the bootloader work again after the recent loadrandom()
change. The fix should also improve the chances of sysupgrade(8) on
loongson.
Note that pmon_iostrategy() does not allow writing. fchmod() will fail
but does not prevent boot.
|
|
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs
polishing; most of this work done during h2k9 last month, although the
porting effort started earlier this year.
|
|
|
|
Tested on Yeeloong.
Looks good to miod@
|
|
Looks good to miod@
|
|
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs
polishing; most of this work done during h2k9 last month, although the
porting effort started earlier this year.
|
|
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs
polishing; most of this work done during h2k9 last month, although the
porting effort started earlier this year.
|
|
miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.
suggested and reviewed by miod@
|
|
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
|
|
bus_space_read_region_n, bus_space_write_region_n and
bus_space_set_region_n functions were all broken.
Same fix as arm64; Thanks to patrick@ for noting that mips64 had the same
code.
ok visa@
|