[U-Boot] [PATCH v3 16/66] armv8: move low-level assembly functions into function-sections
Simon Glass
sjg at chromium.org
Tue Aug 1 09:49:00 UTC 2017
On 28 July 2017 at 13:21, Philipp Tomsich
<philipp.tomsich at theobroma-systems.com> wrote:
> TPL builds today don't need to call into firmware or set up the MMU
> (if this changes, it should be controlled through a config option
> whether to include this or not), but include the needed support code
> for this anyway. By moving these unused low-level functions into
> seperate function-sections, the linker can garbage-collect the unused
> sections.
>
> Note that (if DM support is enabled), there will be a call to the
> cache-flushing code from alloc_priv(...) in drivers/core/device.c.
> This then add 52 bytes of binary size (an increase from 20589 to 20641
> bytes) compared to completely removing this code.
>
> Even for a feature-rich TPL (including DM support as for the RK3368),
> this equates to a size difference of significantly more than 10% in
> TPL binary size.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>
> ---
>
> Changes in v3:
> - change to use function-sections (instead of disabling at the
> Makefile-level for TPL builds) per Tom's suggestion
>
> Changes in v2: None
>
> arch/arm/cpu/armv8/Makefile | 2 +-
> arch/arm/cpu/armv8/cache.S | 22 ++++++++++++++++++++++
> arch/arm/cpu/armv8/tlb.S | 4 +++-
> arch/arm/cpu/armv8/transition.S | 6 ++++++
> 4 files changed, 32 insertions(+), 2 deletions(-)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
> diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
> index c447085..64f35f1 100644
> --- a/arch/arm/cpu/armv8/Makefile
> +++ b/arch/arm/cpu/armv8/Makefile
> @@ -10,11 +10,11 @@ extra-y := start.o
> obj-y += cpu.o
> obj-y += generic_timer.o
> obj-y += cache_v8.o
> -obj-y += exceptions.o
> obj-y += cache.o
> obj-y += tlb.o
> obj-y += transition.o
> obj-y += fwcall.o
> +obj-y += exceptions.o
But what is happened here?
> obj-y += cpu-dt.o
> obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
More information about the U-Boot
mailing list