summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-27Merge tag 'v2021.10-rc5' into nextTom Rini76-1115/+936
Prepare v2021.10-rc5
2021-09-27Prepare v2021.10-rc5Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-27Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini2-1/+9
- turris_omnia: fix leaked mtd device (Marek) - phy: marvell: cp110: Fix SATA invert polarity (Denis)
2021-09-27phy: marvell: cp110: Support SATA invert polarityDenis Odintsov1-1/+6
In commit b24bb99d cp110 configuration initially done in u-boot was removed and delegated to atf firmware as smc call. That commit didn't account for later introduced in d13b740c SATA invert polarity support. This patch adds support of passing SATA invert polarity flags to atf firmware during the smc call. Signed-off-by: Denis Odintsov <shiva@mail.ru> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Rabeeh Khoury <rabeeh@solid-run.com> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-27arm: mvebu: turris_omnia: fix leaked mtd deviceMarek Behún1-0/+3
After getting MTD device via get_mtd_device_nm(), we need to put it with put_mtd_device(), otherwise we get Removing MTD device #0 (mx25l6405d) with use count 1 before booting kernel. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Tested-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-26Merge tag 'efi-2021-10-rc5' of ↵Tom Rini4-23/+35
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-10-rc5 Documentation: * add /config bindings to HTML documentation UEFI * Fix number_of_algorithms field in TCG EFI Protocol
2021-09-25efi_loader: Fix spec ID event creationRuchika Gupta2-23/+24
TCG EFI Protocol Specification defines the number_of_algorithms field in spec ID event to be equal to the number of active algorithms supported by the TPM device. In current implementation, this field is populated with the count of all algorithms supported by the TPM which leads to incorrect spec ID event creation. Similarly, the algorithm array in spec ID event should be a variable length array with length being equal to the number_of_algorithms field. In current implementation this is defined as a fixed length array which has been fixed. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> CC: Masahisa Kojima <masahisa.kojima@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-09-25doc: Add mention of the /config bindingSimon Glass2-0/+11
The devicetree binding files are in their own directory and use a simple text format. Add a link for the binding for the /config node, since it is otherwise hard to find. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-09-25vexpress_ca9x4: Add missing SYS_LOAD_ADDRTom Rini1-13/+10
- Add missing CONFIG_SYS_LOAD_ADDR based on other platforms - Resync Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-25Merge branch '2021-09-24-assorted-updates' into nextTom Rini24-85/+1124
- A few minor updates
2021-09-24drivers: tpm2: update reset gpio semanticsJorge Ramirez-Ortiz2-9/+17
Use the more generic reset-gpios property name. Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-09-24Avoid polluting CONFIG_ namespace with board specific define.Kristian Amlie3-3/+2
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-24tools: Handle PAGER containing argumentsPaul Barker1-4/+6
When printing full help output from a tool, we should be able to handle a PAGER variable which includes arguments, e.g. PAGER='less -F'. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2021-09-24tools: Refactor full help printingPaul Barker4-20/+24
Collect the code for printing the full help message of patman, buildman and binman into a single function in patman.tools. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2021-09-24ARM: vexpress_ca9x4: Reintroduce board in order to use with QEMU.Kristian Amlie13-22/+1072
vexpress_ca9x4 is seemingly the only board except for qemu_arm which is able to run U-Boot correctly, using the `-M vexpress-a9` option to QEMU. Building for qemu_arm and running qemu-system-arm with the `-M virt` argument has a number of downsides, most importantly that it only supports virtio storage drivers. This significantly reduces its usefulness in testing memory card and Flash solutions, especially when the tested images are from a third party source. So therefore we reintroduce the vexpress_ca9x4 board in this commit, with the explicit goal of using it with QEMU. A number of differences to note from the original: * Since the board was apparently unmaintained, I have now set myself as the maintainer. * The board has been converted to use the driver model, which was the reason it was removed in the first place. * The vexpress_ca15_tc2 and vexpress_ca5x2 boards, which were removed in the same commit, are not necessary for the QEMU use case, and have been omitted. * An `mmc0` alias was introduced in the dts file. The mmc is not detected correctly without this, now that it's based on the device tree instead of the board's init function. * A couple of other nodes were removed because they were problematic when trying to run the UEFI bootmgr. Once again, the primary use case here is QEMU, and these nodes are not needed for that to work. * Unnecessary board init code has been removed, thanks to driver model and device tree. * `CONFIG_OF_EMBED` has been enabled. I know this goes against recommended practice, but there doesn't seem to be any other way to pass the dtb to U-Boot in the QEMU scenario. Using the -dtb argument does not work, I suppose because U-Boot doesn't use the same mechanics as the kernel when it's booting. * Load addresses have been changed to fit QEMU use case. People wanting to get a more detailed, yet somewhat isolated, diff between this and the original, can run this command: git diff c6c26a05b89f25a06e7562f8c2071b60fd0c9eac~1 -- \ $( git diff-tree --diff-filter=A -r --name-only HEAD~1 HEAD) (Make sure to either check out this commit first, or replace HEAD with the commit ID of this commit) Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2021-09-24arm: use CONFIG_SUPPORT_PASSING_ATAGSPatrick Delaunay4-32/+8
Simplify the bootm and the spl code by using the new config CONFIG_SUPPORT_PASSING_ATAGS. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-24Merge branch '2021-09-24-assorted-minor-updates'Tom Rini13-685/+42
- Assorted bugfixes, MAINTAINER updates and dead code removal
2021-09-24arm: orion5x: edminiv2: change maintainerSimon Guinot1-1/+1
Since Albert Aribaud is not maintaining anymore the LaCie Ethernet Disk mini V2 board, then I am taking over. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-24mtd: remove SPEAr flash driver st_smiPatrick Delaunay5-668/+0
Remove the driver st_smic.c used in SPEAr products and the associated config CONFIG_ST_SMI; this driver is no more used in U-Boot after the commit 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support"). Fixes: 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-24Taking over responsibility for GE boards from SebastianMartyn Welch3-3/+3
I am taking over responsibility for the GE board from Sebastian Reichel. Updating the MAINTAINERS files to reflect this. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-09-24MAINTAINERS: remove SPEAR entryPatrick Delaunay1-7/+0
As the lastest spear directories are removed, delete the associated entry in the MAINTAINERS file: - arch/arm/cpu/arm926ejs/spear/ - arch/arm/include/asm/arch-spear/ Fixes: 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-09-24fs: avoid superfluous messagesHeinrich Schuchardt1-1/+1
Output like the following is quite irritating: => bootefi hello Scanning disk mmc2.blk... No valid Btrfs found Bad magic number for SquashFS image. ** Unrecognized filesystem type ** Scanning disk mmc1.blk... No valid Btrfs found Bad magic number for SquashFS image. ** Unrecognized filesystem type ** Scanning disk mmc0.blk... No valid Btrfs found Bad magic number for SquashFS image. ** Unrecognized filesystem type ** Albeit a whole disk may be formatted with a filesystem in most cases a partition table is used and the whole disk (partition number 0) doesn't contain a filesytem. Some partitions may only contain a blob. Not seeing a filesytem on the whole disk or on any partition is only worth a debug message. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-09-24scripts/mailmapper: enable running with Python 3Heinrich Schuchardt1-5/+9
Our mailmapper script required Python 2 which is no longer maintained. A main difference when converting to Python 3 is that byte strings are not character strings. So add conversion and skip over conversion errors. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-09-24test/py: tpm2: Skip tpm pytest based on env variableT Karthik Reddy1-0/+28
Tpm test cases relies on tpm device setup. Provide an environment variable "env__tpm_device_test_skip = True" to skip the test case if tpm device is not present. Only needed will have to add variable to the py-test framework. Test runs successfully even this variable is absent. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-09-24Merge branch '2021-09-24-arm64-optimized-str-funcs' into nextTom Rini6-8/+532
- Bring in, but disable by default, asm optimized string functions for arm64.
2021-09-24arm64: Kconfig: Enable usage of optimized memset/memcpy/memmoveStefan Roese2-8/+39
This patch enables the use of the optimized memset(), memmove() & memcpy() versions recently added on ARM64. Please note that these optimized functions are now only enabled for recent GCC versions (>= 9.4), as earlier GCC versions throw these errors: aarch64-linux-ar: warning: arch/arm/lib/memset-arm64.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000 ... Signed-off-by: Stefan Roese <sr@denx.de> [trini: Make this default to off as it causes problems on some platforms still] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-24arm64: memset-arm64: Use simple memset when cache is disabledStefan Roese1-0/+32
The optimized memset uses the dc opcode, which causes problems when the cache is disabled. This patch adds a check if the cache is disabled and uses a very simple memset implementation in this case. Otherwise the optimized version is used. Signed-off-by: Stefan Roese <sr@denx.de>
2021-09-24arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functionsStefan Roese4-0/+461
Ported from https://github.com/ARM-software/optimized-routines These files are included from this repository, including the latest git commit ID: string/aarch64/memcpy.S: afd6244a1f8d string/aarch64/memset.S: e823e3abf5f8 string/asmdefs.h: e823e3abf5f8 Note that memmove is also handled by the memcpy function. Please note that when adding these optimized functions as default memset memcpy functions in U-Boot, U-Boot fails to boot on the LX2160ARDB. After the initial ATF output, no U-Boot output is shown on the serial console. Some exception is triggered here in the very early boot process as some of the assembler opcodes need the caches to be enabled. Because of this, a follow-up patch will add a check to use a simple non-optimized memset for the "cache disabled" case. Note: I also integrated and tested with the Linux versions of these optimized functions. They are similar to the ones now integrated but these ARM versions are still a small bit faster. Signed-off-by: Stefan Roese <sr@denx.de>
2021-09-24Revert "env: Make _init() expect _INVALID when _IS_NOWHERE"Tom Rini1-1/+1
Upon further discussion, this is not required now. This reverts commit f6bc5d17afa9fe12418edaf1fc9f82beeda06132. Link: https://lore.kernel.org/r/ebd92337-669a-9a0a-0af3-d06b957f3b40@denx.de/ Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-24Merge branch '2021-09-23-assorted-updates' into nextTom Rini37-331/+271
- Rework lmb reservation so we have common code for all arches to use - armv8 cache.S cleanups, crc32 speedup - ENV_IS_NOWHWERE, pci io/memory base configuration fixes
2021-09-23pci: Fix configuring io/memory base and limit registers of PCI bridgesPali Rohár1-10/+29
Lower 4 bits of PCI_MEMORY_BASE and PCI_MEMORY_LIMIT registers are reserved and should be zero. So do not set them to non-zero value. Lower 4 bits of PCI_PREF_MEMORY_BASE and PCI_PREF_MEMORY_LIMIT registers contain information if 64-bit memory addressing is supported. So preserve this information when overwriting these registers. Lower 4 bits of PCI_IO_BASE and PCI_IO_LIMIT register contain information if 32-bit io addressing is supported. So preserve this information and do not try to configure 32-bit io addressing (via PCI_IO_BASE_UPPER16 and PCI_IO_LIMIT_UPPER16 registers) when it is unsupported. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-23arm: mediatek: merge board Kconfigs into mach-mediatekGuillaume La Roque13-134/+53
On MediaTek boards we cannot override the SYS_BOARD / SYS_CONFIG_NAME variables from defconfig. This is because in board/mediatek/mtXXXX/Kconfig this value was override by default due to the if CONFIG_TARGET_MTXXXX condition. Merge all the Kconfigs to the mach-medatek/Kconfig. This way: - we only define SYS_{SOC,VENDOR} once - all board definitions are in a single place, simplifying the build logic. Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
2021-09-23lmb: x86: Add arch_lmb_reserve()Marek Vasut1-0/+18
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: xtensa: Add arch_lmb_reserve()Marek Vasut1-0/+12
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Zankel <chris@zankel.net> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: sh: Add arch_lmb_reserve()Marek Vasut1-0/+16
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). This architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: riscv: Add arch_lmb_reserve()Marek Vasut1-0/+13
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Reviewed-by: Rick Chen <rick@andestech.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Atish Patra <atish.patra@wdc.com> Cc: Leo <ycliang@andestech.com> Cc: Rick Chen <rick@andestech.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: nds32: Add arch_lmb_reserve()Marek Vasut1-0/+13
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Reviewed-by: Rick Chen <rick@andestech.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Rick Chen <rick@andestech.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: nios2: Add arch_lmb_reserve()Marek Vasut1-0/+16
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: Remove imx board_lmb_reserve()Marek Vasut1-30/+0
This function is clearly architecture specific code, not board specific code. The only difference from the previous arm arch_lmb_reserve() is the extra reservation of 16k of memory below the stack bottom, rather than the 4k. The common code now also uses 16k alignment. Remove this custom implementation, as it now behaves exactly as the common code. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> Cc: Angelo Dureghello <angelo@sysam.it> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Ye Li <ye.li@nxp.com>
2021-09-23lmb: arm: Increase LMB alignment to 16k in arch_lmb_reserve_generic()Marek Vasut1-1/+1
According to input NXP, the 4k alignment is not always sufficient. Currently iMX works around this problem by implementing board specific LMB reservation, however it is likely this could also occur on other systems. Increase the LMB reservation alignment to 16k by default. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> Cc: Angelo Dureghello <angelo@sysam.it> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Ye Li <ye.li@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-23lmb: Switch to generic arch_lmb_reserve_generic()Marek Vasut6-117/+7
Switch arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() to arch_lmb_reserve_generic(). Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> Cc: Angelo Dureghello <angelo@sysam.it> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Wolfgang Denk <wd@denx.de>
2021-09-23lmb: Add generic arch_lmb_reserve_generic()Marek Vasut2-0/+36
The arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() implementations are all mostly the same, except for a couple of details. Implement a generic arch_lmb_reserve_generic() function which can be parametrized enough to cater for those differences between architectures. This can also be parametrized enough so it can handle cases where U-Boot is not relocated to the end of DRAM e.g. because there is some other reserved memory past U-Boot (e.g. unmovable firmware for coprocessor), it is not relocated at all, and other such use cases. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> Cc: Angelo Dureghello <angelo@sysam.it> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Cc: Hai Pham <hai.pham.ud@renesas.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-23lmb: Always compile arch_lmb_reserve() into U-Boot on arcMarek Vasut2-30/+30
The arch_lmb_reserve() is called by lib/lmb.c lmb_reserve_common() even if CMD_BOOTM is not enabled. However, the arc variant of arch_lmb_reserve() is only compiled in if CMD_BOOTM is enabled. This currently does not trigger build error, because there is an empty weak implementation of arch_lmb_reserve(), however that is not the function that should be used on arc. Fix this by moving the arch_lmb_reserve() implementation into common code and always compile it in. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23lmb: Always compile arch_lmb_reserve() into U-Boot on armMarek Vasut2-45/+45
The arch_lmb_reserve() is called by lib/lmb.c lmb_reserve_common() even if CMD_BOOT{I,M,Z} is not enabled. However, the arm32/arm64 variant of arch_lmb_reserve() is only compiled in if CMD_BOOT{I,M,Z} is enabled. This currently does not trigger build error, because there is an empty weak implementation of arch_lmb_reserve(), however that is not the function that should be used on arm32/arm64. Fix this by moving the arch_lmb_reserve() implementation into common code and always compile it in. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2021-09-23image: add lz4 zstd compression magic mapArtem Lapkin1-0/+2
Add lz4 and zstd compression magic map. Already can decompress images with lz4 and zstd compression type. Signed-off-by: Artem Lapkin <art@khadas.com>
2021-09-23crc32: Add crc32 implementation using __builtin_aarch64_crc32bMarek Vasut3-1/+22
ARMv8.0 has optional crc32 instruction for crc32 calculation. The instruction is mandatory since ARMv8.1. The crc32 calculation is faster using the dedicated instruction, e.g. 1.4 GHz iMX8MN gives: => time crc32 0x50000000 0x2000000 time: 0.126 seconds # crc32 instruction time: 0.213 seconds # software crc32 Add implementation using the compiler builtin wrapper for the crc32 instruction and enable it by default, since we don't support any platforms which do not implement this instruction. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> [trini: Make crc32_table guarded by CONFIG_ARM64_CRC32] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-23armv8/cache.S: Triple with single instructionPierre-Clément Tosi1-2/+1
Replace the current 2-instruction 2-step tripling code by a corresponding single instruction leveraging ARMv8-A's "flexible second operand as a register with optional shift". This has the added benefit (albeit arguably negligible) of reducing the final code size. Fix the comment as the tripled cache level is placed in x12, not x0. Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
2021-09-23armv8/cache.S: Read sysreg fields through ubfxPierre-Clément Tosi1-10/+6
Improve the file's readability and conciseness by using the appropriate Aarch64 instruction: ubfx (unsigned bitfield extract). This makes the code easier to follow as it directly manipulates the offsets and widths of the fields read from system registers, as they are expressed in the Standard (ARM ARM). This has the added benefit (albeit arguably negligible) of reducing the final code size. Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
2021-09-23env: Make _init() expect _INVALID when _IS_NOWHEREPierre-Clément Tosi1-1/+1
Avoid applying the "fix" introduced by commit 5557eec01cbf ("env: Fix invalid env handling in env_init()") to the environment "nowhere". This is necessary as that commit, by setting the return value of env_init() to -ENOENT if gd->env_valid is ENV_INVALID, forces that function to reset gd->env_valid to ENV_VALID. By doing so, it breaks the assumption (required by ENV_IS_NOWHERE) that gd->env_valid must be ENV_INVALID. This, in turn, results in env_relocate() calling env_load() (it should not), which itself, calls U_BOOT_ENV_LOCATION(nowhere).load() i.e. env_nowhere_load(). That function, being implemented under the assumption mentioned above, calls env_set_default(), which in turn, seeing that gd->env_valid is ENV_VALID (it should not), tries to dereference whatever lies in gd->env_addr (most likely garbage), leading to a faulty memory access. Note that other env_locations might be concerned by this bug but that this commit only intends to fix it for when ENV_IS_NOWHERE. Fixes: 5557eec01cbf ("env: Fix invalid env handling in env_init()") Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
2021-09-23Merge git://source.denx.de/u-boot-socfpgaTom Rini5-20/+11
Bugfixes for this one socfpga platform