From: Calvin Johnson <linux.cj@gmail.com>
To: barebox@lists.infradead.org
Subject: ARM security extension is not available with current barebox
Date: Wed, 13 Jul 2011 12:23:43 +0530 [thread overview]
Message-ID: <CAEhpT-VKNYVHHJnz3XKUBOGK3tSqBM=FXwK1ym0uue8ny6dFBA@mail.gmail.com> (raw)
[-- 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
reply other threads:[~2011-07-13 6:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEhpT-VKNYVHHJnz3XKUBOGK3tSqBM=FXwK1ym0uue8ny6dFBA@mail.gmail.com' \
--to=linux.cj@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox