mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* ARM security extension is not available with current barebox
@ 2011-07-13  6:53 Calvin Johnson
  0 siblings, 0 replies; only message in thread
From: Calvin Johnson @ 2011-07-13  6:53 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1966 bytes --]

Hi,

While trying to compile barebox for ARM processor with TrustZone
security extension, the assembler complained about unsupported ARM
instruction "SMC".
-----------------------------------
 {standard input}: Assembler messages:
{standard input}:12: Error: selected processor does not support ARM mode
`smc #0'
-----------------------------------

On searching online I found the following link which explains the solution.
https://lists.yoctoproject.org/pipermail/poky/2011-May/005939.html


I feel that we may have to bring ARM TrustZone security extension support to
barebox at least as a conditional compilation option, as this may be widely
used in ARM based embedded systems.

In order to resolve my issue, I just had to make a minor change
to arch/arm/Makefile

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6201a9b..b0bc8b9 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -15,11 +15,12 @@ endif

 comma = ,

+
 # This selects which instruction set is used.
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes
 # testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call
cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
+arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call
cc-option,-march=armv7-a+sec,-march=armv5t -Wa$(comma)-march=armv7-a+sec)
 arch-$(CONFIG_CPU_32v6)            :=-D__LINUX_ARM_ARCH__=6 $(call
cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
 arch-$(CONFIG_CPU_32v5)                :=-D__LINUX_ARM_ARCH__=5 $(call
cc-option,-march=armv5te,-march=armv4t)
 arch-$(CONFIG_CPU_32v4T)       :=-D__LINUX_ARM_ARCH__=4 -march=armv4t

As I'm new to barebox, I'm not sure whether this change will break
something. It would be good if experts can have look at the link provided
and submit a patch.

Thanks,
Calvin

[-- Attachment #1.2: Type: text/html, Size: 2534 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-13  6:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13  6:53 ARM security extension is not available with current barebox Calvin Johnson

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