[U-Boot] [PATCH v2 0/9] MIPS: improve start.S and add exception support
Daniel Schwierzeck
daniel.schwierzeck at gmail.com
Mon Oct 3 19:51:21 CEST 2016
Fix and optinmize initialization of cp0 registers. Also add
the possibilty to setup the initial stack and global data in
SRAM to provide a C environment for lowlevel_init(). This
could be used on the QCA ath79 platform to rewrite and
optimize the low-level init code.
Add support for a dynamic exception vectors in RAM and add
initial exception handlers. The general exception handler
prints an oops message similar to Linux kernel and then hangs.
The EJTAG exception handler checks for SDBBP and delegates to
the SDBBP handler if necessary. Otherwise the debug mode
will be simply exited. The SDBBP handler currently only
prints the content of registers c0_depc and c0_debug. This
could be extended in the future to handle semi-hosting
according to the MIPS UHI specification.
This patch series is also available at:
git://git.denx.de/u-boot-mips.git mips_rework_start_v2
Changes in v2:
- invoke UHI exception operation for all exception vectors but
the EJTAG debug exception
- use EHB after setting cp0 status
- reordered macros in genex.S to allow side-by-side diff with Linux's
arch/mips/include/asm/stackframe.h
- sync'ed genex.S with Linux v4.8-rc8 to incorporate changes for
MIPS r6
- add execution_hazard_barrier() after clearing c0 status.BEV
Daniel Schwierzeck (9):
MIPS: make inclusion of ROM exception vectors configurable
MIPS: fix ROM exception vectors
MIPS: fix iand optimize setup of CP0 registers
MIPS: factor out code for initial stack and global data
MIPS: add possibility to setup initial stack and global data in SRAM
MIPS: add asm-offsets for struct pt_regs
MIPS: reserve space for exception vectors
MIPS: add handling for generic and EJTAG exceptions
common/board_f: enable initr_trap for MIPS
arch/mips/Kconfig | 32 ++++++
arch/mips/cpu/start.S | 174 ++++++++++++++++++----------
arch/mips/include/asm/asm-offsets.h | 5 +
arch/mips/include/asm/mipsregs.h | 1 +
arch/mips/include/asm/system.h | 8 ++
arch/mips/include/asm/u-boot-mips.h | 4 +
arch/mips/lib/Makefile | 3 +
arch/mips/lib/asm-offsets.c | 61 ++++++++++
arch/mips/lib/genex.S | 224 ++++++++++++++++++++++++++++++++++++
arch/mips/lib/stack.c | 19 +++
arch/mips/lib/traps.c | 106 +++++++++++++++++
arch/mips/mach-ath79/Kconfig | 2 +
arch/mips/mach-pic32/Kconfig | 1 +
common/board_r.c | 4 +-
14 files changed, 581 insertions(+), 63 deletions(-)
create mode 100644 arch/mips/include/asm/asm-offsets.h
create mode 100644 arch/mips/lib/asm-offsets.c
create mode 100644 arch/mips/lib/genex.S
create mode 100644 arch/mips/lib/stack.c
create mode 100644 arch/mips/lib/traps.c
--
2.10.0
More information about the U-Boot
mailing list