[U-Boot] Please pull ARC changes

Hi Tom,
This is the first batch of ARC changes for the next release.
Here we: 1. Significantly rework cache-related functionality. In particular that fixes coherency problems in some corner-cases, allows us to enable and disable caches in run-time and still have properly running system, finally support execution from real flash (before we used to run from DDR from the very beginning).
2. Remove string routines implemented in assembly. That allows us to build and run U-Boot on wide range og ARC cores with different configurations. I.e. whatever tuning is used on GCC's command-line we'll get code for desired flavor of ARC. Otherwise for each and every corner-case we would need to add ifdefs in assembly code to accommodate missing instructions etc.
3. Get use of GCC's garbage collector which helps to slim-down resulting image quite a bit.
4. Also now we may disable U-Boot self-relocation for ARC if needed either by platform or for debugging purposes.
-Alexey
P.S. Do you have an idea when RC1 is going to be cut? We have some other pending changes and it's good to understand how much time we have for finalization if we want [and we do want] to still squeeze it all in the next release.
The following changes since commit 9c0e2f6ed391f199ba1bf30c7d0b71123a012958:
Merge git://git.denx.de/u-boot-fsl-qoriq (2018-03-20 18:39:27 -0400)
are available in the Git repository at:
git://git.denx.de/u-boot-arc.git
for you to fetch changes up to f665c14f04d225597cd3cb0c6faa35ddc2a1b2df:
ARC: bootm: Refactor GO and PREP subcommands implementation (2018-03-23 15:57:51 +0300)
---------------------------------------------------------------- Alexey Brodkin (5): arc: Get rid of handwritten string routines arc: Don't halt slaves arc: Eliminate unused code and data with GCC's garbage collector arc: Introduce a possibility to not relocate U-boot arc: Fine-tune implementation of memory barriers
Eugeniy Paltsev (21): ARC: Cache: Move I$ entire operation to a separate function ARC: Cache: Remove per-line I$ operations as unused ARC: Cache: Add support for FLUSH_N_INV D$ operations ARC: Introduce is_isa_X() functions ARC: Flush & invalidate D$ with a single command ARC: Cache: Move IOC initialization to a separate function ARC: Move BCR encodings to separate header file ARC: Cache: Allways check D$ status before entire/line ops ARC: Cache: Use is_isa_arcv2() instead of CONFIG_ISA_ARCV2 ifdef ARC: Cache: Move SLC status check into slc_entire_op() and slc_rgn_op() ARC: Cache: Get rid of [slc,pae,icache,dcache]_exists global variables ARC: Move cache global variables to arch_global_data ARC: Cache: Move PAE exists check into slc_upper_region_init() ARC: Move IOC enabling to compile-time options ARC: Cache: Implement [i,d]cache_enabled() as separate functions ARC: Cache: Fix SLC operations when SLC is bypassed for data ARC: Implement a function to sync and cleanup caches ARC: Cache: Add more HW configuration checks ARC: Cache: Add missing cache cleanup before cache disable ARC: Cache: Refactor arc_ioc_setup() ARC: bootm: Refactor GO and PREP subcommands implementation
arch/arc/Kconfig | 18 ++++ arch/arc/config.mk | 3 +- arch/arc/include/asm/arc-bcr.h | 77 +++++++++++++ arch/arc/include/asm/arcregs.h | 11 ++ arch/arc/include/asm/cache.h | 7 ++ arch/arc/include/asm/global_data.h | 6 ++ arch/arc/include/asm/io.h | 8 +- arch/arc/include/asm/string.h | 26 ----- arch/arc/lib/Makefile | 7 -- arch/arc/lib/bootm.c | 55 +++++----- arch/arc/lib/cache.c | 677 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------- --------- arch/arc/lib/init_helpers.c | 6 +- arch/arc/lib/memcmp.S | 123 --------------------- arch/arc/lib/memcpy-700.S | 63 ----------- arch/arc/lib/memset.S | 62 ----------- arch/arc/lib/relocate.c | 6 ++ arch/arc/lib/start.S | 28 ++--- arch/arc/lib/strchr-700.S | 141 ------------------------ arch/arc/lib/strcmp.S | 97 ----------------- arch/arc/lib/strcpy-700.S | 67 ------------ arch/arc/lib/strlen.S | 80 -------------- board/synopsys/axs10x/axs10x.c | 12 +++ board/synopsys/hsdk/hsdk.c | 11 ++ common/board_f.c | 3 +- 24 files changed, 635 insertions(+), 959 deletions(-) create mode 100644 arch/arc/include/asm/arc-bcr.h delete mode 100644 arch/arc/lib/memcmp.S delete mode 100644 arch/arc/lib/memcpy-700.S delete mode 100644 arch/arc/lib/memset.S delete mode 100644 arch/arc/lib/strchr-700.S delete mode 100644 arch/arc/lib/strcmp.S delete mode 100644 arch/arc/lib/strcpy-700.S delete mode 100644 arch/arc/lib/strlen.S

