summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-07smbios: Drop support for SMBIOS2 tablesSimon Glass
These tables are a pain since there is no way to handle memory above 4GB. Use SMBIOS3 always. This should hopefully not create problems on x86 devices, since SMBIOS3 was released seven years ago (2015). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-01-07smbios: Require the caller to align the SMBIOS tableSimon Glass
All callers handle this alignment, so drop the unnecessary code. This simplifies things a little. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-07efi: Use the correct GUID for the SMBIOS tableSimon Glass
EFI does not use the 'anchor string' to determine the SMBIOS table version, instead preferring to have two separate GUIDs. Use the correct one, depending on the table version. Call unmap_system() to balance to the use of map_sysmem() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-07smbios: Correct gd_smbios_start()Simon Glass
This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-07smbios: Use SMBIOS 3.0 to support an address above 4GBSimon Glass
When the SMBIOS table is written to an address above 4GB a 32-bit table address is not large enough. Use an SMBIOS3 table in that case. Note that we cannot use efi_allocate_pages() since this function has nothing to do with EFI. There is no equivalent function to allocate memory below 4GB in U-Boot. One solution would be to create a separate malloc() pool, or just always put the malloc() pool below 4GB. - Use log_debug() for warning - Rebase on Heinrich's smbios.h patch - Set the checksum for SMBIOS3 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-07smbios: SMBIOS 3.0 (64-bit) Entry Point structureHeinrich Schuchardt
Add definition of the SMBIOS 3.0 (64-bit) Entry Point structure. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2024-01-07smbios: Move the rest of the SMBIOS2 codeSimon Glass
Move all of this logic into the else clause, since it will not be used for SMBIOS3 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-07smbios: Refactor 32-bit code into an else statementSimon Glass
In preparation for adding support for SMBIOS3 move this code into an else statement. There is no functional change. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-06Merge branch 'staging' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tegra into next Documentation updates for endeavoru, lg_x3, grouper and transformers, addition of MIPI calibration clock name for T114 (inline with T124+), conversion of TEGRA_SUPPORT_NON_SECURE into Kconfig and endeavoru stability improvements.
2024-01-06Merge branch '2024-01-05-fw_env-fixes' into nextTom Rini
- A few fw_env fixes
2024-01-05fw_env: autodetect NAND erase size and env sectorsAnthony Loiseau
As already done for NOR chips, if device ESIZE and ENVSECTORS static configurations are both zero, then autodetect them at runtime. Cc: Joe Hershberger <joe.hershberger@ni.com> cc: Stefan Agner <stefan@agner.ch> cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Anthony Loiseau <anthony.loiseau@allcircuits.com>
2024-01-05fw_env: keep calling read() until whole flash block is readRafał Miłecki
It's totally valid for read() to provide less bytes than requested maximum. It may happen if there is no more data available yet or source pushes data in small chunks. This actually happens when trying to read env data from NVMEM device. Kernel may provide NVMEM content in page size parts (like 4096 B). This fixes warnings like: Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 16384 bytes but got 4096 Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 12288 bytes but got 4096 Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 8192 bytes but got 4096 Since the main loop in flash_read_buf() is used to read blocks this patch adds a new nested one. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-05fw_env: rename variables holding env data contentRafał Miłecki
Rename "addr0" and "addr1" to "buf0" and "buf1" accordingly. Name "addr" suggests that variable contains a numeric value being some kind of address. Name "buf" is de facto a standard name for pointer to allocated memory for reading data to. While at it drop redundant checks for NULL before calling free(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-05fw_env: fix reading NVMEM device's "compatible" valueRafał Miłecki
Call to fread() was changed to check for return value. The problem is it can't be checked for returning 1 (as it is) to determine success. We call fread() with buffer size as "size" argument. Reading any "compatible" value shorter than buffer size will result in returning 0 even on success. Modify code to use fstat() to determine expected read length. This fixes regression that broke using fw_env with NVMEM devices. Fixes: c059a22b7776 ("tools: env: fw_env: Fix unused-result warning") Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-05board: htc: endeavoru: add an early SPL RCM hookSvyatoslav Ryhel
Unlike all other supported Tegra devices and most known Tegra devices, the HTC One X has no hardware way to enter APX/RCM mode, which may lead to a dangerous situation when, if BCT is set correctly and the bootloader is faulty, the device will hang in a permanent brick state. Exiting from this state can be done only by disassembling the device and shortening the testpad to the ground. To prevent this or to minimize the probability of such an accident, it was proposed to add the RCM rebooting hook as early into SPL as possible since SPL is much more robust and has minimal changes that can break bootflow. gpio_early_init_uart() function was chosen as it is the earliest function exposed for setup by the device. Hook performs a check for volume up button state and triggers RCM if it is pressed. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-04Merge patch series "ATF and OP-TEE Firewalling for K3 devices."Tom Rini
Manorit Chawdhry <m-chawdhry@ti.com> says: K3 devices have firewalls that are used to prevent illegal accesses to memory regions that are deemed secure. The series prevents the illegal accesses to ATF and OP-TEE regions that are present in different K3 devices. AM62X, AM62AX and AM64X are currently in hold due to some firewall configurations that our System Controller (TIFS) needs to handle. The devices that are not configured with the firewalling nodes will not be affected and can continue to work fine until the firewall nodes are added so will be a non-blocking merge. Test Logs: https://gist.github.com/manorit2001/4cead2fb3a19eb5d19005b3f54682627 CICD Run: https://github.com/u-boot/u-boot/pull/442
2024-01-04docs: board: ti: k3: Add secure booting documentationManorit Chawdhry
This commit adds a general flow to explain the usage of firewalls and the chain of trust in K3 devices. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04docs: board: ti: k3: Cleanup FIT signature documentationManorit Chawdhry
The previous documentation had been very crude so refactor it to make it cleaner and concise. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04arm: dts: k3-j7200-binman: Add firewall configurationsManorit Chawdhry
The following commits adds the configuration of firewalls required to protect ATF and OP-TEE memory region from non-secure reads and writes using master and slave firewalls present in our K3 SOCs. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-01-04arm: dts: k3-j721s2-binman: Add firewall configurationsManorit Chawdhry
The following commits adds the configuration of firewalls required to protect ATF and OP-TEE memory region from non-secure reads and writes using master and slave firewalls present in our K3 SOCs. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04arm: dts: k3-j721e-binman: Add firewall configurationsManorit Chawdhry
The following commits adds the configuration of firewalls required to protect ATF and OP-TEE memory region from non-secure reads and writes using master and slave firewalls present in our K3 SOCs. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04arm: dts: k3-binman: Add k3-security.h and include it in k3-binman.dtsiManorit Chawdhry
For readability during configuring firewalls, adding k3-security.h file and including it in k3-binman.dtsi to be accessible across K3 SoCs Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Andrew Davis <afd@ti.com>
2024-01-04binman: ftest: Add test for ti-secure firewall nodeManorit Chawdhry
Add test for TI firewalling node in ti-secure. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04binman: ti-secure: Add support for firewalling entitiesManorit Chawdhry
We can now firewall entities while loading them through our secure entity TIFS, the required information should be present in the certificate that is being parsed by TIFS. The following commit adds the support to enable the certificates to be generated if the firewall configurations are present in the binman dtsi nodes. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04dtoc: Change dst to self in debug messageManorit Chawdhry
Fix the error message to not use dst and use self as it is copying the properties to self. While using templating if there are no subnodes defined, we end up in this situation where "dst" isn't defined and it tries to print the error message and fails. 'UnboundLocalError: local variable 'dst' referenced before assignment' Fixes: 55e1278d5eca ("dtoc: Allow inserting a list of nodes into another") Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-03ARM: tegra114: support nonsecure state detectionSvyatoslav Ryhel
Principle is exactly the same as on T124, testing of register which behaves differently in secure and non-secure states. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03ARM: tegra114: expand MC register mapSvyatoslav Ryhel
This expansion is required for nonsecure detection to work correctly. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03ARM: tegra124: convert TEGRA_SUPPORT_NON_SECURE into KconfigSvyatoslav Ryhel
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-03Merge tag 'v2024.01-rc6' into nextTom Rini
Prepare v2024.01-rc6
2024-01-03Prepare v2024.01-rc6v2024.01-rc6Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-03configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-03arm: dts: k3-am62a*: Sync with kernel v6.7-rc1Nishanth Menon
Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly. Signed-off-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: mach-k3: am62a: Add main_timer0 id to the dev listNishanth Menon
main_timer0 is used by u-boot as the tick-timer. Add it to the soc devices list so it an be enabled via the k3 power controller. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-01-03Merge patch series "sync am65x device tree with Linux v6.7-rc1"Tom Rini
Bryan Brattlof <bb@ti.com> says: Hello Again Everyone! This series gets the am65x booting again along with syncing the device tree files with v6.7-rc1 Linux. The bulk of these patches unify the WKUP SPL board file with the arm64 files to make future syncs from Linux much easier. In the end the DTBs should look a lot like what the DTBs look like for the am64x which is fairly similar to the am65x. For those interested in what UART boot looks like: https://paste.sr.ht/~bryanb/7df8a645dc548912cd806abd5ecab967ef3287bc
2024-01-03arm: dts: k3-am654: convert bootph-pre-ram to bootph-allBryan Brattlof
Many nodes are reused between WKUP SPL, MAIN SPL, and U-Boot. Using bootph-pre-ram is causing these nodes to be present in SPL builds but pruned away during the U-Boot build. Convert these nodes to bootph-all so they will remain no matter which dtb build is happening. Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate mcu secure proxy nodeBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate mcu secure proxy node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: move dummy_clock to root nodeBryan Brattlof
The dummy_clock node is used to help the drivers probe the IO needed to setup consoles and boot media to load firmware into the SoC. This dummy_clock isn't a device that exists nor does it exist in the mcu domain. So move it from cbass_mcu to the root node to avoid any confusion. Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove un-needed aliasesBryan Brattlof
These aliases are not needed in U-Boot. Remove them Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate root propertiesBryan Brattlof
With the Linux and U-Boot board dtb files unified, we have duplicate properties in the root node. Remove them Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate vtt pinmuxBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate vtt_pinmux node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate mdioBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate mdio node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove usb0Bryan Brattlof
The pinmux for usb0 is missing from the Linux board dtb file. Remove it until we can introduce it in Linux Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate ospi0 nodeBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate ospi0 node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate wkup_i2c0Bryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate wkup_i2c0 node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate sdhci1 pinmux nodeBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate sdhci1 pinmux node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate sdhci0 pinmux nodeBryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate sdhci0 pinmux node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate main_uart0Bryan Brattlof
With the Linux and U-Boot board dtb files unified, we now have a duplicate main_uart0 node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: remove duplicate mcu_uart0 nodeBryan Brattlof
With the Linux and U-Boot board dtb files unified we now have a duplicate mcu_uart0 node. Remove it Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03arm: dts: k3-am654: add needed regs to udmap nodesBryan Brattlof
Ethernet is one of a few IPs in U-Boot that depend on DMA to operate. However there are a few missing registers ranges in the udmap nodes need to properly setup DMA for the am65x. A fix has been added to the Linux kernel[0] to add these ranges however they have not made it to a Linux tag. To keep DMA operational until the next DT sync from Linux, add these ranges to the *-u-boot.dtsi with a note for our future selves. [0] https://lore.kernel.org/r/20231213135138.929517-2-vigneshr@ti.com Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>