Age | Commit message (Collapse) | Author |
|
supported CPUs.
ok deraadt@, patrick@, visa@
|
|
Inspired by an earlier diff from drahn@
ok patrick@, jsg@
|
|
|
|
since some OLED display controller settings can change depending on the
actual hardware integration.
|
|
makes output stats look plausible.
reported by jason tubnor
ok deraadt@
|
|
table and setting the bits atomically another core can select the
same ASID as we did it currently would not be safe to run it without
the kernel lock. This replaces the atomic_setbits_int(9) call with
atomic_cas_uint(9) where we can check that the table entry has not
been changed since we evaluted it. Also modify pmap_free_asid() to
use the same concept.
ok kettenis@
|
|
It treats all access to the memory mapped registers as "secure" even if
we're running in non-secure mode. As a result, during bringup of OpenBSD
on the RK3399, I got confused and tweaked the interrupt priorities in a way
that is wrong (but worked on the RK3399.
Fix those priorities to match what they should be according to the
documentation (and works on other hardware that includes a GICv3) and
add code that detects the broken RK3399 GIC and adjusts the priorities
accordingly. Also remove (broken) code that tries to mess around with
group 0 interrupts and fix setting bits in the GICD_CTLR register on the
broken RK3399 GIC.
|
|
and those that are indexed by the assigned CPU (unit) number. Fix the
shuffling of the affinity fields are shuffled around to match the spec.
|
|
fd_getfile(9) is mpsafe. Note that sys_mmap(2) isn't actually unlocked
currently. However this diff has been tested with it unlocked, and I
hope to unlock it for real soon-ish.
ok visa@, mpi@
|
|
pmap_free_asid() and therefore pmap_destroy() mpsafe which is important since
we might end up calling that function without holding the kernel lock
as a result of releasing a reference in pmap_page_protect(9).
ok visa@
|
|
We now prefer stronger crypto over weaker crypto over none, prefer 5 GHz
band with reasonable RSSI, and use RSSI as a tie-breaker with a slight
advantage for 5GHz. Candidate APs are now ranked by a score which is
calculated based on these attributes.
There is likely room for improvements to make these heuristics
work well across many different environments, but it's a start.
ok phessler@
|
|
Reported by Bryan Vyhmeister.
|
|
a scenario where MP-unsafe code gets run without the kernel lock
as a consequence of an unlocked system call.
OK mpi@, kettenis@
|
|
When the EEPROM is not populated, set the MAC config register
MUE_MAC_CR_AUTO_SPEED. While there, encode the MAC address for the onboard
USB Ethernet for the Rasperry Pi, like smsc(4) does.
|
|
'Deep Dive: CPUID Enumeration and Architectural MSRs'
ok deraadt@
|
|
|
|
ok dlg@ deraadt@ kettenis@
|
|
we want to skip all userland-related checks. Discussed with beck and
semarie, tested by stsp.
|
|
KERNELPATH indicates this operation is being done on behalf of the kernel,
not a process, so ignore chroot of the current process context, start at /,
and skip unveil and pledge checks. Discussed with beck and semarie
|
|
argument, rather than manually |= afterwards. Observed by semarie
|
|
(the other cause is implausible, and crashes with a nice *NULL)
|
|
passing the main function directly to kthread_create(9). The start_*
functions are mere stepping stones nowadays and can be pruned.
They used to contain more logic in the pre-kthread era.
While here, set `cleanerproc' and `syncerproc' during the thread
creation rather than expect the threads to set the proc pointer.
Also, rename `sched_sync' to `syncer_thread' to reduce confusion
with the scheduler-related functions.
OK kettenis@, deraadt@, mpi@
|
|
Some access points have a feature called "band steering" where they
will try to push clients from 2 GHz channels to 5 GHz channels.
If a client sends probe-requests on both 2 GHz and 5GHz channels, and
then attempts to authenticate on a 2 GHz channel, such APs will deny
authentication and hope that the client will come back on a 5 GHz channel.
So if we fail to AUTH for any reason, and if there is a different
AP with the same ESSID that we haven't tried yet, try that AP next.
Keep trying until no APs are left, and only then continue scanning.
APs with support for this feature were provided by Mischa Peters.
ok phessler@ mpi@
|
|
ok kettenis@
|
|
ok kettenis@
|
|
if the current BSS has been changed by ieee80211_input().
Needed for upcoming band-steering support in net80211.
ok phessler@ mpi@
|
|
- Update counters atomatically
- Use IPL_MPFLOOR for pipe's pool.
- Grab the KERNEL_LOCK() before calling km_alloc(9) & km_free(9)
Inputs from kettenis@, ok visa@
|
|
|
|
|
|
|
|
The trunk driver now has a new ioctl (SIOCxTRUNKOPTS), which for now only
has options for LACP:
* Mode - Active or Passive (default Active)
* Timeout - Fast or Slow (default Slow)
* System Priority - 1(high) to 65535(low) (default 32768/0x8000)
* Port Priority - 1(high) to 65535(low) (default 32768/0x8000)
* IFQ Priority - 0 to NUM_QUEUES (default 6)
At the moment, ifconfig only has options for lacpmode and lacptimeout
plumbed as those are the immediate need.
The approach taken for the options was to make them on a "trunk" vs a
"port" as what's typically seen on various NOSes (JunOS, NXOS, etc...)
as it's uncommon for a host to have one link "Passive" and the other
"Active" in a given trunk.
Just like on a NOS, when applying lacpmode or lacptimeout, the settings
are immediately applied to all existing ports in the trunk and to all
future ports brought into the trunk.
Tested by many on a plethora of NIC drivers and switches.
Ok remi@
|
|
references.
ok visa@, deraadt@
|
|
Should have been part of the earlier commit that unified armv7 and arm64.
|
|
cases in kernel and libc.
ok deraadt@
|
|
|
|
|
|
We use UNVEIL_INSPECT instead in the unveil flags for the same
purpose, and now add traversed vnodes of a path with UNVEIL_INSPECT
instead of with 0 flags and voodoo in unveil_flagmatch. This
allows us to uncontort the logic of unveil_flagmatch a bunch.
helpful review and ok from semarie@
|
|
|
|
|
|
ok jsg@
|
|
- Don't dereference sc_prop if we're not handling an LPI. Fixes a crash
on qemu when emulating a GICv3 without ITS (and therefore no LPIs(.
- Use the true IPL when calculating the priority of an LPI. The old
code used a variable that still had the IPL_MPSAFE flag in it.
- Write to the right GITS_BASERn instead of ialways writing to GITS_BASER0.
- Flush the cache after initializing/modifying the in-memory tables. The
GICv3 on the SynQuacer isn't fully coherent and only supports the
"non-shareable" attribute for its in-memory tables. So we have to flush
the cache to the point of coherency to guarentee that the GIC sees our
changes to those tables. Throw in a full memory barrier for good measure.
Also add support for the SynQuacer pre-ITS.
ok jsg@, patrick@
|
|
requested by mpi@
|
|
ok jsg@, patrick@
|
|
Fixes machines with more than 8 cores.
ok jsg@, patrick@
|
|
|
|
|
|
Historically, the softraid crypto support in the boot loaders has only
given one attempt to provide the correct passphrase. There were a
few reasons for this, including the fact that pkcs5_pbkdf2() allows an
empty passphrase and that returning EPERM allowed for another attempt.
With the event of KARL and the need for bsd.booted with hibernate resumption,
this becomes much more of an issue - if you get the passphrase wrong you
fail to resume. There are also other situations like using /etc/boot.conf
to switch serial console, but an incorrect passphrase results in the config
not being read. Also, bcrypt_pbkdf() does not permit empty passphrases.
This reworks the softraid crypto support in the boot loaders so that it
loops requesting a valid passphrase until one is provided, or an empty
passphrase is entered (at which point it will abort).
ok mortimer@ tb@
|
|
Prior to r1.153 of kern_descrip.c, the kqueue descriptors were removed
using fdremove(), which reset fd_freefile as appropriate. The new code
simply avoids adding the descriptor to the new table, however this means
that fd_freefile can be left with an incorrect value, resulting in a file
descriptor allocation "hole". Restore the previous behavour by lowering
fd_freefile as appropriate when dropping descriptors.
Issue found via golang regress tests.
ok deraadt@ mpi@ visa@
|
|
kq_knlist are dedicated to a single kqueue instance, which makes
the filtering by kn_kq unnecessary.
OK kettenis@, mpi@
|
|
the characters that changed, and only when they change. This
replaces writing out the whole framebuffer every 100ms with a
partial update mechanism. Now the system stays responsive and
does not slow down anymore due to the periodic update.
|