From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] ARM: OMAP5: redefine arm_setup_identity_mapping
Date: Tue, 11 Dec 2012 10:43:25 -0500 [thread overview]
Message-ID: <50C7549D.5080907@ti.com> (raw)
In-Reply-To: <1355240131-31173-1-git-send-email-v-stehle@ti.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/11/12 10:35, Vincent Stehl? wrote:
> We introduce an OMAP5 specific version of
> arm_setup_identity_mapping(), which makes the first page of the
> identity mapping invalid.
>
> We want to unmap the region near address zero on HS OMAP devices,
> to avoid speculative accesses. Accessing this region causes
> security violations, which we want to avoid.
>
> Signed-off-by: Vincent Stehl? <v-stehle@ti.com> Cc: Tom Rini
> <trini@ti.com> --- Changes for v2: - Fix missing page_table
> argument - Add extern definition to fix compilation warning
>
> arch/arm/cpu/armv7/omap5/Makefile | 1 +
> arch/arm/cpu/armv7/omap5/cache-cp15.c | 46
> +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)
> create mode 100644 arch/arm/cpu/armv7/omap5/cache-cp15.c
>
> diff --git a/arch/arm/cpu/armv7/omap5/Makefile
> b/arch/arm/cpu/armv7/omap5/Makefile index 9b261c4..49c454c 100644
> --- a/arch/arm/cpu/armv7/omap5/Makefile +++
> b/arch/arm/cpu/armv7/omap5/Makefile @@ -29,6 +29,7 @@ COBJS +=
> hwinit.o COBJS += clocks.o COBJS += emif.o COBJS += sdram.o +COBJS
> += cache-cp15.o
>
> SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix
> $(obj),$(COBJS) $(SOBJS)) diff --git
> a/arch/arm/cpu/armv7/omap5/cache-cp15.c
> b/arch/arm/cpu/armv7/omap5/cache-cp15.c new file mode 100644 index
> 0000000..6ff4548 --- /dev/null +++
> b/arch/arm/cpu/armv7/omap5/cache-cp15.c @@ -0,0 +1,46 @@ +/* + *
> (C) Copyright 2002 + * Wolfgang Denk, DENX Software Engineering,
> wd at denx.de. + * + * (C) Copyright 2012 + * Vincent Stehl?, Texas
> Instruments, v-stehle at ti.com. + * + * See file CREDITS for list of
> people who contributed to this + * project. + * + * This program
> is free software; you can redistribute it and/or + * modify it
> under the terms of the GNU General Public License as + * published
> by the Free Software Foundation; either version 2 of + * the
> License, or (at your option) any later version. + * + * This
> program is distributed in the hope that it will be useful, + * but
> WITHOUT ANY WARRANTY; without even the implied warranty of + *
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *
> GNU General Public License for more details. + * + * You should
> have received a copy of the GNU General Public License + * along
> with this program; if not, write to the Free Software + *
> Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA
> 02111-1307 USA + */ + +#include <common.h> + +/* OMAP5 specific
> function to set up the identity mapping. */ +void
> arm_setup_identity_mapping(u32 *page_table) +{ + extern void
> __arm_setup_identity_mapping(u32 *page_table);
Lets put the extern in arch/arm/include/asm/cache.h and make both
files #include <asm/cache.h>. Thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQIcBAEBAgAGBQJQx1SdAAoJENk4IS6UOR1WmRkQAIfaVp9YOcBPiGmKNDNTBpXL
ol4psfAEEg0OGOZdzX4lIW2+NjzLtzzcwx8s8luEt4YMtaSkPlJ+Sf5eQ1Fd9KpG
xBteU5PLWqE9mtTRBHylKrwqjysyuypFHfWpU4tiwLWygGI+eybRb0hrRKEplop6
BYjAOhJ8i4J5NYxQucFkLFeCTR7WAFQsxQ58rfDg/7KkVYcK71j+tZs6SmPijhIw
oJoGsWnpsljC/4mbTs189Y391CKmYcSNxgRtGc6fU9NJQFJ2Vx8Ajazhasvtl8sU
7yOrxR8ssFhXSSD2/PdcKUi/VHrX/mVXTV9uk4B9ImsQt5e5Jr3c8XTnw+hLdBzz
WMBpQNNPxEMibhYn3UZpskWfxR+1T1kCNbq+lVB6KVCboy98/3Bhu8OWGCLUWRk5
IB/LUfrf4uWjO5pA9hHlmzM0ckjLbQd27zGtof1qwB6EsOefL+x83XR4azqHW6Pq
6Iw+RdX7G+KKvJEqHux/fHvxrSqUzSUQJH4Bk6GYVeSNno+XfIAzNSfMfGv94zvN
HMrL9AQIhxfl+2+D1siEXG5YHw4COgNhcz55DYMZK9/1HvQ6QWW5WmT/+Ty1+DfB
WKX9ZLksdVl9dPgHtxlfaqWIVc2GrbwUgEzdZHVbdzsDfecNFDxxypBXU7U693KW
AC/XcVMEiN1rGRL0cRFt
=giVG
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-12-11 15:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 13:36 [U-Boot] [RFC, PATCH] omap: Invalidate first page to avoid speculation Vincent Stehlé
2012-11-16 20:52 ` Albert ARIBAUD
2012-11-19 14:59 ` [U-Boot] [RFC, PATCH v2] " Vincent Stehlé
2012-11-19 14:59 ` [U-Boot] [PATCH 1/2] ARM: cache: introduce weak arm_setup_identity_mapping Vincent Stehlé
2012-11-19 20:48 ` Tom Rini
2012-11-19 14:59 ` [U-Boot] [PATCH 2/2] ARM: OMAP5: redefine arm_setup_identity_mapping Vincent Stehlé
2012-11-19 20:49 ` Tom Rini
2012-11-20 11:01 ` [U-Boot] [RFC, PATCH v3] omap: Invalidate first page to avoid speculation Vincent Stehlé
2012-11-20 11:01 ` [U-Boot] [PATCH 1/2] ARM: cache: introduce weak arm_setup_identity_mapping Vincent Stehlé
2012-11-20 11:01 ` [U-Boot] [PATCH 2/2] ARM: OMAP5: redefine arm_setup_identity_mapping Vincent Stehlé
2012-12-11 15:35 ` [U-Boot] [PATCH v2] " Vincent Stehlé
2012-12-11 15:43 ` Tom Rini [this message]
2012-12-11 16:06 ` Vincent Stehlé
2012-12-11 16:06 ` [U-Boot] [PATCH v3 1/2] ARM: cache: introduce weak arm_setup_identity_mapping Vincent Stehlé
2012-12-11 16:06 ` [U-Boot] [PATCH v3 2/2] ARM: OMAP5: redefine arm_setup_identity_mapping Vincent Stehlé
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=50C7549D.5080907@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/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