public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] tegra: override compiler flags for cmd_nvedit
       [not found] <1336162232-19714-1-git-send-email-amartin@nvidia.com>
@ 2012-05-14 20:25 ` Allen Martin
  2012-05-14 23:14 ` [U-Boot] [PATCH] tegra: override compiler flags for low level init code Allen Martin
  1 sibling, 0 replies; 7+ messages in thread
From: Allen Martin @ 2012-05-14 20:25 UTC (permalink / raw)
  To: u-boot

Override -march setting for tegra to -march=armv4t for cmd_nvedit.c

The recent change to use -march=armv7-a for armv7 caused a regression
on tegra because tegra starts boot on a arm7tdmi processor before
transferring control to the cortex-a9.  While still executing on the
arm7tdmi there is a call to getenv_ulong() that causes an illegal
instruction exception if cmd_nvedit is compiled for armv7.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 arch/arm/cpu/armv7/tegra2/config.mk |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/tegra2/config.mk b/arch/arm/cpu/armv7/tegra2/config.mk
index fe9ef5b..3f068dc 100644
--- a/arch/arm/cpu/armv7/tegra2/config.mk
+++ b/arch/arm/cpu/armv7/tegra2/config.mk
@@ -24,10 +24,11 @@
 # MA 02111-1307 USA
 #
 
-# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this
-# file with compatible flags
+# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build these
+# files with compatible flags
 ifdef CONFIG_TEGRA2
 CFLAGS_arch/arm/lib/board.o += -march=armv4t
+CFLAGS_common/cmd_nvedit.o += -march=armv4t
 endif
 
 USE_PRIVATE_LIBGCC = yes
-- 
1.7.9.5

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
       [not found] <1336162232-19714-1-git-send-email-amartin@nvidia.com>
  2012-05-14 20:25 ` [U-Boot] [PATCH v2] tegra: override compiler flags for cmd_nvedit Allen Martin
@ 2012-05-14 23:14 ` Allen Martin
  2012-05-14 23:23   ` Stephen Warren
  1 sibling, 1 reply; 7+ messages in thread
From: Allen Martin @ 2012-05-14 23:14 UTC (permalink / raw)
  To: u-boot

Override -march setting for tegra to -march=armv4t for files that are
necessary for low level init on tegra.

The recent change to use -march=armv7-a for armv7 caused a regression
on tegra because tegra starts boot on a arm7tdmi processor before
transferring control to the cortex-a9.  While still executing on the
arm7tdmi there are calls to getenv_ulong() and memset() that cause an
illegal instruction exception if compiled for armv7.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 arch/arm/cpu/armv7/tegra2/config.mk |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/tegra2/config.mk b/arch/arm/cpu/armv7/tegra2/config.mk
index fe9ef5b..4dd8cb8 100644
--- a/arch/arm/cpu/armv7/tegra2/config.mk
+++ b/arch/arm/cpu/armv7/tegra2/config.mk
@@ -24,10 +24,13 @@
 # MA 02111-1307 USA
 #
 
-# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this
-# file with compatible flags
+# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build these
+# files with compatible flags
 ifdef CONFIG_TEGRA2
 CFLAGS_arch/arm/lib/board.o += -march=armv4t
+CFLAGS_arch/arm/lib/memset.o += -march=armv4t
+CFLAGS_lib/string.o += -march=armv4t
+CFLAGS_common/cmd_nvedit.o += -march=armv4t
 endif
 
 USE_PRIVATE_LIBGCC = yes
-- 
1.7.9.5

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
  2012-05-14 23:14 ` [U-Boot] [PATCH] tegra: override compiler flags for low level init code Allen Martin
@ 2012-05-14 23:23   ` Stephen Warren
  2012-06-04 17:54     ` Allen Martin
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2012-05-14 23:23 UTC (permalink / raw)
  To: u-boot

On 05/14/2012 05:14 PM, Allen Martin wrote:
> Override -march setting for tegra to -march=armv4t for files that are
> necessary for low level init on tegra.
> 
> The recent change to use -march=armv7-a for armv7 caused a regression
> on tegra because tegra starts boot on a arm7tdmi processor before
> transferring control to the cortex-a9.  While still executing on the
> arm7tdmi there are calls to getenv_ulong() and memset() that cause an
> illegal instruction exception if compiled for armv7.
> 
> Signed-off-by: Allen Martin <amartin@nvidia.com>

Tested-by: Stephen Warren <swarren@wwwdotorg.org>

