[uClinux-dev] Exception vectors on ARM?

Lance Spaulding lance at hpbs4089.boi.hp.com
Thu Nov 1 17:48:45 EST 2001


Steve & Erwin,

Thanks for the responses.  I guess what I was trying to ask was if uClinux
could currently be configured to boot an ARM processor directly (eg - w/o
requiring a bootloader to even setup the vector tables).  from what I can tell,
the answer is no so I believe I have to add that support myself.  I think this
should be as simple as setting TEXTADDR=0 and adding a dummy vector table at
the start of stext as shown below:

ENTRY(stext)
      /* Initial reset vector table at address TEXTADDR=0 */
      b resetvec
      b unexpected
      b unexpected
      b unexpected
      b unexpected
      b unexpected
      b unexpected
      b unexpected

unexpected:
      b unexpected

      /* Leave room for the IRQ stubs to get copied to */
      .space 4096-(9*4)

resetvec:
      /* Initialize hardware */

      /* normal stext code follows */

Is there a problem with having TEXTADDR=0?  It looks like this would only be a
problem on MMU-enabled versions of Linux which put the page tables just below
TEXTADDR.

Again, thanks in advance,
Lance

On Nov 1, 12:53pm, Steve Johnson wrote:
> Lance,
>
>     Exception vector table is in entry-armv.S (Lbranches/jump_addresses
> code).  trap_init() puts those vectors at 0x0-0x1c.
>
>     .stext is the start of your text, which should be modified by
> TEXTADDR to be other than 0x0.  If you have an external process set up
> your vector table, just put a branch to the start of your text at 0x0.
>
>     Steve
>-- End of excerpt from Steve Johnson

On Nov 1,  8:40pm, Erwin Authried wrote:
> For the 2.4 kernel, the vectors are initialized in
> arch/armnommu/kernel/entry-armv.S,
> in __trap_init. The vectors are copied to location 0, and the IRQ stubs to
> adress 0x200.
> If you don't want to modify the source, wouldn't it be easier to locate the
> kernel image
> behind that (e.g. 0x300) and then jump to this adress?
>
> -Erwin
>-- End of excerpt from Erwin Authried

On Nov 1, 11:59am, Lance Spaulding wrote:
> Subject: [uClinux-dev] Exception vectors on ARM?
> Can someone tell me where the exception vector table is located in uClinux?
>  from what I can tell looking through the code, it appears the entry location
> in the kernel is at "stext" in kernel/head-armv.S.  However, the code at
stext
> isn't in the form of an ARM exception table.  How and where do the vectors at
> address 0 get filled in?  I'd like to link uClinux to address 0 and boot
> directly from it w/o using a bootloader (RAM is at address 0 and is already
> setup before the ARM boots).  Is this currently possible with uClinux?
>
> Thanks in advance,
> Lance
>-- End of excerpt from Lance Spaulding

-- 
###########################+------------------------------------------------+
########  _/       ########|  O-      L A N C E   S P A U L D I N G      O- |
#####    _/           #####|         Research & Development Engineer        |
####    _/_/_/ _/_/_/  ####|             Hewlett-Packard Company            |
####   _/  _/ _/  _/   ####|        LaserJet Copy Solutions,  M/S 242       |
####  _/  _/ _/_/_/    ####|       11311 Chinden Blvd, Boise, ID  83714     |
#####       _/        #####| EMAIL: lance at boi.hp.com   URL: hpbs2780/~lance |
########   _/      ########| VOICE:(208) 396-3342      FAX: (208) 396-3457  |
###########################+------------------------------------------------+
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list