[U-Boot] [PATCH v3 0/2] Fix SoC-specific exception handling

Albert ARIBAUD
2014-11-13T16:59:13Z

Short version:

* this patch fixes exception handling on i.MX27
which was broken, probably from day one.

* this patch was tested on apf27. Due to lack of
debugging hardware, only the data abort, prefetch
abort and undefined instruction cases have been
tested; software interrupt, IRQ and FIQ were not
tested.

* This patch was NOT tested on imx27lite, which is
the only other i.MX27-based board AFAICT. The
maintainer of imx27lite is Cc:ed on this series.

* i.MX custodian (Cc:) please review this patch and let
me know if this should also be done for other i.MX
SoCs as well.

Long version:

This patch was created after apf27 maintainer found
out that the board did not boot any more. The root
cause was that commit 3ff46cc4 would try and write
into the exception vectors table, which i.MX27 has
in ROM. This caused a data abort, and as the U-Boot
vectors were not in place yet, this abort went to
the ROM code which silently hung.

Investigation led to a patch sent in 2009 to the list
(but never applied) with a description of the i.MX27
exception handling:

http://lists.denx.de/pipermail/u-boot/2009-October/062811.html

By his own author's admission, this patch was not fit for
inclusion in U-Boot, but it gave the technical information
needed to produce this present patch set.

The first patch is only cosmetic, fixing whitespace
quirks which affect legibility or cause a warning in
patman.

The second patch moves vectors relocation out of the
relocate_code routine and into its own relocate_vectors
routine. This routine is made weak so that it can be
replaced by a SoC-specific, strong one. Such a strong
replacement is provided for i.MX27.

Changes in v3:
- Fixed AGAIN wrong i.MX27 vector relocation code

Changes in v2:
- Fixed wrong i.MX27 vector relocation code

Albert ARIBAUD (2):
cosmetic: arm: fix whitespace in arch/arm/lib/relocate.S
imx: fix exception vectors relocation in imx27

arch/arm/cpu/arm926ejs/mx27/Makefile | 4 ++
arch/arm/cpu/arm926ejs/mx27/relocate.S | 51 ++++++++++++++++++++++++
arch/arm/lib/crt0.S | 5 +++
arch/arm/lib/relocate.S | 73 ++++++++++++++++++++--------------
4 files changed, 103 insertions(+), 30 deletions(-)
create mode 100644 arch/arm/cpu/arm926ejs/mx27/relocate.S

--
2.1.0