
On Thu, Apr 25, 2013 at 11:37 PM, Marek Vasut marex@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@denx.de CC: Stefano Babic sbabic@denx.de CC: Fabio Estevam fabio.estevam@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@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br