[00/21] A series of updates related to MIPS

Message ID 20241031054937.68189-1-arikalo@gmail.com
Headers
Series A series of updates related to MIPS |

Message

Aleksandar Rikalo Oct. 31, 2024, 5:49 a.m. UTC
  This is a series of patches for MIPS port that have accumulated
over the past years. It contains significant updates of libgloss
and newlib and several bug fixes.

Aleksandar Rikalo (1):
  Copyright updates to MIPS Tech, LLC

Faraz Shahbazker (6):
  mips: libc: Add improved C implementation of memcpy/memset
  mips: libc: Improve performance of strcmp implementation
  mips: libc: memcpy prefetches beyond copied memory
  mips: libgloss: g++ exception handling failure on o32 elf targets
  mips: libgloss: UHI linker scripts fail to link with _isr_vec_count=1
  mips: libc: Fix strcmp bug for little endian targets

Jaydeep Patil (9):
  Add HAL for MIPS architecture
  Add UHI for MIPS architecture
  Add boot code for MIPS architecture
  Add a banch of examples for MIPS architecture
  mips: libgloss: A few minor fixes
  mips: newlib: A few minor fixes.
  newlib: Necessary fixes related to MIPS.
  mips: libc: Support for vector type in printf
  mips: libc: Add SmallCLib headers

Matthew Fortune (4):
  libgloss: Necessary fixes related to MIPS.
  mips: libgloss: Remove the arch spec in mti* linker scripts
  mips: libgloss: Fixes and improvements for CM3 bootcode
  mips: libgloss: Update to new custom exception handler example and use
    soft-float

