HomeFreeBSD

LinuxKPI: add firmware loading support

Description

LinuxKPI: add firmware loading support

Implement linux firmware KPI compat code.
This includes: request_firmware() request_firmware_nowait(),
request_firmware_direct(), firmware_request_nowarn(),
and release_firmware().

Given we will try to map requested names from natively ported
or full-linuxkpi-using drivers to a firmware(9) auto-loading
name format (.ko file name and image name matching),
we quieten firmware(9) and print success or failure (unless
the _nowarn() version was called) in the linuxkpi implementation.
At the moment we try up-to 4 different naming combinations,
with path stripped, original name, and requested name with '/'
or '.' replaced.

We do not currently defer loading in the "nowait" case.

Sponsored-by: The FreeBSD Foundation
Sponsored-by: Rubicon Communications, LLC ("Netgate")

		(firmware(9) nowarn update from D27413)

MFC after: 3 days
Reviewed by: kib, manu (looked at older versions)
Differential Revision: https://reviews.freebsd.org/D27414

(cherry picked from commit a6c2507d1baedb183268e31bc6b6f659a9529904)
(cherry picked from commit 4a26380ba6dc487a7525d909ee29fbc710b558d1)

Details

Provenance
bzAuthored on Jan 28 2021, 4:05 PM
Reviewer
kib
Differential Revision
D27414: linuxkpi: add firmware loading support
Parents
rGf19a4e97d3b0: newvers: tweak uname to be more useful
Branches
Unknown
Tags
Unknown