- May 18, 2020
-
-
Move this uncommon header out of the common header. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 17, 2020
-
-
In OP-TEE we can run EDK2's StandAloneMM on a secure partition. StandAloneMM is responsible for the UEFI variable support. In combination with OP-TEE and it's U-Boot supplicant, variables are authenticated/validated in secure world and stored on an RPMB partition. So let's add a new config option in U-Boot implementing the necessary calls to OP-TEE for the variable management. Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by:
Pipat Methavanitpong <pipat1010@gmail.com> Signed-off-by:
Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Virtually all callers of this function do the rounding on their own. Some do it right, some don't. Instead of doing this in each caller, do the rounding in efi_add_memory_map(). Change the size parameter to bytes instead of pages and remove aligning and size calculation in all callers. There is no more need to make the original efi_add_memory_map() (which takes pages as size) available outside the module. Thus rename it to efi_add_memory_map_pg() and make it static to prevent further misuse outside the module. Signed-off-by:
Michael Walle <michael@walle.cc> Add missing comma in sunxi_display.c. Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- May 15, 2020
-
-
If "object=" is specified in "keydir" when using the pkcs11 engine do not append another "object=<key-name-hint>". This makes it possible to use object names other than the key name hint. These two string identifiers are not necessarily equal. Signed-off-by:
Jan Luebbe <jlu@pengutronix.de> Signed-off-by:
Bastian Krause <bst@pengutronix.de> Reviewed-by:
George McCollister <george.mccollister@gmail.com>
-
Better than crashing later if it is missing. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
stdlib.h is the header for malloc since at least c89/c90. There is no system malloc.h on OpenBSD and trying to use malloc.h here falls back to the U-Boot malloc.h breaking the build of qemu_arm64. Fixes: 336d4615 ("dm: core: Create a new header file for 'compat' features") Signed-off-by:
Jonathan Gray <jsg@jsg.id.au>
-
At present the MD5 option cannot be enabled by board configs since it has no Kconfig name. It is generally enabled, so long as FIT support is present. But not all boards use FIT, particularly in SPL Fix this and add an option for SPL as well. This allows board code to call md5() even if FIT support is not enabled. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 09, 2020
-
-
The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various places to calculate the number of bytes occupied by a u16 string. Let's introduce a wrapper around this. This wrapper is used on following patches Signed-off-by:
Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
The only error case is that a given UUID is in wrong format. So just return EFI_INVALID_PARAMETER here. Reported-by: Coverity (CID 300333) Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Coverity detected: Using "&opt->CheckSum" as an array. This might corrupt or misinterpret adjacent memory locations. The code should work as far as a structure, IMAGE_OPTIONAL_HEADER(64) is packed, but modify it in more logical form. Subsystem is a member next to CheckSum. Reported-by: Coverity (CID 300339) Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- May 07, 2020
-
-
Heinrich Schuchardt authored
User <> and not "" for referencing a global include. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Since pkcs7_parse_message() returns an error pointer, we must not check for NULL. We have to explicitly set msg to NULL in the error case, otherwise the call to pkcs7_free_message() on the goto err path will assume it's a valid object. Signed-off-by:
Patrick Wildt <patrick@blueri.se> Add missing include linux/err.h Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
efi_variable_parse_signature() returns NULL on error, so IS_ERR() is an incorrect check. The goto err leads to pkcs7_free_message(), which works fine on a NULL ptr. Signed-off-by:
Patrick Wildt <patrick@blueri.se> Reviewed-by:
AKASHI Takahiro <takahiro.akashi@linaro.org>
-
Heinrich Schuchardt authored
According to the UEFI spec ACPI tables should be placed in EfiACPIReclaimMemory. Let's do the same with the device tree. Suggested-by:
Ard Biesheuvel <ardb@kernel.org> Cc: Grant Likely <grant.likely@arm.com> Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
There is no need to call efi_get_variable() instead of efi_get_variable_common(). So let's use the internal function. Move forward declarations to the top of the file. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
Fix unreachable code. Free memory on error. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
The value of dp is overwritten without being used. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Add a couple of missing targets so that helloworld and other efi targets are not needlessly rebuilt. CC: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Tested-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
To fill the exponent field of the rsa_public_key struct, rsa_mod_exp_sw did a cast to uint64_t of the key_prop->public_exponent field. But that alignment is not guaranteed in all cases. This came to light when in my spl-fit-signature the key-name exceeded a certain length and with it the verification then started failing. (naming it "integrity" worked fine, "integrity-uboot" failed) key_prop.public_exponent itself is actually a void-pointer, fdt_getprop() also just returns such a void-pointer and inside the devicetree the 64bit exponent is represented as 2 32bit numbers, so assuming a 64bit alignment can lead to false reads. So just use the already existing rsa_convert_big_endian() to do the actual conversion from the dt's big-endian to the needed uint64 value. Fixes: fc2f4246 ("rsa: Split the rsa-verify to separate the modular exponentiation") Signed-off-by:
Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Reviewed-by:
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- May 04, 2020
-
-
Heinrich Schuchardt authored
If we want to restore variables from disk, we need to initialize block devices before variables. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
EFI_STATUS is unsigned (UINTN). Hence it cannot be negative. Correct comments for 'Return:'. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
Eliminate superfluous functions efi_set_volatile_variable() and efi_set_nonvolatile_variable(). Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Heinrich Schuchardt authored
Eliminate superfluous functions efi_get_volatile_variable() and efi_get_nonvolatile_variable(). Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
This function will check if a given handle to device is an EFI system partition. It will be utilised in implementing capsule-on-disk feature. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Add function description. Return bool. Reviewed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
efi_set_secure_stat() provides the common code for each stat transition caused by efi_transfer_secure_state(). Suggested-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Correct description of return value. Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
"if (left < esl->signature_size)" is not reachable in a while loop. But it is still valuable in case that a given signature database is somehow corrupted. So fix the while loop condition. Reported-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
Pkcs7_parse.h and x509_parser.h are used in UEFI subsystem, in particular, secure boot. So move them to include/crypto to avoid relative paths. Suggested-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Don't include include x509_parser.h twice. Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
By adding extra symbols, we can now avoid including x509_parser and pkcs7_parser.h files multiple times. Suggested-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Don't include include x509_parser.h twice. Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- May 01, 2020
-
-
The most basic printf("%i", value) formating string was missing, add it for the sake of convenience. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Roese <sr@denx.de>
-
- Apr 30, 2020
-
-
It is useful to dump ACPI tables in U-Boot to see what has been generated. Add a command to handle this. To allow the command to find the tables, add a position into the global data. Support subcommands to list and dump the tables. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Wolfgang Wallner <wolfgang.wallner@br-automation.com>
-
Put this in the context along with the other important pointers. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Wolfgang Wallner <wolfgang.wallner@br-automation.com>
-
We always write three basic tables to ACPI at the start. Move this into its own function, along with acpi_fill_header(), so we can write a test for this code. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Move this code to a generic location so that we can test it with sandbox. This requires adding a few new fields to acpi_ctx, so drop the local variables used in the original code. Also use mapmem to avoid pointer-to-address casts which don't work on sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Wolfgang Wallner <wolfgang.wallner@br-automation.com>
-
The current code uses an address but a pointer would result in fewer casts. Also it repeats the alignment code in a lot of places so this would be better done in a helper function. Update write_acpi_tables() to make use of the new acpi_ctx structure, adding a few helpers to clean things up. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Wolfgang Wallner <wolfgang.wallner@br-automation.com>
-
A device may want to write out ACPI tables to describe itself to Linux. Add a method to permit this. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Wolfgang Wallner <wolfgang.wallner@br-automation.com>
-
Heinrich Schuchardt authored
In subsequent patches UEFI variables shalled be stored on the EFI system partition. Hence we need to identify the EFI system partition. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- Apr 27, 2020
-
-
Provide a valid reference for the deflate format. Reformat the ALGORITHM and REFERENCES comments. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
This patch enables LZMA decompression support for SPL build Reviewed-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Tom Rini <trini@konsulko.com> Signed-off-by:
Weijie Gao <weijie.gao@mediatek.com>
-
- Apr 26, 2020
-
-
My goal is to sync lib/libfdt/ with scripts/dtc/libfdt/, that is, make lib/libfdt/ contain only wrapper files. fdt_region.c was written only for U-Boot to implement the verified boot. So, this belongs to the same group as common/fdt_support.c, which is a collection of U-Boot own fdt helpers. Move lib/libfdt/fdt_region.c to common/fdt_region.c . This is necessary only when CONFIG_(SPL_TPL_)_FIT_SIGNATURE is enabled. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
There is no essential difference between scripts/dtc/libfdt/fdt_ro.c and lib/libfdt/fdt_ro.c Migrate to a simple wrapper like the other files. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-