aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-01-06lmb: consider EFI memory mapHeinrich Schuchardt1-0/+36
Add reservations for all EFI memory areas that are not EFI_CONVENTIONAL_MEMORY. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-06efi_loader: carve out efi_get_memory_map_alloc()Heinrich Schuchardt1-0/+34
Carve out code from efidebug command used to read the memory map. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04efi_loader: populate console handles in system tableHeinrich Schuchardt1-0/+3
The fields ConsoleInHandle, ConsoleOutHandle, ConsoleErrHandle must point to the handles with the respective console protocols. Failure to do so leads to an error in the EFI Shell: No SimpleTextInputEx was found. CTRL-based features are not usable. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-04efi_loader: adjust sorting of capsulesHeinrich Schuchardt1-3/+6
Up to now we only compared the first letter of the capsule name to sort them alphabetically. Properly sort by the Unicode alphabet. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04lib: add function u16_strcasecmp()Heinrich Schuchardt1-0/+26
Provide a function for comparing UTF-16 strings in a case insensitive manner. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29efi_loader: use u16_strlen() in efi_var_mem_ins()Heinrich Schuchardt1-3/+1
Don't duplicate library functionality. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29efi_loader: avoid adding variables twiceIlias Apalodimas2-3/+5
When the efi subsystem starts we restore variables that are both in a file or stored into the .efi_runtime section of U-Boot. However once a variable gets created or changed the preseeded entries will end up in the file. As a consequence on the next boot we will end up adding identical variable entries twice. Fix this by checking if the to be inserted variable already exists. Also swap the restoration order and start with the file instead of the builtin variables, so a user can replace the preseeded ones if needed. Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29efi_loader: typo non-volatile in efi_var_restoreHeinrich Schuchardt1-1/+1
It is volatile variables that we do not allow to be restored from file. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-29efi_loader: fix get_package_list_handle() statusVincent Stehlé1-1/+1
When the HII protocol function get_package_list_handle() is called with an invalid package list handle, it returns EFI_NOT_FOUND but this is not in its list of possible status codes as per the EFI specification. Return EFI_INVALID_PARAMETER instead to fix conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-20efi_selftest: conformance test for GetNextVariableNameHeinrich Schuchardt1-0/+35
Test that GetNextVariableName() checks the parameters. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-20efi_loader: fix efi_get_next_variable_name_mem()Heinrich Schuchardt1-3/+3
The VariableNameSize parameter is in bytes but u16_strnlen() counts u16. Fix the parameter check for null termination. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-20eficonfig: carve out efi_get_next_variable_name_int callsMasahisa Kojima1-0/+34
To retrieve the EFI variable name by efi_get_next_variable_name_int(), the sequence of alloc -> efi_get_next_variable_name_int -> realloc -> efi_get_next_variable_name_int is required. In current code, this sequence repeatedly appears in the several functions. It should be curved out a common function. This commit also fixes the missing free() of var_name16 in eficonfig_delete_invalid_boot_option(). Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-17efi: adjust ebbr to v2.1 in conformance profileVincent Stehlé3-10/+10
The EFI Conformance Profile Table entry for EBBR appears in v2.1.0 of the EBBR specification[1]. Update naming accordingly. While at it, update the EBBR version referenced in the documentation. [1]: https://github.com/ARM-software/ebbr/releases/tag/v2.1.0 Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-08arch/riscv: add semihosting support for RISC-VKautuk Consul1-5/+5
We add RISC-V semihosting based serial console for JTAG based early debugging. The RISC-V semihosting specification is available at: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-08lib: Add common semihosting libraryKautuk Consul3-0/+235
We factor out the arch-independent parts of the ARM semihosting implementation as a common library so that it can be shared with RISC-V. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-05net: ipv6: Enable IPv6 typeconversion specifierViacheslav Mitrofanov1-6/+1
Add the possibility to recognize IPv6 address in print function. To output IPv6 address use %pI6 specifier. Series-changes: 3 - Substituted #if (...) for if (...) to get better readability Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05net: ipv6: Add string_to_ip6 converterViacheslav Mitrofanov1-0/+109
This functions is used as a converter from IPv6 address string notation to struct ip6_addr that is used everywhere in IPv6 implementation. For example it is used to parse and convert IPv6 address from tftpboot command. Conversion algorithm uses two passes, first to verify syntax and locate colons and second pass to read the address. In case of valid IPv6 address it returns 0. Examples of valid strings: 2001:db8::0:1234:1 2001:0db8:0000:0000:0000:0000:1234:0001 ::1 ::ffff:192.168.1.1 Examples of invalid strings 2001:db8::0::0 (:: can only appear once) 2001:db8:192.168.1.1::1 (v4 part can only appear at the end) 192.168.1.1 (we don't implicity map v4) Series-changes: 3 - Added function description - Added length parameter to string_to_ip6() Series-changes: 4 - Fixed function description style Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-02efi_loader: utility function to check the variable name is "Boot####"Masahisa Kojima1-0/+33
Some commands need to enumerate the existing UEFI load option variable("Boot####"). This commit transfers some code from cmd/efidebug.c to lib/efi_loder/, then exposes efi_varname_is_load_option() function to check whether the UEFI variable name is "Boot####". Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-02efi_loader: don't use EFI_LOADER_DATA internallyHeinrich Schuchardt1-2/+2
EFI_LOADER_DATA/CODE is reserved for EFI applications. Memory allocated by U-Boot for internal usage should be EFI_BOOT_SERVICES_DATA or _CODE or EFI_RUNTIME_SERVICES_DATA or _CODE. Reported-by: François-Frédéric Ozog <ff@ozog.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: François-Frédéric Ozog <ff@ozog.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-02efi_loader: fix handling of DHCP acknowledgeHeinrich Schuchardt1-3/+10
The dhcp command may be executed after the first UEFI command. We should still update the EFI_PXE_BASE_CODE_PROTOCOL. Don't leak content of prior acknowledge packages. Handle failing allocation when calling malloc(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-02efi_selftest: test FatToStr() truncationHeinrich Schuchardt1-1/+1
Let the FatToStr test check that the FatSize parameter is considered. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-02efi_loader: add an EFI binary to print boot hart IDHeinrich Schuchardt2-0/+341
Provide an EFI binary that prints the boot hart ID as found in the device-tree as /chosen/boot-hartid property and as provided by the RISCV_EFI_BOOT_PROTOCOL. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-22efi_selftest: Improve the FatToStr() unit testHeinrich Schuchardt1-0/+12
Add a test with a character >= 0x80. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-22efi_selftest: unsigned char parameter for efi_st_strcmp_16_8()Heinrich Schuchardt1-1/+1
Use unsigned char for the parameter of efi_st_strcmp_16_8. This allows comparing characters 0x80 - 0xff. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-22efi_loader: Fix buffer underflowMikhail Ilin1-1/+1
If the array index 'i' < 128, the 'codepage' array is accessed using [-128...-1] in efi_unicode_collation.c:262. This can lead to a buffer overflow. Negative index in efi_unicode_collation.c:262. The index of the 'codepage' array should be c - 0x80 instead of i - 0x80. Fixes: 0bc4b0da7b59 ("efi_loader: EFI_UNICODE_COLLATION_PROTOCOL") Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-16efi_loader: replace a u16_strdup with alloc + memcpyIlias Apalodimas1-1/+7
Heinrich reports that on RISC-V unaligned access is emulated by OpenSBI which is very slow. Performance wise it's better if we skip the calls to u16_strdup() -- which in turn calls u16_strsize() and just allocate/copy the memory directly. The access to dp.length may still be unaligned, but that's way less than what u16_strsize() would do Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Use malloc() instead of calloc(). Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-16efi_loader: add missing EFI_CALL when closing a fileIlias Apalodimas1-1/+1
Closing the files uses the EFI protocol and specifically it's .close callback. This needs to be wrapped on an EFI_CALL() Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-16efi_loader: add comments on efi_file_from_path() regarding alignmentIlias Apalodimas1-0/+5
UEFI specification requires pointers that are passed to protocol member functions to be aligned. There's a u16_strdup in that function which doesn't make sense otherwise Add a comment so no one removes it accidentally Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-16efi_loader: improve description of efi_file_from_path()Heinrich Schuchardt1-0/+9
Provide a description of the function's logic. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-11-16efi_loader: initialize return values in ↵Ilias Apalodimas1-1/+1
efi_uninstall_multiple_protocol_interfaces_int() If the va_list we got handed over contains no protocols we must return EFI_SUCCESS. However in that case the current code just returns an unintialized value. Fix that by setting the return value in the variable definition Addresses-Coverity: CID 376195: ("Uninitialized variables (UNINIT)") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-07dm: sandbox: Switch over to using the new host uclassSimon Glass2-4/+3
Update the sandbox implementation to use UCLASS_HOST and adjust all the pieces to continue to work: - Update the 'host' command to use the new API - Replace various uses of UCLASS_ROOT with UCLASS_HOST - Disable test_eficonfig since it doesn't work (this should have a unit test to allow this to be debugged) - Update the blk test to use the new API - Drop the old header file Unfortunately it does not seem to be possible to split this change up further. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-06efi_loader: AllocateAddress requires page addressHeinrich Schuchardt1-0/+2
AllocatePages() can be called with Type=AllocateAddress. Such a call can only succeed if *Memory points to the address of an unallocated page range. A call with *Memory being an address that is not page aligned must not succeed. The UEFI specification requires returning EFI_OUT_OF_RESOURCES if the requested pages cannot be allocated. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-06efi_loader: discover if no efi_system_partition is setHeinrich Schuchardt1-2/+4
Variable efi_system_partition holds the efi_system_partition. Currently it is initialized as: { .uclass_id = 0 = UCLASS_ROOT, .denum = 0, .part = 0, } This indicates that host 0:0 is the efi_system_partition and we see output like: => bootefi hello ** Bad device specification host 0 ** Couldn't find partition host 0:0 To identify that no EFI system partition has been set use UCLASS_INVALID. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-11-06efi_loader: remove CONFIG_EFI_SETUP_EARLYAKASHI Takahiro2-37/+11
Since the commit a9bf024b2933 ("efi_loader: disk: a helper function to create efi_disk objects from udevice"), CONFIG_EFI_SETUP_EARLY option is by default on and will never be turned off. So just remove this option. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-11-06efi_loader: Let networking support depend on NETDEVICESJan Kiszka5-7/+6
CONFIG_NET does not imply that there are actually network devices available, only CONFIG_NETDEVICES does. Changing to this dependency obsoletes the check in Kconfig because NETDEVICES means DM_ETH. Fixes: 0efe1bcf5c2c ("efi_loader: Add network access support") Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-10-31test: dm: Add test cases for FWU Metadata uclassSughosh Ganu1-0/+6
Add test cases for accessing the FWU Metadata on the sandbox platform. The sandbox platform also uses the metadata access driver for GPT partitioned block devices. The FWU feature will be tested on the sandbox64 variant with a raw capsule. Remove the FIT capsule testing from sandbox64 defconfig -- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31FWU: Add support for the FWU Multi Bank Update featureSughosh Ganu7-2/+291
The FWU Multi Bank Update feature supports updating firmware images to one of multiple sets(also called banks) of images. The firmware images are clubbed together in banks, with the system booting images from the active bank. Information on the images such as which bank they belong to is stored as part of the metadata structure, which is stored on the same storage media as the firmware images on a dedicated partition. At the time of update, the metadata is read to identify the bank to which the images need to be flashed(update bank). On a successful update, the metadata is modified to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31FWU: Add boot time checks as highlighted by the FWU specificationSughosh Ganu1-1/+191
The FWU Multi Bank Update specification requires the Update Agent to carry out certain checks at the time of platform boot. The Update Agent is the component which is responsible for updating the firmware components and maintaining and keeping the metadata in sync. The spec requires that the Update Agent perform the following checks at the time of boot * Sanity check of both the metadata copies maintained by the platform. * Get the boot index passed to U-Boot by the prior stage bootloader and use this value for metadata bookkeeping. * Check if the system is booting in Trial State. If the system boots in the Trial State for more than a specified number of boot counts, change the Active Bank to be booting the platform from. Call these checks through the main loop event at the time of platform boot. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31FWU: Add helper functions for accessing FWU metadataSughosh Ganu2-0/+150
Add weak functions for getting the update index value and dfu alternate number needed for FWU Multi Bank update functionality. The current implementation for getting the update index value is for platforms with 2 banks. If a platform supports more than 2 banks, it can implement it's own function. The function to get the dfu alternate number has been added for platforms with GPT partitioned storage devices. Platforms with other storage partition scheme need to implement their own function. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31FWU: Add FWU metadata structure and driver for accessing metadataSughosh Ganu1-0/+474
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, which is stored on a dedicated partition. Add the metadata structure, and a driver model uclass which provides functions to access the metadata. These are generic API's, and implementations can be added based on parameters like how the metadata partition is accessed and what type of storage device houses the metadata. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-10-31disk: Rename block functionsSimon Glass1-2/+4
Use the uclass type as the first part of the function name, to be consistent with the methods in other block drivers. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass3-11/+11
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEOSimon Glass3-3/+3
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30efi: Drop old LCD codeSimon Glass2-35/+5
This relies on the old LCD implementation which is to be removed. Drop the existing #ifdef and convert it to C code. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-27lib: fix buggy strcmp and strncmpWIP/27Oct2022Rasmus Villemoes1-10/+17
There are two problems with both strcmp and strncmp: (1) The C standard is clear that the contents should be compared as "unsigned char": The sign of a nonzero value returned by the comparison functions memcmp, strcmp, and strncmp is determined by the sign of the difference between the values of the first pair of characters (both interpreted as unsigned char) that differ in the objects being compared. (2) The difference between two char (or unsigned char) values can range from -255 to +255; so that's (due to integer promotion) the range of values we could get in the *cs-*ct expressions, but when that is then shoe-horned into an 8-bit quantity the sign may of course change. The impact is somewhat limited by the way these functions are used in practice: - Most of the time, one is only interested in equality (or for strncmp, "starts with"), and the existing functions do correctly return 0 if and only if the strings are equal [for strncmp, up to the given bound]. - Also most of the time, the strings being compared only consist of ASCII characters, i.e. have values in the range [0, 127], and in that case it doesn't matter if they are interpreted as signed or unsigned char, and the possible difference range is bounded to [-127, 127] which does fit the signed char. For size, one could implement strcmp() in terms of strncmp() - just make it "return strncmp(a, b, (size_t)-1);". However, performance of strcmp() does matter somewhat, since it is used all over when parsing and matching DT nodes and properties, so let's find some other place to save those ~30 bytes. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-10-17dm: treewide: Use uclass_first_device_err when accessing one deviceMichal Suchanek2-2/+2
There is a number of users that use uclass_first_device to access the first and (assumed) only device in uclass. Some check the return value of uclass_first_device and also that a device was returned which is exactly what uclass_first_device_err does. Some are not checking that a device was returned and can potentially crash if no device exists in the uclass. Finally there is one that returns NULL on error either way. Convert all of these to use uclass_first_device_err instead, the return value will be removed from uclass_first_device in a later patch. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-16efi_loader: remove efi_delete_handle on loadfile2Ilias Apalodimas1-4/+15
Loadfile2 code is installing two protocols on it's own handle and uses efi_delete_handle() to clean it up on failure(s). However commit 05c4c9e21ae6 ("efi_loader: define internal implementations of install/uninstallmultiple") prepares the ground for us to clean up efi_delete_handle() used in favor of Install/UninstallMultipleProtocol. While at it clean up the non needed void casts to (void *) on the protolcol installation. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-16efi_loader: avoid EFI_CALL() when draining consoleHeinrich Schuchardt1-3/+1
Use internal function. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-16efi_loader: avoid EFI_CALL() for clearing screenHeinrich Schuchardt1-9/+17
Carve out function efi_clear_screen. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-11lib: crypt: fix selecting a non-existent optionOleksandr Suvorov1-1/+0
The option SHA256_ALGO does not exist. Remove selecting it. Fixes: 26dd9936574 ("lib: add crypt subsystem") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>