summaryrefslogtreecommitdiffstats
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* cmd: ubi: Remove useless call to mtdparts_init()Boris Brezillon2018-11-132-6/+0
| | | | | | | | | | | | | | | | | | | | | | Commit c58fb2cdb3e4 ("cmd: ubi: clean the partition handling") introduced a call to mtd_probe_devices() in the ubi_attach() path and this function takes care of parsing mtdparts/mtdids and creating/registering the associated mtd partitions. The mtdparts_init() call in the ubi_detach() path is not only unnecessary but can sometimes print error messages even when things work properly (that's the case with SPI NAND devices that have not been probed with 'mtd list'), which is misleading. Remove this call to mtdparts_init() and drop the dependency on CMD_MTDPARTS. Fixes: c58fb2cdb3e4 ("cmd: ubi: clean the partition handling") Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
* mtd: Make {MTDIDS, MTDPARTS}_DEFAULT visible when MTD_PARTITIONS is selectedBoris Brezillon2018-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | gwventana configs are relying on CMD_UBI to select CMD_MTDPARTS, which is then making {MTDIDS,MTDPARTS}_DEFAULT options available. We are about to remove the 'select CMD_MTDPARTS' statement in the CMD_UBI entry, but if we do that without first making sure {MTDIDS,MTDPARTS}_DEFAULT are visible, we end up with a build failure when building gwventana configs. Address that by adding a depends on MTD_PARTITIONS to {MTDIDS,MTDPARTS}_DEFAULT which does the trick since CMD_UBI selects MTD_UBI which in turn selects MTD_PARTITIONS. We also get rid of the depends on CMD_MTD, since CMD_MTD also selects MTD_PARTITIONS. Reported-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
* cmd: remove CONFIG_SOURCE support in MakefilePatrick Delaunay2018-11-011-1/+0
| | | | | | | | | | | | This line is no more needed and can be removed. Only CONFIG_CMD_SOURCE is defined in Kconfig and used in defconfig files. CONFIG_SOURCE if not defined in source code and "config SOURCE" is not present in any Kconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* cmd: remoteproc: Fix the base of strtoul for ID conversion from 3 to 10Keerthy2018-11-011-2/+2
| | | | | | | Currently the base is 3 fix it 10 so that IDs follow decimal system. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Lokesh Vutla <lokeshvulta@ti.com>
* cmd: mii: don't check address for 'device' subcommandHector Palacios2018-10-241-1/+1
| | | | | | | | All mii operations require a valid PHY address except the 'device' command, which expects the PHY name rather than the address. Signed-off-by: Hector Palacios <hector.palacios@digi.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Merge tag 'signed-efi-2018.11' of git://github.com/agraf/u-bootTom Rini2018-10-171-17/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2018-10-17 A few bug fixes for the 2018.11 release: - Fix block seeking on 32bit - Fix execution with DEBUG set - Fix a few Coverity found bugs - Fix warnings Heinrich Schuchardt (13): efi_loader: fix relocation on x86_64 efi_loader: correct signature of GetPosition, SetPosition efi_loader: execute efi_save_gd() first efi_loader: efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, ...) efi_loader: error handling in read_console() efi_loader: return type efi_console_register() efi_loader: superfluous statement in is_dir() efi_loader: memory leak in efi_set_variable() efi_loader: remove lcd.h from efi_net.c arm: do not include efi_loader.h twice efi_loader: fix typo in efi_boottime.c efi_selftest: creating new handle in controller test efi_loader: efi_dp_get_next_instance() superfluous statement Tom Rini (2): efi_loader: Fix warning in efi_load_image() fs: fat: Fix warning in normalize_longname()
| * efi_loader: execute efi_save_gd() firstHeinrich Schuchardt2018-10-161-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If DEBUG is defined we may be calling EFI_CALL already during the initialization of the EFI subsystem. We must make sure efi_save_gd() has already been called at that moment. Anyway it is better to have this call in one location instead of three. This fixes an illegal memory access occurring since 4e6b5d6503ce ("efi_loader: create root node") with DEBUG = 1. Fixes: 4e6b5d6503ce ("efi_loader: create root node") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | cmd: kgdb: Enable kgdb only for PPCMichal Simek2018-10-161-0/+1
|/ | | | | | | Only PPC supports this option that's why there should be proper dependency setup via Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dmTom Rini2018-10-103-35/+19
|\ | | | | | | | | | | Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements
| * cros_ec: Update cros_ec_read_hash() to specify the imageSimon Glass2018-10-091-1/+1
| | | | | | | | | | | | Allow selection of which EC image to hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Update mtrr functions to allow leaving cache aloneSimon Glass2018-10-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | At present the mtrr functions disable the cache before making changes and enable it again afterwards. This is fine in U-Boot, but does not work if running in CAR (such as we are in SPL). Update the functions so that the caller can request that caches be left alone. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cros: Update ec_commands to latest versionSimon Glass2018-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This file has changed quite a bit in the last 5 years as the capabilities of the ECs have grown. Sync it up with the copy in coreboot commit b9141f2215. The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed because U-Boot uses the new v2 vboot API and this is not currently fully supported by Chromium OS firmware. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tpm: Add a few new commands for v1Simon Glass2018-10-091-15/+0
| | | | | | | | | | | | | | These are needed for the 2018 version of Chromium OS vboot. Add an implementation for TPM v1, with v2 to come later. Signed-off-by: Simon Glass <sjg@chromium.org>
| * cros: Update cros_ec code to use struct udeviceSimon Glass2018-10-091-12/+12
| | | | | | | | | | | | | | | | At present we pass around a private pointer to specify the cros_ec device. With driver model it makes more sense to pass the device. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
* | fdt: add call to ft_board_setup_ex() for ks2 boardsNicholas Faustini2018-10-101-0/+3
| | | | | | | | | | | | | | | | | | When updating the board FDT, some of the operations are performed by ft_board_setup_ex() and should be executed also by the fdt command. Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | cmd: pxe: add support for FIT config selectionPatrick Delaunay2018-10-081-3/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add a way in configuration files (exlinux.conf for sysboot command) to select a specific FIT configuration. The configuration is selected with a string added after the FIT filename in the label "KERNEL" or "LINUX", using the same format than bootm command: KERNEL [Filename]#<conf>[#<extra-conf[#...]] This configuration string, beginning by '#', is directly appended to bootm argument 1 after <kernel_addr_r>. bootm [<kernel_addr_r>]#<conf>[#<extra-conf[#...]] see doc/uImage.FIT/command_syntax_extensions.txt for details Example : KERNEL /fit.itb#cfg1 KERNEL /fit.itb#cfg2 Configuration can be use also for overlay management : KERNEL /fit.itb#cfg1#dtbo1#dtbo3 see doc/uImage.FIT/overlay-fdt-boot.txt for details Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* cmd: avb: print error message if command failsJens Wiklander2018-10-071-0/+17
| | | | | Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
* cmd: avb read_rb: print rb_idx in hexadecimalJens Wiklander2018-10-071-1/+1
| | | | | | | | | | | Prior to this patch was do_avb_write_rb() reading supplied rb_idx as a hexadecimal number while do_avb_read_rb() printed the read out rb_idx as decimal number. For consistency change do_avb_read_rb() to print rb_idx as a hexadecimal number too. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
* riscv: cmd: bdinfo: Print the relocation addressBin Meng2018-10-031-0/+2
| | | | | | | Add printing of U-Boot relocation address. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
* riscv: Remove mach typeBin Meng2018-10-031-1/+0
| | | | | | | Since the mach_id is not used by RISC-V, remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2018-10-025-95/+531
|\ | | | | | | | | | | | | This is the PR for SPI-NAND changes along with few spi changes. [trini: Re-sync changes for ls1012afrwy_qspi*_defconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
| * cmd: mtdparts: describe as legacyMiquel Raynal2018-10-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | The 'mtdparts' command is not needed anymore. While the environment variable is still valid (and useful, along with the 'mtdids' one), the command has been replaced by 'mtd' which is much more close to the MTD stack and do not add its own specific glue. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: ubi: clean the partition handlingMiquel Raynal2018-10-022-71/+27
| | | | | | | | | | | | | | | | | | | | UBI should not mess with MTD partitions, now that the partitions are handled in a clean way, clean the ubi command and avoid using this uneeded extra-glue to reference the devices. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: mtd: add 'mtd' commandMiquel Raynal2018-10-023-2/+482
| | | | | | | | | | | | | | | | | | | | | | | | There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partitions at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: mtdparts: remove mandatory 'mtdparts=' prefixMiquel Raynal2018-09-201-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All U-Boot users must define the mtdparts environment variable with: setenv mtdparts mtdparts=... While this may ease the partition declaration job to be passed to Linux, this is a pure software limitation and forcing this prefix is a complete non-sense. Let the user to declare manually the mtdparts variable without the prefix. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mtdparts: accept spi-nand devicesMiquel Raynal2018-09-201-5/+8
| | | | | | | | | | | | | | | | | | | | Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mtdparts: add fallthrough in switch statementMiquel Raynal2018-09-201-0/+3
| | | | | | | | | | | | | | Switch blocks for deriving size naturally use fallthrough between 'case' statements. Make it explicit. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
| * cmd: ubi: delete useless and misleading definitionsMiquel Raynal2018-09-201-5/+0
| | | | | | | | | | | | | | | | | | | | | | These definitions are simply not used and are misleading because similar definitions exist in jffs2/load_kernel.h and are used widely to define MTD device types (which is, by the way, totally redundant with what the MTD core does). Remove these definitions. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2018-09-301-0/+37
|\ \
| * | cmd: clk: Add trivial implementation of clock dump for DMMarek Vasut2018-09-291-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add trivial implementation of the clk dump in case DM is enabled. This implementation just iterates over all the clock registered with the CLK uclass and prints their rate. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
* | | u-boot: align cache flushes in load_elf_image_shdr to line boundariesNeil Stainton2018-09-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent cache warning messages when using the 'bootelf' command on an Arm target. Round down each section start address and round up the respective section end to the nearest cache line. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk> [trini: Manually apply, rework whitespace] Signed-off-by: Tom Rini <trini@konsulko.com>
* | | cmd: env: Fix CRC calculation for 'env export -c -s'Neil Stainton2018-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix failure to reimport exported checksummed, size constrained data block. 'env export -c' command ignores optional -s size argument when calculating checksum causing subsequent 'env import -c' to fail. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk>
* | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-09-293-0/+300
|\ \ \ | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
| * | | cmd: Add osd commandsMario Six2018-09-283-0/+300
| |/ / | | | | | | | | | | | | | | | | | | | | | Add command to query information from and write text to on-screen display (OSD) devices. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | cmd: Relocate poweroff under Device access commandsAdam Ford2018-09-291-5/+5
| | | | | | | | | | | | | | | | | | | | | Previously poweroff was located under boot. It seems to make more sense to have it located under the Device access commands. Signed-off-by: Adam Ford <aford173@gmail.com>
* | | w1: add command for onewire protocolEugen Hristev2018-09-283-0/+134
| | | | | | | | | | | | | | | | | | | | | Add basic command for bus information and read for onewire bus using Dallas 1-Wire protocol. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* | | cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()Tien Fong Chee2018-09-281-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmd_ubifs_mount() function would be called directly instead of involving whole command machinery for mounting ubifs in generic firmware loader, so some checking codes need to be factored out into cmd_ubifs_mount() without breaking original functionality design. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | | cmd: ubifs: Move ubifs_initialized checking into cmd_ubifs_umount()Tien Fong Chee2018-09-282-11/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | cmd_ubifs_umount() function would be called directly instead of involving whole command machinery in generic firmware loader, so checking on ubifs_initialized status need to be done in cmd_ubifs_umount() without breaking original functionality design. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de> [trini: Fix conflicting type error in cmd/ubi.c] Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2018-09-262-70/+151
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2018-09-26 A lot of goodness in this release. We're *very* close to running the UEFI Shell and SCT natively. The only missing piece are HII protocols. - FAT write support (needed for SCT) - improved FAT directory support (needed for SCT) - RTC support with QEMU -M virt - Sandbox support (run UEFI binaries in Linux - yay) - Proper UTF-16 support - EFI_UNICODE_COLLATION_PROTOCOL support (for UEFI Shell) - EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL support (for UEFI Shell) - Fix window size determination - Fix Tegra by explicitly unmapping RAM - Clean up handle entanglement - Lots of generic code cleanup [trini: Fixup merge conflict in include/configs/qemu-arm.h] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | efi_loader: refactor efi_setup_loaded_image()Heinrich Schuchardt2018-09-231-27/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the handle of loaded images and the EFI_LOADED_IMAGE_PROTOCOL inside efi_setup_loaded_image(). Do not use local variables. Currently we expect the loaded image handle to point to the loaded image protocol. Additionally we have appended private fields to the protocol. With the patch the handle points to a loaded image object and the private fields are added here. This matches how we handle the net and the gop object. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: Fix loaded_image handle passing from EL3Alexander Graf2018-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in EL3 mode on AArch64, we have to first drop to EL2 to execute a UEFI payload. When dropping down, the arguments to the entry point have to stay identical to the ones for normal entry though. In commit ea54ad59286 ("efi_loader: pass handle of loaded image") we incorrectly changed that logic and had the el3 entry path diverge. Fix it up by syncing it back to what it's supposed to be. Fixes: ea54ad59286 ("efi_loader: pass handle of loaded image") Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
| * | efi_loader: create root nodeHeinrich Schuchardt2018-09-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we assign a lot of protocols to loaded images though these protocols are not related to them. Instead they should be installed on a separate handle. Via the device path it is the parent to the devices like the network adapter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: memory leak in efi_set_bootdev()Heinrich Schuchardt2018-09-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | efi_set_bootdev() may be called repeatedly. Free the memory allocated for device paths in previous calls. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: do not use local variable for handleHeinrich Schuchardt2018-09-231-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Do not use a local variable for the handle backing the memory device path. Adjust relate comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add fatrm commandAKASHI Takahiro2018-09-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | In this patch, a new command, fatrm, is added so as to delete a file or directory. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add fatmkdir commandAKASHI Takahiro2018-09-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, a new command, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is assumed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add offset parameter to fatwriteAKASHI Takahiro2018-09-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | In this patch, fatwrite command is extended so as to accept an additional parameter of file offset. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: buffer size for load optionsHeinrich Schuchardt2018-09-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of bytes in an utf-8 string is an upper limit for the number of words in the equivalent utf-16 string. In so far the inumbant coding works correctly. For non-ASCII characters the utf-16 string is shorter. With the patch only the necessary buffer size is allocated for the load options. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi: sandbox: Tidy up copy_fdt() to work with sandboxSimon Glass2018-09-231-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function takes a pointer as its argument, then passes this to efi_allocate_pages(), which actually takes an address. It uses casts, which are not supported on sandbox. Also the function calculates the FDT size rounded up to the neared EFI page size, then its caller recalculates the size and adds a bit more to it. This function is much better written as something that works with addresses only, and returns both the address and the size of the relocated FDT. Also, copy_fdt() returns NULL on error, but really should propagate the error from efi_allocate_pages(). To do this it needs to return an efi_status_t, not a void *. Update the code in this way, so that it is easier to follow, and also supports sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi: Relocate FDT to 127MB instead of 128MBSimon Glass2018-09-231-2/+2
| |/ | | | | | | | | | | | | | | Sandbox only has 128MB of memory so we cannot relocate the device tree up to start at 128MB. Use 127MB instead, which should be safe. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>