aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-04-25qemu: dfu: Correct memset call in set_dfu_alt_infoTom Rini1-1/+1
When building with clang, we see: board/emulation/common/qemu_dfu.c:51:24: warning: 'memset' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Wsizeof-pointer-memaccess] As we're calling memset with the length set to the size of the pointer and not the size of the buffer. Correct this with a call of the size of the buffer itself. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-04-25api: Rework menu, and make it depend on CC_IS_GCCTom Rini1-3/+4
We can only use the old U-Boot API for standalone applications when building U-Boot with GCC as it relies upon the "gd is a register" trick that only GCC supports. Further, rework the rest of the options so that they are in the API menu and only visible if API support is enabled. Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25sysreset: psci: add psci_sysreset_get_statusPeng Fan1-0/+6
Add weak function psci_sysreset_get_status for platform to define their own reset status with CONFIG_SYSRESET enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-04-25sysreset: psci: enable DM_FLAG_PRE_RELOCPeng Fan1-0/+1
It is possible that cpu core may reset before relocation with PSCI reset Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-04-25firmware: psci: enable DM_FLAG_PRE_RELOCPeng Fan1-0/+1
It is possible that cpu core may reset before relocation with PSCI reset Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-04-25xen: Fix Kconfig dependenciesMichal Simek3-2/+2
XEN config can be enabled by other platforms (even it doesn't need to make sense) that's why fix dependencies. XEN (xenbus.c) requires sscanf (also pvblock needs it). And PVBLOCK is inside drivers/xen folder which requires XEN to be enabled. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-25pytest: Use --lazy with umountTom Rini1-2/+2
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25usb: gadget: f_mass_storage: Rework do_request_sense slightlyTom Rini1-2/+1
When building with clang, it notes that sdinfo may be unused uninitialized in some cases. This appears to be true from reading the code, and we can simply set the variable to zero to start with and be as correct as before. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Marek Vasut <marex@denx.de>
2023-04-25boot/image-board.c: Silence warning in select_ramdiskTom Rini1-1/+1
When building with clang we get a warning that rdaddr could be uninitialized in one case. While this cannot functionally happen, we can easily silence the warning. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25armv7: Use isb/dsb directly in start.STom Rini1-4/+4
Toolchains which do not directly support using "isb" and "dsb" directly are no longer functionally supported in U-Boot. Furthermore, clang has for a long time warned about using the alternate form that we were. Update the code. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm: Centralize fixed register logicTom Rini2-3/+8
When building for ARM64, we need to pass -ffixed-x18 and otherwise pass -ffixed-r9. Rather than having this logic in two places, we can do this once in arch/arm/config.mk. Further, while gcc will ignore being passed both -ffixed-r9 and -ffixed-x18 and simply use -ffixed-x18, clang will note that -ffixed-r9 is not used. Remove this duplication to also remove the warning. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25clang: Don't look for libgccTom Rini1-0/+2
In the case of using clang to build, and having not already enabled the private libgcc, do not look for it, as it will not be found nor required. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25clang: Add $(CLANG_TARGET) to LDPPFLAGSTom Rini1-0/+1
When we invoke $(CPP) to make u-boot.lds we have LDPPFLAGS available to set other required flags here. As this file is for the target and not the host, we must ensure that CPP knows what the target architecture is. For this, pass in $(CLANG_TARGET). Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm: Only support ARM64_CRC32 when using GCCTom Rini1-1/+1
Today, only gcc has __builtin_aarch64_crc32b (clang-16 does not, for example). Make this option depend on CC_IS_GCC. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25fs: yaffs2: Make yaffsfs_deviceList staticBin Meng1-1/+1
yaffsfs_deviceList is only referenced in yaffsfs.c Signed-off-by: Bin Meng <bmeng@tinylab.org>
2023-04-25test: move unit tests into a sub-menuHeinrich Schuchardt1-1/+5
The main configuration menu should not contain detail settings. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25test: improve configuration for Kconfig test optionsHeinrich Schuchardt1-7/+8
* Fix dependencies * Provide labels that are easier to grasp. * Fix typo %s/whgch/which/ * Fix type %s/Is/is/ Fixes: 29784d62eded ("test: Add some tests for kconfig.h") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm64: interrupts: print FAR_ELx on sync exceptionsPavel Skripkin1-1/+37
Default synchronous exceptions handler prints only esr and register dump. Sometimes it requiers to see an address which caused exceptions to understand what's going on ARM ARM in section D13.2.41 states that FAR_EL2 will contain meanfull value in case of ESR.EC holds 0x20, 0x21, 0x24, 0x25, 0x22, 0x34 or 0x35. Same applies for EL1. This patch adds function whivh determine current EL, gets correct FAR register and prints it on panic. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
2023-04-25configs: Create minimal vexpress_fvp_defconfigPeter Hoyes1-0/+5
The vexpress64 board family now relies on OF_CONTROL and OF_HAS_PRIOR_STAGE, so platform-specific configuration requirements are minimal. The vexpress_aemv8a_semi_defconfig file defines many flags that are not needed for a minimal boot, such as flash memory configuration. Therefore create vexpress_fvp_defconfig which contains the minimum configuration required to boot on an Arm v8a FVP. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
2023-04-25vexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base modelPeter Hoyes1-0/+5
The Arm EBBR (Embedded Base Boot Requirements) require that the time and basic networking EFI interfaces are available and working, so long as the hardware has an RTC and network interface. Arm FVPs typically have a memory-mapped PL031 RTC and a VIRTIO_NET device defined in the device tree, so "imply" these in the Kconfig for the FVP base model to simplify creating EBBR-compliant firmware. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
2023-04-25vexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variantPeter Hoyes1-1/+1
BASE_FVP now typically uses a devicetree provided by a prior boot stage (typically Arm TF-A), so imply this option by default when TARGET_VEXPRESS64_BASE_FVP is selected. OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns TARGET_VEXPRESS64_BASE_FVP with TARGET_VEXPRESS64_BASER_FVP. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-04-25include: configs: am64x_evm: Change to using .envNikhil M Jain2-85/+63
Move to using .env file for setting up environment variables for am64x. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-04-25arch: mach-k3: j721s2_init: Disable the firewallsJayesh Choudhary1-0/+53
Some firewalls enabled by ROM are still left on. So some address space is inaccessible to the bootloader. For example, in OSPI boot mode we get an exception and the system hangs. Therefore, disable all the firewalls left on by the ROM. Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-25soc: soc_ti_k3: fix revision array bounds checksRasmus Villemoes1-2/+2
If rev is equal to the array size, we'll access the array one-past-the-end. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-04-25armv8: enable HAFDBS for other ELx when FEAT_HAFDBS is presentmeitao2-3/+13
u-boot could be run at EL1/EL2/EL3. so we set it as same as EL1 does. otherwise it will hang when enable mmu, that is what we encounter in our SOC. Signed-off-by: meitao <meitaogao@asrmicro.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/3bf38943aeab4700c2319bff2a1477d99c6afd2f
2023-04-25arm64: Use level-2 for largest block mappings when FEAT_HAFDBS is presentMarc Zyngier2-4/+11
In order to make invalidation by VA more efficient, set the largest block mapping to 2MB, mapping it onto level-2. This has no material impact on u-boot's runtime performance, and allows a huge speedup when cleaning the cache. Signed-off-by: Marc Zyngier <maz@kernel.org> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/417a73581a72ff6d6ee4b0938117b8a23e32f7e8
2023-04-25arm64: Use FEAT_HAFDBS to track dirty pages when availableMarc Zyngier3-5/+26
Some recent arm64 cores have a facility that allows the page table walker to track the dirty state of a page. This makes it really efficient to perform CMOs by VA as we only need to look at dirty pages. Signed-off-by: Marc Zyngier <maz@kernel.org> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/3c433724e6f830a6b2edd5ec3d4a504794887263
2023-04-25Merge branch '2023-04-25-use-bounce-buffers-for-VIRTIO_F_IOMMU_PLATFORM'Tom Rini4-37/+125
To quote the author: These patches will use bounce buffers when VIRTIO_F_IOMMU_PLATFORM feature is in a virtio device. This feature can be tested with qemu with -device virtio-iommu-pci. So that when a -device virtio-blk-pci with iommu_platform=true, it will uses the bounce buffer instead.
2023-04-25virtio: Use bounce buffers when VIRTIO_F_IOMMU_PLATFORM is setWIP/2023-04-25-use-bounce-buffers-for-VIRTIO_F_IOMMU_PLATFORMWill Deacon1-1/+47
Devices advertising the VIRTIO_F_IOMMU_PLATFORM feature require platform-specific handling to configure their DMA transactions. When handling virtio descriptors for such a device, use bounce buffers to ensure that the underlying buffers are always aligned to and padded to PAGE_SIZE in preparation for platform specific handling at page granularity. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/1eff171e613ee67dca71dbe97be7282e2db17011 Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORMWill Deacon2-6/+24
In preparation for bouncing virtio data for devices advertising the VIRTIO_F_IOMMU_PLATFORM feature, allocate an array of bounce buffer structures in the vring, one per descriptor. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/3e052749e7c50c4c1a6014e645ae3b9be3710c07 Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25virtio: Add helper functions to attach/detach vring descriptorsWill Deacon1-0/+6
Move the attach and detach logic for manipulating vring descriptors out into their own functions so that we can later extend these to bounce the data for devices with VIRTIO_F_IOMMU_PLATFORM set. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/f73258a4bfe968c5f935db45f2ec5cc0104ee796 Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25virtio: Allocate virtqueue in page-size unitsWill Deacon2-11/+29
In preparation for explicit bouncing of virtqueue pages for devices advertising the VIRTIO_F_IOMMU_PLATFORM feature, introduce a couple of wrappers around virtqueue allocation and freeing operations, ensuring that buffers are handled in terms of page-size units. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/b4bb5227d4cf4fdfcd8b4e1ff2692d3a54d1482a Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25virtio: pci: Tear down VQs in virtio_pci_reset()Will Deacon1-19/+19
The pages backing the virtqueues for virtio PCI devices are not freed on reset, despite the virtqueue structure being freed as part of the driver '->priv_auto' destruction at ->remove() time. Call virtio_pci_del_vqs() from virtio_pci_reset() to free the virtqueue pages before freeing the virtqueue structure itself. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/5ed54ccd83cbffd0d8719ce650604b4e44b5b0d8 Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25virtio: Expose VIRTIO_F_IOMMU_PLATFORM in device featuresWill Deacon1-1/+1
If we detect the VIRTIO_F_IOMMU_PLATFORM transport feature for a device, then expose it in the device features. Signed-off-by: Will Deacon <willdeacon@google.com> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Link: https://android.googlesource.com/platform/external/u-boot/+/9693bd26bfcfe77d6a1295a561420e08c5daf019 Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-24Merge branch '2023-04-24-TI-platform-updates'Tom Rini189-2818/+2440
- Merge in assorted K3 updates, and re-sync all of the device trees for TI platforms with v6.3-rc6
2023-04-24arm: mach-k3: am642: move do_dt_magic() after sysfw loadingWIP/2023-04-24-TI-platform-updatesChristian Gmeiner1-2/+2
Makes it possible to use e.g mcu_spi0 for custom board detection. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-04-24include: configs: j721e_evm: Fix name_fdt for J7200Neha Malcom Francis1-0/+2
Currently, name_fdt is not set for J7200, fix this so right DTB is picked during boot. Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-04-24arm: mach-k3: common: re-locate authentication for atf/opteeManorit Chawdhry1-2/+33
For setting up the master firewalls present in the K3 SoCs, the arm64 clusters need to be powered on. Re-locates the code for atf/optee authentication. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24remoteproc: ti_k3_arm64: Change the startup of arm64 coreManorit Chawdhry1-20/+42
Configuring master firewalls require the power of the cluster to be enabled before configuring them, change the load of rproc to configure the gtc clocks and start the cluster along with configuring the boot vector. The start of rproc will only start the core. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am625-r5-sk: add a53 cluster powerManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am62a7-r5-sk: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am642-r5: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am642-r5-sk: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j7200-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721e-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721e-r5-sk: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721s2-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: mach-k3: Remove empty sys_proto.h includeAndrew Davis17-30/+0
This header file is now empty, remove it. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move J721s2 SPL init functions to mach-k3Andrew Davis3-66/+64
This matches AM64 and J721e and removes the need to forward declare k3_spl_init(), k3_mem_init(), and check_rom_loaded_sysfw() in sys_proto.h. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move sdelay() and wait_on_value() declarationAndrew Davis2-4/+4
These probably should be in some system wide header given their use. Until then move them out of K3 sys_proto.h so we can finish cleaning that header out. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>