RE: [U-Boot-Users] [PATCH] ARM720t -- Relocating Exception Vectors

Subject: [U-Boot-Users] [PATCH] ARM720t -- Relocating Exception Vectors
This patch is for cpu/arm720t/start.S -- The patch relocates the exception vectors to RAM address 0x0.
No offense, but this is a bad hack. The copy code belongs from a 'structured' point of view to where the relocation is done and not just attached to the end of the source code. And from an 'optimized code' point of view it belongs there, too, as _TEXT_BASE is already loaded there into an register for example, no need to do this multiple times. I don't quite see the necessarity for a loop, too. There are 7 exception vectors, never more, never less. The copy procedure can be handled by a single ldmia/stmia pair.
Best regards, Lars Friedrich

On Wed, Jul 07, 2004 at 09:21:08AM +0200, Friedrich, Lars wrote:
This patch is for cpu/arm720t/start.S -- The patch relocates the exception vectors to RAM address 0x0.
No offense, but this is a bad hack. The copy code belongs from
I see your point -- thanks for the advice. I will submit a new patch incorporating your advice.
Everyone, please ignore this patch.
Cheers, Curt

Attached is a new patch for relocating the exception vectors, which addresses your concerns:
On Wed, Jul 07, 2004 at 09:21:08AM +0200, Friedrich, Lars wrote:
No offense, but this is a bad hack. The copy code belongs from a 'structured' point of view to where the relocation is done and not just attached to the end of the source code.
Agreed -- moved the vector relocation code to where the main relocation resides.
And from an 'optimized code' point of view it belongs there, too, as _TEXT_BASE is already loaded there into an register for example, no need to do this multiple times. I don't quite see the necessarity for a loop, too. There are 7 exception vectors, never more, never less. The copy procedure can be handled by a single ldmia/stmia pair.
Almost -- I also need to copy the 7 words after the vectors that contain the absolute addresses of the exception handlers. In total that takes two ldmia/stmia pairs.
Thanks for the criticism -- the code is a bit tighter now (down to 7 instructions from 14, no branches and no loops).
Cheers, Curt
participants (2)
-
Curt Brune
-
Friedrich, Lars