uhid: Move generic HID code to sys/dev/hid
This change introduces a bus agnostic HID interface (sys/dev/hid/hidev.h)
and splits the uhid driver into a shareable (sys/dev/hid/uhid_common.c) and
USB specific (sys/dev/usb/uhid.c) code.
Pull up following revision(s) (requested by jmcneill in ticket #115):
sys/dev/sdmmc/sdmmc_io.c: revision 1.22
sys/dev/sdmmc/sdhc.c: revision 1.123
sdhc: Do not set auto cmd12 enable for SDIO RW extended ops
sdmmc: Use block mode for multi block SDIO transfers.
Change from OpenBSD:
https://github.com/openbsd/src/commit/5e0782b17abc2070c235843e37de911ce3f98ef8
So far the SDIO stack issued one transfer for every 64 byte to be
copied. This severely limits the speed over the bus. By using
block mode we can issue block-sized transfers, which bumps the
transfer size to at least 512 bytes. By using multi-block mode
we can copy up to 511 blocks per transfer.
Additionaly apply the following to fix the build for ticket #112:
usr.sbin/npf/npfctl/npf_build.c 1.63
enclose NPF_VAR_ID case in braces to fix linter build
fix XMAP9 access / timings, which is surprisingly difficult since REX and XMAP9
run at different clock speeds ( one on bus clock, the other on half the pixel
clock with no handshake, and both with their own FIFOs
From Adrian Chadd
sdmmc: Use block mode for multi block SDIO transfers.
Change from OpenBSD:
https://github.com/openbsd/src/commit/5e0782b17abc2070c235843e37de911ce3f98ef8
So far the SDIO stack issued one transfer for every 64 byte to be
copied. This severely limits the speed over the bus. By using
block mode we can issue block-sized transfers, which bumps the
transfer size to at least 512 bytes. By using multi-block mode
we can copy up to 511 blocks per transfer.
ftp: fix ascii transfers with progress bar
Handle stdio interruption by signals and improve error handling
in getc() and putc() on the control and data channels.
Provide ftp_getc() and ftp_putc() wrappers that:
- Retry the operation on EINTR or EAGAIN instead of failing.
- Store other error codes in a return variable separate to errno,
and use that variable in ferror() handling, for more correct
error messages.
Fixes the progress bar display in ascii mode transfers.
(Note that I haven't fixed interrupted reads from stdin or
writes to ttyout; that's a much larger refactor that's out of scope).
Fix PR bin/59587 from Johnny Billquist, with the fix
inspired by the patch in that PR.
Track individual inodes between the time that their accounting is
subtracted from one segment before it is added to the new segment.
Counting duplicates is not sufficient. Addresses a "negative bytes"
panic.
mips: Fix R5000SC cache page macro typo that broke boot.
A change in rev 1.5 to mips_r5k_round_page() and mips_r5k_trunc_page()
in cache_r5k.h (for PR/55139) had a fatal typo in the mask, so the
R5000SC cache flush code ended up operating on unintended addresses
and at least R5000SC Indy would no longer boot.
(not sure how my Qube 2700 worked at that time..)
Fix the macros to use the intended mask so that the secondary cache
flushes are done on the correct range again.
Sorry for the long breakage.
Analyzed and reported by Adrian Chadd on port-mips@.
https://mail-index.netbsd.org/port-mips/2025/12/thread1.html#001536
Should be pulled up to netbsd-9, netbsd-10, and netbsd-11.
sys/arch/amd64: support ramdisks when booting in GENPVH mode
This adds support for booting NetBSD/amd64 with QEMU’s -kernel/-initrd
combination, in generic PVH mode (GENPVH). This includes the MICROVM
kernel, which now defaults to supporting modules and root on memory
disks.
This patch probes the first few bytes loaded in memory for
differentiating between modules, splash screens (PNG or JPEG), or
assumes filesystem images otherwise. It works with plain filesystem
images, but not with modules yet. Supporting any combination of
filesystem, modules or splash screen images should be possible in the
future.
Tested on NetBSD/amd64 by iMil and myself; measured to gain another 1~3
ms of boot time with the MICROVM kernel on the reference hardware.
As posted on tech-kern@ on 26/11/2025, with no objections.
XXX pull-up to -11 and adapt for -10