On Fri, Mar 23, 2018 at 01:23:53PM +0000, Alexey Brodkin wrote:
Hi Tom,
This is the first batch of ARC changes for the next release.
Here we:
Significantly rework cache-related functionality. In particular that fixes coherency problems in some corner-cases, allows us to enable and disable caches in run-time and still have properly running system, finally support execution from real flash (before we used to run from DDR from the very beginning).
Remove string routines implemented in assembly. That allows us to build and run U-Boot on wide range og ARC cores with different configurations. I.e. whatever tuning is used on GCC's command-line we'll get code for desired flavor of ARC. Otherwise for each and every corner-case we would need to add ifdefs in assembly code to accommodate missing instructions etc.
Get use of GCC's garbage collector which helps to slim-down resulting image quite a bit.
Also now we may disable U-Boot self-relocation for ARC if needed either by platform or for debugging purposes.
FYI, all of the above would be really good to put into a signed tag, next time :)
P.S. Do you have an idea when RC1 is going to be cut? We have some other pending changes and it's good to understand how much time we have for finalization if we want [and we do want] to still squeeze it all in the next release.
Should be April 2nd, per the ReleaseCycle wiki page.

Hi Tom,
On Fri, 2018-03-23 at 09:33 -0400, Tom Rini wrote:
On Fri, Mar 23, 2018 at 01:23:53PM +0000, Alexey Brodkin wrote:
Hi Tom,
This is the first batch of ARC changes for the next release.
Here we:
Significantly rework cache-related functionality. In particular that fixes coherency problems in some corner-cases, allows us to enable and disable caches in run-time and still have properly running system, finally support execution from real flash (before we used to run from DDR from the very beginning).
Remove string routines implemented in assembly. That allows us to build and run U-Boot on wide range og ARC cores with different configurations. I.e. whatever tuning is used on GCC's command-line we'll get code for desired flavor of ARC. Otherwise for each and every corner-case we would need to add ifdefs in assembly code to accommodate missing instructions etc.
Get use of GCC's garbage collector which helps to slim-down resulting image quite a bit.
Also now we may disable U-Boot self-relocation for ARC if needed either by platform or for debugging purposes.
FYI, all of the above would be really good to put into a signed tag, next time :)
Sure will do! Do you want me to do it now as well?
P.S. Do you have an idea when RC1 is going to be cut? We have some other pending changes and it's good to understand how much time we have for finalization if we want [and we do want] to still squeeze it all in the next release.
Should be April 2nd, per the ReleaseCycle wiki page.
Thanks for pointing to this article - very useful indeed.
-Alexey

On Fri, Mar 23, 2018 at 01:38:48PM +0000, Alexey Brodkin wrote:
Hi Tom,
On Fri, 2018-03-23 at 09:33 -0400, Tom Rini wrote:
On Fri, Mar 23, 2018 at 01:23:53PM +0000, Alexey Brodkin wrote:
Hi Tom,
This is the first batch of ARC changes for the next release.
Here we:
Significantly rework cache-related functionality. In particular that fixes coherency problems in some corner-cases, allows us to enable and disable caches in run-time and still have properly running system, finally support execution from real flash (before we used to run from DDR from the very beginning).
Remove string routines implemented in assembly. That allows us to build and run U-Boot on wide range og ARC cores with different configurations. I.e. whatever tuning is used on GCC's command-line we'll get code for desired flavor of ARC. Otherwise for each and every corner-case we would need to add ifdefs in assembly code to accommodate missing instructions etc.
Get use of GCC's garbage collector which helps to slim-down resulting image quite a bit.
Also now we may disable U-Boot self-relocation for ARC if needed either by platform or for debugging purposes.
FYI, all of the above would be really good to put into a signed tag, next time :)
Sure will do! Do you want me to do it now as well?
I just copy/pasted it into my merge message. Thanks tho.
participants (2)
-
Alexey Brodkin
-
Tom Rini