From 35934415c4d36e094f4c53f155cb9efa3aef977e Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 21 Jan 2013 20:02:15 -0800 Subject: armv7: add ARM-encoded bootblock_exit() stub This replaces the call() function with a stub which is compiled separately using -marm. See http://review.coreboot.org/#/c/2175/ for details. Change-Id: I7f8c45b5e63ec97b0a82294488129d1c97ec0cbf Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/2180 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/armv7/include/arch/bootblock_exit.h | 26 ++++++++++++++++++++++++++ src/arch/armv7/include/arch/cbfs.h | 17 ----------------- 2 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 src/arch/armv7/include/arch/bootblock_exit.h (limited to 'src/arch/armv7/include') diff --git a/src/arch/armv7/include/arch/bootblock_exit.h b/src/arch/armv7/include/arch/bootblock_exit.h new file mode 100644 index 0000000000..0a039e195d --- /dev/null +++ b/src/arch/armv7/include/arch/bootblock_exit.h @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2013 Google Inc + * + * 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; version 2 of + * the License. + * + * 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., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +/** + * This is a shim that is to be compiled for the instruction set matching + * that of the entry point for the next boot stage (romstage). + */ +void bootblock_exit(unsigned long addr); diff --git a/src/arch/armv7/include/arch/cbfs.h b/src/arch/armv7/include/arch/cbfs.h index 99b7b43e66..f060643936 100644 --- a/src/arch/armv7/include/arch/cbfs.h +++ b/src/arch/armv7/include/arch/cbfs.h @@ -98,21 +98,4 @@ static unsigned long loadstage(const char* target) return 0; } } - -static inline void call(unsigned long addr) -{ - __attribute__((noreturn)) void (*doit)(void) = (void *)addr; - printk(BIOS_INFO, "addr: %08lx, doit: %p\n", addr, doit); - /* FIXME: dumping SRAM content for sanity checking */ - int i; - for (i = 0; i < 128; i++) { - if (i % 16 == 0) - printk(BIOS_INFO, "\n0x%08lx: ", addr + i); - else - printk(BIOS_INFO, " "); - printk(BIOS_INFO, "%02x", *(uint8_t *)(addr + i)); - } - /* FIXME: do we need to change to/from arm/thumb? */ - doit(); -} #endif -- cgit v1.2.3