Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31abdb74 authored by David Brown's avatar David Brown Committed by Russell King
Browse files

ARM: 5739/1: ARM: allow empty ATAG_CORE



From: David Brown <davidb@quicinc.com>

The ATAG_CORE is allowed to be empty.  Although this is handled
by parse_tag_core(), __vet_atags during startup rejects this tag
unless it contains data.  Allow the initial tag to be either the
full size, or empty.

Signed-off-by: default avatarDavid Brown <davidb@quicinc.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0a4bc5e8
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@


#define ATAG_CORE 0x54410001
#define ATAG_CORE 0x54410001
#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
#define ATAG_CORE_SIZE_EMPTY ((2*4) >> 2)


	.align	2
	.align	2
	.type	__switch_data, %object
	.type	__switch_data, %object
@@ -251,7 +252,8 @@ __vet_atags:
	bne	1f
	bne	1f


	ldr	r5, [r2, #0]			@ is first tag ATAG_CORE?
	ldr	r5, [r2, #0]			@ is first tag ATAG_CORE?
	subs	r5, r5, #ATAG_CORE_SIZE
	cmp	r5, #ATAG_CORE_SIZE
	cmpne	r5, #ATAG_CORE_SIZE_EMPTY
	bne	1f
	bne	1f
	ldr	r5, [r2, #4]
	ldr	r5, [r2, #4]
	ldr	r6, =ATAG_CORE
	ldr	r6, =ATAG_CORE