add cpuid and msr bits from
'Deep Dive: CPUID Enumeration and Architectural MSRs'
Introduce mue_eeprom_present to check if the EEPROM is present.
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.
Grab the KERNEL_LOCK() in MP-unsafe fo_close routines. This prevents
a scenario where MP-unsafe code gets run without the kernel lock
as a consequence of an unlocked system call.
OK mpi@, kettenis@
Partially revert previous, EM7455 is already handled by umb(4).
Reported by Bryan Vyhmeister.
Update AP selection heuristics for auto-join.
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.
Use atomic instructions to keep track of what ASIDs are in use. This makes
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).
Push back the kernel lock in sys_mmap(2) a little bit more now that
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@
Distinguish between softc array members that are indexed by redistributor
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.
Turns out the integration of the GIC-500 on the Rockchip RK3399 is busted.
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.