[U-Boot] [PATCH v7 1/5] core support of arm64
FengHua
fenghua at phytium.com.cn
Thu Sep 12 06:47:29 CEST 2013
> -----原始邮件-----
> 发件人: "Scott Wood" <scottwood at freescale.com>
> 发送时间: 2013年9月12日 星期四
> 收件人: fenghua at phytium.com.cn
> 抄送: u-boot at lists.denx.de, trini at ti.com
> 主题: Re: [U-Boot] [PATCH v7 1/5] core support of arm64
>
> On Tue, 2013-09-10 at 16:12 +0800, fenghua at phytium.com.cn wrote:
> > +/*
> > + * Enter Exception.
> > + * This will save the processor state that is X0~X29/LR/SP/ELR/PSTATE
> > + * to the stack frame.
> > + */
> > +#define EXCEPTION_ENTRY \
>
> asm macros are nicer.
>
> > + sub sp, sp, S_FRAME_SIZE - S_LR ;\
> > + push x28, x29 ;\
> > + push x26, x27 ;\
> > + push x24, x25 ;\
> > + push x22, x23 ;\
> > + push x20, x21 ;\
> > + push x18, x19 ;\
> > + push x16, x17 ;\
> > + push x14, x15 ;\
> > + push x12, x13 ;\
> > + push x10, x11 ;\
> > + push x8, x9 ;\
> > + push x6, x7 ;\
> > + push x4, x5 ;\
> > + push x2, x3 ;\
> > + push x0, x1 ;\
> > + add x21, sp, S_FRAME_SIZE ;\
>
> You just happened to pick x21 for this on your rewrite?
>
The preservation of exception state just should be that.
If this got problem, I'd like to remove it. Actually, it's unnecessary currently.
Best regards,
> > + ;\
> > + /* Could be running at EL1 or EL2 */ ;\
> > + mrs x0, CurrentEL ;\
> > + cmp x0, 0x4 ;\
> > + b.eq 1f ;\
> > + cmp x0, 0x8 ;\
> > + b.eq 2f ;\
> > + b 3f ;\
> > +1: mrs x22, elr_el1 ;\
> > + mrs x23, spsr_el1 ;\
>
> Likewise x22 and x23. Taking Linux code and altering details is not the
> same thing as writing from scratch and does not free the code from
> GPLv2-only or the need to attribute.
>
> Given how many times we've gone back and forth on this sort of thing,
> I'm rather nervous about the legal status of this patchset in general.
> What other copying is there that I haven't noticed?
>
> -Scott
>
>
>
More information about the U-Boot
mailing list