kernel_optimize_test/Documentation
Hans de Goede e4c2c0ff00 firmware: Add new platform fallback mechanism and firmware_request_platform()
In some cases the platform's main firmware (e.g. the UEFI fw) may contain
an embedded copy of device firmware which needs to be (re)loaded into the
peripheral. Normally such firmware would be part of linux-firmware, but in
some cases this is not feasible, for 2 reasons:

1) The firmware is customized for a specific use-case of the chipset / use
with a specific hardware model, so we cannot have a single firmware file
for the chipset. E.g. touchscreen controller firmwares are compiled
specifically for the hardware model they are used with, as they are
calibrated for a specific model digitizer.

2) Despite repeated attempts we have failed to get permission to
redistribute the firmware. This is especially a problem with customized
firmwares, these get created by the chip vendor for a specific ODM and the
copyright may partially belong with the ODM, so the chip vendor cannot
give a blanket permission to distribute these.

This commit adds a new platform fallback mechanism to the firmware loader
which will try to lookup a device fw copy embedded in the platform's main
firmware if direct filesystem lookup fails.

Drivers which need such embedded fw copies can enable this fallback
mechanism by using the new firmware_request_platform() function.

Note that for now this is only supported on EFI platforms and even on
these platforms firmware_fallback_platform() only works if
CONFIG_EFI_EMBEDDED_FIRMWARE is enabled (this gets selected by drivers
which need this), in all other cases firmware_fallback_platform() simply
always returns -ENOENT.

Reported-by: Dave Olsthoorn <dave@bewaar.me>
Suggested-by: Peter Jones <pjones@redhat.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200115163554.101315-5-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-20 14:54:04 +01:00
..
ABI
accounting
admin-guide Merge 5.6-rc5 into driver-core-next 2020-03-09 08:41:53 +01:00
arm
arm64
block
bpf
cdrom
core-api
cpu-freq
crypto
dev-tools
devicetree ARM: SoC fixes 2020-03-08 17:36:22 -07:00
doc-guide
driver-api firmware: Add new platform fallback mechanism and firmware_request_platform() 2020-03-20 14:54:04 +01:00
EDID
fault-injection
fb
features
filesystems debugfs: remove return value of debugfs_create_file_size() 2020-03-18 13:35:29 +01:00
firmware_class
firmware-guide
fpga
gpu
hid
hwmon docs: adm1177: fix a broken reference 2020-02-23 20:00:29 -08:00
i2c
ia64
ide
iio
infiniband
input
isdn
kbuild kbuild: get rid of trailing slash from subdir- example 2020-02-27 10:03:27 +09:00
kernel-hacking
leds
livepatch
locking
m68k
maintainer
media
mic
mips
misc-devices
netlabel
networking docs: networking: phy: Rephrase paragraph for clarity 2020-02-23 20:42:47 -08:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power
powerpc
process
RCU
riscv
s390
scheduler
scsi
security
sh
sound
sparc
sphinx docs: Fix empty parallelism argument 2020-02-25 03:11:04 -07:00
sphinx-static
spi
target
timers
trace
translations
usb
userspace-api
virt KVM: s390: rstify new ioctls in api.rst 2020-02-24 19:28:40 +01:00
vm
w1
watchdog
x86 docs: remove MPX from the x86 toc 2020-02-25 03:10:22 -07:00
xtensa
.gitignore
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
Changes
CodingStyle
conf.py
COPYING-logo
crc32.txt
debugging-modules.txt
debugging-via-ohci1394.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff
futex-requeue-pi.txt
hwspinlock.txt
index.rst
io_ordering.txt
io-mapping.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
Kconfig
kobject.txt
kprobes.txt
kref.txt
logo.gif
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt
nommu-mmap.txt
percpu-rw-semaphore.txt
pi-futex.txt
preempt-locking.txt
rbtree.txt
remoteproc.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
speculation.txt
static-keys.txt
SubmittingPatches
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
xz.txt