| f40ad66f | 28-Jul-2017 |
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
arch/sh: don't bring common/env_embedded.o into the link
The linker script for SuperH brings the .ppcenv and .ppcenvr section of common/env_embedded.o into the .text section. However, the .ppcenv se
arch/sh: don't bring common/env_embedded.o into the link
The linker script for SuperH brings the .ppcenv and .ppcenvr section of common/env_embedded.o into the .text section. However, the .ppcenv section is only ever filled in by env_embedded.o when CONFIG_SYS_USE_PPCENV is defined, but no platforms in mainline U-Boot use this.
In addition, common/env_embedded.o is not always built (when you use CONFIG_ENV_IS_NOWHERE for example), which causes the following build failure:
Fixes:
LD u-boot /home/thomas/sh4aeb-linux-musl/bin/sh4aeb-linux-ld.bfd: cannot find common/env_embedded.o
We fix this by no longer adding the .ppcenv and .ppcenvr sections from common/env_embedded.o into the .text section.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
show more ...
|
| 76a55989 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh: generate position independent code for all platforms
Finally add fpic compilation option to produce relocatable code. Note that this requires to define CONFIG_NEEDS_MANUAL_RELOC for all board fi
sh: generate position independent code for all platforms
Finally add fpic compilation option to produce relocatable code. Note that this requires to define CONFIG_NEEDS_MANUAL_RELOC for all board files, also relocation support still has some limitations (e.g. a developer should care not to overwrite the executing code or memset() with zeroes not yet relocated data on malloc init etc.), which may be fixed while switching to PIE.
Due to short investigation the architecture code is not ready for PIE linking, this will require some manipulations with .dyn* sections.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
show more ...
|
| 9c141b2b | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh4: fix start.S by calling board_init_f() after first code relocation
Like on ARM platform keep the first code relocation from a U-boot image storage to RAM at CONFIG_SYS_TEXT_BASE, then pass execu
sh4: fix start.S by calling board_init_f() after first code relocation
Like on ARM platform keep the first code relocation from a U-boot image storage to RAM at CONFIG_SYS_TEXT_BASE, then pass execution to a generic board_init_f() with empty GD flags. If CONFIG_SYS_TEXT_BASE is equal to a calculated by board_init_f() relocation address there will be no more code and data copy, however it's worth to mention that the first copy happens even if $pc on _start is the same as CONFIG_SYS_TEXT_BASE, on practice this works without a problem.
Also note that _sh_start is renamed back to _start to correct gd->mon_len calculation by setup_mon_len(), the opposite rename was done in pre-generic board commit 2024b968ee9 ("sh: Fix build in start.S").
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 8371dabb | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh: add MEMORY command to a shared linker script
At the moment in runtime all defined sections are copied into or created in RAM, specify this explicitly to assert potential out of RAM placements of
sh: add MEMORY command to a shared linker script
At the moment in runtime all defined sections are copied into or created in RAM, specify this explicitly to assert potential out of RAM placements of the sections.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b26d2507 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh: define entry point and reloc_dst inside a linker script
No functional change, concentrate linker script commands in one place for convenience. Entry point is set to CONFIG_SYS_TEXT_BASE by defau
sh: define entry point and reloc_dst inside a linker script
No functional change, concentrate linker script commands in one place for convenience. Entry point is set to CONFIG_SYS_TEXT_BASE by default on build, so this option can be omitted from being added to the linker script.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 3f8b5391 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh4: use single u-boot linker script for all boards
Three supported SH4/SH4A boards with the bootloader image stored on SPI flash have own flavour of a linker script, in turn they are equal among ea
sh4: use single u-boot linker script for all boards
Three supported SH4/SH4A boards with the bootloader image stored on SPI flash have own flavour of a linker script, in turn they are equal among each other. The only difference is that the text from lowlevel_init.o is placed right after start.o, which makes sense.
Note that .bss section is not marked as NOLOAD, because for about 10 years this is a default option of a GNU linker, either the attribute is found or not the resulting image file is the same.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b33718c6 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh4: cache: move exported cache manipulation functions into cache.c
No functional change, moving cache manipulation functions into cache.c allows to collect all of them in a single location and as a
sh4: cache: move exported cache manipulation functions into cache.c
No functional change, moving cache manipulation functions into cache.c allows to collect all of them in a single location and as a pleasant side effect cache_control() function can be unexported now.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 6ab8b961 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh: cache: don't modify CCR from P1 area
cache_wback_all() is a local function and it is called from cache_control() only, which is in turn jumps to P2 area.
The change fixes an issue when cache_wb
sh: cache: don't modify CCR from P1 area
cache_wback_all() is a local function and it is called from cache_control() only, which is in turn jumps to P2 area.
The change fixes an issue when cache_wback_all() returns from P2 to P1, however cache_control() continues to manipulate with CCR register, according to the User's Manual this is restricted.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
show more ...
|
| c230a378 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh: cache use jump_to_P2() and back_to_P1() from asm/system.h
Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine th
sh: cache use jump_to_P2() and back_to_P1() from asm/system.h
Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine them.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| dad2b300 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh3: remove unused cache.c file from being built
The change is similar to commit 994b56616bae ("sh: delete an unused source file") for SH2, however here the removed cache.c file was built and includ
sh3: remove unused cache.c file from being built
The change is similar to commit 994b56616bae ("sh: delete an unused source file") for SH2, however here the removed cache.c file was built and included into an image as a dead code.
If it is needed in future the contents can be reused from a similar arch/sh/cpu/sh4/cache.c file, which is in turn will be moved to a shared among all core flavours location at arch/sh/lib/cache.c.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 0f62bf63 | 27-Nov-2016 |
Vladimir Zapolskiy <vz@mleia.com> |
sh4: cache: correct flush_cache() to writeback and invalidate
In common usecases flush_cache() assumes both cache invalidation and write-back to memory, instead of doing cache invalidation only with
sh4: cache: correct flush_cache() to writeback and invalidate
In common usecases flush_cache() assumes both cache invalidation and write-back to memory, instead of doing cache invalidation only with the wrapped 'ocbi' instruction pin flush_cache() to cache invalidation with memory write-back done by 'ocbp'.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 08f11151 | 26-Feb-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
sh: merge compiler flag -ffixed-r13
-ffixed-r13 is defined commonly for sh2, sh3, sh4. Move it to arch/sh/config.mk
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Nobuhiro Iwamatsu
sh: merge compiler flag -ffixed-r13
-ffixed-r13 is defined commonly for sh2, sh3, sh4. Move it to arch/sh/config.mk
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
show more ...
|