rust: add firmware abstractions
authorDanilo Krummrich <dakr@redhat.com>
Tue, 18 Jun 2024 15:48:35 +0000 (17:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2024 16:45:12 +0000 (18:45 +0200)
commitde6582833db0e695ba0c548e3cc2ad7dbb6aa260
treeb17747cb2071f35ab705eef8385ad1c485cad6ac
parenta674fefd17324fc467f043568e738b80ca22f2b4
rust: add firmware abstractions

Add an abstraction around the kernels firmware API to request firmware
images. The abstraction provides functions to access the firmware's size
and backing buffer.

The firmware is released once the abstraction instance is dropped.

Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240618154841.6716-3-dakr@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_loader/Kconfig
rust/bindings/bindings_helper.h
rust/kernel/firmware.rs [new file with mode: 0644]
rust/kernel/lib.rs