From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 07 Dec 2011 08:44:42 +0100 Subject: [U-Boot] [RFC PATCH 5/7] reboard: arm: Add processor function library In-Reply-To: <1321919880-10070-6-git-send-email-sjg@chromium.org> References: <1321919880-10070-1-git-send-email-sjg@chromium.org> <1321919880-10070-6-git-send-email-sjg@chromium.org> Message-ID: <4EDF196A.7080800@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, Le 22/11/2011 00:57, Simon Glass a ?crit : > Add a library to hold ARM assembler code which is generic across all > ARM CPUs. > > Signed-off-by: Simon Glass > --- > arch/arm/lib/Makefile | 1 + > arch/arm/lib/proc.S | 35 +++++++++++++++++++++++++++++++++++ > 2 files changed, 36 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/lib/proc.S > > diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile > index ca2802a..27749dc 100644 > --- a/arch/arm/lib/Makefile > +++ b/arch/arm/lib/Makefile > @@ -50,6 +50,7 @@ endif > > ifndef CONFIG_SYS_LEGACY_BOARD > COBJS-y += arch_reloc.o > +SOBJS-y += proc.o > endif > > SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ > diff --git a/arch/arm/lib/proc.S b/arch/arm/lib/proc.S > new file mode 100644 > index 0000000..99a2944 > --- /dev/null > +++ b/arch/arm/lib/proc.S > @@ -0,0 +1,35 @@ > +/* > + * Copyright (c) 2011 The Chromium OS Authors. > + * 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 > + */ > + > + > +/** > + * Jump to board_init_r with a new stack pointer > + * > + * @param gd Pointer to global data > + * @param dest_addr Destination address from global data > + * @param func Address of board_init_r function (relocated) > + * @param sp New stack pointer > + */ > +.globl proc_call_board_init_r > +proc_call_board_init_r: > + mov sp, r3 > + /* jump to it ... */ > + mov pc, r2 What do we gain from this patch exactly? Amicalement, -- Albert.