1*321eaf31SDave Airlie===================
2*321eaf31SDave AirlieFirmware Guidelines
3*321eaf31SDave Airlie===================
4*321eaf31SDave Airlie
5*321eaf31SDave AirlieUsers switching to a newer kernel should *not* have to install newer
6*321eaf31SDave Airliefirmware files to keep their hardware working. At the same time updated
7*321eaf31SDave Airliefirmware files must not cause any regressions for users of older kernel
8*321eaf31SDave Airliereleases.
9*321eaf31SDave Airlie
10*321eaf31SDave AirlieDrivers that use firmware from linux-firmware should follow the rules in
11*321eaf31SDave Airliethis guide. (Where there is limited control of the firmware,
12*321eaf31SDave Airliei.e. company doesn't support Linux, firmwares sourced from misc places,
13*321eaf31SDave Airliethen of course these rules will not apply strictly.)
14*321eaf31SDave Airlie
15*321eaf31SDave Airlie* Firmware files shall be designed in a way that it allows checking for
16*321eaf31SDave Airlie  firmware ABI version changes. It is recommended that firmware files be
17*321eaf31SDave Airlie  versioned with at least a major/minor version. It is suggested that
18*321eaf31SDave Airlie  the firmware files in linux-firmware be named with some device
19*321eaf31SDave Airlie  specific name, and just the major version. The firmware version should
20*321eaf31SDave Airlie  be stored in the firmware header, or as an exception, as part of the
21*321eaf31SDave Airlie  firmware file name, in order to let the driver detact any non-ABI
22*321eaf31SDave Airlie  fixes/changes. The firmware files in linux-firmware should be
23*321eaf31SDave Airlie  overwritten with the newest compatible major version. Newer major
24*321eaf31SDave Airlie  version firmware shall remain compatible with all kernels that load
25*321eaf31SDave Airlie  that major number.
26*321eaf31SDave Airlie
27*321eaf31SDave Airlie* If the kernel support for the hardware is normally inactive, or the
28*321eaf31SDave Airlie  hardware isn't available for public consumption, this can
29*321eaf31SDave Airlie  be ignored, until the first kernel release that enables that hardware.
30*321eaf31SDave Airlie  This means no major version bumps without the kernel retaining
31*321eaf31SDave Airlie  backwards compatibility for the older major versions.  Minor version
32*321eaf31SDave Airlie  bumps should not introduce new features that newer kernels depend on
33*321eaf31SDave Airlie  non-optionally.
34*321eaf31SDave Airlie
35*321eaf31SDave Airlie* If a security fix needs lockstep firmware and kernel fixes in order to
36*321eaf31SDave Airlie  be successful, then all supported major versions in the linux-firmware
37*321eaf31SDave Airlie  repo that are required by currently supported stable/LTS kernels,
38*321eaf31SDave Airlie  should be updated with the security fix. The kernel patches should
39*321eaf31SDave Airlie  detect if the firmware is new enough to declare if the security issue
40*321eaf31SDave Airlie  is fixed.  All communications around security fixes should point at
41*321eaf31SDave Airlie  both the firmware and kernel fixes. If a security fix requires
42*321eaf31SDave Airlie  deprecating old major versions, then this should only be done as a
43*321eaf31SDave Airlie  last option, and be stated clearly in all communications.
44*321eaf31SDave Airlie
45