Commit graph

25546 commits

Author SHA1 Message Date
Simon Glass
a8efebe719 acpi: Write pointers to tables instead of addresses
Sandbox uses an API to map between addresses and pointers. This allows
it to have (emulated) memory at zero and avoid arch-specific addressing
details. It also allows memory-mapped peripherals to work.

As an example, on many machines sandbox maps address 100 to pointer
value 10000000.

However this is not correct for ACPI, if sandbox starts another program
(e.g EFI app) and passes it the tables. That app has no knowledge of
sandbox's address mapping. So to make this work we want to store
10000000 as the value in the table.

Add two new 'nomap' functions which clearly make this exeption to how
sandbox works.

This should allow EFI apps to access ACPI tables with sandbox, e.g. for
testing purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-07 13:45:07 -07:00
Tom Rini
c2c598e87c Merge branch 'staging' of 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-06 09:57:56 -05:00
Tom Rini
0d53be75c7 Merge patch series "ATF and OP-TEE Firewalling for K3 devices."
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-04 16:53:49 -05:00
Manorit Chawdhry
8ae586e08c arm: dts: k3-j7200-binman: Add firewall configurations
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-04 16:48:00 -05:00
Manorit Chawdhry
b8dea0c85e arm: dts: k3-j721s2-binman: Add firewall configurations
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-04 16:48:00 -05:00
Manorit Chawdhry
c485567ee6 arm: dts: k3-j721e-binman: Add firewall configurations
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-04 16:48:00 -05:00
Manorit Chawdhry
89caf6d6c5 arm: dts: k3-binman: Add k3-security.h and include it in k3-binman.dtsi
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-04 16:48:00 -05:00
Svyatoslav Ryhel
5c39fbfa13 ARM: tegra114: support nonsecure state detection
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-03 20:20:12 +02:00
Svyatoslav Ryhel
e692aded5e ARM: tegra114: expand MC register map
This expansion is required for nonsecure detection to work correctly.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03 20:18:38 +02:00
Svyatoslav Ryhel
27e69fe99a ARM: tegra124: convert TEGRA_SUPPORT_NON_SECURE into Kconfig
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03 20:18:24 +02:00
Tom Rini
93a0138acb Prepare v2024.01-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmWVa0gACgkQFHw5/5Y0
 tyyxaAv/XwG8mzltTwMHc65IHmeupJLhBPBJgrZyZPlHRWNThSKBcbtTKnJIxN/j
 ZAakyMFykkZCs+xfpckjzyY9CA2B5pkZ1RMKj5AgiWOH3+vbCPN92/wzs+NVpN78
 ek1Ht2McIM51pdLYe50hYuqIU/Y8rWsptpK9/t2rdGSa79G70uo3DTGNYVyGcLNF
 b63B42FLnu11+MkyfN7z2Q3y0OlKpT/oZHb6R4rWNWNQqDbpficpEvoJdA1LzeAg
 GouCZ7Ib1qffoydbj1wruYT7Pkg9AsPs1tNa2eENJldfthlx9PFrW4be1t8bRput
 WnpbSbxRBw1sS8dukjCi0st+lhUNyuapT2J7hmtuXSMVprxK0UzQMbdGo9suxSlT
 DwTuTsNvwGzIk5E4SRZZI+xSUqpeCKnnVC7OLcqGKSAsoZIv5s5Fq/VgIIQ7gzNY
 LA+kdSjVeiKfsPzXCXCvILMqffwS8J9zIYdoxmq4o9XsmksabDCDUZpEy9IQ3gbB
 6MPxZgnj
 =Sqkn
 -----END PGP SIGNATURE-----

Merge tag 'v2024.01-rc6' into next