Robert Suchanek (1):
  mips: libgloss: Boot and startup code improvements inc.

 config-ml.in                                  |   25 +-
 config/mt-sde                                 |    4 +-
 libgloss/config/mips.mt                       |   60 +-
 libgloss/configure                            |   12 +-
 libgloss/fstat.c                              |    3 +
 libgloss/kill.c                               |    1 +
 libgloss/libnosys/fstat.c                     |    3 +
 libgloss/mips/Makefile.in                     |  219 ++-
 libgloss/mips/boot/corecheck_predef.S         |  227 +++
 libgloss/mips/boot/init_caches.S              |  178 ++
 libgloss/mips/boot/init_caches_predef.S       |  183 ++
 libgloss/mips/boot/init_cm3l2.S               |  137 ++
 libgloss/mips/boot/init_cm3l2_predef.S        |  117 ++
 libgloss/mips/boot/init_cp0.S                 |  105 ++
 libgloss/mips/boot/init_cp0_predef.S          |  131 ++
 libgloss/mips/boot/init_l23caches.S           |  141 ++
 libgloss/mips/boot/init_l23caches_predef.S    |  161 ++
 libgloss/mips/boot/init_tlb.S                 |  348 ++++
 libgloss/mips/boot/init_tlb_predef.S          |  149 ++
 libgloss/mips/boot/predef.h                   |  153 ++
 libgloss/mips/boot/reset.S                    |  233 +++
 libgloss/mips/boot/reset_predef.S             |  261 +++
 libgloss/mips/bootcode.ld                     |   14 +
 libgloss/mips/crt0.S                          |  316 ----
 libgloss/mips/examples/custom_excpt/Makefile  |   48 +
 .../mips/examples/custom_excpt/README.txt     |   16 +
 .../mips/examples/custom_excpt/custom_excpt.c |  109 ++
 .../mips/examples/fault_recovery/Makefile     |   48 +
 .../mips/examples/fault_recovery/README.txt   |   15 +
 .../examples/fault_recovery/fault_recovery.c  |   75 +
 .../mips/examples/interrupt_handler/Makefile  |   48 +
 .../examples/interrupt_handler/README.txt     |   14 +
 .../interrupt_handler/interrupt_handler.c     |   70 +
 .../mips/examples/isr_vector_space/Makefile   |   52 +
 .../mips/examples/isr_vector_space/README.txt |   19 +
 .../examples/isr_vector_space/excpt_isr.S     |  109 ++
 .../isr_vector_space/isr_vector_space.c       |   72 +
 libgloss/mips/examples/romable/Makefile       |   59 +
 libgloss/mips/examples/romable/README.txt     |   15 +
 libgloss/mips/examples/romable/romable.c      |   36 +
 .../mips/examples/romable_minimal/Makefile    |   65 +
 .../mips/examples/romable_minimal/README.txt  |   32 +
 .../examples/romable_minimal/makescripts.sh   |   31 +
 .../romable_minimal/romable_minimal.c         |   37 +
 .../mips/examples/romable_predef/Makefile     |   96 +
 .../mips/examples/romable_predef/README.txt   |   16 +
 .../examples/romable_predef/romable_predef.c  |   36 +
 .../mips/examples/romable_predef_xip/Makefile |  105 ++
 .../examples/romable_predef_xip/README.txt    |   21 +
 .../romable_predef_xip/romable_predef_xip.c   |   33 +
 libgloss/mips/fstat.c                         |   32 +
 libgloss/mips/hal/__exit.c                    |   48 +
 libgloss/mips/hal/abiflags.S                  |   82 +
 libgloss/mips/hal/cache.h                     |   82 +
 libgloss/mips/hal/crt0.S                      |  312 ++++
 libgloss/mips/hal/get_ram_range.c             |   65 +
 libgloss/mips/hal/libcm3.a                    |   34 +
 libgloss/mips/hal/link.c                      |   39 +
 libgloss/mips/hal/minicrt.S                   |   41 +
 libgloss/mips/hal/mips64_tlb.c                |  219 +++
 libgloss/mips/hal/mips_clean_cache.c          |  113 ++
 libgloss/mips/hal/mips_cm3_l2size.c           |   88 +
 libgloss/mips/hal/mips_dsp.S                  |  128 ++
 libgloss/mips/hal/mips_excpt_boot.S           |  379 ++++
 libgloss/mips/hal/mips_excpt_entry.S          |  210 +++
 libgloss/mips/hal/mips_excpt_handler.c        |  309 ++++
 libgloss/mips/hal/mips_excpt_isr_fallback.S   |   50 +
 libgloss/mips/hal/mips_excpt_isr_fragment.S   |   71 +
 libgloss/mips/hal/mips_excpt_register.S       |  145 ++
 libgloss/mips/hal/mips_excpt_timer.S          |  101 ++
 libgloss/mips/hal/mips_flush_cache.c          |  106 ++
 libgloss/mips/hal/mips_fp.S                   |  182 ++
 libgloss/mips/hal/mips_intctrl.c              |  149 ++
 libgloss/mips/hal/mips_l2size.c               |   94 +
 libgloss/mips/hal/mips_lock_cache.c           |   81 +
 libgloss/mips/hal/mips_msa.S                  |  181 ++
 libgloss/mips/hal/mips_size_cache.c           |  106 ++
 libgloss/mips/hal/mips_sync_cache.c           |   62 +
 libgloss/mips/hal/mips_tlb.c                  |  477 +++++
 libgloss/mips/hal/mips_xpa.S                  |   76 +
 libgloss/mips/hal/syscalls.c                  |   51 +
 libgloss/mips/idtmon.S                        |    3 +-
 libgloss/mips/include/mips/asm.h              |  354 ++++
 libgloss/mips/include/mips/cm3.h              |   75 +
 libgloss/mips/include/mips/cpu.h              |  354 ++++
 libgloss/mips/include/mips/ctx.S              |  147 ++
 libgloss/mips/include/mips/dsp.h              |   58 +
 libgloss/mips/include/mips/endian.h           |   94 +
 libgloss/mips/include/mips/fgregdef.h         |  126 ++
 libgloss/mips/include/mips/fpa.h              |   31 +
 libgloss/mips/include/mips/hal.h              |  454 +++++
 libgloss/mips/include/mips/intctrl.h          |   69 +
 libgloss/mips/include/mips/m32c0.h            | 1605 +++++++++++++++++
 libgloss/mips/include/mips/m32c1.h            |  274 +++
 libgloss/mips/include/mips/m32tlb.h           |  101 ++
 libgloss/mips/include/mips/m64c0.h            |  266 +++
 libgloss/mips/include/mips/m64tlb.h           |  104 ++
 libgloss/mips/include/mips/mips32.h           |  175 ++
 libgloss/mips/include/mips/mips64.h           |  114 ++
 libgloss/mips/include/mips/mt.h               |  519 ++++++
 libgloss/mips/include/mips/notlb.h            |  113 ++
 libgloss/mips/include/mips/prid.h             |  128 ++
 libgloss/mips/include/mips/regdef.h           |  131 ++
 libgloss/mips/include/mips/uhi_syscalls.h     |   68 +
 libgloss/mips/include/mips/version.h          |    4 +
 libgloss/mips/malta32-yamon.ld                |  316 ++++
 libgloss/mips/mti32.ld                        |   24 +-
 libgloss/mips/mti64.ld                        |    5 +-
 libgloss/mips/mti64_n32.ld                    |    5 +-
 libgloss/mips/regs.S                          |    5 +-
 libgloss/mips/rules/mipshal.mk                |  133 ++
 libgloss/mips/rules/srec2hex.pl               |  196 ++
 libgloss/mips/syscalls.c                      |   45 -
 libgloss/mips/test.c                          |    7 +-
 libgloss/mips/uhi/uhi_assert.c                |   73 +
 libgloss/mips/uhi/uhi_break.c                 |   62 +
 libgloss/mips/uhi/uhi_close.c                 |   71 +
 libgloss/mips/uhi/uhi_exception.c             |   63 +
 libgloss/mips/uhi/uhi_exit.c                  |   87 +
 libgloss/mips/uhi/uhi_fstat.c                 |  159 ++
 libgloss/mips/uhi/uhi_get_ram_range.c         |   62 +
 libgloss/mips/uhi/uhi_getargs.S               |  106 ++
 libgloss/mips/uhi/uhi_indirect.c              |   56 +
 libgloss/mips/uhi/uhi_link.c                  |   80 +
 libgloss/mips/uhi/uhi_lseek.c                 |   76 +
 libgloss/mips/uhi/uhi_open.c                  |   75 +
 libgloss/mips/uhi/uhi_plog.c                  |   79 +
 libgloss/mips/uhi/uhi_pread.c                 |   78 +
 libgloss/mips/uhi/uhi_pwrite.c                |   78 +
 libgloss/mips/uhi/uhi_read.c                  |   75 +
 libgloss/mips/uhi/uhi_stat.c                  |   58 +
 libgloss/mips/uhi/uhi_stat.h                  |   51 +
 libgloss/mips/uhi/uhi_unlink.c                |   77 +
 libgloss/mips/uhi/uhi_write.c                 |   75 +
 libgloss/mips/uhi/yamon_close.c               |   81 +
 libgloss/mips/uhi/yamon_exception.c           |   52 +
 libgloss/mips/uhi/yamon_exit.c                |   60 +
 libgloss/mips/uhi/yamon_fstat.c               |  183 ++
 libgloss/mips/uhi/yamon_read.c                |  101 ++
 libgloss/mips/uhi/yamon_syscalls.h            |   33 +
 libgloss/mips/uhi/yamon_write.c               |   98 +
 libgloss/mips/uhi32.ld                        |  346 ++++
 libgloss/mips/uhi64_64.ld                     |  345 ++++
 libgloss/mips/uhi64_n32.ld                    |  345 ++++
 libgloss/print.c                              |    2 +
 newlib/Makefile.am                            |    2 +-
 newlib/Makefile.in                            |   32 +-
 newlib/configure.host                         |    1 +
 newlib/libc/include/ctype.h                   |   17 +
 newlib/libc/include/machine/endian.h          |    5 +
 newlib/libc/include/machine/ieeefp.h          |    6 +
 newlib/libc/include/stdio.h                   |  178 ++
 newlib/libc/include/sys/config.h              |    2 +-
 newlib/libc/include/sys/stat.h                |    4 +
 newlib/libc/machine/mips/machine/regdef.h     |   38 +
 newlib/libc/machine/mips/memcpy.c             |  449 +++++
 newlib/libc/machine/mips/memset.c             |  176 ++
 newlib/libc/machine/mips/setjmp.S             |    6 +-
 newlib/libc/machine/mips/strcmp.S             |  273 +--
 newlib/libc/machine/mips/strlen.c             |   20 +-
 newlib/libc/stdio/vfprintf.c                  |  208 ++-
 161 files changed, 18696 insertions(+), 582 deletions(-)
 create mode 100644 libgloss/mips/boot/corecheck_predef.S
 create mode 100644 libgloss/mips/boot/init_caches.S
 create mode 100644 libgloss/mips/boot/init_caches_predef.S
 create mode 100644 libgloss/mips/boot/init_cm3l2.S
 create mode 100644 libgloss/mips/boot/init_cm3l2_predef.S
 create mode 100644 libgloss/mips/boot/init_cp0.S
 create mode 100644 libgloss/mips/boot/init_cp0_predef.S
 create mode 100644 libgloss/mips/boot/init_l23caches.S
 create mode 100644 libgloss/mips/boot/init_l23caches_predef.S
 create mode 100644 libgloss/mips/boot/init_tlb.S
 create mode 100644 libgloss/mips/boot/init_tlb_predef.S
 create mode 100644 libgloss/mips/boot/predef.h
 create mode 100644 libgloss/mips/boot/reset.S
 create mode 100644 libgloss/mips/boot/reset_predef.S
 create mode 100644 libgloss/mips/bootcode.ld
 delete mode 100644 libgloss/mips/crt0.S
 create mode 100644 libgloss/mips/examples/custom_excpt/Makefile
 create mode 100644 libgloss/mips/examples/custom_excpt/README.txt
 create mode 100644 libgloss/mips/examples/custom_excpt/custom_excpt.c
 create mode 100644 libgloss/mips/examples/fault_recovery/Makefile
 create mode 100644 libgloss/mips/examples/fault_recovery/README.txt
 create mode 100644 libgloss/mips/examples/fault_recovery/fault_recovery.c
 create mode 100644 libgloss/mips/examples/interrupt_handler/Makefile
 create mode 100644 libgloss/mips/examples/interrupt_handler/README.txt
 create mode 100644 libgloss/mips/examples/interrupt_handler/interrupt_handler.c
 create mode 100644 libgloss/mips/examples/isr_vector_space/Makefile
 create mode 100644 libgloss/mips/examples/isr_vector_space/README.txt
 create mode 100644 libgloss/mips/examples/isr_vector_space/excpt_isr.S
 create mode 100644 libgloss/mips/examples/isr_vector_space/isr_vector_space.c
 create mode 100644 libgloss/mips/examples/romable/Makefile
 create mode 100644 libgloss/mips/examples/romable/README.txt
 create mode 100644 libgloss/mips/examples/romable/romable.c
 create mode 100644 libgloss/mips/examples/romable_minimal/Makefile
 create mode 100644 libgloss/mips/examples/romable_minimal/README.txt
 create mode 100644 libgloss/mips/examples/romable_minimal/makescripts.sh
 create mode 100644 libgloss/mips/examples/romable_minimal/romable_minimal.c
 create mode 100644 libgloss/mips/examples/romable_predef/Makefile
 create mode 100644 libgloss/mips/examples/romable_predef/README.txt
 create mode 100644 libgloss/mips/examples/romable_predef/romable_predef.c
 create mode 100644 libgloss/mips/examples/romable_predef_xip/Makefile
 create mode 100644 libgloss/mips/examples/romable_predef_xip/README.txt
 create mode 100644 libgloss/mips/examples/romable_predef_xip/romable_predef_xip.c
 create mode 100644 libgloss/mips/fstat.c
 create mode 100644 libgloss/mips/hal/__exit.c
 create mode 100644 libgloss/mips/hal/abiflags.S
 create mode 100644 libgloss/mips/hal/cache.h
 create mode 100644 libgloss/mips/hal/crt0.S
 create mode 100644 libgloss/mips/hal/get_ram_range.c
 create mode 100644 libgloss/mips/hal/libcm3.a
 create mode 100644 libgloss/mips/hal/link.c
 create mode 100644 libgloss/mips/hal/minicrt.S
 create mode 100644 libgloss/mips/hal/mips64_tlb.c
 create mode 100644 libgloss/mips/hal/mips_clean_cache.c
 create mode 100644 libgloss/mips/hal/mips_cm3_l2size.c
 create mode 100644 libgloss/mips/hal/mips_dsp.S
 create mode 100644 libgloss/mips/hal/mips_excpt_boot.S
 create mode 100644 libgloss/mips/hal/mips_excpt_entry.S
 create mode 100644 libgloss/mips/hal/mips_excpt_handler.c
 create mode 100644 libgloss/mips/hal/mips_excpt_isr_fallback.S
 create mode 100644 libgloss/mips/hal/mips_excpt_isr_fragment.S
 create mode 100644 libgloss/mips/hal/mips_excpt_register.S
 create mode 100644 libgloss/mips/hal/mips_excpt_timer.S
 create mode 100644 libgloss/mips/hal/mips_flush_cache.c
 create mode 100644 libgloss/mips/hal/mips_fp.S
 create mode 100644 libgloss/mips/hal/mips_intctrl.c
 create mode 100644 libgloss/mips/hal/mips_l2size.c
 create mode 100644 libgloss/mips/hal/mips_lock_cache.c
 create mode 100644 libgloss/mips/hal/mips_msa.S
 create mode 100644 libgloss/mips/hal/mips_size_cache.c
 create mode 100644 libgloss/mips/hal/mips_sync_cache.c
 create mode 100644 libgloss/mips/hal/mips_tlb.c
 create mode 100644 libgloss/mips/hal/mips_xpa.S
 create mode 100644 libgloss/mips/hal/syscalls.c
 create mode 100644 libgloss/mips/include/mips/asm.h
 create mode 100644 libgloss/mips/include/mips/cm3.h
 create mode 100644 libgloss/mips/include/mips/cpu.h
 create mode 100644 libgloss/mips/include/mips/ctx.S
 create mode 100644 libgloss/mips/include/mips/dsp.h
 create mode 100644 libgloss/mips/include/mips/endian.h
 create mode 100644 libgloss/mips/include/mips/fgregdef.h
 create mode 100644 libgloss/mips/include/mips/fpa.h
 create mode 100644 libgloss/mips/include/mips/hal.h
 create mode 100644 libgloss/mips/include/mips/intctrl.h
 create mode 100644 libgloss/mips/include/mips/m32c0.h
 create mode 100644 libgloss/mips/include/mips/m32c1.h
 create mode 100644 libgloss/mips/include/mips/m32tlb.h
 create mode 100644 libgloss/mips/include/mips/m64c0.h
 create mode 100644 libgloss/mips/include/mips/m64tlb.h
 create mode 100644 libgloss/mips/include/mips/mips32.h
 create mode 100644 libgloss/mips/include/mips/mips64.h
 create mode 100644 libgloss/mips/include/mips/mt.h
 create mode 100644 libgloss/mips/include/mips/notlb.h
 create mode 100644 libgloss/mips/include/mips/prid.h
 create mode 100644 libgloss/mips/include/mips/regdef.h
 create mode 100644 libgloss/mips/include/mips/uhi_syscalls.h
 create mode 100644 libgloss/mips/include/mips/version.h
 create mode 100644 libgloss/mips/malta32-yamon.ld
 create mode 100644 libgloss/mips/rules/mipshal.mk
 create mode 100755 libgloss/mips/rules/srec2hex.pl
 delete mode 100644 libgloss/mips/syscalls.c
 create mode 100644 libgloss/mips/uhi/uhi_assert.c
 create mode 100644 libgloss/mips/uhi/uhi_break.c
 create mode 100644 libgloss/mips/uhi/uhi_close.c
 create mode 100644 libgloss/mips/uhi/uhi_exception.c
 create mode 100644 libgloss/mips/uhi/uhi_exit.c
 create mode 100644 libgloss/mips/uhi/uhi_fstat.c
 create mode 100644 libgloss/mips/uhi/uhi_get_ram_range.c
 create mode 100644 libgloss/mips/uhi/uhi_getargs.S
 create mode 100644 libgloss/mips/uhi/uhi_indirect.c
 create mode 100644 libgloss/mips/uhi/uhi_link.c
 create mode 100644 libgloss/mips/uhi/uhi_lseek.c
 create mode 100644 libgloss/mips/uhi/uhi_open.c
 create mode 100644 libgloss/mips/uhi/uhi_plog.c
 create mode 100644 libgloss/mips/uhi/uhi_pread.c
 create mode 100644 libgloss/mips/uhi/uhi_pwrite.c
 create mode 100644 libgloss/mips/uhi/uhi_read.c
 create mode 100644 libgloss/mips/uhi/uhi_stat.c
 create mode 100644 libgloss/mips/uhi/uhi_stat.h
 create mode 100644 libgloss/mips/uhi/uhi_unlink.c
 create mode 100644 libgloss/mips/uhi/uhi_write.c
 create mode 100644 libgloss/mips/uhi/yamon_close.c
 create mode 100644 libgloss/mips/uhi/yamon_exception.c
 create mode 100644 libgloss/mips/uhi/yamon_exit.c
 create mode 100644 libgloss/mips/uhi/yamon_fstat.c
 create mode 100644 libgloss/mips/uhi/yamon_read.c
 create mode 100644 libgloss/mips/uhi/yamon_syscalls.h
 create mode 100644 libgloss/mips/uhi/yamon_write.c
 create mode 100644 libgloss/mips/uhi32.ld
 create mode 100644 libgloss/mips/uhi64_64.ld
 create mode 100644 libgloss/mips/uhi64_n32.ld
 create mode 100644 newlib/libc/machine/mips/memcpy.c
 create mode 100644 newlib/libc/machine/mips/memset.c