summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | efi_loader: parameter check in GetNextVariableName()Heinrich Schuchardt2020-11-211-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If GetNextVariableName() is called with a non-existing combination of VariableName and VendorGuid, return EFI_INVALID_PARAMETER. If GetNextVariableName() is called with a string that is not zero terminated, return EFI_INVALID_PARAMETER. Reformat a line over 80 characters. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: tcg2 protocol updatesIlias Apalodimas2020-11-212-70/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | On pull reuqest https://lists.denx.de/pipermail/u-boot/2020-November/432735.html V4 of the patchset was sent instead of the v5. This is the v4->v5 missing diff Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | dfu: simplify the dependencies of DFU_TFTPAKASHI Takahiro2020-11-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CONFIG_UPDATE_COMMON always selects CONFIG_DFU_WRITE_ALT, we can drop the latter from dependencies of CONFIG_DFU_TFTP. Fixes: 3149e524fc1e ("common: update: add a generic interface for FIT image") Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | Merge tag 'xilinx-for-v2021.01-rc3' of ↵Tom Rini2020-11-2011-110/+35
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2021.01-rc3 Microblaze: - Enable GC - Get rid of xparameters.h and switch to DT for CFI - Fix config file tpm: - Fix TPM code zynqmp: - Enable TPM by default - Remove unused macros fru: - Several fixes especially use limit for recording
| * | fru: common: Record pcie/uuid fields in custom board areaMichal Simek2020-11-201-0/+4
| | | | | | | | | | | | | | | | | | Add additional fields. They will be just recorded and filled but not shown. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | fru: ops: Do not let parser to write data to not allocated spaceMichal Simek2020-11-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | If customs fields in board area are used it will likely go over allocated space in struct fru_board_data. That's why calculate limit of this structure to make sure that different data is not rewritten by accident. When limit is reached stop to record fields. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | fru: common: Switch capture variable with the restMichal Simek2020-11-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | capture variable is bool which is just one byte and it is just causing unaligned accesses. Better to have it as last entry in the structure. It also simplify offset calculation for initial header copy. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | arm64: zynqmp: Enable TPM for xilinx platformsMichal Simek2020-11-201-0/+3
| | | | | | | | | | | | | | | | | | TPMs are becoming popular that's why enable drivers and command for it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | arm64: zynqmp: Get rid of unused macrosMichal Simek2020-11-201-4/+2
| | | | | | | | | | | | | | | | | | | | | There is no reason to have these macros. But record offsets of missing register in the structure for future use. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | tpm: spi: Cleanup source codeMichal Simek2020-11-201-3/+0
| | | | | | | | | | | | | | | | | | | | | There is no need for GD to be used and priv variable is unused. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | microblaze: Detect NOR flash based on DTMichal Simek2020-11-202-38/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove fixed configuration and detect flash based on DT. Also increase amount of flash sectors to 2048 because on kc705 flash has 1027 sectors. Bank # 1: CFI conformant flash (16 x 16) Size: 128 MB in 1027 Sectors Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x8962 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Unify of setting for SPL_NOR/XIP supportMichal Simek2020-11-201-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XIP is not enabled in SPL. SPL_NOR is enabled but any macro setting with using SYS_FLASH_BASE are wrong because it is not aligned with DM. That's why change these macro and align them with TEXT_BASE macro. Information should be find at run time based on DT but implementation is not done yet. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Remove CONFIG_SYS_FDT_SIZEMichal Simek2020-11-202-2/+0
| | | | | | | | | | | | | | | | | | CONFIG_SYS_FDT_SIZE is not use anywhere that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Get rid of xparameters.hMichal Simek2020-11-202-19/+6
| | | | | | | | | | | | | | | | | | | | | There is no need to use this file anymore. Include it in main config file and simplify logic based on it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Simplify cache handlingMichal Simek2020-11-201-14/+2
| | | | | | | | | | | | | | | | | | | | | Enable caches by default. For now just simplify config file but it should be read from DT or PVRs. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Clean config file from ifdef messMichal Simek2020-11-201-24/+0
| | | | | | | | | | | | | | | | | | | | | A lot of configs has been moved to Kconfig and it ends up in ifdef mess with no bodies. That's why remove all of them. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | microblaze: Enable GCC garbage collector for full U-BootMichal Simek2020-11-202-3/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC's garbage collector works for Microblaze for quite a long time but none has enabled it. The same change has be done for example by commit fac4790491f6 ("arc: Eliminate unused code and data with GCC's garbage collector"). Before: text data bss dec hex filename 588760 33592 39192 661544 a1828 u-boot After: text data bss dec hex filename 504504 32164 38608 575276 8c72c u-boot Which saves almost 15% of memory footprint. Also group symbols/functions to proper section. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | Merge branch '2020-11-18-assorted-fixes'Tom Rini2020-11-1926-168/+321
|\ \ | | | | | | | | | | | | | | | - Assorted SquashFS fixes and cleanups - Fixes for various Coverity issues - Various fixups to other platforms / code
| * | fs/squashfs: implement exists() functionRichard Genoud2020-11-193-1/+40
| | | | | | | | | | | | | | | | | | | | | This permits to find a file and use the distro_bootcmd Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: remove buggy offset functionalityRichard Genoud2020-11-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | offset is the offset in the file read, not the offset in the destination buffer. If the offset is not null, this will lead to a memory corruption. So, for now, we are returning an error if the offset is used. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: don't write beyond buffer sizeRichard Genoud2020-11-191-0/+8
| | | | | | | | | | | | | | | | | | | | | The length of the buffer wasn't taken into account when writing to the given buffer. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return valueRichard Genoud2020-11-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | sqfs_decompressor_init() returns a value, so it's better to use it than to force the return value to EINVAL (it could be ENOMEM) Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_probe: reset cur_dev/cur_part_info to NULL on errorRichard Genoud2020-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Resetting the context on error will prevent some checks like: if (!ctx.cur_dev) To pass when the probe method has failed Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_probe: fix possible memory leak on errorRichard Genoud2020-11-191-5/+9
| | | | | | | | | | | | | | | | | | | | | If SquashFS magic number is invalid, there's a memory leak. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: fix memory leak on finfo.blk_sizesRichard Genoud2020-11-191-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | finfo.blk_sizes may not be freed in case of error in the for loop Setting it to null and freeing it at the end makes prevents that from happening. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_get_abs_path: fix possible memory leak on errorRichard Genoud2020-11-191-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | if sqfs_tokenize(rel_tokens, rc, rel); fails, the function exits without freeing the array base_tokens. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_get_abs_path: fix error checkRichard Genoud2020-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | the return value of sqfs_tokenize(rel_tokens, rc, rel); wasn't checked. (but "ret" value was !) This is obviouly a typo. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_frag_lookup: simplify error handlingRichard Genoud2020-11-191-12/+16
| | | | | | | | | | | | | | | | | | | | | For consistency with other functions. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: fix another memory leakRichard Genoud2020-11-191-0/+2
| | | | | | | | | | | | | | | | | | data_buffer was allocated in a loop and freed only once. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: fix memory leakRichard Genoud2020-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | sqfs_closedir() should be called to free memory allocated by sqfs_opendir() Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: remove useless sqfs_closedir()Richard Genoud2020-11-191-1/+0
| | | | | | | | | | | | | | | | | | as sqfs_opendir failed, there's no need to call sqfs_closedir Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read: fix dangling pointer dirs->entryRichard Genoud2020-11-191-0/+1
| | | | | | | | | | | | | | | | | | dirs->entry shouldn't be left dangling as it could be freed twice. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_size: remove useless sqfs_closedir()Richard Genoud2020-11-191-1/+0
| | | | | | | | | | | | | | | | | | as sqfs_opendir failed, there's no need to call sqfs_closedir Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_size: fix dangling pointer dirs->entryRichard Genoud2020-11-191-0/+2
| | | | | | | | | | | | | | | | | | dirs->entry shouldn't be left dangling as it could be freed twice. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_concat_tokens: check if malloc succeedsRichard Genoud2020-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | memory allocation should always be checked Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read_inode_table: fix dangling pointerRichard Genoud2020-11-191-0/+1
| | | | | | | | | | | | | | | | | | inode_table should not be left dangling as it may be freed in sqfs_opendir Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_search_dir: fix memory leaksRichard Genoud2020-11-191-13/+51
| | | | | | | | | | | | | | | | | | | | | path, target, res, rem and sym_tokens were not free on error nor success. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_search_dir: fix dangling pointerRichard Genoud2020-11-191-0/+5
| | | | | | | | | | | | | | | | | | dirs->entry shouldn't be left dangling as it could be freed twice. Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_read_directory_table: fix memory leakRichard Genoud2020-11-191-14/+17
| | | | | | | | | | | | | | | | | | | | | pos_list wasn't freed on every error Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_split_path: fix memory leak and dangling pointersRichard Genoud2020-11-191-12/+28
| | | | | | | | | | | | | | | | | | | | | *file and *dir were not freed on error Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_closedir: fix memory leakRichard Genoud2020-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | sqfs_dirs wasn't freed anywhere. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_opendir: simplify error handlingRichard Genoud2020-11-191-15/+12
| | | | | | | | | | | | | | | | | | | | | Using only one label permits to prevents bugs when moving code around. Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: sqfs_opendir: fix some memory leaks and dangling pointersRichard Genoud2020-11-191-8/+29
| | | | | | | | | | | | | | | | | | When trying to load an non-existing file, the cpu hangs! Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
| * | fs/squashfs: fix board hang-up when calling .exists()Richard Genoud2020-11-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | add missing squashfs function to prevent dangling or null pointers. For exemple, when calling test [ -e somefile ], squashfs.exists may be called. Signed-off-by: Richard Genoud <richard.genoud@posteo.net> Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
| * | fs: btrfs: initialize @ret to 0 to prevent uninitialized return valueQu Wenruo2020-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In show_dir() if we hit a ROOT_ITEM, we can exit with uninitialized @ret. Fix it by initializing it to 0. Reported-by: Coverity CID 312955 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek Behún <marek.behun@nic.cz>
| * | fs: btrfs: inode: handle uninitialized type before returning itQu Wenruo2020-11-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In btrfs_lookup_path() the local variable @type should always be updated after we hit any file/dir. But if @filename is NULL from the very beginning, then we don't initialize it and return it directly. To prevent such problem from happening, we initialize @type to BTRFS_FT_UNKNOWN. For normal execution route, it will get updated for each filename we resolved. Buf if we didn't find any path, we check if the type is still FT_UNKNOWN and ret == 0. If true we know there is something wrong, just return -EUCLEAN to inform the caller. Reported-by: Coverity CID 312958 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek Behún <marek.behun@nic.cz>
| * | fs/squashfs: Fix index off by 1 for inode SQFS_LDIR_TYPEGerard Koskamp2020-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've created a squashfs file system with Yocto (it use squashfs-tools) and u-boot command sqfsls give the error:'Error while searching inode: unknown type.' After some digging in the code I found that the index is off by 1. This patch fix this issue and I can successful use the sqfsls command. After search for the squashfs format I found a link talk about a similar issue but this time in the documentation. The link is: https://github.com/AgentD/squashfs-tools-ng/commit/e6588526838caece9529 Signed-off-by: Gerard Koskamp <gerard.koskamp@nedap.com> Tested-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * | drivers: led: bcm6858: set the correct led polarity registerSteven Lawrance2020-11-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change sets the output (hardware) polarity register instead of the input (software) polarity register for the bcm6858 LED controller. The logic was inverted (a LED configued active high behaved as active low). Signed-off-by: Steven Lawrance <steven.lawrance@softathome.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
| * | km/ppc: use Kconfig for MEMTEST configurationHolger Brunck2020-11-193-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also change back SYS_MEMTEST_END to 0x00f00000. 0xe00000 was wrong and introduced due to the global Kconfig migration of this option in u-boot. CC: Heiko Schocher <hs@denx.de> CC: Tom Rini <trini@konsulko.com> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
| * | km: replace hardcoded address for imported environmentMatteo Ghidoni2020-11-199-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using an hard coded address, make use of an already defined address for importing the environment for ramfs and nfs boot. This allows boards having different mapping to use the same code. CC: Heiko Schocher <hs@denx.de> CC: Tom Rini <trini@konsulko.com> Signed-off-by: Matteo Ghidoni <matteo.ghidoni@hitachi-powergrids.com> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>