The content of the ATAG_CORE tag is optional, according to the specification. The existing code that validates the atag list pointed to by r2 at boot does not accept an empty ATAG_CORE tag. This patch fixes the test so that the empty tag is accepted as well as the complete tag. (This corrects issues observed with the Apex bootloader, as well as with the kexec mechanism.) Signed-off-by: Mike Westerhof -- PATCH FOLLOWS KernelVersion: 2.6.24 diff -Naur linux.orig/arch/arm/kernel/head-common.S linux/arch/arm/kernel/head-common.S --- linux.orig/arch/arm/kernel/head-common.S 2008-02-01 22:21:57.000000000 -0600 +++ linux/arch/arm/kernel/head-common.S 2008-02-01 22:27:14.000000000 -0600 @@ -239,8 +239,11 @@ ldr r5, [r2, #0] @ is first tag ATAG_CORE? subs r5, r5, #ATAG_CORE_SIZE + beq 2f + ldr r5, [r2, #0] + subs r5, r5, #ATAG_CORE_EMPTY_SIZE bne 1f - ldr r5, [r2, #4] +2: ldr r5, [r2, #4] ldr r6, =ATAG_CORE cmp r5, r6 bne 1f diff -Naur linux.orig/arch/arm/kernel/head.S linux/arch/arm/kernel/head.S --- linux.orig/arch/arm/kernel/head.S 2008-02-01 22:21:57.000000000 -0600 +++ linux/arch/arm/kernel/head.S 2008-02-01 22:22:01.000000000 -0600 @@ -30,6 +30,7 @@ #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) #define ATAG_CORE 0x54410001 +#define ATAG_CORE_EMPTY_SIZE ((2*4) >> 2) #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)