device are bound as child devices of the MCU device.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
configs/turris_omnia_defconfig| 1 +
drivers/gpio/Kconfig | 7 -
drivers/gpio/Makefile | 1 -
drivers/misc/Kconfig
Enable support for the poweroff command via sysreset for Turris Omnia.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
configs/turris_omnia_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig
index 9d5171c6a8
In the rng command, print
Abort
instead of
Reading RNG failed
if the error number is -EINTR, which can happen if the user pressed
CTRL-C.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
cmd/rng.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cmd/rng.c
Add support for true random number generator provided by the MCU on
Turris Omnia. The MCU firmware supports TRNG if the FEAT_TRNG bit is set
in features. In that case we bind the rng driver.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
configs/turris_omnia_defconfig | 1
Now that Turris Omnia has a rng driver provided in the MCU driver,
enable the rng command in defconfig.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
configs/turris_omnia_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/turris_omnia_defconfig b/configs
explained in patch 6
- patch 9 glues the old DDR3 training code to current U-Boot
- patch 10 allows for dynamic selection of old DDR3 training code on
Turris Omnia, via an U-Boot environment variable
Marek
Marek Behún (10):
ddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if
we
The variables is_default_centralization, is_tune_result and
is_bist_reset_bit are never used.
Signed-off-by: Marek Behún
---
drivers/ddr/marvell/a38x/ddr3_debug.c | 3 ---
drivers/ddr/marvell/a38x/ddr3_init.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/drivers/ddr/marvell/a38x
Return from ddr3_tip_print_log() early if we won't print anything
anyway.
This way the compiler can optimize away the VALIDATE_IF_ACTIVE() calls
in the for-loop, so if the SILENT_LIB macro is defined, no code is
generated for the rest of the function, which saves some space.
Signed-off-by:
The variables is_validate_window_per_if, is_validate_window_per_pup,
sweep_cnt and is_run_leveling_sweep_tests are only used if
DDR_VIEWER_TOOL macro is defined, so define them only in that case.
Make them static since they are only used in ddr3_debug.c.
Signed-off-by: Marek Behún
---
drivers
Allow compiling with immutable debug settings:
- DEBUG_LEVEL is always set to DEBUG_LEVEL_ERROR
- register dumps are disabled
This can save around 10 KiB of space in the resulting binary, which is a
lot in U-Boot SPL.
Signed-off-by: Marek Behún
---
arch/arm/mach-mvebu/Kconfig | 10
Save 10 KiB in Turris Omnia's SPL binary by enabling immutable debug
settings for DDR3 training code.
Signed-off-by: Marek Behún
---
configs/turris_omnia_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig
Fix some compilation warning in the old DDR training code.
Signed-off-by: Marek Behún
---
drivers/ddr/marvell/a38x/old/ddr3_a38x.c | 1 +
drivers/ddr/marvell/a38x/old/ddr3_init.h | 2 ++
drivers/ddr/marvell/a38x/old/ddr3_training.c | 1 +
drivers/ddr
Backport the option to compile with immutable debug settings also to
the old implementation of the DDR3 training code.
The original PR for mv-ddr-marvell can be seen at
https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/45/
Signed-off-by: Marek Behún
---
drivers/ddr/marvell
to support this need to select the
ARMADA_38X_SUPPORT_OLD_DDR3_TRAINING
config option and implement the old version of DDR topology provider,
ddr3_get_topology_map().
Signed-off-by: Marek Behún
---
arch/arm/mach-mvebu/Kconfig | 4 +
arch/arm/mach-mvebu/include/mach/cpu.h
the
environment variable
env set omnia_ddr3_training old
env save
Signed-off-by: Marek Behún
---
arch/arm/mach-mvebu/Kconfig | 1 +
board/CZ.NIC/turris_omnia/Makefile| 1 +
board/CZ.NIC/turris_omnia/old_ddr3_training.c | 79 +++
board/CZ.NIC
on such as
> 14.0.1.
>
> All the best,
> Tony
>
> On Mon, Apr 15, 2024 at 9:39 AM Marek Behún wrote:
> >
> > Hi Stefan,
> >
> > this series adds some changes to DDR3 training for Armada 38x and
> > Turris Omnia.
> >
> > - patches 1-4 are
Acked-by: Marek Behún
use reset-gpios so that we can get
rid of these drivers parsing this property.
Fixes: 1da53ae26afc ("arm: mvebu: turris_omnia: Add support for design with SW
reset signals")
Signed-off-by: Marek Behún
---
board/CZ.NIC/turris_omnia/turris_omnia.c | 44 ++-
Hello Max,
Out of curiousity, what is your use case for having these random
numbers on this platform in U-Boot?
Below are a few more things to change and then you I'll give my
Reviewed-by tag.
On Sun, 21 Jan 2024 21:17:16 +0100
Max Resch wrote:
> A RNG driver for Armada 3720 boards running the
So you're using A3720 with OpenBSD? Can I ask which A3720 boards do you
use?
Marek
On Mon, 05 Feb 2024 14:46:24 +0100
Mark Kettenis wrote:
> > Date: Mon, 5 Feb 2024 12:40:14 +0100
> > From: Marek Behún
> >
> > Hello Max,
> >
> > Out of curiousit
On Tue, 13 Feb 2024 10:49:43 +0100
Heinrich Schuchardt wrote:
> On 2/13/24 10:16, Stefan Roese wrote:
> > Hi Max,
> >
> > mostly some nitpicking comments below.
> >
> > On 2/11/24 14:04, Max Resch wrote:
> >> A RNG driver for Armada 3720 boards running the Turris Mox rWTM firmware
> >> from CZ.
Hi Stefan,
On Wed, 14 Feb 2024 08:50:16 +0100
Stefan Roese wrote:
> Hi Ramon,
>
> On 1/9/24 10:37, Stefan Roese wrote:
> > On 12/18/23 17:09, Marek Behún wrote:
> >> On Wed, 6 Dec 2023 15:35:56 +0100
> >> Marek Mojík wrote:
> >>
> >>>
Marek Behún (4):
arm: mvebu: turris_omnia: Refactor MCU status and features reading
arm: mvebu: turris_omnia: Implement getting board information from MCU
arm: mvebu: turris_omnia: Print board ECDSA public key if available
arm: mvebu: turris_omnia: Disable Atmel SHA node if not present
board
Implement reading board serial number, first MAC address and board
version from MCU. MCU supports board information if the FEAT_BOARD_INFO
feature bit is set in MCU features.
Prefer getting board information from MCU if supported, fallback to
Atmel SHA chip.
Signed-off-by: Marek Behún
Refactor MCU status word and MCU firmware features reading to make it
simpler to use.
Signed-off-by: Marek Behún
---
board/CZ.NIC/turris_omnia/turris_omnia.c | 81
1 file changed, 53 insertions(+), 28 deletions(-)
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c
If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key
from MCU and print it.
Signed-off-by: Marek Behún
---
board/CZ.NIC/turris_omnia/turris_omnia.c | 29 +++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/board/CZ.NIC/turris_omnia
If the FEAT_CRYPTO feature bit is present in MCU features, the board
crypto is implemented by MCU and the Atmel SHA chip is not present.
Disable Atmel SHA device-tree node in that case.
Signed-off-by: Marek Behún
---
board/CZ.NIC/turris_omnia/turris_omnia.c | 23 +++
1 file
Enable wdt command in defconfig for Turris MOX. This is useful when
doing debugging.
Signed-off-by: Marek Behún
---
configs/turris_mox_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
index 66dc2473d6..4543acf073 100644
Enable wdt command in defconfig for Turris MOX. This is useful when
doing debugging.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
---
configs/turris_mox_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
index
Enable setexpr command in defconfig for Turris MOX. We have found that
this is sometimes useful in U-Boot scripts and there is enough space in
NOR memory on MOX.
Signed-off-by: Marek Behún
---
configs/turris_mox_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
ill
this is done, we need this patch.
Signed-off-by: Marek Behún
Tested-by: Pali Rohár
Cc: Stefan Roese
---
arch/arm/dts/armada-3720-espressobin.dts | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/armada-3720-espressobin.dts
b/arch/arm/dts/armada-3720-es
On Wed, 2 Sep 2020 09:11:52 +0200
Andre Heider wrote:
> On 31/08/2020 09:52, Pali Rohár wrote:
> > On Monday 31 August 2020 05:25:38 Andre Heider wrote:
> >> From: Grzegorz Jaszczyk
> >>
> >> The settings of reference clock is done via pcie address space and
> >> not comphy address space - mov
On Wed, 9 Sep 2020 00:38:31 +0200
Pali Rohár wrote:
> On Tuesday 08 September 2020 08:52:56 Tom Rini wrote:
> > On Tue, Sep 08, 2020 at 10:14:15AM +0200, Andre Heider wrote:
> > > On 08/09/2020 09:42, Pali Rohár wrote:
> > > > On Tuesday 08 September 2020 08:35:00 Andre Heider wrote:
> > >
On Fri, 11 Sep 2020 10:37:42 +0200
Andre Heider wrote:
> On 11/09/2020 08:43, Stefan Roese wrote:
> > Hi Pali, Andre and others,
> >
> > On 10.09.20 21:04, Pali Rohár wrote:
> >> On Thursday 10 September 2020 19:53:40 Andre Heider wrote:
> >>> Use mmc_of_parse() to set the common host proper
On Fri, 11 Sep 2020 14:21:46 +0200
Stefan Roese wrote:
> Thanks. Unfortunately this is taking a bit too long for me, as I
> have to leave in about an hour. I will take care of these patches
> in a bit over a week.
>
> Thanks,
> Stefan
Happy vacation, Stefan :)
; - case 4:
> - host->host_caps |= MMC_MODE_4BIT;
> - break;
> - case 1:
> - break;
> - default:
> - printf("Invalid \"bus-width\" value\n");
> - return -EINVAL;
> - }
> +
> + ret = mmc_of_parse(dev, &plat->cfg);
> + if (ret)
> + return ret;
>
> host->ops = &xenon_sdhci_ops;
>
Tested-by: Marek Behún
On Fri, 11 Sep 2020 17:52:26 +0200
Andre Heider wrote:
> Hi Marek,
>
> On 11/09/2020 13:55, Marek Behún wrote:
> > On Wed, 9 Sep 2020 00:38:31 +0200 Pali Rohár
> > wrote:
> >> On Tuesday 08 September 2020 08:52:56 Tom Rini wrote:
> >>> Note that
-by: sa_ip-sw-jenkins
Reviewed-by: Sujeet Kumar Baranwal
Reviewed-by: Nadav Haklai
Signed-off-by: Marek Behún
Tested-by: Chris Packham
---
Stefan, last time I overlooked this commit. This is also part of
upstream mv-ddr-marvell.
---
drivers/ddr/marvell/a38x/mv_ddr_spd.h | 8 +++-
1 file
This is how Linux does this now, see Linux commit 339f29d91acf.
Signed-off-by: Marek Behún
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 755f4802a4..fd1e9c4d24 100755
--- a/scripts/checkpatch.pl
ad() also zero out the space so that we don't get invalid
result if regmap_raw_read() does not fill the whole object.
Signed-off-by: Marek Behún
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
Reviewed-by: Bin Meng
---
drivers/core/regmap.c | 13 -
1 file changed,
blk_dwrite(struct blk_desc *block_dev, lbaint_t st
| ^
Signed-off-by: Marek Behún
Reviewed-by: Simon Glass
---
include/api_public.h | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/include/api_public.h b/include/api_public.h
index
previously declared here
7 | char __efi_runtime_start[0] __attribute__((section(".__efi_run
| ^
Change the type to char[] in include/efi_loader.h.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/efi_loader.h | 4 ++--
1 file changed, 2 insertions(+), 2 dele
Use the __ADDRESSABLE() macro to make entries and lists declared by
ll_entry_declare() and ll_entry_declare_list() addressable so that when
building with LTO the compiler does not optimize this data away.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linker_lists.h | 8
Prepare private macros expanding to linker list entry symbol name and
declaration to avoid nasty code repetition in the next patch.
We also avoid some code repetition in current code with these macros.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linker_lists.h | 46
Use UNIQUE_ID in the __ADDRESSABLE macro.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linux/compiler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 82a8a4ede9..98dd3fc4cc 100644
--- a/include
symbol of the form
_u_boot_list_2_X_2_Y
also symbol
__UNIQUE_ID___addressable__u_boot_list_2_X_2_YN,
(where N at the end is some number).
In order to avoid matching these additional symbols, ensure that the
character before "_u_boot_list_2" is not a symbol name character.
Signed-off
,
(these are mentioned in GCC man page for option -nodefaultlibs that
the compiler may generate; this seems to be a bug in GCC that linking
fails with LTO even if these functions are present, because the
symbols can be renamed on some targets by optimization)
Marek
Marek Behún (38):
regmap
quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/arm/cpu/arm926ejs/spear/spl.c| 2 +-
arch/arm/cp
Indent the linking commands so that they look cosmetically better.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
Makefile | 12 +++-
scripts/Makefile.spl | 17 +++--
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
use the P flag for ar, otherwise final linking may fail.
Signed-off-by: Marek Behún
---
Makefile | 4 ++--
arch/sandbox/config.mk | 10 +++---
scripts/Makefile.build | 16
scripts/Makefile.spl | 4 ++--
4 files changed, 19 insertions(+), 15 deletions
Document the macros __efi_runtime and __efi_runtime_data in Sphinx
style.
Signed-off-by: Marek Behún
---
include/efi_loader.h | 29 ++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index a8281b3c95
Add macro __efi_runtime_rodata, for const variables with similar purpose
as those using __efi_runtime_data.
Signed-off-by: Marek Behún
---
include/efi_loader.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 696f80e9f3
section .rodata.efi_runtime, instead of
.data.efi_runtime, via macro __efi_runtime_rodata.
Signed-off-by: Marek Behún
Reviewed-by: Marek Vasut
---
lib/crc32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/crc32.c b/lib/crc32.c
index e9be3bf386..f2acc107fe 100644
--- a
Add $(CFLAGS_EFI) and remove $(CFLAGS_NON_EFI) for
efi_selftest_miniapp_exception.o.
The removal is needed when compiling with LTO - this object file needs
to be compiled without -flto.
The adding is for consistency with other miniapps.
Signed-off-by: Marek Behún
Cc: Heinrich Schuchardt
entry points should be supplied through some other mechanism
when this option is specified.
Make these functions visible by using the __used macro to avoid this
error.
Signed-off-by: Marek Behún
---
lib/string.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib
Make LTO available for sandbox architecture.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/Kconfig | 1 +
arch/sandbox/config.mk | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index 27843cd79c..a6dab3e56d 100644
--- a/arch/Kconfig
+++ b
eason it thinks that array is empty (start and end
symbols are at the same address).
Signed-off-by: Marek Behún
---
arch/sandbox/cpu/os.c | 3 ++-
arch/sandbox/cpu/start.c| 3 ++-
arch/sandbox/cpu/u-boot-spl.lds | 8 +---
arch/sandbox/cpu/u-boot.lds
The Thumb instruction `ldr` is able to move high registers only from
armv7. For armv5 and armv6 we have to use `mov`.
Signed-off-by: Marek Behún
---
arch/arm/include/asm/global_data.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/global_data.h
b
When apf27_defconfig is built with LTO, linking complains about
undefined reference to `nand_boot`. This is because it is referenced
from inline assembly. Make it visible.
Signed-off-by: Marek Behún
---
drivers/mtd/nand/raw/mxc_nand_spl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
ff-by: Marek Behún
---
arch/arm/cpu/arm926ejs/Makefile | 2 ++
arch/arm/lib/Makefile | 1 +
2 files changed, 3 insertions(+)
diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile
index af63d5cc5e..98aafe805a 100644
--- a/arch/arm/cpu/arm926ejs/Makefile
+++ b/arch/ar
When imx28_xea_defconfig is built with LTO, the compiler complains about
the two different declarations of _start:
include/asm-generic/sections.has extern void _start(void);
arch/arm/cpu/arm926ejs/mxs/mxs.c as extern uint32_t _start;
Fix this.
Signed-off-by: Marek Behún
Reviewed-by
When building keystone with LTO the compiler complains:
Error: selected processor does not support `smc #0' in Thumb mode
Fix this by removing -flto for the file implementing these SMC calls.
Signed-off-by: Marek Behún
---
arch/arm/mach-keystone/Makefile | 1 +
1 file changed, 1 inse
g.cgi?id=68384
Signed-off-by: Marek Behún
---
arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 +-
arch/arm/include/asm/global_data.h| 2 +-
arch/arm/mach-exynos/spl_boot.c | 2 +-
arch/arm/mach-imx/imx8m/soc.c | 2 +-
arch/arm/mach-imx/spl_imx_romapi.c| 16
5
implementation.
Change the type of this function in the implementation to fix this.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/arm/mach-imx/imx8m/clock_imx8mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
b/arch/arm/mach-imx
removing -flto for this file.
Signed-off-by: Marek Behún
---
arch/arm/mach-tegra/tegra20/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-tegra/tegra20/Makefile
b/arch/arm/mach-tegra/tegra20/Makefile
index faaf30d068..bb17c90cca 100644
--- a/arch/arm/mach-tegra/tegra20
Add plumbing for building U-Boot with Link Time Optimizations.
When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive /
--no-whole-archive group, otherwise some functions declared in assembly
may not be resolved and linking may fail.
Signed-off-by: Marek Behún
---
Kbuild
-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/arm/mach-rockchip/board.c| 2 +-
board/samsung/common/exynos5-dt.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index c386b52987..5304eb055c 100644
--- a
When building with LTO, using -ffunction-sections/-fdata-sections is not
useful anymore.
Signed-off-by: Marek Behún
---
arch/arm/config.mk | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 4153f7e371..2b2c6ad2e5 100644
actually passes an int variable into the function (so it is implicitly
converted to u8).
Change the type of this parameter to int in drivers/ata/ahci.c.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
drivers/ata/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
When using LTO, we can throw away the --gc-sections flag, but only if
using private libgcc.
When using system's libgcc, --gc-sections is still needed, otherwise
linking will fail due to undefined references to libc's symbols.
Signed-off-by: Marek Behún
---
arch/arm/config.mk | 2
Make LTO available for ARM architecture.
Signed-off-by: Marek Behún
---
arch/Kconfig | 1 +
arch/arm/lib/Makefile | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index b884b7b248..bf4b8afcb4 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -33,6 +33,7
Enable LTO for some boards that were tested by people on U-Boot Mailing
List.
Signed-off-by: Marek Behún
Tested-by: Adam Ford
Tested-by: Pali Rohár
Tested-by: Tim Harvey
---
configs/am3517_evm_defconfig | 1 +
configs/da850evm_defconfig| 1 +
configs
Build sandbox targets with LTO by default.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index a6dab3e56d..b884b7b248 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -123,6 +123,7 @@ config
ference in
/tmp/u-boot.EQlEXz.ltrans0.ltrans.o
To avoid this conflict use different asm label for this variable when
CONFIG_SANDBOX is enabled.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
Reviewed-by: Simon Glass
---
include/errno.h | 8 +++-
lib/errno.c | 4 +++-
2 files c
Adam Ford says that DM3730 needs board.c compiled without LTO flags.
Also add clock.c, since it says in Makefile that it need different
flags.
Signed-off-by: Marek Behún
Suggested-by: Adam Ford
---
arch/arm/mach-omap2/omap3/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch
function to that of the other usages.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/arm/cpu/armv7/kona-common/clk-stubs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv7/kona-common/clk-stubs.c
b/arch/arm/cpu/armv7/kona-common/clk-stubs.c
index
For some reason when building SPL for ARMv8 with LTO, the relocation
information is not discarded.
Discard it explicitly in the linker script.
This fixes LTO build for imx8mm_venice_defconfig.
Signed-off-by: Marek Behún
---
arch/arm/cpu/armv8/u-boot-spl.lds | 1 +
1 file changed, 1 insertion
Enable LTO for some boards that were tested by people on U-Boot Mailing
List.
Signed-off-by: Marek Behún
Tested-by: Adam Ford
Tested-by: Pali Rohár
Tested-by: Tim Harvey
---
configs/am3517_evm_defconfig | 1 +
configs/da850evm_defconfig| 1 +
configs
ad() also zero out the space so that we don't get invalid
result if regmap_raw_read() does not fill the whole object.
Signed-off-by: Marek Behún
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
Reviewed-by: Bin Meng
---
drivers/core/regmap.c | 13 -
1 file changed,
with LTO even if these functions are present, because the
symbols can be renamed on some targets by optimization)
Marek
Marek Behún (39):
regmap: fix a serious pointer casting bug
api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA
checkpatch: require quotes around section
This is how Linux does this now, see Linux commit 339f29d91acf.
Signed-off-by: Marek Behún
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 755f4802a4..fd1e9c4d24 100755
--- a/scripts/checkpatch.pl
Prepare private macros expanding to linker list entry symbol name and
declaration to avoid nasty code repetition in the next patch.
We also avoid some code repetition in current code with these macros.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linker_lists.h | 46
Use UNIQUE_ID in the __ADDRESSABLE macro.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linux/compiler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 82a8a4ede9..98dd3fc4cc 100644
--- a/include
blk_dwrite(struct blk_desc *block_dev, lbaint_t st
| ^
Signed-off-by: Marek Behún
Reviewed-by: Simon Glass
---
include/api_public.h | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/include/api_public.h b/include/api_public.h
index
symbol of the form
_u_boot_list_2_X_2_Y
also symbol
__UNIQUE_ID___addressable__u_boot_list_2_X_2_YN,
(where N at the end is some number).
In order to avoid matching these additional symbols, ensure that the
character before "_u_boot_list_2" is not a symbol name character.
Signed-off
quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/arm/cpu/arm926ejs/spear/spl.c| 2 +-
arch/arm/cp
entry points should be supplied through some other mechanism
when this option is specified.
Make these functions visible by using the __used macro to avoid this
error.
Signed-off-by: Marek Behún
---
lib/string.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib
Use the __ADDRESSABLE() macro to make entries and lists declared by
ll_entry_declare() and ll_entry_declare_list() addressable so that when
building with LTO the compiler does not optimize this data away.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/linker_lists.h | 8
previously declared here
7 | char __efi_runtime_start[0] __attribute__((section(".__efi_run
| ^
Change the type to char[] in include/efi_loader.h.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
include/efi_loader.h | 4 ++--
1 file changed, 2 insertions(+), 2 dele
Document the macros __efi_runtime and __efi_runtime_data in Sphinx
style.
Signed-off-by: Marek Behún
Reviewed-by: Heinrich Schuchardt
---
include/efi_loader.h | 29 ++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/include/efi_loader.h b/include
Indent the linking commands so that they look cosmetically better.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
Makefile | 12 +++-
scripts/Makefile.spl | 17 +++--
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
section .rodata.efi_runtime, instead of
.data.efi_runtime, via macro __efi_runtime_rodata.
Signed-off-by: Marek Behún
Reviewed-by: Marek Vasut
Reviewed-by: Heinrich Schuchardt
---
lib/crc32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/crc32.c b/lib/crc32.c
index
Add macro __efi_runtime_rodata, for const variables with similar purpose
as those using __efi_runtime_data.
Signed-off-by: Marek Behún
Reviewed-by: Heinrich Schuchardt
---
include/efi_loader.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/include/efi_loader.h b/include
Add $(CFLAGS_EFI) and remove $(CFLAGS_NON_EFI) for
efi_selftest_miniapp_exception.o.
The removal is needed when compiling with LTO - this object file needs
to be compiled without -flto.
The adding is for consistency with other miniapps.
Signed-off-by: Marek Behún
Reviewed-by: Heinrich
ference in
/tmp/u-boot.EQlEXz.ltrans0.ltrans.o
To avoid this conflict use different asm label for this variable when
CONFIG_SANDBOX is enabled.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
Reviewed-by: Simon Glass
---
include/errno.h | 8 +++-
lib/errno.c | 4 +++-
2 files c
andle .note.gnu.build-id
section.
Fix this by explicitly disabling build-id.
Signed-off-by: Marek Behún
---
Makefile | 2 ++
scripts/Makefile.spl | 2 ++
2 files changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 952c165d8f..d806155ede 100644
--- a/Makefile
+++ b/Mak
use the P flag for ar, otherwise final linking may fail.
Signed-off-by: Marek Behún
---
Makefile | 4 ++--
arch/sandbox/config.mk | 10 +++---
scripts/Makefile.build | 16
scripts/Makefile.spl | 4 ++--
4 files changed, 19 insertions(+), 15 deletions
Make LTO available for sandbox architecture.
Signed-off-by: Marek Behún
Reviewed-by: Bin Meng
---
arch/Kconfig | 1 +
arch/sandbox/config.mk | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index 27843cd79c..a6dab3e56d 100644
--- a/arch/Kconfig
+++ b
eason it thinks that array is empty (start and end
symbols are at the same address).
Signed-off-by: Marek Behún
---
arch/sandbox/cpu/os.c | 3 ++-
arch/sandbox/cpu/start.c| 3 ++-
arch/sandbox/cpu/u-boot-spl.lds | 8 +---
arch/sandbox/cpu/u-boot.lds
Add plumbing for building U-Boot with Link Time Optimizations.
When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive /
--no-whole-archive group, otherwise some functions declared in assembly
may not be resolved and linking may fail.
Signed-off-by: Marek Behún
---
Kbuild
101 - 200 of 1650 matches
Mail list logo