Prepare v2024.01-rc6
2024-01-03 09:22:47 -05:00
Nishanth Menon
e703bfcb38 arm: dts: k3-am62a*: Sync with kernel v6.7-rc1
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-03 08:52:19 -05:00
Nishanth Menon
244c9fd1a5 arm: mach-k3: am62a: Add main_timer0 id to the dev list
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-03 08:52:19 -05:00
Bryan Brattlof
37a1a4074b arm: dts: k3-am654: convert bootph-pre-ram to bootph-all
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-03 08:36:37 -05:00
Bryan Brattlof
4aea536754 arm: dts: k3-am654: remove duplicate mcu secure proxy node
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-03 08:36:37 -05:00
Bryan Brattlof
e055622bd7 arm: dts: k3-am654: move dummy_clock to root node
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-03 08:36:37 -05:00
Bryan Brattlof
5baad5521d arm: dts: k3-am654: remove un-needed aliases
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-03 08:36:37 -05:00
Bryan Brattlof
dabf30a2bf arm: dts: k3-am654: remove duplicate root properties
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-03 08:36:37 -05:00
Bryan Brattlof
d23582d052 arm: dts: k3-am654: remove duplicate vtt pinmux
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-03 08:36:37 -05:00
Bryan Brattlof
c7b075074f arm: dts: k3-am654: remove duplicate mdio
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-03 08:36:37 -05:00
Bryan Brattlof
9a6fab6d82 arm: dts: k3-am654: remove usb0
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-03 08:36:37 -05:00
Bryan Brattlof
755db5fc7c arm: dts: k3-am654: remove duplicate ospi0 node
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-03 08:36:37 -05:00
Bryan Brattlof
41ae2c6fb7 arm: dts: k3-am654: remove duplicate wkup_i2c0
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-03 08:36:37 -05:00
Bryan Brattlof
7f66ec50ad arm: dts: k3-am654: remove duplicate sdhci1 pinmux node
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-03 08:36:37 -05:00
Bryan Brattlof
52d87efd02 arm: dts: k3-am654: remove duplicate sdhci0 pinmux node
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-03 08:36:37 -05:00
Bryan Brattlof
3e00c8b82e arm: dts: k3-am654: remove duplicate main_uart0
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-03 08:36:37 -05:00
Bryan Brattlof
bdf8a2c040 arm: dts: k3-am654: remove duplicate mcu_uart0 node
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-03 08:36:37 -05:00
Bryan Brattlof
5e00547e58 arm: dts: k3-am654: add needed regs to udmap nodes
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>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
194641300c arm: dts: k3-am654: remove duplicate mcu_udmap
With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu_udmap 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-03 08:36:37 -05:00
Bryan Brattlof
afb7fb6ba7 arm: dts: k3-am654: remove duplicate mcu_ringacc
With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu_ringacc 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-03 08:36:37 -05:00
Bryan Brattlof
7cf2fa8096 arm: dts: k3-am654: remove duplicate timer
timer1 is really just the mcu_timer0 node redefined for the WKUP SPL.
Remove the timer1 and replace it with the mcu_timer0 from the Linux
device tree we imported into U-Boot.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
3bf9f9a35f arm: dts: k3-am654: remove duplicate wkup_uart0
With the Linux and U-Boot board files unified, we now have a duplicate
wkup_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-03 08:36:37 -05:00
Bryan Brattlof
a67443efc7 arm: dts: k3-am654: remove duplicate vtt_supply
With the Linux and U-Boot board dtb files unified we now have a
duplicate vtt_supply 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-03 08:36:37 -05:00
Bryan Brattlof
e72ece5894 arm: dts: k3-am654: include a53 board dtb for r5 build
To make things as organized as possible, start from the Linux board dtbs
and apply all properties needed for U-Boot in our *-u-boot.dtsi file for
the MAIN SPL and U-Boot builds.

We can then include these files for the WKUP SPL build making further
edits to the needed properties and nodes for the WKUP SPL bootloader's
view of the am65x.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
b65ea697d7 arm: dts: k3-am654: copy bootph properties to a53 dts
In order to unify the R5 board dtb file with the Linux board dtb file,
we will need to copy all bootph-pre-ram properties to the *-u-boot.dtsi
overlay.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
4dbdc84754 arm: dts: k3-am654: pull in dtb update from Linux
Pull in dtb updates for the am654 base board from v6.7-rc1 of 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-03 08:36:37 -05:00
Bryan Brattlof
b53f19061f arm: dts: k3-am654-r5: Merge board file and U-Boot overlay
The R5 board file for U-Boot should be the same as the board file copied
from Linux with a few alterations to work with the R5's view of the SoC.

