Age | Commit message (Collapse) | Author |
|
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@
|
|
This allows more control over the structure of the linked kernel image.
Now the ELF .openbsd.randomdata segment can be omitted from BOOT kernel.
The segment has caused trouble with broken firmware when the firmware
tries to load it on top of the actual kernel segment.
Discussed with and OK deraadt@
|
|
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@
|
|
This makes the system recognize and configure Netgear ProSecure UTM25.
Of the network ports, LAN1-4 and WAN1 are functional. WAN2 does not work
for some reason. Even though WAN1 has a separate link to the SoC, the
connection appears to go through the same switch that the LAN ports use.
At the moment, the system relies on U-Boot to set up the switch so that
the LAN and WAN segments stay separate.
Initial diff and input from Thaison Nguyen, thank you!
|
|
Detect octeon board model in one place, and replace firmware-supplied
board_type with an abstract model identifier in driver code. This makes
it easier to manage with different products, and board flavours, that
happen to use the same model information, such as board_type.
|
|
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@
|
|
|
|
|
|
OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@
|
|
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@
|
|
|
|
|
|
|
|
Unfortunately, machines tend to come with underpopulated device trees,
and consequently this change is not very useful as is. The lack of good
data is troublesome especially with things like I2C bus switches.
|
|
This generally is an exercise in futility because the phandle of the
controller node tends to be missing.
|
|
|
|
|
|
This makes certain machines' management network port usable.
|
|
This makes various receive and transmit event counters readable. This
additionally replaces the old, and somewhat unusual, way of updating
error counters in ifp.
Most of the hardware counters are 32 bits wide. Hence the code polls
them periodically and adds the values to 64-bit software counters.
The hardware counters are cleared when read.
|
|
ok kettenis visa
|
|
|
|
|
|
|
|
OK kettenis@
|
|
OK naddy@; no objections from kettenis@
|
|
This makes the cycle counter usable as timecounter on multiprocessor
machines.
Idea from Linux.
Tested on CN5020, CN6120, CN7130 and CN7360.
Looks reasonable to kettenis@
|
|
ok dlg@ tobhe@
|
|
The processor does not perform speculative reads and only one of its
execution pipes should issue memory accesses. As a result, loads should
happen in the correct order without barrier instructions.
Tested on CN5020, CN6120, CN7130 and CN7360.
This diff has been in use on the octeon-based mips64 bulk build cluster
for several months. Also tested in snaps for a while.
|
|
length of up to 31 characters. This limit is also present in the
flattened device tree specification/ Unfortunately this limit isn't enforced
by the tooling and there are systems in the wild that use longer strings.
This includes the device trees used on POWER9 systems and has been seen
on some ARM systems as well.
So bump the buffer size from 32 bytes (31 + terminating NUL) to 64 bytes.
Centrally define OFMAXPARAM to this value (in <dev/ofw/openfirm.h>)
replacing the various OPROMMAXPARAM definition scattered around the tree
to make sure the FDT implementation of OF_nextprop() uses the same
buffer size as its consumers.
Eliminate the static buffer in various openprom(4) implementations on
FDT systems.
Makes it possible to dump the full device tree on POWER9 systems using
eeprom -p.
ok deraadt@, visa@
|
|
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@
|
|
OK pirofti@
|
|
|
|
|
|
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 loadrandom() succeeds, set RB_GOODRANDOM in boothowto.
To enable fchmod(), disk_open() has to mount the filesystem in writable
mode. This is tricky because the filesystem might be unclean. Hence the
code has to use MNT_FORCE.
Input and OK deraadt@
|
|
Load the kernel image from the filesystem upfront in rdboot and pass
the loaded image to octboot(4)'s kexec call in a memory buffer. As a
result, octboot(4) does not rely on a mounted filesystem.
OK deraadt@
|
|
|
|
OK deraadt@
|
|
The data are static but they introduce differences between systems.
OK deraadt@
|
|
|
|
/dev/fdt.
ok patrick@, visa@
|
|
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@
|