summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2021-04-10efi_loader: simplify efi_get_device_path_text()Heinrich Schuchardt1-15/+16
Replace static function efi_get_device_handle_info() by a simplified function efi_get_device_path_text() avoiding EFI_CALL(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-04-08crypto: Add blob command support for i.MX8M platformsAymen Sghaier2-4/+4
This patch enable blob command for mScale platforms. Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08imx7ulp: Enable support for cmd blobFranck LENORMAND2-4/+6
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08cmd: blob: Instantiate RNG before running CMD_BLOBBreno Lima1-0/+14
U-Boot can instantiate CAAM RNG if needed by crypto operations. Call sec_init() prior running a blob operation to ensure RNG is correctly instantiated. Make sure CAAM clock is enabled and check if a job ring is available for that operation. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08cmd: blob: Add IMX_HAB and CAAM supported SoCs as dependencyBreno Lima1-0/+2
In order to build CMD_BLOB on i.MX CAAM supported devices it's necessary to select IMX_HAB. Add IMX_HAB and CAAM supported SoCs as dependency. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-06cmd: mmc: check whether bootbus's arguments is valid or notJaehoon Chung1-1/+38
According to Specification, each bit have valid value. But it doesn't check whether arguments is valid or not. It has potential bug with arguments passed by wrong value. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-06cmd: mmc: modify more readable about hwpartition usageJaehoon Chung1-4/+7
Modified more readable about hwpartition usage. Because it's difficult to understand how to use its command. The arguments didn't optional. mmc hwpartition needs to pass <USER> <GP> <MODE> as arguments. Description about each arguments what is required is the below: USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}> GP - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}> MODE - <{check|set|complete}> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-05Merge branch 'next'Tom Rini13-77/+781
2021-04-04cmd: CMD_USB depends on USBHeinrich Schuchardt1-0/+1
The usb command cannot be compiled with CONFIG_USB=n: ld.bfd: cmd/usb.c:660: undefined reference to `usb_stop' ld.bfd: cmd/usb.c:663: undefined reference to `usb_started' Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-27sandbox: Provide a way to bind fixed/removeable devicesSimon Glass1-4/+15
At present when a file is bound to a host device it is always marked as removeable. Arguably the device is removeable, since it can be unbound at will. However while it is bound, it is not considered removable by the user. Also it is useful to be able to model both fixed and removeable devices for code that distinguishes them. Add a -r flag to the 'host bind' command and plumb it through to provide this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27sandbox: Update do_host_bind() argument countingSimon Glass1-3/+6
Remove the 'bind' subcommand before processing the arguments. This will make it easier to add an optional flag. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27sandbox: Disintangle declarations in do_host_bind()Simon Glass1-4/+9
This function has a strange mix of declarations and argument parsing which is a bit hard to follow and harder to modify. Separate out the declarations at the start of the function and adjust the ordering of the code slightly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27cmd: Add missing check for CONFIG_SYS_LONGHELPSimon Glass2-0/+4
Two commands are missing this check, so compilation fails when building without CONFIG_CMDLINE. Add it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27x86: Add a command to display coreboot sysinfoSimon Glass3-0/+404
This information is interesting to look at and can be important for debugging and inspection. Add a command to display it in a helpful format. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27x86: Make coreboot sysinfo available to any x86 boardSimon Glass1-1/+1
It is possible to boot U-Boot for chromebook_coral either 'bare metal' or from coreboot. In the latter case we want to provide access to the coreboot sysinfo tables. Move the definitions into a file available to any x86 board. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-25cmd: efi: ESRT table debug printJose Marinho1-0/+84
This commit enables the ESRT printing from the u-boot shell by invoking: - efidebug capsule esrt CC: Heinrich Schuchardt <xypron.glpk@gmx.de> CC: Sughosh Ganu <sughosh.ganu@linaro.org> CC: AKASHI Takahiro <takahiro.akashi@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Andre Przywara <andre.przywara@arm.com> CC: Alexander Graf <agraf@csgraf.de> CC: nd@arm.com Signed-off-by: Jose Marinho <jose.marinho@arm.com> Reviwed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-25efi: Add ESRT to the EFI system tableJose Marinho1-0/+4
The ESRT is initialised during efi_init_objlist after efi_initialize_system_table(). The ESRT is recreated from scratch at the following events: - successful UpdateCapsule; - FMP instance install. The code ensures that every ESRT entry has a unique fw_class value. Limitations: - The ESRT is not updated if an FMP instance is uninstalled; - the fields image_type and flags are in the current implementation left undefined. Setting these values will require a per-platform function that returns the image_type/flags as a function of the image fw_class. CC: Heinrich Schuchardt <xypron.glpk@gmx.de> CC: Sughosh Ganu <sughosh.ganu@linaro.org> CC: AKASHI Takahiro <takahiro.akashi@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Andre Przywara <andre.przywara@arm.com> CC: Alexander Graf <agraf@csgraf.de> CC: nd@arm.com Signed-off-by: Jose Marinho <jose.marinho@arm.com> Remove two EFI_CALL() indirections. Move ESRT GUID in efidebug's list of GUIDs. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-25efidebug: add multiple device path instances on Boot####Ilias Apalodimas1-36/+155
The UEFI spec allows a packed array of UEFI device paths in the FilePathList[] of an EFI_LOAD_OPTION. The first file path must describe the loaded image but the rest are OS specific. Previous patches parse the device path and try to use the second member of the array as an initrd. So let's modify efidebug slightly and install the second file described in the command line as the initrd device path. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-03-25efi_loader: Replace config option for initrd loadingIlias Apalodimas1-0/+3
Up to now we install EFI_LOAD_FILE2_PROTOCOL to load an initrd unconditionally. Although we correctly return various EFI exit codes depending on the file status (i.e EFI_NO_MEDIA, EFI_NOT_FOUND etc), the kernel loader, only falls back to the cmdline interpreted initrd if the protocol is not installed. This creates a problem for EFI installers, since they won't be able to load their own initrd and continue the installation. It also makes the feature hard to use, since we can either have a single initrd or we have to recompile u-boot if the filename changes. So let's introduce a different logic that will decouple the initrd path from the config option we currently have. When defining a UEFI BootXXXX we can use the filepathlist and store a file path pointing to our initrd. Specifically the EFI spec describes: "The first element of the array is a device path that describes the device and location of the Image for this load option. Other device paths may optionally exist in the FilePathList, but their usage is OSV specific" When the EFI application is launched through the bootmgr, we'll try to interpret the extra device path. If that points to a file that exists on our disk, we'll now install the load_file2 and the efi-stub will be able to use it. This opens up another path using U-Boot and defines a new boot flow. A user will be able to control the kernel/initrd pairs without explicit cmdline args or GRUB. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-25cmd/load: support uploading EFI binary via UARTHeinrich Schuchardt1-2/+8
When uploading an EFI binary via the UART we have to call efi_set_bootdev() or we won't be able to execute it. Put the includes into alphabetic order. Fixes: 5f59518a7b1a ("efi_loader: setting boot device") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-25efi: Fix compiler warningsSimon Glass1-1/+1
This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:9: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:19: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ In file included from include/common.h:20, from lib/efi_loader/efi_capsule.c:9: lib/efi_loader/efi_capsule.c: In function ‘efi_update_capsule’: include/efi_loader.h:83:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ include/log.h:229:2: note: in expansion of macro ‘log’ log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \ ^~~ include/log.h:249:2: note: in expansion of macro ‘debug_cond’ debug_cond(_DEBUG, fmt, ##args) ^~~~~~~~~~ include/efi_loader.h:83:2: note: in expansion of macro ‘debug’ debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~ lib/efi_loader/efi_capsule.c:444:2: note: in expansion of macro ‘EFI_ENTRY’ EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ^~~~~~~~~ lib/efi_loader/efi_capsule.c:444:19: note: format string is defined here EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ~~^ %u Signed-off-by: Simon Glass <sjg@chromium.org> Replace (uintptr_t)NULL by 0. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-19cmd/load: support uploading EFI binary via UARTHeinrich Schuchardt1-2/+8
When uploading an EFI binary via the UART we have to call efi_set_bootdev() or we won't be able to execute it. Put the includes into alphabetic order. Fixes: 5f59518a7b1a ("efi_loader: setting boot device") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-16efi: Fix compiler warningsSimon Glass1-1/+1
This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:9: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:19: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ In file included from include/common.h:20, from lib/efi_loader/efi_capsule.c:9: lib/efi_loader/efi_capsule.c: In function ‘efi_update_capsule’: include/efi_loader.h:83:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ include/log.h:229:2: note: in expansion of macro ‘log’ log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \ ^~~ include/log.h:249:2: note: in expansion of macro ‘debug_cond’ debug_cond(_DEBUG, fmt, ##args) ^~~~~~~~~~ include/efi_loader.h:83:2: note: in expansion of macro ‘debug’ debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~ lib/efi_loader/efi_capsule.c:444:2: note: in expansion of macro ‘EFI_ENTRY’ EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ^~~~~~~~~ lib/efi_loader/efi_capsule.c:444:19: note: format string is defined here EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ~~^ %u Signed-off-by: Simon Glass <sjg@chromium.org> Replace (uintptr_t)NULL by 0. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-15Merge tag 'v2021.04-rc4' into nextTom Rini3-0/+44
Prepare v2021.04-rc4
2021-03-13cmd: SCP03: enable and provision commandJorge Ramirez-Ortiz3-0/+63
Enable and provision the SCP03 keys on a TEE controlled secured elemt from the U-Boot shell. Executing this command will generate and program new SCP03 encryption keys on the secure element NVM. Depending on the TEE implementation, the keys would then be stored in some persistent storage or better derived from some platform secret (so they can't be lost). Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2021-03-13tpm: Don't select LOGSimon Glass1-1/+0
We don't need to enable logging to run this command since the output will still appear. Drop the 'select'. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-05cmd: Fix virtio command dependencyBin Meng1-0/+1
The 'virtio' command calls blk_common_cmd() which is only available when CONFIG_HAVE_BLOCK_DEVICE is on. Fix the Kconfig dependency. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-03-05cmd: Add a command to display the address mapBin Meng3-0/+43
This adds a new command 'addrmap' to display the address map for non-identity virtual-physical memory mappings. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-03-02tpm: Switch TPMv1 over to use the new APISimon Glass2-30/+35
Take over the plain 'tpm_...' functions for use by the new TPM API. Rename all the TPMv1 functions so they are called from the API. Update the TPMv1 functions so that they are called from the API. Change existing users to use the tpm1_ prefix so they don't need to go through the API, which might introduce uncertainty. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler1-1/+1
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-27Merge tag 'efi-2021-04-rc3-2' of ↵Tom Rini1-0/+4
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-04-rc3-2 Bug fixes: * debug build for mkeficapsule * limit output length for VenHw, VenMedia * ACPI tables must be in EfiACPIReclaimMemory
2021-02-26Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbTom Rini1-1/+2
- fastboot updates / fixes
2021-02-26Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spiTom Rini1-11/+18
- new GigaDevice flash ids - fixes for imx, nxp_spi drivers
2021-02-26cmd/efidebug: add firmware management protocol GUIDHeinrich Schuchardt1-0/+4
Add missing GUID short text used in the efidebug tables and efidebug dh sub-commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-02-26part: Support getting whole disk from part_get_info_by_dev_and_name_or_numSean Anderson1-1/+2
This adds an option to part_get_info_by_dev_and_name_or_num to allow callers to specify whether whole-disk partitions are fine. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-26Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini1-0/+1
2021-02-26cmd: sf: Print error on test failureSean Anderson1-9/+13
The sf test command is used to test spi flashes (and spi masters). Printing the exact error code is very helpful to those debugging the spi stack. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-02-26cmd: sf: Display errno on erase failureSean Anderson1-2/+5
If there is an error while erasing SPI flash, no errno is displayed. This makes it difficult to determine the cause of the error. This change mirrors the logic for write errors above. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-02-25cmd/riscv/sbi: support System Reset ExtensionHeinrich Schuchardt1-0/+1
Let the sbi command detect the 'System Reset Extension' (EID #0x53525354 "SRST"). Cf. https://github.com/riscv/riscv-sbi-doc Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com> Reviewed-by: Leo Liang <ycliang@andestech.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
2021-02-25cmd: pinmux: depend on PINCTRLMarek Behún1-0/+1
The pinmux command uses functions pinctrl_get_pin_*(), which are missing if PINCTRL config option is disabled. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-25cmd: pwm: Rework argc sanity checkingTom Rini1-22/+19
Currently, we check argc in a number of places to make sure that we have all of the required arguments for each of the pwm sub-commands. However, there's at least one place where we've got dead code as we'll never have argc == 0, due to checking that argc was at least 4 earlier and having only subtracted 3. Rework things so that when we have determined our subcommand make sure we have the right number of arguments for it, or error out. This means we can stop checking against argc again later. Reported-by: Coverity (CID: 316601) Cc: Pragnesh Patel <pragnesh.patel@sifive.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-21dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIOIgor Opaniuk2-52/+52
Use CONFIG_IS_ENABLED() macro, which provides more convenient way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs for both SPL and U-Boot proper. CONFIG_IS_ENABLED(DM_I2C) expands to: - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y', - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y', - 0 otherwise. All occurences were replaced automatically using these bash cmds: $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-02-19cmd: mmc: update the mmc command's usage about argumentJaehoon Chung1-3/+3
It's confusing whether arguments are optional or mandatory. Update the command's usage to clarify how to use. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-16image: Adjust the workings of fit_check_format()Simon Glass7-9/+9
At present this function does not accept a size for the FIT. This means that it must be read from the FIT itself, introducing potential security risk. Update the function to include a size parameter, which can be invalid, in which case fit_check_format() calculates it. For now no callers pass the size, but this can be updated later. Also adjust the return value to an error code so that all the different types of problems can be distinguished by the user. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Bruce Monroe <bruce.monroe@intel.com> Reported-by: Arie Haenel <arie.haenel@intel.com> Reported-by: Julien Lenoir <julien.lenoir@intel.com>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini23-0/+24
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-08cmd: mvebu/bubt: Fix default options in helpPali Rohár1-3/+3
Default options depends on compile time defines. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-02-05Merge tag 'efi-2021-04-rc2' of ↵Tom Rini1-0/+5
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-04-rc2 Bug fixes: * do not allow creating of files with filenames on FAT file system * install UEFI System Partition GUID on ESP handle * in dtbdump.efi test tool use GUID to find ESP handle Documentation: * man-page for load command * describe end of life of plat_auto
2021-02-04efi_loader: install UEFI System Partition GUIDHeinrich Schuchardt1-0/+5
On the handle for the UEFI System Partition we must install the System Partition GUID (with a NULL interface). Let the efidebug command display the GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-02-04Merge tag 'dm-pull-3feb21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini1-26/+26
Support late device removal Allow booting a 32-bit system with a top memory address beyond 4 GiB
2021-02-03cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel imageKory Maincent1-0/+3
Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>