linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: allow empty ATAG_CORE
@ 2009-09-30 21:44 David Brown
  2009-09-30 22:53 ` David Brown
  0 siblings, 1 reply; 3+ messages in thread
From: David Brown @ 2009-09-30 21:44 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Currently, some configurations of the Android bootloader use an empty
ATAG_CORE.

 arch/arm/kernel/head-common.S |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 93ad576..1e8f0d6 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -13,6 +13,7 @@
 
 #define ATAG_CORE 0x54410001
 #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
+#define ATAG_CORE_SIZE_EMPTY ((2*4 + 3*4) >> 2)
 
 	.align	2
 	.type	__switch_data, %object
@@ -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
-- 
1.6.2.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: allow empty ATAG_CORE
  2009-09-30 21:44 [PATCH] ARM: allow empty ATAG_CORE David Brown
@ 2009-09-30 22:53 ` David Brown
  2009-10-01 15:30   ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: David Brown @ 2009-09-30 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Sorry, previous patch didn't actually do anything, since the new
constant was defined incorrectly.

 arch/arm/kernel/head-common.S |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 93ad576..885a721 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -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
@@ -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
-- 
1.6.2.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: allow empty ATAG_CORE
  2009-09-30 22:53 ` David Brown
@ 2009-10-01 15:30   ` Russell King - ARM Linux
  0 siblings, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2009-10-01 15:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 30, 2009 at 03:53:00PM -0700, David Brown wrote:
> 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.

Please send to the patch system, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-01 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 21:44 [PATCH] ARM: allow empty ATAG_CORE David Brown
2009-09-30 22:53 ` David Brown
2009-10-01 15:30   ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).