[U-Boot] [PATCH] arm: mxs: Fix vectoring table crafting

Otavio Salvador otavio at ossystems.com.br
Fri Apr 26 05:05:05 CEST 2013


On Thu, Apr 25, 2013 at 11:37 PM, Marek Vasut <marex at denx.de> wrote:
> The vectoring table has to be placed at 0x0, but U-Boot on MX23/MX28
> starts from RAM, so the vectoring table at 0x0 is not present. Craft
> code that will be placed at 0x0 and will redirect interrupt vectoring
> to proper location of the U-Boot in RAM.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> CC: Stefano Babic <sbabic at denx.de>
> CC: Fabio Estevam <fabio.estevam at freescale.com>

Please always Cc me in 'mxs' patches.

> +/*
> + * This function will craft a jumptable at 0x0 which will redirect interrupt
> + * vectoring to proper location of U-Boot in RAM.
> + *
> + * The structure of the jumptable will be as follows:
> + *  ldr pc, [pc, #0x18] ..... for each vector, thus repeated 8 times
> + *  <destination address> ... for each previous ldr, thus also repeated 8 times
> + *
> + * The "ldr pc, [pc, #0x18]" instruction above loads address from memory at
> + * offset 0x18 from current value of PC register. Note that PC is already
> + * incremented by 4 when computing the offset, so the effective offset is
> + * actually 0x20, this the associated <destination address>. Loading the PC
> + * register with an address performs a jump to that address.
> + */

I understood what you're doing but not the motivation for it. What
problem you're fixing or feature this will allow?

--
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


More information about the U-Boot mailing list