aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2020-08-22dm: fix ofnode_read_addr/size_cells()Heinrich Schuchardt1-4/+6
In the case of the live tree ofnode_read_addr_cells() and ofnode_read_size_cells() return the #address-cells and #size-cells defined in the parent node. With the patch the same is done for a non-live tree. The only consumer of these functions is currently the CFI flash driver. This patch fixes the incorrect parsing of the device tree leading to 'saveenv' failing on qemu_arm64_defconfig. For testing qemu-system-aarch64 has to be called with -drive if=pflash,format=raw,index=1,file=envstore.img to provide the flash memory. envstore.img must be 64 MiB large. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2020-08-20Merge tag 'xilinx-for-v2020.10-rc3' of ↵Tom Rini6-8/+52
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2020.10-rc3 - Fix fdtfile variable setup - Fix bootm_*/fdt_high/initrd_high variables handling - Fix Kconfig dependencies for Xilinx drivers - Fix booting u-boot from lowest memory - Fix firmware payload argument count for Versal - Fix dfu configurations - Fix mio_bank property handling - Fix and align code around ID detection - Start to use ENV_VARS_UBOOT_RUNTIME_CONFIG - Simplify logic around reading MAC from eeprom - Decrease malloc length for zynqmp mini qspi - Enable preboot for ZynqMP and Versal i2c: - Fix i2c eeprom partitions handling mmc: - Fix logic around HS mode enabling and use proper functions
2020-08-20clk: versal: Move pm_query_id out of clock driverMichal Simek1-0/+17
There is no reason to have firmware specific structure in clock driver. Move it to generic location and also initialize enum values which is based on https://lore.kernel.org/linux-arm-kernel/20200318125003.GA2727094@kroah.com/ recommended way to go to make sure that values guaranteed by compiler. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: common: Get rid of fdt_high variableMichal Simek3-3/+0
There is no need to setup this variable if bootm_low and bootm_size variable are properly setup. If fdt_high variable is missing U-Boot is asking LMB to return free memory which is not used. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: synchronize firmware call return payloadIbai Erkiaga1-0/+9
Removes duplicated definition of PAYLOAD_ARG_CNT and define it in the firmware driver. Additionally fixes payload buffer declarations without macro usage Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: Enable DFU tftp supportMichal Simek1-1/+3
Enable DFU tftp support for firmware update. Fill dfu_ram_tftp variable to have command present for showing how to use it. boot FIT image has been created from below fragment. Key part is that type of image has to be firmware. Also based on experiment load property is completely ignored and base addresses are taken from dfu_alt_info variable. $ cat update_uboot.its /dts-v1/; / { description = "Automatic U-Boot update"; #address-cells = <1>; images { Image { description = "Kernel"; data = /incbin/("/tftpboot/Image"); compression = "none"; arch = "arm64"; type = "firmware"; os = "linux"; load = <0x80000>; entry = <0x80000>; hash-1 { algo = "sha1"; }; }; system.dtb { description = "DTB"; data = /incbin/("/tftpboot/system.dtb"); compression = "none"; arch = "arm64"; type = "firmware"; load = <0>; hash-1 { algo = "sha1"; }; }; }; }; $ mkimage -f update_uboot.its /tftpboot/boot When U-Boot starts get IP address and server IP. dhcp setenv serverip 192.168.0.105 And then run prepared command. run dfu_ram_tftp Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: Align dfu ram with booti commandMichal Simek2-3/+5
Image should be loaded to 0x80000 address and not to $kernel_addr_r. Also kernel_addr, fdt_addr and fdt_size in zynqmp case are not defined that's why define it to be aligned with Versal. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20arm64: zynqmp: Reduce malloc memory for mini QSPI configurationAshok Reddy Soma1-1/+1
Mini U-boot runs on lower foot print of 256KB OCM. Hence 8K memory for malloc may not be required. Reduce it by 1.5K. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20lib: fdt: Introduce fdtdec_setup_mem_size_base_lowest()Michal Simek1-0/+17
New function should be called from board dram_init() because it initialized gd->ram_base/ram_size. It finds the lowest available memory. On systems with multiple memory nodes finding out the first memory node by fdtdec_setup_mem_size_base() is not enough because this memory can be above actual U-Boot VA mapping. Currently only mapping till 39bit is supported (Full 44bit mapping was removed by commit 7985cdf74b28 ("arm64: Remove non-full-va map code")). If DT starts with the first memory node above 39bit address then system can be unpredictable. The function is available only when multiple memory bank support is enabled. Calling fdtdec_setup_memory_banksize() from dram_init() is not possible because fdtdec_setup_memory_banksize() is saving dram information to bd structure which is placed on stack but not initialized at this time. Also stack is placed at location setup in dram_init(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-08-19arm: dts: mt7622: add SATA reset constantsFrank Wunderlich1-1/+4
add reset constants used for SATA to header file Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2020-08-18ARM: uniphier: rename include guard of include/configs/uniphier.hMasahiro Yamada1-3/+3
Make the include guard match to the file name. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-08-15Merge tag 'efi-2020-10-rc3-2' of ↵Tom Rini2-7/+19
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc3 (2) This series includes bug fixes for: * UEFI secure boot - images with multiple signatures * UEFI secure boot - support for intermediate certificates * corrections for UEFI unit tests * missing loadaddr on MAIX board
2020-08-14board: xen: De-initialize before jumping to LinuxOleksandr Andrushchenko1-0/+8
Free resources used by Xen board before jumping to Linux kernel. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-08-14xen: pvblock: Add initial support for para-virtualized block driverAnastasiia Lukianenko4-0/+27
Add initial infrastructure for Xen para-virtualized block device. This includes compile-time configuration and the skeleton for the future driver implementation. Add new class UCLASS_PVBLOCK which is going to be a parent for virtual block devices. Add new interface type IF_TYPE_PVBLOCK. Implement basic driver setup by reading XenStore configuration. Signed-off-by: Andrii Anisov <andrii_anisov@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
2020-08-14xen: Port Xen grant table driver from mini-osOleksandr Andrushchenko2-1/+26
Make required updates to run on u-boot. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
2020-08-14xen: Port Xen bus driver from mini-osOleksandr Andrushchenko2-1/+117
Make required updates to run on u-boot and strip test code. Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
2020-08-14lib: sscanf: add sscanf implementationAndrii Anisov1-0/+8
Port sscanf implementation from mini-os and introduce new Kconfig option to enable it: CONFIG_SSCANF. Disable by default. Signed-off-by: Andrii Anisov <andrii_anisov@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
2020-08-14linux/compat.h: Add wait_event_timeout macroOleksandr Andrushchenko1-0/+54
Add wait_event_timeout - sleep until a condition gets true or a timeout elapses. This is a stripped version of the same from Linux kernel with the following u-boot specific modifications: - no wait queues supported - use u-boot timer to detect timeouts - check for Ctrl-C pressed during wait Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> [trini: Drop atomic_read from gadget/ether.c as this has existed for a while and now causes problems] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-14xen: Port Xen event channel driver from mini-osOleksandr Andrushchenko2-1/+43
Make required updates to run on u-boot. Strip functionality not needed by U-boot. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
2020-08-14xen: Port Xen hypervisor related code from mini-osOleksandr Andrushchenko2-0/+42
Port hypervisor related code from Mini-OS. This is referencing the code of Mini-OS from [1] by Huang Shijie and Volodymyr Babchuk which is for ARM64. Update essential arch code to support required bit operations, memory barriers etc. Copyright for the bits ported belong to at least the following authors, please see related files for details: Copyright (c) 2002-2003, K A Fraser Copyright (c) 2005, Grzegorz Milos, gm281@cam.ac.uk,Intel Research Cambridge Copyright (c) 2014, Karim Allah Ahmed <karim.allah.ahmed@gmail.com> [1] - https://github.com/zyzii/mini-os.git Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> [trini: Drop wmb() from musb-net/linux-compat.h now] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-14board: Introduce xenguest_arm64 boardAndrii Anisov1-0/+44
Introduce a minimal Xen guest board running as a virtual machine under Xen Project's hypervisor [1], [2]. Part of the code is ported from Xen mini-os and also uses work initially done by different authors from NXP: please see relevant files for their copyrights. [1] https://xenbits.xen.org [2] https://wiki.xenproject.org/ Signed-off-by: Andrii Anisov <andrii_anisov@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
2020-08-14riscv: load addresses for Sipeed MAIXHeinrich Schuchardt1-0/+9
Define default load addresses and the device tree name for the Sipeed MAIX. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-14xen: Add essential and required interface headersOleksandr Andrushchenko14-0/+3242
Add essential and required Xen interface headers only taken from the stable Linux kernel stable/linux-5.7.y at commit 66dfe4522160 Linux 5.7.5. These are better suited for U-boot than the original headers from Xen as they are the stripped versions of the same. At the same time use public protocols from Xen RELEASE-4.13.1, at commit 6278553325a9 update Xen version to 4.13.1 as those have more comments in them. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2020-08-14configs: evb-ast2500: Move BOOTCOMMAND from header to defconfigChia-Wei, Wang1-2/+0
Move the BOOTCOMMAND definition from the board inclusion header to the default configuration file. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14include/configs: aspeed: Remove hardcoded variablesChia-Wei, Wang1-7/+9
The hardcoded platform variables such as DRAM base address are not common to Aspeed SoCs AST24xx/AST25xx/AST26xx. This patch replaces those hardcoded with macros defined in a newly added header, where the basic SoC HW information are assigned accordingly. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14drivers: pci: add api to get dma regionsRayagonda Kokatanur1-1/+2
Add api to get dma regions. Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
2020-08-14efi_loader: signature: correct a behavior against multiple signaturesAKASHI Takahiro1-3/+6
Under the current implementation, all the signatures, if any, in a signed image must be verified before loading it. Meanwhile, UEFI specification v2.8b section 32.5.3.3 says, Multiple signatures are allowed to exist in the binary’s certificate table (as per PE/COFF Section “Attribute Certificate Table”). Only one hash or signature is required to be present in db in order to pass validation, so long as neither the SHA-256 hash of the binary nor any present signature is reflected in dbx. This patch makes the semantics of signature verification compliant with the specification mentioned above. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-13efi_loader: signature: rework for intermediate certificates supportAKASHI Takahiro1-4/+4
In this commit, efi_signature_verify(with_sigdb) will be re-implemented using pcks7_verify_one() in order to support certificates chain, where the signer's certificate will be signed by an intermediate CA (certificate authority) and the latter's certificate will also be signed by another CA and so on. What we need to do here is to search for certificates in a signature, build up a chain of certificates and verify one by one. pkcs7_verify_one() handles most of these steps except the last one. pkcs7_verify_one() returns, if succeeded, the last certificate to verify, which can be either a self-signed one or one that should be signed by one of certificates in "db". Re-worked efi_signature_verify() will take care of this step. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-08-11Merge tag 'ti-v2020.10-rc3' of ↵Tom Rini3-3/+21
https://gitlab.denx.de/u-boot/custodians/u-boot-ti - Added support for J7200 evm - DM_ETH and DM_USB migrations for omap3 - USB DFU and mass storage support for AM65x evm - RTI watchdog support for K3 devices - Fix an issue with L3 cache on K3 devices
2020-08-11board: ti: j7200: Introduce support for j7200 build targetsLokesh Vutla1-2/+2
j7200-evm has minor differences with j721e-evm based on the IPs available in the SoC. Introduce separate build targets for j7200-evm to incorporate the differences. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Suman Anna <s-anna@ti.com>
2020-08-11configs: am65x_evm_a53: Enable USB Mass storage and DFU boot modesFaiz Abbas1-0/+2
Enable configs to facilitate booting from USB Mass Storage devices as well as USB peripheral boot Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11configs: am65x_evm: Add support for DFU related configsFaiz Abbas1-1/+3
Add offset and environment related configs used for booting from DFU. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11spl: usb: Create an API spl_usb_load()Faiz Abbas1-0/+14
Create a new API spl_usb_load() that takes the filename as a parameter instead of taking the default U-boot PAYLOAD_NAME Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11Merge tag 'efi-2020-10-rc3' of ↵Tom Rini1-1/+4
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc3 Bugs in the UEFI sub-system are fixed: * use the optional data of the BootXXXX variables as load options * simplify function public_key_verify_signature() * amend a copyright notice
2020-08-08efi_loader: set load options in boot managerHeinrich Schuchardt1-1/+1
Up to now we used the value of the bootargs environment variable as load options in the boot manager. This is not correct. The data has to be taken from the Boot#### variable. Let the boot manager copy the optional data of the EFI_LOAD_OPTION as load options to the loaded image protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-08efi_loader: factor out efi_set_load_options()Heinrich Schuchardt1-0/+3
The bootefi bootmgr command has to set the load options for a loaded image from the value of BootXXXX variable. If the boot manager is not used, the value is set from the environment variable bootargs (or efi_selftest). Factor out a common function efi_set_load_options(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-08Convert CONFIG_SYS_MMC_ENV_DEV et al to KconfigTom Rini206-575/+1
This converts the following to Kconfig: CONFIG_SYS_MMC_ENV_DEV CONFIG_SYS_MMC_ENV_PART Note that with this conversion we now have consistent behavior with respect to ensuring that we have always selected the correct MMC device and hardware partition. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-07include/u-boot, lib/zlib: add sources for zlib decompressionJoao Marcos Costa1-0/+32
Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07fs/squashfs: new filesystemJoao Marcos Costa2-0/+26
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07cmd: Update the memory-search commandSimon Glass1-0/+1
Add various fixes and improvements to this command that were missed in the original version. Unfortunately I forgot to send v2. - Fix Kconfig name - Use a separate variable for the remaining search length - Correct a minor bug - Move into a separate test suite - Add -q flag to the 'quiet' test to test operation when console is enabled - Enable the feature for sandbox Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07test: Add a flag for tests that need console recordingSimon Glass1-0/+1
Allow tests that need console recording to be marked, so they can be skipped if it is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07dm: Rename DM test flags to make them more genericSimon Glass2-9/+10
The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07console: Always define the console-recording functionsSimon Glass1-1/+39
On boards without console recording these function are currently missing. It is more convenient for them to be present but to return dummy values. That way if we know that a test needs recording, we can check if it is available, and skip the test if not, while avoiding #ifdefs. Update the header file according and adjust console_record_reset_enable() to return an error if recording is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07test: Add a way to check part of a console line or skip itSimon Glass1-0/+59
Some lines of the output are not worth testing, or not worth testing in their entirety. For example, when checking a hex dump we know that the hex-dump routine can display ASCII so we only need to check the hex bytes, not the ASCII dump. Add a new test macros which can check only part of a console line. Sometimes it is useful to skip a line altogether, so add a macro for that also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-06drivers: serial: Make serial_initialize return intOvidiu Panait1-1/+1
serial_initialize is called only during the common init sequence, after relocation (in common/board_r.c). Because it has a void return value, it has to wrapped in initr_serial. In order to be able to get rid of this indirection, make serial_initialize return int. Remove extern from prototype in order to silence the following checkpatch warning: check: extern prototypes should be avoided in .h files Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-08-06board_f: Introduce arch_setup_bdinfo initcallOvidiu Panait1-0/+12
Certain architectures (ppc, mips, sh, m68k) use setup board_part1 and setup_board_part2 calls during pre-relocation init to populate gd->bd boardinfo fields. This makes the generic init sequence cluttered with arch-specific ifdefs. In order to clean these arch-specific sequences from generic init, introduce arch_setup_bdinfo weak initcall so that everyone can define their own bdinfo setup routines. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-08-06board_f: Introduce setup_bdinfo initcallOvidiu Panait1-0/+10
Introduce setup_bdinfo initcall as a generic routine to populate bdinfo fields. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-08-06Kconfig: Remove CONFIG_SYS_SRAM_STARTOvidiu Panait2-6/+0
Remove ad-hoc CONFIG_SYS_SRAM_START and use CONFIG_SYS_SRAM_BASE instead. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-08-06Kconfig: Convert CONFIG_SYS_SRAM_SIZE to KconfigOvidiu Panait3-4/+0
This converts ad-hoc CONFIG_SYS_SRAM_SIZE to Kconfig. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-08-06Kconfig: Convert CONFIG_SYS_SRAM_BASE to KconfigOvidiu Panait1-1/+0
This converts ad-hoc CONFIG_SYS_SRAM_BASE to Kconfig. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>