aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2021-10-26Merge tag 'efi-2022-01-rc1-2' of ↵WIP/26Oct2021Tom Rini6-11/+69
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-01-rc1-2 doc: Remove obsolete PPC4XX references UEFI: Implement missing TCG2 measurements Code clean up # gpg: Signature made Tue 26 Oct 2021 05:56:47 PM EDT # gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4 # gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown] # gpg: aka "[jpeg image of size 1389]" [unknown] # Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
2021-10-26efi_loader: add UEFI GPT measurementMasahisa Kojima3-1/+17
This commit adds the UEFI GPT disk partition topology measurement required in TCG PC Client Platform Firmware Profile Specification Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2021-10-26firmware: scmi: fix struct layout for scmi_clk_rate_set_inClément Léger1-2/+2
First two fields are reversed compared to what is expected by the SCMI specification. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Fixes: 60388844836 ("clk: add clock driver for SCMI agents")
2021-10-26efi_loader: add SMBIOS table measurementMasahisa Kojima3-2/+32
TCG PC Client Platform Firmware Profile Specification requires to measure the SMBIOS table that contains static configuration information (e.g. Platform Manufacturer Enterprise Number assigned by IANA, platform model number, Vendor and Device IDs for each SMBIOS table). The device- and environment-dependent information such as serial number is cleared to zero or space character for the measurement. Existing smbios_string() function returns pointer to the string with const qualifier, but exisintg use case is updating version string and const qualifier must be removed. This commit removes const qualifier from smbios_string() return value and reuses to clear the strings for the measurement. This commit also fixes the following compiler warning: lib/smbios-parser.c:59:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] const struct smbios_header *header = (struct smbios_header *)entry->struct_table_address; Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2021-10-25arm: spl: prepare for jumping to OPTEERicardo Salveti1-1/+10
Make sure to (if applicable) flush the D-cache, invalidate I-cache, and disable MMU and caches before jumping to OPTEE. This fixes the SDP->SPL->OPTEE boot flow on iMX6Q and most likely on some other ARM SoCs. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2021-10-25efi_loader: function to get GUID for variable nameHeinrich Schuchardt1-0/+8
In multiple places we need the default GUID matching a variable name. The patch provides a library function. For secure boot related variables like 'PK', 'KEK', 'db' a lookup table is used. For all other variable names EFI_GLOBAL_VARIABLE is returned. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-25efi_loader: treat UEFI variable name as constHeinrich Schuchardt2-7/+11
UEFI variable names are typically constants and hence should be defined as const. Unfortunately some of our API functions do not define the parameters for UEFI variable names as const. This requires unnecessary conversions. Adjust parameters of several internal functions to tre UEFI variable names as const. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-25efi_loader: add missing const qualifierMasahisa Kojima1-1/+1
This commit fixes the following compilation warning of boottime->install_configuration_table() function. lib/efi_selftest/efi_selftest_tcg2.c:475:46: warning: passing argument 1 of ‘boottime->install_configuration_table’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ret = boottime->install_configuration_table(&smbios_guid, dmi); Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-25Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiWIP/25Oct2021Tom Rini7-12/+13
- Add and enable watchdog driver - Prepare for SYSRESET driven AXP poweroff - Prepare for SoCs without MMC2 - Some fixes for extending SPL (SPL-DM for RISC-V) - Some preparations for proper VBUS management - Fix secure monitor move
2021-10-25Merge tag 'u-boot-imx-20211022' of ↵Tom Rini5-38/+52
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20211022 ------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9561 - i.MX8: - Toradex Verdin (switch to binman, cleanup, etc.) - Phytec phycore_imx8mm (fixes, boot from SPI-NOR) - fixes for imx8mp_evk - doc (i.MX): MX8MM with Fast boot - i.MX6: - Toradex : colibri-imx6ull with eMMC, fixes - i.MX7ULP : - preparation for OPTEE + Serial Number - generic: - imx8m_image: Support ddr3 firmware
2021-10-25include: axp_pmic: Include headers for all variantsSamuel Holland6-12/+10
A single DM-based driver should be able to support some feature for several PMIC variants where the interface is the same. For example, all PMIC variants use the same register bit to trigger poweroff. However, currently only definitions for a single PMIC are available at a time. This requires drivers to use #ifdefs and different indentifiers for each variant they support. Let's simplify this by making register definitions for all variants available from the header. Then no preprocessor conditions are needed; the driver can use the register definition from any variant that supports the relevant feature. An exception is the GPIO-related definitions, which do not use unique identifiers. So for now, keep them like before. They will be cleaned up along with the GPIO driver. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-10-25include: axp_pmic: Add missing header guard definitionSamuel Holland1-0/+1
This header attempted to avoid multiple inclusion using a header guard. But the preprocessor symbol was never defined, so the guard had no effect. Fix this by defining the symbol. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-10-25sunxi: A23/A33/H3: Actually move the secure monitorSamuel Holland1-0/+2
commit 1ebfc0c631e3 ("sunxi: A23/A33/H3: Move sun8i secure monitor to SRAM A2") attempted to move the secure monitor to SRAM A2. But not all sun8i SoCs have SRAM A2, so a check was put in for SUNXI_SRAM_A2_SIZE to avoid breaking the other SoCs. However, because the header providing SUNXI_SRAM_A2_SIZE was not included, this unintentionally skipped the new definitions on all SoCs. Fix this by including the right header. Fixes: 1ebfc0c631e3 ("sunxi: A23/A33/H3: Move sun8i secure monitor to SRAM A2") Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-10-23Merge https://source.denx.de/u-boot/custodians/u-boot-spiWIP/23Oct2021Tom Rini3-12/+9
- Fix mtd erase with mtdpart (Marek Behún) - NXP fspi driver fixes (Kuldeep Singh)
2021-10-23mtd: Remove mtd_erase_callback() entirelyMarek Behún2-12/+0
The original purpose of mtd_erase_callback() in Linux at the time it was imported to U-Boot, was to inform the caller that erasing is done (since it was an asynchronous operation). All supplied callback methods in U-Boot do nothing, but the mtd_erase_callback() function was (until previous patch) grossly abused in U-Boot's mtdpart implementation for completely different purpose. Since we got rid of the abusement, remove the mtd_erase_callback() function and the .callback member from struct erase_info entirely, in order to avoid such problems in the future. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-23mtd: spi-flash: Check for zero length in legacy spi_flash_*()Marek Behún1-0/+9
Check for zero length in the legacy spi_flash_read() / spi_flash_write() / spi_flash_erase() functions. On zero length, return 0 immediately, don't call the underlying method. Rationale: - these legacy functions call the _read(), _write() and _erase() methods of struct mtd - the DM callers of these methods already check for zero length - making all callers of these methods check for zero length makes it possible to remove the check from implementations of these _read(), _write() and _erase() methods Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-22Merge tag 'efi-2022-01-rc1' of ↵Tom Rini3-20/+38
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-01-rc1 Documentation: Use Sphinx 3.43. Move system reset documentation to HTML UEFI: Fix linking EFI apps with LLVM Fix alignment of loaded image Correct simple network protocol test Code cleanup
2021-10-21env: Make return value of env_get_f() behave like sprintf() on successMarek Behún1-4/+2
Currently the env_get_f() function's return value behaves weirdly: it returns the number of bytes written into `buf`, but whether this is excluding the terminating NULL-byte or including it depends on whether there was enough space in `buf`. Change the function to always return the actual length of the value of the environment variable (excluding the terminating NULL-byte) on success. This makes it behave like sprintf(). All users of this function in U-Boot are compatible with this change. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Inline env_get_char() into its only userMarek Behún1-10/+0
This function is a relic from the past when environment was read from underlying device one character at a time. It is used only in the case when getting an environemnt variable prior relocation, and the function is simple enough to be inlined there. Since env_get_char() is being changed to simple access to an array, we can drop the failing cases and simplify the code (this could have been done before, since env_get_char() did not fail even before). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Change env_match() to static and remove from headerMarek Behún1-11/+0
This function was used by other parts of U-Boot in the past when environment was read from underlying device one character at a time. This is not the case anymore. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Fix documentation for env_get_f()Marek Behún1-1/+4
This function actually returns: - the number of bytes written into @buf excluding the terminating NULL-byte, if there was enough space in @buf - the number of bytes written into @buf including the terminating NULL-byte, if there wasn't enough space in @buf - -1 if the variable is not found Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21dm: Fix util.h's broken include guardPierre-Clément Tosi1-2/+2
Fix up the header's include guard to contain the definition of dm_priv_to_rw(), which was erroneously added outside of it, by moving its #endif to the end of the file (i.e. where it belongs). This removes the risk of compilation errors resulting from the redefinition of that function where the header might have been (indirectly) included more than once. Fixes: cfb9c9b77c2 ("dm: core: Use separate priv/plat data region") Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> Cc: Simon Glass <sjg@chromium.org>
2021-10-21imx8mp_evk: Delete noncached memory configYe Li1-3/+0
DWC EQOS driver has removed to use noncached memory, so delete the configuration from iMX8MP EVK head file. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21Merge branch 'master' of git://git.denx.de/u-bootStefano Babic79-254/+527
Signed-off-by: Stefano Babic <sbabic@denx.de>
2021-10-21Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini9-86/+22
- Turris MOX and Omnia changes, mostly moving to Kconfig (Marek) - a37xx: pci: Misc smaller fixes (Pali) - cmd: tlv_eeprom: Fix building with DEBUG enabled (Sven) - termios_linux.h: Fix tcsendbreak() implementation (Pali) - mvebu: Add missing "if SPL" (Tom)
2021-10-21arm: mvebu: turris_omnia: Move CONFIG_SPL_DRIVERS_MISC to KconfigMarek Behún1-1/+0
Instead of declaring CONFIG_SPL_DRIVERS_MISC in board config header, select it in Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_omnia: Move SPL's SYS_MALLOC_SIMPLE to KconfigMarek Behún1-4/+0
Instead of declaring CONFIG_SYS_MALLOC_SIMPLE dependant on CONFIG_SPL_BUILD in board config header, select CONFIG_SPL_SYS_MALLOC_SIMPLE in Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Cosmetic update for board config headerMarek Behún1-39/+22
Reorder the definitions in Turris MOX' board config header, drop the comment relics from when this file was copied, fix indentation. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: kirkwood, mvebu: Remove CONFIG_SYS_RESET_ADDRESS optionMarek Behún8-25/+0
This option is not used anywhere. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: a3720: Create Kconfig option for I2C_MVMarek Behún2-10/+0
Move the config option CONFIG_I2C_MV to a Kconfig option CONFIG_SYS_I2C_MV and move the default definition from config header files into defconfigs. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Move options to defconfigMarek Behún1-7/+0
Move config options CONFIG_LAST_STAGE_INIT and CONFIG_DISPLAY_BOARDINFO_LATE to turris_mox_defconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21efi_loader: avoid multiple local copies of lf2_initrd_guidHeinrich Schuchardt1-0/+1
Create the GUID as a global variable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: efi_dp_from_lo() unused parameter sizeHeinrich Schuchardt1-1/+0
Parameter size is never used in function efi_dp_from_lo(). Remove it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: efi_dp_from_lo() don't copy GUIDHeinrich Schuchardt1-1/+2
Instead of copying a GUID and then using a pointer to the copy for calling guidcmp(), just pass the pointer to the orginal GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: Fix loaded image alignmentIlias Apalodimas1-0/+2
We are ignoring the alignment communicated via the PE/COFF header. Starting 5.10 the Linux kernel will loudly complain about it. For more details look at [1] (in linux kernel). So add a function that can allocate aligned EFI memory and use it for our relocated loaded image. [1] c32ac11da3f83 ("efi/libstub: arm64: Double check image alignment at entry") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Vincent Stehlé <vincent.stehle@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21doc: add system reset to API documentationHeinrich Schuchardt1-19/+34
Complete the Sphinx documentation in include/sysreset.h Add the include to the generated HTML documentation of the U-Boot API. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-20Merge tag 'u-boot-imx-20211020' of ↵WIP/20Oct2021Tom Rini12-19/+201
https://source.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20211020 ------------------- First PR from u-boot-imx for 2022.01 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535 - new board: kontron-sl-mx8mm - imx8m: - fix secure boot - imx ESDHC: fixes - i.MX53: Support thum2, bmode and fixes for Menlo board usbarmory switch to Ethernet driver model - imx6 : - DDR calibration for Toradex boards - imx7: - Fixes - Updated gateworks boards (ventana / venice) # gpg verification failed.
2021-10-20colibri-imx6ull: add emmc variantMax Krummenacher1-11/+40
Add code to build the eMMC variant of the Colibri iMX6ULL, i.e. the 'Colibri iMX6ULL 1GB' which has a eMMC instead of the raw NAND used on other SKUs. Related-to: ELB-4056, ELB-4057 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-10-20colibri-imx6ull: imximage.cfg: integrate new 1GiB RAM variantPhilippe Schenker1-1/+1
Integrate new Toradex SKU 0062 Colibri iMX6ULL 1GB IT. This commit basically adjusts three parameters of the RAM settings: Increase density from 4Gb to 8Gb Increase ROW address from 15 to 16 Increase tRFC (refresh command time) from 260 to 350 This timing is valid for all Toradex Colibri iMX6ULL SKUs Related-to: ELB-4055, ELB-4057 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-10-20include: configs: phycore-imx8mm: Do not use macro for addressTeresa Remmet1-1/+1
Do not use size macros for addesses. So convert PHYS_SDRAM to address. No functional change. Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2021-10-20include: configs: phycore-imx8mm: Remove not needed definesTeresa Remmet1-10/+1
Remove obsolet defines in phycore_imx8mm.h. Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2021-10-20include: configs: phycore_imx8mm: Remove hard coded network settingsTeresa Remmet1-4/+1
Remove ip address and server ip from board config as they should not be added hardcoded. Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2021-10-20include/configs: apalis-imx8/verdin-imx8mm: rename kernel image variableOleksandr Suvorov2-8/+8
Variable "kernel_image" is used in boot.scr script only, that sets its own default value to the constant string @@KERNEL_IMAGETYPE@@ in case "kernel_image" is not set. The default name of the kernel image shipped with BSP 5.x is "Image.gz". Setting kernel_image="Image" as a pre-defined u-boot variable breaks booting systems with modern versions of boot.scr, whereas renaming it fixes booting with modern scripts and does not break working of earlier versions of boot.scr. While at it also update the copyright period, rather than hard-coding fdtfile default fdt_board to dev for the Verdin iMX8M Mini and fix its closing #endif comment. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-10-20kontron-sl-mx8mm: fix missing configs and deadlock in CIStefano Babic1-3/+0
Even if board can be successfuly built, CI goes in deadlock (see thread on https://www.mail-archive.com/u-boot@lists.denx.de/msg419663.html). This is caused by SYS_CONFIG set in header file and because defconfig for the board is out of sync with Kconfig. As result, buildman goes on to read from stdin until an OOM is reached. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-10-20dm: Provide dev_read_addr_index_ptr() wrapperBin Meng1-0/+18
Like dev_read_addr_ptr(), provide a wrapper for the indexed version. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-20dm: core: Add a new API devfdt_get_addr_index_ptr()Bin Meng1-0/+12
At present there is only devfdt_get_addr_ptr() which only returns the first <addr, size> pair in the 'reg' property. Add a new API devfdt_get_addr_index_ptr() to return the indexed pointer. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-19arm: total_compute: increase DRAM to 8GBUsama Arif1-0/+3
The extra 6GB start at 0x8080000000. Signed-off-by: Usama Arif <usama.arif@arm.com>
2021-10-19ARM: imx: mx5: Add altbootcmd and resets to M53MenloMarek Vasut1-4/+11
Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts altbootcmd instead of the default bootcmd boot command. The altbootcmd swaps the default boot partition for the other boot partition, which is an identical copy or an older copy, and tries booting from that one instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2021-10-19board: ea: mx7ulp_com: move setting CONFIG_BOOTCOMMAND to defconfigRicardo Salveti1-5/+0
Move setting CONFIG_BOOTCOMMAND to the mx7ulp_com_defconfig file. It also allows replacing the default CONFIG_BOOTCOMMAND without code modification. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-10-18treewide: Remove OF_PRIOR_STAGEWIP/bisect-testingIlias Apalodimas1-4/+0
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>