Skip to content

Commit

Permalink
ARM: 5739/1: ARM: allow empty ATAG_CORE
Browse files Browse the repository at this point in the history
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: David Brown <davidb@quicinc.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
David Brown authored and Russell King committed Oct 2, 2009
1 parent 0a4bc5e commit 31abdb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/kernel/head-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

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

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

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
ldr r5, [r2, #4]
ldr r6, =ATAG_CORE
Expand Down

0 comments on commit 31abdb7

Please sign in to comment.