First we need to unify the R5 board file and it's U-Boot overlay before
we can unify the Linux board file with this one.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Svyatoslav Ryhel
bb8a602ca9 tegra114: clock: define MIPI calibration peripheral clock
TEGRA114_CLK_MIPI_CAL is a fixed child of PLLP and is used
as clock source of the MIPI PHY calibration mechanism.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-02 19:21:24 +02:00
Simon Glass
1a2e02f955 bloblist: Adjust API to align in powers of 2
The updated bloblist structure stores the alignment as a power-of-two
value in its structures. Adjust the API to use this, to avoid needing to
calling ilog2().
Update the bloblist alignment from 16 bytes to 8 bytes.
Drop a stale comment while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Co-developed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-12-31 07:21:02 -07:00
Simon Glass
2c714d682d x86: coral: Align bootph SPI-flash subnodes with parent
The subnode has different tags from the parents, which is not correct.
Fix the subnode.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31 07:21:02 -07:00
Leo Yu-Chi Liang
61d5c543f3 andes: cpu: Enable cache and TLB ECC support
Andes CPU supports cache and TLB ECC.
Enable them by default.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
2023-12-27 17:29:07 +08:00
Leo Yu-Chi Liang
bf12bb99d8 andes: cpu: Enable memboost feature
Andes CPU has memboost feature including prefetch,
write-around and non-blocking load. Enable them by default.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
2023-12-27 17:29:07 +08:00
Leo Yu-Chi Liang
b0469041c0 andes: ae350: Implement cache switch via Kconfig
Kconfig provides SYS_[I|D]CACHE_OFF config options to switch off caches.
Provide the corresponding implementation to the options.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
2023-12-27 17:29:07 +08:00
Leo Yu-Chi Liang
c36eb2f917 andes: csr.h: Clean up CSR definition
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
2023-12-27 17:29:07 +08:00
Michal Simek
670db88c79 riscv: Extend board compatible string with "qemu,mbv"
Extend compatible string to match the latest change in dt binding.

Fixes: 7576ab2fac ("riscv: Add support for AMD/Xilinx MicroBlaze V")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-12-27 17:29:02 +08:00
Zong Li
40c76dfed2 riscv: cache: support cache enable in SPL stage
The power gating feature of pl2 should be enabled as early as possible,
it would be better to put it in SPL stage.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-12-27 17:28:57 +08:00
Tom Rini
7c4647b8fb Merge patch series "Complete decoupling of bootm logic from commands"
Simon Glass <sjg@chromium.org> says:

This series continues refactoring the bootm code to allow it to be used
with CONFIG_COMMAND disabled. The OS-handling code is refactored and
a new bootm_run() function is created to run through the bootm stages.
This completes the work.

A booti_go() function is created also, in case it proves useful, but at
last for now standard boot does not use this.

This is cmdd (part d of CMDLINE refactoring)
It depends on dm/bootstda-working
which depends on dm/cmdc-working
2023-12-21 16:10:00 -05:00
Simon Glass
e4cee649b9 stm32: Use bootm_run() and bootz_run()
Use the new bootm/z_run() functions to avoid having to create an
argument list for the stm32prog code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-12-21 16:07:52 -05:00
Simon Glass
6b50aff13f stm32: Use local vars in stm32prog for initrd and fdt
Rather than assigning to the bootm_argv[] array multiple times, use
local variables for the two things that can change and assign them at
the end.

This makes it easier to drop the array eventually.

Tidu up an overly short line while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-12-21 16:07:52 -05:00
Simon Glass
b5d397f489 bootm: Rename do_bootm_states() to bootm_run_states()
Rename the function to bootm_run_states() to better indicate ts
purpose. The 'do_' prefix is used to indicate a command processor,
which this is now not.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-12-21 16:07:52 -05:00