question regarding startup code
Hi ppl,
Am a newbie to u-boot as well as arm assembly.
wanted to know about the startup code. Below is the vector table pasted from the code. What i dont understand is why only the reset vector is PC relative and all others have memory allocated to hold the addresses. I mean all other vectors also could be branch instructions.Any reason ?
.globl _start_start: b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
ldr pc, _data_abort
ldr pc, _not_used
ldr pc, _irq
ldr pc, _fiq
_undefined_instruction: .word undefined_instruction_software_interrupt: .word software_interrupt_prefetch_abort: .word prefetch_abort_data_abort: .word data_abort_not_used: .word not_used_irq: .word irq_fiq: .word fiq
.balignl 16,0xdeadbeef
Thanks and Regards,
Srinivas Bakki
__________________________________________________________
Sent from Yahoo! Mail.
More Ways to Keep in Touch. http://uk.docs.yahoo.com/nowyoucan.html
Quoted 29 lines
Hi ppl,
Am a newbie to u-boot as well as arm
assembly.
wanted to know about the startup code. Below is the vector table pasted from the code. What i dont understand is why only the reset vector is PC relative
and all others have memory allocated to hold the addresses. I mean all other vectors also could be branch instructions.Any reason ?.globl
_start_start: b reset
ldr pc,_undefined_instruction
ldr pc,_software_interrupt
ldr pc,_prefetch_abort
ldr pc,_data_abort
ldr pc,_not_used
ldr pc,_irq
ldr pc,_fiq
_undefined_instruction: .wordundefined_instruction_software_interrupt: .wordsoftware_interrupt_prefetch_abort: .wordprefetch_abort_data_abort: .worddata_abort_not_used: .wordnot_used_irq: .word irq_fiq: .word fiq
Quoted 3 lines
.balignl 16,0xdeadbeefThanks and Regards,
Srinivas Bakki
Hi,
I have thought of an explanation can anyone please
rectify if am wrong.
the load to PC instruction allows utilizing the full 32-bit address space for placement of the exception handlers, whereas the relative branch instruction is limited to +/- 25 bits relative to the current PC.
is that right ?
Regards,
Srinivas Bakki
__________________________________________________________
Sent from Yahoo! Mail.
More Ways to Keep in Touch. http://uk.docs.yahoo.com/nowyoucan.html
Quoted 10 lines
-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of srinivas bakki
Sent: 25 March 2008 05:32
To: u-boot-users at lists.sourceforge.net
Subject: [U-Boot-Users] question regarding startup code
Quoted 3 lines
Hi ppl,
Am a newbie to u-boot as well as arm assembly.
wanted to know about the startup code.
Srinivas
Try
http://infocenter.arm.com
Software Development Toolkit
ARM Software Development Toolkit User Guide
10. Writing Code For ROM
Let me know offlist if you can't access this.
Regards
Peter