[U-Boot] [PATCH v7 1/5] core support of arm64

Scott Wood scottwood at freescale.com
Thu Sep 12 03:23:04 CEST 2013


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?

> +						;\
> +	/* 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