Age | Commit message (Collapse) | Author |
|
Timeout callback functions are of type void (*)(void *).
adb_cuda_tickle() needs a void pointer for a first parameter.
ok mpi@
|
|
This makes sysctl machdep.altivec return 0 in this case, allowing
applications to select the non-altivec code path.
Issue with pixman reported by cwen@ ok jca@ gkoehler@ deraadt@
|
|
These are copies of powerpc64/conf/ld.script with some changes for
macppc. They work with both ld.bfd and ld.lld.
The ld.script fixes ld.lld. Without ld.script, lld would set the
symbol "etext" to a wrong value like 0x10000034, then ofwboot would
freeze and fail to boot the kernel. With ld.script, we PROVIDE a
correct etext.
ok kettenis@
|
|
Match what apm(4/macppc) says and make apmd(8) log an approiate warning when
unsupported power actions are requested.
Merge identical cases while here.
This syncs with the apm ioctl handlers on loongson and arm64.
|
|
of this file are only doing cpp #define
|
|
|
|
already calculates _usable_ memory and updates physmem (if it is 0),
whereas ofw_read_mem_regions() was counting usable+unuseable memory.
ie. 4G or more on some machines. powerpc's 32-bit pagetable cannot use memory
beyond 4G phys addr.
(On a 4G machine, physmem64 was calculated as 0, which caused the installer's
auto-diskabel code to place /tmp on the b partition).
ok gkoehler, works for kurt also
|
|
The timecounter struct is large and I think it may change in the
future. Changing it later will be easier if we use C99-style
initialization for all timecounter structs. It also makes reading the
code a bit easier.
For reasons I cannot explain, switching to C99-style initialization
sometimes changes the hash of the resulting object file, even though
the resulting struct should be the same. So there is a binary change
here, but only sometimes. No behavior should change in either case.
I can't compile-test this everywhere but I have been staring at the
diff for days now and I'm relatively confident this will not break
compilation. Fingers crossed.
ok gnezdo@
|
|
|
|
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@
|
|
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@
|
|
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@
|
|
Add R_PPC_ADDR24 to lld. We need R_PPC_ADDR24 for absolute branches
"ba" and "bla" in locore.S in the kernel.
In Makefile.macppc, add a gapdummy (like in Makefile.powerpc64) to
avoid an lld error. Also adapt a part of Makefile.i386, so my
powerpc64 can use clang and lld to build and link the macppc kernel.
(I didn't boot that kernel.)
My macppc can now build, link, and boot kernels with either ld.bfd or
ld.lld. Beware that kernels linked with ld.lld have at least one
problem (wrong &etext) not yet fixed.
ok kettenis@
|
|
This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)
and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)
to show that r11 and r12 are in use between setup and check, and to
pick registers other than r11 and r12 in some kernel functions.
ok mortimer@ deraadt@
|
|
Simplify MD code and reduce the amount of recursion into the signal code
which helps when dealing with locks.
ok cheloha@, deraadt@
|
|
wscons and ofw are in sync.
ok kn@
|
|
settings.
Found by and ok kn@
|
|
commands. Fixes wsconsctl display commands with drm drivers.
ok kettenis@
|
|
The kernel text will grow larger when retguard adds code to many
functions to check their return addresses. The entire kernel
(including text, data, bss, symbol table, and ramdisk) must fit under
the CLAIM_LIMIT. A kernel that overflows this limit may fail very
quickly, by causing a "DEFAULT CATCH!" error in Open Firmware.
Crank version to "1.10", so I can see whether the running ofwboot uses
the higher CLAIM_LIMIT.
ok deraadt@
|
|
Values would be updated but the variable would still be reported as invalid.
Adopted from NetBSD's sys/dev/ofw/openfirmio.c
From miod
|
|
|
|
OK deraadt@, mpi@
|
|
Tested by cwen@ and myself. Thanks to pirofti@ for creating the
userland timecounter feature.
ok kettenis@ pirofti@ deraadt@ cheloha@
|
|
full lower 32 bits for the timecounter. ok kettenis@
|
|
"new" API.
ok dlg@ tobhe@
|
|
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@
|
|
This adds the missing TAS3004 volume control. Before, I put my ear
near the speaker (to hear audio), because I had no way to turn up the
volume. Now, the default volume is much louder, so I use sndioctl(1)
to turn it down.
Check for the model string "PowerBook5,4". This model's device tree
has compatible = "AOAKeylargo" for the audio, doesn't show the TAS3004
in the same way as other models.
|
|
ok dlg@, powerpc/sparc64 ok kettenis@, sparc64/alpha tested by deraadt@
|
|
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@
|
|
|
|
howto
|
|
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@
|
|
ok deraadt@
|
|
ok deraadt@, mpi@, visa@
ok cheloha@ as well (would have preferred in new file for this code)
|
|
the file system such that implementations can use it to guess the right
century.
ok mpi@
|
|
amd64/arm64/armv7/i386/hppa/sparc64 and move it to the end of machdep.c.
Wrap the existing time_read and time_write hooks into something that
can be used as a todr_handle.
ok mpi@
|
|
|
|
for example, with locking assertions.
OK mpi@, anton@
|
|
|
|
ofw_stack() was changing its caller's stack frame, but this stops
working when clang inlines the caller into another function. Move the
stack-switching logic into openfirmware(). Now ofw_stack() becomes
ofw_msr() and only sets the msr.
ok deraadt@ kettenis@
|
|
|
|
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|