(This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The
Whistler patches I just sent were tested with this fix in place)

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
  2012-05-14 23:23   ` Stephen Warren
@ 2012-06-04 17:54     ` Allen Martin
  2012-06-04 18:00       ` Stephen Warren
  0 siblings, 1 reply; 7+ messages in thread
From: Allen Martin @ 2012-06-04 17:54 UTC (permalink / raw)
  To: u-boot

On Mon, May 14, 2012 at 04:23:33PM -0700, Stephen Warren wrote:
> On 05/14/2012 05:14 PM, Allen Martin wrote:
> > Override -march setting for tegra to -march=armv4t for files that are
> > necessary for low level init on tegra.
> > 
> > The recent change to use -march=armv7-a for armv7 caused a regression
> > on tegra because tegra starts boot on a arm7tdmi processor before
> > transferring control to the cortex-a9.  While still executing on the
> > arm7tdmi there are calls to getenv_ulong() and memset() that cause an
> > illegal instruction exception if compiled for armv7.
> > 
> > Signed-off-by: Allen Martin <amartin@nvidia.com>
> 
> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
> 
> (This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The
> Whistler patches I just sent were tested with this fix in place)

Hi Tom, could you pick this up in u-boot-tegra?  Without it tegra is
currently broken in both u-boot-tegra and u-boot gits depending on the
compiler you use. 

-Allen
-- 
nvpublic

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
  2012-06-04 17:54     ` Allen Martin
@ 2012-06-04 18:00       ` Stephen Warren
  2012-06-04 18:06         ` Allen Martin
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2012-06-04 18:00 UTC (permalink / raw)
  To: u-boot

On 06/04/2012 11:54 AM, Allen Martin wrote:
> On Mon, May 14, 2012 at 04:23:33PM -0700, Stephen Warren wrote:
>> On 05/14/2012 05:14 PM, Allen Martin wrote:
>>> Override -march setting for tegra to -march=armv4t for files that are
>>> necessary for low level init on tegra.
>>>
>>> The recent change to use -march=armv7-a for armv7 caused a regression
>>> on tegra because tegra starts boot on a arm7tdmi processor before
>>> transferring control to the cortex-a9.  While still executing on the
>>> arm7tdmi there are calls to getenv_ulong() and memset() that cause an
>>> illegal instruction exception if compiled for armv7.
>>>
>>> Signed-off-by: Allen Martin <amartin@nvidia.com>
>>
>> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
>>
>> (This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The
>> Whistler patches I just sent were tested with this fix in place)
> 
> Hi Tom, could you pick this up in u-boot-tegra?  Without it tegra is
> currently broken in both u-boot-tegra and u-boot gits depending on the
> compiler you use. 

It's been there for a while, I believe, at least in u-boot-tegra/master.

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
  2012-06-04 18:00       ` Stephen Warren
@ 2012-06-04 18:06         ` Allen Martin
  2012-06-04 18:10           ` Tom Warren
  0 siblings, 1 reply; 7+ messages in thread
From: Allen Martin @ 2012-06-04 18:06 UTC (permalink / raw)
  To: u-boot

On Mon, Jun 04, 2012 at 11:00:35AM -0700, Stephen Warren wrote:
> On 06/04/2012 11:54 AM, Allen Martin wrote:
> > Hi Tom, could you pick this up in u-boot-tegra?  Without it tegra is
> > currently broken in both u-boot-tegra and u-boot gits depending on the
> > compiler you use. 
> 
> It's been there for a while, I believe, at least in u-boot-tegra/master.

Ah you're right sorry, my remote was stale.  What's the next merge
window to get this into u-boot/master?  I imagine other people must be
running into this too.

-Allen
-- 
nvpublic

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

* [U-Boot] [PATCH] tegra: override compiler flags for low level init code
  2012-06-04 18:06         ` Allen Martin
@ 2012-06-04 18:10           ` Tom Warren
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Warren @ 2012-06-04 18:10 UTC (permalink / raw)
  To: u-boot

Allen,

> -----Original Message-----
> From: Allen Martin [mailto:amartin at nvidia.com]
> Sent: Monday, June 04, 2012 11:06 AM
> To: Stephen Warren
> Cc: Tom Warren; vapier at gentoo.org; wd at denx.de; u-boot at lists.denx.de
> Subject: Re: [PATCH] tegra: override compiler flags for low level init code
> 
> On Mon, Jun 04, 2012 at 11:00:35AM -0700, Stephen Warren wrote:
> > On 06/04/2012 11:54 AM, Allen Martin wrote:
> > > Hi Tom, could you pick this up in u-boot-tegra?  Without it tegra is
> > > currently broken in both u-boot-tegra and u-boot gits depending on
> > > the compiler you use.
> >
> > It's been there for a while, I believe, at least in u-boot-tegra/master.
> 
> Ah you're right sorry, my remote was stale.  What's the next merge window to
> get this into u-boot/master?  I imagine other people must be running into
> this too.
Sorry, not sure. Adding Wolfgang and Albert - it really depends on them. The pull request that contains this patch went out on Thursday.

Tom
> 
> -Allen
> --
> nvpublic

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

end of thread, other threads:[~2012-06-04 18:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1336162232-19714-1-git-send-email-amartin@nvidia.com>
2012-05-14 20:25 ` [U-Boot] [PATCH v2] tegra: override compiler flags for cmd_nvedit Allen Martin
2012-05-14 23:14 ` [U-Boot] [PATCH] tegra: override compiler flags for low level init code Allen Martin
2012-05-14 23:23   ` Stephen Warren
2012-06-04 17:54     ` Allen Martin
2012-06-04 18:00       ` Stephen Warren
2012-06-04 18:06         ` Allen Martin
2012-06-04 18:10           ` Tom Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox