[U-Boot] [PATCH v2] MIPS: start.S: unify and simplify reset vector handling

Langer Thomas (LQDE RD ST PON SW) thomas.langer at lantiq.com
Sat Feb 2 00:16:49 CET 2013


Hello Daniel,

Daniel Schwierzeck wrote on 2013-02-01:

> 2013/2/1 Gabor Juhos <juhosg at openwrt.org>:
>> Hi Daniel,
>> 
>>> From: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
>>> 
>>> Adopt reset vector handling from Yamon.
>>> 
>>> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
>> 
>> Looks good, I have only one minor comment below.
>> 
>>> ---
>>> Changes for v2:
>>> - optimized U-Boot entry point on MIPS32
>>> - fix indentation of .org
>>> 
>>> ---
>>>  arch/mips/cpu/mips32/start.S | 186 +++++++++----------------------------------
>>>  arch/mips/cpu/mips64/start.S |  47 +++++------
>>>  2 files changed, 57 insertions(+), 176 deletions(-)
>>> diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
>>> index 65acf7d..7373d4e 100644
>>> --- a/arch/mips/cpu/mips32/start.S
>>> +++ b/arch/mips/cpu/mips32/start.S
>>> @@ -47,19 +47,16 @@
>>>       .set    pop
>>>       .endm
>>> -#define RVECENT(f,n) \
>>> -   b f; nop
>>> -#define XVECENT(f,bev) \
>>> -   b f     ;           \
>>> -   li k0,bev
>>> -
>>>       .set noreorder
>>>       
>>>       .globl _start
>>>       .text
>>>  _start:
>>> -     RVECENT(reset,0)                        # U-boot entry point
>>> -     RVECENT(reset,1)                        # software reboot
>>> +     /* U-boot entry point */
>>> +     b       reset
>>> +      nop
>>> +
>>> +     .org 0x10
>>>  #ifdef CONFIG_SYS_XWAY_EBU_BOOTCFG
>> 
>> The .org should be within the ifdef. Although it does not change the
>> generated binary code, but logically it would be a more correct place.
>> Sorry, I should have mentioned that in the previous mail.
>> 
>> -Gabor
>> 
>> 
> 
> I think we should keep it outside. If we add qemu-malta, then we get
> another #if branch.
> I also would like to move some register inits (watch, timer, status)
> to slightly reduce
> binary size.
>
In addition you could completely remove these exception vectors for u-boot binaries,
which will be loaded from SPI- or NAND-flash (or some other storage, which is not
memory mapped), which typically involves some ROM code.
In this case, the vectors are already part of the ROM.

Best Regards,
Thomas




More information about the U-Boot mailing list