All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] ARM exception vectors -- relocating
@ 2004-07-06 17:27 Curt Brune
  2004-07-06 21:19 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Curt Brune @ 2004-07-06 17:27 UTC (permalink / raw)
  To: u-boot

Hello,

I have a question about relocating the exception vectors for the ARM
platform.  I am working with cpu/arm720t/start.S and want to use
interrupts, but I think I see a problem with the code as it stands
now.  Consider the following scenario:

1. power on, cpu starts executing from address 0x0, which is located
   in flash.

2. memsetup.S configures 8MB SRAM to begin at address 0x0 and remaps
   flash to address 0x01000000.

3. back in start.S u-boot is relocated(copied) from flash to TEXT_BASE
   = 0x007d0000.

Now the exception vectors are sitting in SRAM @ 0x007d0000 and in
flash @ 0x0100000 -- if I want to use interrupts, however, the
exception vectors need to be in SRAM at address 0x0.

Currently I have added an additional relocation step to start.S that
explicitly copies the vectors from flash to 0x0 (in SRAM) if TEXT_BASE
is not equal 0x0 (if TEXT_BASE is equal to 0x0 there is no problem).

Question: Is start.S the correct place to put this, perhaps bracketed
with "#ifdef CONFIG_USE_IRQ/#endif"?  It seems like a global problem
that all arm720t boards that use interrupts would have.  Or is
memsetup.S a better place for this?

Comments?

Cheers,
Curt

-- 

========================================================================
 Curt Brune           | Phone   1.650.380.2528 |     Managing Principal
 curt at cucy.com        | WWW       www.cucy.com |           Cucy Systems
========================================================================
             Cucy Systems -- Software. Integration. Training.
========================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [U-Boot-Users] ARM exception vectors -- relocating
@ 2004-07-07  9:52 Friedrich, Lars
  2004-07-07 10:28 ` Marius Groeger
  0 siblings, 1 reply; 7+ messages in thread
From: Friedrich, Lars @ 2004-07-07  9:52 UTC (permalink / raw)
  To: u-boot

>> Maybe, but I don't think so. At least I see no  code  in  ARMBoot  to
>> relocate the exception vectors.
> Because they can't be. The vectors always sit at address 0000'0000,
> and thus in the flash. You can only change that by turning on the MMU.
> So the relocated entry points are loaded to the pc via ldr, the only
> exception being the RESET vector, obviosly. In other words, interrupts
> in ARMboot can only be used _after_ relocation.

I think you fail to understand the problem.

IF the flash memory is mapped to an area != 0x0 AND
the SDRAM memory is mapped to 0x0 BUT the _TEXT_BASE does not
start at 0x0, THEN the exception vectors will not work,
as there is no proper handling of this case in the current code.

All other issues you have raised are correct, but fail to recognize
the situation.

Best regards,
Lars Friedrich

-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-07-07 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-06 17:27 [U-Boot-Users] ARM exception vectors -- relocating Curt Brune
2004-07-06 21:19 ` Wolfgang Denk
2004-07-07  7:48   ` Marius Groeger
2004-07-07  8:09     ` Wolfgang Denk
2004-07-07  8:19       ` Marius Groeger
  -- strict thread matches above, loose matches on Subject: below --
2004-07-07  9:52 Friedrich, Lars
2004-07-07 10:28 ` Marius Groeger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.