mbox series

[v2,00/10] firmware_loader: built-in API and make x86 use it

Message ID 20211021155843.1969401-1-mcgrof@kernel.org (mailing list archive)
Headers show
Series firmware_loader: built-in API and make x86 use it | expand

Message

Luis Chamberlain Oct. 21, 2021, 3:58 p.m. UTC
From: Luis Chamberlain <mcgrof@kernel.org>

Changes in this v2:

 o drops two patches which Greg has already merged
 o drop one patch which added the new kconfig symbol FW_LOADER_BUILTIN
   which Greg didn't like, and so instead we rely only on the FW_LOADER
   symbol. If anyone cringes during review because of this, just keep in mind,
   *this* is *why* I added the symbol in the first patch series.

I've ran the firmware selftests test and found no issues. I have also
let 0 day grind on this and it found no issues. This is all based on
linux-next next-20211020, I have a branch 20211020-firmware-builtin
which has these changes in case anyone wants this in a git tree [0].

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20211020-firmware-builtin

Borislav Petkov (1):
  x86/microcode: Use the firmware_loader built-in API

Luis Chamberlain (9):
  firmware_loader: formalize built-in firmware API
  firmware_loader: remove old DECLARE_BUILTIN_FIRMWARE()
  firmware_loader: move struct builtin_fw to the only place used
  vmlinux.lds.h: wrap built-in firmware support under FW_LOADER
  x86/build: Tuck away built-in firmware under FW_LOADER
  firmware_loader: rename EXTRA_FIRMWARE and EXTRA_FIRMWARE_DIR
  firmware_loader: move builtin build helper to shared library
  test_firmware: move a few test knobs out to its library
  test_firmware: add support for testing built-in firmware

 .../driver-api/firmware/built-in-fw.rst       |   6 +-
 Documentation/x86/microcode.rst               |   8 +-
 arch/x86/Kconfig                              |   4 +-
 arch/x86/include/asm/microcode.h              |   3 -
 arch/x86/kernel/cpu/microcode/amd.c           |  14 ++-
 arch/x86/kernel/cpu/microcode/core.c          |  17 ---
 arch/x86/kernel/cpu/microcode/intel.c         |   9 +-
 arch/x86/tools/relocs.c                       |   2 +
 drivers/base/firmware_loader/Kconfig          |  29 +++--
 drivers/base/firmware_loader/Makefile         |   1 +
 drivers/base/firmware_loader/builtin/Makefile |  43 ++-----
 .../base/firmware_loader/builtin/lib.Makefile |  32 ++++++
 drivers/base/firmware_loader/builtin/main.c   | 106 ++++++++++++++++++
 drivers/base/firmware_loader/firmware.h       |  17 +++
 drivers/base/firmware_loader/main.c           |  78 +------------
 .../firmware_loader/test-builtin/.gitignore   |   3 +
 .../firmware_loader/test-builtin/Makefile     |  18 +++
 drivers/staging/media/av7110/Kconfig          |   4 +-
 include/asm-generic/vmlinux.lds.h             |  20 ++--
 include/linux/firmware.h                      |  30 +++--
 lib/Kconfig.debug                             |  33 ++++++
 lib/test_firmware.c                           |  52 ++++++++-
 .../testing/selftests/firmware/fw_builtin.sh  |  69 ++++++++++++
 .../selftests/firmware/fw_filesystem.sh       |  16 ---
 tools/testing/selftests/firmware/fw_lib.sh    |  24 ++++
 .../selftests/firmware/fw_run_tests.sh        |   2 +
 26 files changed, 441 insertions(+), 199 deletions(-)
 create mode 100644 drivers/base/firmware_loader/builtin/lib.Makefile
 create mode 100644 drivers/base/firmware_loader/builtin/main.c
 create mode 100644 drivers/base/firmware_loader/test-builtin/.gitignore
 create mode 100644 drivers/base/firmware_loader/test-builtin/Makefile
 create mode 100755 tools/testing/selftests/firmware/fw_builtin.sh