summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--Makefile.inc4
-rw-r--r--payloads/libpayload/Config.in6
-rw-r--r--payloads/libpayload/Makefile4
-rw-r--r--payloads/libpayload/Makefile.inc2
-rw-r--r--payloads/libpayload/arch/Config.in2
-rw-r--r--payloads/libpayload/arch/arm/Config.in (renamed from payloads/libpayload/arch/armv7/Config.in)2
-rw-r--r--payloads/libpayload/arch/arm/Makefile.inc (renamed from payloads/libpayload/arch/armv7/Makefile.inc)0
-rw-r--r--payloads/libpayload/arch/arm/assembler.h (renamed from payloads/libpayload/arch/armv7/assembler.h)0
-rw-r--r--payloads/libpayload/arch/arm/cache.c (renamed from payloads/libpayload/arch/armv7/cache.c)3
-rw-r--r--payloads/libpayload/arch/arm/coreboot.c (renamed from payloads/libpayload/arch/armv7/coreboot.c)0
-rw-r--r--payloads/libpayload/arch/arm/dummy_media.c (renamed from payloads/libpayload/arch/armv7/dummy_media.c)0
-rw-r--r--payloads/libpayload/arch/arm/exception.c (renamed from payloads/libpayload/arch/armv7/exception.c)0
-rw-r--r--payloads/libpayload/arch/arm/exception_asm.S (renamed from payloads/libpayload/arch/armv7/exception_asm.S)0
-rw-r--r--payloads/libpayload/arch/arm/head.S (renamed from payloads/libpayload/arch/armv7/head.S)0
-rw-r--r--payloads/libpayload/arch/arm/libpayload.ldscript (renamed from payloads/libpayload/arch/armv7/libpayload.ldscript)0
-rw-r--r--payloads/libpayload/arch/arm/main.c (renamed from payloads/libpayload/arch/armv7/main.c)0
-rw-r--r--payloads/libpayload/arch/arm/memcpy.S (renamed from payloads/libpayload/arch/armv7/memcpy.S)0
-rw-r--r--payloads/libpayload/arch/arm/memset.S (renamed from payloads/libpayload/arch/armv7/memset.S)0
-rw-r--r--payloads/libpayload/arch/arm/sysinfo.c (renamed from payloads/libpayload/arch/armv7/sysinfo.c)0
-rw-r--r--payloads/libpayload/arch/arm/timer.c (renamed from payloads/libpayload/arch/armv7/timer.c)4
-rw-r--r--payloads/libpayload/arch/arm/util.S (renamed from payloads/libpayload/arch/armv7/util.S)0
-rw-r--r--payloads/libpayload/arch/arm/virtual.c (renamed from payloads/libpayload/arch/armv7/virtual.c)0
-rwxr-xr-xpayloads/libpayload/bin/lpgcc8
-rw-r--r--payloads/libpayload/configs/config.panther2
-rw-r--r--payloads/libpayload/configs/defconfig2
-rw-r--r--payloads/libpayload/configs/defconfig-arm7
-rw-r--r--payloads/libpayload/include/arm/arch/cache.h (renamed from src/arch/armv7/include/arch/cache.h)12
-rw-r--r--payloads/libpayload/include/arm/arch/exception.h (renamed from payloads/libpayload/include/armv7/arch/exception.h)0
-rw-r--r--payloads/libpayload/include/arm/arch/io.h (renamed from payloads/libpayload/include/armv7/arch/io.h)0
-rw-r--r--payloads/libpayload/include/arm/arch/types.h (renamed from payloads/libpayload/include/armv7/arch/types.h)0
-rw-r--r--payloads/libpayload/include/arm/arch/virtual.h (renamed from payloads/libpayload/include/armv7/arch/virtual.h)0
-rw-r--r--payloads/libpayload/include/cbfs_core.h2
-rw-r--r--payloads/libpayload/sample/Makefile2
-rw-r--r--payloads/libpayload/util/xcompile/xcompile12
-rw-r--r--payloads/tianocoreboot/libpayload.config2
-rw-r--r--src/Kconfig6
-rw-r--r--src/arch/arm/Kconfig (renamed from src/arch/armv7/Kconfig)10
-rw-r--r--src/arch/arm/Makefile.inc (renamed from src/arch/armv7/Makefile.inc)60
-rw-r--r--src/arch/arm/armv7/Kconfig11
-rw-r--r--src/arch/arm/armv7/Makefile.inc71
-rw-r--r--src/arch/arm/armv7/bootblock.S (renamed from src/arch/armv7/bootblock.S)0
-rw-r--r--src/arch/arm/armv7/bootblock_simple.c (renamed from src/arch/armv7/bootblock_simple.c)2
-rw-r--r--src/arch/arm/armv7/cache.c (renamed from src/arch/armv7/cache.c)2
-rw-r--r--src/arch/arm/armv7/exception.c (renamed from src/arch/armv7/exception.c)0
-rw-r--r--src/arch/arm/armv7/exception_asm.S (renamed from src/arch/armv7/exception_asm.S)0
-rw-r--r--src/arch/arm/armv7/mmu.c (renamed from src/arch/armv7/mmu.c)0
-rw-r--r--src/arch/arm/armv7/thread.c (renamed from src/arch/armv7/thread.c)0
-rw-r--r--src/arch/arm/boot.c (renamed from src/arch/armv7/boot.c)0
-rw-r--r--src/arch/arm/bootblock.ld (renamed from src/arch/armv7/bootblock.ld)0
-rw-r--r--src/arch/arm/cpu.c (renamed from src/arch/armv7/cpu.c)0
-rw-r--r--src/arch/arm/div0.c (renamed from src/arch/armv7/div0.c)0
-rw-r--r--src/arch/arm/eabi_compat.c (renamed from src/arch/armv7/eabi_compat.c)0
-rw-r--r--src/arch/arm/id.S (renamed from src/arch/armv7/id.S)0
-rw-r--r--src/arch/arm/include/arch/boot/boot.h (renamed from src/arch/armv7/include/arch/boot/boot.h)0
-rw-r--r--src/arch/arm/include/arch/byteorder.h (renamed from src/arch/armv7/include/arch/byteorder.h)0
-rw-r--r--src/arch/arm/include/arch/early_variables.h (renamed from src/arch/armv7/include/arch/early_variables.h)0
-rw-r--r--src/arch/arm/include/arch/exception.h (renamed from src/arch/armv7/include/arch/exception.h)0
-rw-r--r--src/arch/arm/include/arch/hlt.h (renamed from src/arch/armv7/include/arch/hlt.h)0
-rw-r--r--src/arch/arm/include/arch/io.h (renamed from src/arch/armv7/include/arch/io.h)43
-rw-r--r--src/arch/arm/include/arch/pci_ops.h (renamed from src/arch/armv7/include/arch/pci_ops.h)4
-rw-r--r--src/arch/arm/include/arch/stages.h (renamed from src/arch/armv7/include/arch/stages.h)2
-rw-r--r--src/arch/arm/include/armv7.h (renamed from src/arch/armv7/include/armv7.h)0
-rw-r--r--src/arch/arm/include/armv7/arch/arch_io.h68
-rw-r--r--src/arch/arm/include/armv7/arch/cache.h (renamed from payloads/libpayload/include/armv7/arch/cache.h)12
-rw-r--r--src/arch/arm/include/armv7/arch/cpu.h (renamed from src/arch/armv7/include/arch/cpu.h)0
-rw-r--r--src/arch/arm/include/armv7/arch/types.h (renamed from src/arch/armv7/include/arch/types.h)0
-rw-r--r--src/arch/arm/include/assembler.h (renamed from src/arch/armv7/include/assembler.h)0
-rw-r--r--src/arch/arm/include/bootblock_common.h (renamed from src/arch/armv7/include/bootblock_common.h)0
-rw-r--r--src/arch/arm/include/clocks.h (renamed from src/arch/armv7/include/clocks.h)0
-rw-r--r--src/arch/arm/include/smp/spinlock.h (renamed from src/arch/armv7/include/smp/spinlock.h)0
-rw-r--r--src/arch/arm/include/stdint.h (renamed from src/arch/armv7/include/stdint.h)0
-rw-r--r--src/arch/arm/include/utils.h (renamed from src/arch/armv7/include/utils.h)0
-rw-r--r--src/arch/arm/memcpy.S (renamed from src/arch/armv7/memcpy.S)0
-rw-r--r--src/arch/arm/memmove.S (renamed from src/arch/armv7/memmove.S)0
-rw-r--r--src/arch/arm/memset.S (renamed from src/arch/armv7/memset.S)0
-rw-r--r--src/arch/arm/ramstage.ld (renamed from src/arch/armv7/ramstage.ld)2
-rw-r--r--src/arch/arm/romstage.ld (renamed from src/arch/armv7/romstage.ld)2
-rw-r--r--src/arch/arm/stages.c (renamed from src/arch/armv7/stages.c)0
-rw-r--r--src/arch/arm/tables.c (renamed from src/arch/armv7/tables.c)0
-rw-r--r--src/console/Kconfig2
-rw-r--r--src/cpu/ti/am335x/Makefile.inc2
-rw-r--r--src/device/oprom/yabel/device.h8
-rw-r--r--src/drivers/uart/Kconfig2
-rw-r--r--src/include/cbfs_core.h2
-rw-r--r--src/soc/nvidia/tegra124/bootblock_asm.S2
-rw-r--r--src/vendorcode/google/chromeos/fmap.c2
-rw-r--r--toolchain.inc7
-rw-r--r--util/cbfstool/cbfs.h2
-rw-r--r--util/cbfstool/cbfstool.c2
-rw-r--r--util/cbfstool/common.c2
-rw-r--r--util/cbfstool/elfheaders.c2
-rw-r--r--util/runfw/googlesnow.c2
-rw-r--r--util/showdevicetree/showdt.c2
-rwxr-xr-xutil/xcompile/xcompile6
95 files changed, 258 insertions, 164 deletions
diff --git a/Makefile b/Makefile
index a55ad676b8..49fbba5e5f 100644
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@ else
include $(HAVE_DOTCONFIG)
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
-# FIXME: armv7/aarch64 won't build right now
+# FIXME: arm/aarch64 won't build right now
CFLAGS_x86_32 = -no-integrated-as -Qunused-arguments -target i386-elf -m32
CC_x86_32:=clang
@@ -130,8 +130,8 @@ endif
#CFLAGS_x86_32 += -mno-sse
#endif
-CFLAGS_armv7 = -no-integrated-as -Qunused-arguments -target armv7-eabi -ccc-gcc-name $(CC_armv7)
-CC_armv7:=clang
+CFLAGS_arm = -no-integrated-as -Qunused-arguments -target arm-eabi -ccc-gcc-name $(CC_arm)
+CC_arm:=clang
CFLAGS_aarch64 = -no-integrated-as -Qunused-arguments -target aarch64-eabi -ccc-gcc-name $(CC_aarch64)
CC_aarch64:=clang
diff --git a/Makefile.inc b/Makefile.inc
index ab27df0a6b..00e1a6c479 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -68,7 +68,7 @@ PHONY+= clean-abuild coreboot lint lint-stable build-dirs
subdirs-y := src/lib src/console src/device src/ec src/southbridge src/soc
subdirs-y += src/northbridge src/superio src/drivers src/cpu src/vendorcode
subdirs-y += util/cbfstool util/sconfig util/nvramtool
-subdirs-y += src/arch/armv7 src/arch/x86
+subdirs-y += src/arch/arm src/arch/x86
subdirs-y += src/mainboard/$(MAINBOARDDIR)
subdirs-y += site-local
@@ -550,7 +550,7 @@ cbfs-files-$(CONFIG_BOOTSPLASH) += bootsplash.jpg
bootsplash.jpg-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE))
bootsplash.jpg-type := bootsplash
-ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y)
+ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y)
ROMSTAGE_ELF := romstage.elf
endif
ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y)
diff --git a/payloads/libpayload/Config.in b/payloads/libpayload/Config.in
index e3e064e87e..2a5048cbab 100644
--- a/payloads/libpayload/Config.in
+++ b/payloads/libpayload/Config.in
@@ -67,10 +67,10 @@ choice
prompt "Target Architecture"
default ARCH_X86
-config ARCH_ARMV7
- bool "ARMv7"
+config ARCH_ARM
+ bool "ARM"
help
- Support the x86 architecture
+ Support the ARM architecture
config ARCH_X86
bool "x86"
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index 64165197b8..d84b63b4b5 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -91,14 +91,14 @@ include util/kconfig/Makefile
include $(HAVE_DOTCONFIG)
-ARCHDIR-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCHDIR-$(CONFIG_LP_ARCH_ARM) := arm
ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
ARCH-y := $(ARCHDIR-y)
# If architecture folder name is different from GCC binutils architecture name,
# override here.
-ARCH-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCH-$(CONFIG_LP_ARCH_ARM) := arm
ARCH-$(CONFIG_LP_ARCH_X86) := i386
CC := $(CC_$(ARCH-y))
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index 5eeb9077dc..d3b8787532 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -31,7 +31,7 @@
export KERNELVERSION := 0.2.0
-ARCHDIR-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCHDIR-$(CONFIG_LP_ARCH_ARM) := arm
ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
DESTDIR ?= install
diff --git a/payloads/libpayload/arch/Config.in b/payloads/libpayload/arch/Config.in
index 1049da02cc..541f64f2c1 100644
--- a/payloads/libpayload/arch/Config.in
+++ b/payloads/libpayload/arch/Config.in
@@ -27,5 +27,5 @@
## SUCH DAMAGE.
##
-source "arch/armv7/Config.in"
+source "arch/arm/Config.in"
source "arch/x86/Config.in"
diff --git a/payloads/libpayload/arch/armv7/Config.in b/payloads/libpayload/arch/arm/Config.in
index 79cd6768a0..b2ee527ab7 100644
--- a/payloads/libpayload/arch/armv7/Config.in
+++ b/payloads/libpayload/arch/arm/Config.in
@@ -27,7 +27,7 @@
## SUCH DAMAGE.
##
-if ARCH_ARMV7
+if ARCH_ARM
config ARCH_SPECIFIC_OPTIONS # dummy
def_bool y
diff --git a/payloads/libpayload/arch/armv7/Makefile.inc b/payloads/libpayload/arch/arm/Makefile.inc
index 42d6ed2d5c..42d6ed2d5c 100644
--- a/payloads/libpayload/arch/armv7/Makefile.inc
+++ b/payloads/libpayload/arch/arm/Makefile.inc
diff --git a/payloads/libpayload/arch/armv7/assembler.h b/payloads/libpayload/arch/arm/assembler.h
index 5e4789b145..5e4789b145 100644
--- a/payloads/libpayload/arch/armv7/assembler.h
+++ b/payloads/libpayload/arch/arm/assembler.h
diff --git a/payloads/libpayload/arch/armv7/cache.c b/payloads/libpayload/arch/arm/cache.c
index 3af7cbd28b..3944818110 100644
--- a/payloads/libpayload/arch/armv7/cache.c
+++ b/payloads/libpayload/arch/arm/cache.c
@@ -267,7 +267,6 @@ void dcache_mmu_disable(void)
write_sctlr(sctlr);
}
-
void dcache_mmu_enable(void)
{
uint32_t sctlr;
@@ -278,7 +277,7 @@ void dcache_mmu_enable(void)
write_sctlr(sctlr);
}
-void armv7_invalidate_caches(void)
+void arm_invalidate_caches(void)
{
uint32_t clidr;
int level;
diff --git a/payloads/libpayload/arch/armv7/coreboot.c b/payloads/libpayload/arch/arm/coreboot.c
index 1397fc1be2..1397fc1be2 100644
--- a/payloads/libpayload/arch/armv7/coreboot.c
+++ b/payloads/libpayload/arch/arm/coreboot.c
diff --git a/payloads/libpayload/arch/armv7/dummy_media.c b/payloads/libpayload/arch/arm/dummy_media.c
index 7926976422..7926976422 100644
--- a/payloads/libpayload/arch/armv7/dummy_media.c
+++ b/payloads/libpayload/arch/arm/dummy_media.c
diff --git a/payloads/libpayload/arch/armv7/exception.c b/payloads/libpayload/arch/arm/exception.c
index 8d8b50b175..8d8b50b175 100644
--- a/payloads/libpayload/arch/armv7/exception.c
+++ b/payloads/libpayload/arch/arm/exception.c
diff --git a/payloads/libpayload/arch/armv7/exception_asm.S b/payloads/libpayload/arch/arm/exception_asm.S
index 163fdbd52a..163fdbd52a 100644
--- a/payloads/libpayload/arch/armv7/exception_asm.S
+++ b/payloads/libpayload/arch/arm/exception_asm.S
diff --git a/payloads/libpayload/arch/armv7/head.S b/payloads/libpayload/arch/arm/head.S
index 7a706e3aa6..7a706e3aa6 100644
--- a/payloads/libpayload/arch/armv7/head.S
+++ b/payloads/libpayload/arch/arm/head.S
diff --git a/payloads/libpayload/arch/armv7/libpayload.ldscript b/payloads/libpayload/arch/arm/libpayload.ldscript
index 5f65bd7f1a..5f65bd7f1a 100644
--- a/payloads/libpayload/arch/armv7/libpayload.ldscript
+++ b/payloads/libpayload/arch/arm/libpayload.ldscript
diff --git a/payloads/libpayload/arch/armv7/main.c b/payloads/libpayload/arch/arm/main.c
index 4e7c05dfe1..4e7c05dfe1 100644
--- a/payloads/libpayload/arch/armv7/main.c
+++ b/payloads/libpayload/arch/arm/main.c
diff --git a/payloads/libpayload/arch/armv7/memcpy.S b/payloads/libpayload/arch/arm/memcpy.S
index e68b28f542..e68b28f542 100644
--- a/payloads/libpayload/arch/armv7/memcpy.S
+++ b/payloads/libpayload/arch/arm/memcpy.S
diff --git a/payloads/libpayload/arch/armv7/memset.S b/payloads/libpayload/arch/arm/memset.S
index aa4f57a993..aa4f57a993 100644
--- a/payloads/libpayload/arch/armv7/memset.S
+++ b/payloads/libpayload/arch/arm/memset.S
diff --git a/payloads/libpayload/arch/armv7/sysinfo.c b/payloads/libpayload/arch/arm/sysinfo.c
index 5aa517594c..5aa517594c 100644
--- a/payloads/libpayload/arch/armv7/sysinfo.c
+++ b/payloads/libpayload/arch/arm/sysinfo.c
diff --git a/payloads/libpayload/arch/armv7/timer.c b/payloads/libpayload/arch/arm/timer.c
index 9449c9feff..3902308562 100644
--- a/payloads/libpayload/arch/armv7/timer.c
+++ b/payloads/libpayload/arch/arm/timer.c
@@ -28,8 +28,8 @@
*/
/**
- * @file armv7/timer.c
- * ARMv7 specific timer routines
+ * @file arm/timer.c
+ * ARM specific timer routines
*/
#include <libpayload.h>
diff --git a/payloads/libpayload/arch/armv7/util.S b/payloads/libpayload/arch/arm/util.S
index e3f173eb2d..e3f173eb2d 100644
--- a/payloads/libpayload/arch/armv7/util.S
+++ b/payloads/libpayload/arch/arm/util.S
diff --git a/payloads/libpayload/arch/armv7/virtual.c b/payloads/libpayload/arch/arm/virtual.c
index 59768dbd66..59768dbd66 100644
--- a/payloads/libpayload/arch/armv7/virtual.c
+++ b/payloads/libpayload/arch/arm/virtual.c
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 32ec5689d0..a555bcbc48 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -68,11 +68,11 @@ else
exit 1
fi
-if [ "$CONFIG_LP_ARCH_ARMV7" = "y" ]; then
- _ARCHINCDIR=$_INCDIR/armv7
- _ARCHLIBDIR=$_LIBDIR/armv7
+if [ "$CONFIG_LP_ARCH_ARM" = "y" ]; then
+ _ARCHINCDIR=$_INCDIR/arm
+ _ARCHLIBDIR=$_LIBDIR/arm
_ARCHEXTRA=""
- _ARCH=armv7
+ _ARCH=arm
fi
if [ "$CONFIG_LP_ARCH_X86" = "y" ]; then
diff --git a/payloads/libpayload/configs/config.panther b/payloads/libpayload/configs/config.panther
index ec0f11d8bd..e3af09974d 100644
--- a/payloads/libpayload/configs/config.panther
+++ b/payloads/libpayload/configs/config.panther
@@ -15,7 +15,7 @@ CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
-# CONFIG_LP_ARCH_ARMV7 is not set
+# CONFIG_LP_ARCH_ARM is not set
# CONFIG_LP_ARCH_POWERPC is not set
CONFIG_LP_ARCH_X86=y
# CONFIG_LP_MEMMAP_RAM_ONLY is not set
diff --git a/payloads/libpayload/configs/defconfig b/payloads/libpayload/configs/defconfig
index aef9fc30c2..f63822eb00 100644
--- a/payloads/libpayload/configs/defconfig
+++ b/payloads/libpayload/configs/defconfig
@@ -15,7 +15,7 @@
#
# Architecture Options
#
-# CONFIG_LP_ARCH_ARMV7 is not set
+# CONFIG_LP_ARCH_ARM is not set
CONFIG_LP_ARCH_X86=y
# CONFIG_LP_MEMMAP_RAM_ONLY is not set
# CONFIG_LP_MULTIBOOT is not set
diff --git a/payloads/libpayload/configs/defconfig-arm b/payloads/libpayload/configs/defconfig-arm
index 55552b0363..e336f6a979 100644
--- a/payloads/libpayload/configs/defconfig-arm
+++ b/payloads/libpayload/configs/defconfig-arm
@@ -15,7 +15,7 @@
#
# Architecture Options
#
-CONFIG_LP_ARCH_ARMV7=y
+CONFIG_LP_ARCH_ARM=y
# CONFIG_LP_ARCH_X86 is not set
# CONFIG_LP_MEMMAP_RAM_ONLY is not set
@@ -35,6 +35,7 @@ CONFIG_LP_LZMA=y
# CONFIG_LP_SKIP_CONSOLE_INIT is not set
CONFIG_LP_CBMEM_CONSOLE=y
CONFIG_LP_SERIAL_CONSOLE=y
+# CONFIG_LP_8250_SERIAL_CONSOLE is not set
# CONFIG_LP_SERIAL_SET_SPEED is not set
# CONFIG_LP_SERIAL_ACS_FALLBACK is not set
CONFIG_LP_VIDEO_CONSOLE=y
@@ -60,10 +61,6 @@ CONFIG_LP_USB_HUB=y
CONFIG_LP_USB_MSC=y
CONFIG_LP_USB_GEN_HUB=y
# CONFIG_LP_USB_PCI is not set
-CONFIG_LP_USB_MEMORY=y
-CONFIG_LP_USB_OHCI_BASE_ADDRESS=0x12120000
-CONFIG_LP_USB_EHCI_BASE_ADDRESS=0x12110000
-CONFIG_LP_USB_XHCI_BASE_ADDRESS=0x12000000
# CONFIG_LP_BIG_ENDIAN is not set
CONFIG_LP_LITTLE_ENDIAN=y
# CONFIG_LP_IO_ADDRESS_SPACE is not set
diff --git a/src/arch/armv7/include/arch/cache.h b/payloads/libpayload/include/arm/arch/cache.h
index 1cd9958fc4..ffdb55a706 100644
--- a/src/arch/armv7/include/arch/cache.h
+++ b/payloads/libpayload/include/arm/arch/cache.h
@@ -26,11 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * cache.h: Cache maintenance API for ARMv7
+ * cache.h: Cache maintenance API for ARM
*/
-#ifndef ARMV7_CACHE_H
-#define ARMV7_CACHE_H
+#ifndef ARM_CACHE_H
+#define ARM_CACHE_H
#include <stddef.h>
#include <stdint.h>
@@ -320,8 +320,8 @@ void tlb_invalidate_all(void);
* Generalized setup/init functions
*/
-/* invalidate all caches on ARMv7 */
-void armv7_invalidate_caches(void);
+/* invalidate all caches on ARM */
+void arm_invalidate_caches(void);
/* mmu initialization (set page table address, set permissions, etc) */
void mmu_init(void);
@@ -338,4 +338,4 @@ void mmu_disable_range(unsigned long start_mb, unsigned long size_mb);
void mmu_config_range(unsigned long start_mb, unsigned long size_mb,
enum dcache_policy policy);
-#endif /* ARMV7_CACHE_H */
+#endif /* ARM_CACHE_H */
diff --git a/payloads/libpayload/include/armv7/arch/exception.h b/payloads/libpayload/include/arm/arch/exception.h
index 57076bd57b..57076bd57b 100644
--- a/payloads/libpayload/include/armv7/arch/exception.h
+++ b/payloads/libpayload/include/arm/arch/exception.h
diff --git a/payloads/libpayload/include/armv7/arch/io.h b/payloads/libpayload/include/arm/arch/io.h
index 8948e133ef..8948e133ef 100644
--- a/payloads/libpayload/include/armv7/arch/io.h
+++ b/payloads/libpayload/include/arm/arch/io.h
diff --git a/payloads/libpayload/include/armv7/arch/types.h b/payloads/libpayload/include/arm/arch/types.h
index 1bd815bb44..1bd815bb44 100644
--- a/payloads/libpayload/include/armv7/arch/types.h
+++ b/payloads/libpayload/include/arm/arch/types.h
diff --git a/payloads/libpayload/include/armv7/arch/virtual.h b/payloads/libpayload/include/arm/arch/virtual.h
index 328c3aa34e..328c3aa34e 100644
--- a/payloads/libpayload/include/armv7/arch/virtual.h
+++ b/payloads/libpayload/include/arm/arch/virtual.h
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index d908d83d9c..6edad0e20b 100644
--- a/payloads/libpayload/include/cbfs_core.h
+++ b/payloads/libpayload/include/cbfs_core.h
@@ -106,7 +106,7 @@ struct cbfs_header {
*/
#define CBFS_ARCHITECTURE_UNKNOWN 0xFFFFFFFF
#define CBFS_ARCHITECTURE_X86 0x00000001
-#define CBFS_ARCHITECTURE_ARMV7 0x00000010
+#define CBFS_ARCHITECTURE_ARM 0x00000010
/** This is a component header - every entry in the CBFS
will have this header.
diff --git a/payloads/libpayload/sample/Makefile b/payloads/libpayload/sample/Makefile
index 67697e85fd..2029209c41 100644
--- a/payloads/libpayload/sample/Makefile
+++ b/payloads/libpayload/sample/Makefile
@@ -31,7 +31,7 @@
include ../.xcompile
include ../.config
-ARCH-$(CONFIG_ARCH_ARMV7) := armv7
+ARCH-$(CONFIG_ARCH_ARMV) := arm
ARCH-$(CONFIG_ARCH_POWERPC) := powerpc
ARCH-$(CONFIG_ARCH_X86) := i386
diff --git a/payloads/libpayload/util/xcompile/xcompile b/payloads/libpayload/util/xcompile/xcompile
index 09c1879f63..755fb18ba7 100644
--- a/payloads/libpayload/util/xcompile/xcompile
+++ b/payloads/libpayload/util/xcompile/xcompile
@@ -106,7 +106,7 @@ detect_special_flags() {
CFLAGS="$CFLAGS -Wl,--build-id=none"
case "$architecture" in
- armv7 )
+ arm )
# testcc "$CC" "$CFLAGS -mcpu=cortex-a9" &&
# CFLAGS="$CFLAGS -mcpu=cortex-a9"
;;
@@ -135,13 +135,13 @@ touch "$TMPFILE"
trap clean_up EXIT
# Architecture definition
-SUPPORTED_ARCHITECTURE="x86 armv7"
+SUPPORTED_ARCHITECTURE="x86 arm"
# ARM Architecture
-TARCH_armv7="armv7"
-TBFDARCH_armv7="littlearm"
-TCLIST_armv7="armv7a"
-TWIDTH_armv7="32"
+TARCH_arm="arm"
+TBFDARCH_arm="littlearm"
+TCLIST_arm="armv7a"
+TWIDTH_arm="32"
# X86 Architecture
TARCH_x86="i386"
diff --git a/payloads/tianocoreboot/libpayload.config b/payloads/tianocoreboot/libpayload.config
index c7c0720b9c..e63fee8314 100644
--- a/payloads/tianocoreboot/libpayload.config
+++ b/payloads/tianocoreboot/libpayload.config
@@ -15,7 +15,7 @@
#
# Architecture Options
#
-# CONFIG_ARCH_ARMV7 is not set
+# CONFIG_ARCH_ARM is not set
# CONFIG_ARCH_POWERPC is not set
CONFIG_ARCH_X86=y
# CONFIG_MEMMAP_RAM_ONLY is not set
diff --git a/src/Kconfig b/src/Kconfig
index 45a215593c..97a479919e 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -210,12 +210,12 @@ config ARCH_X86
default n
select PCI
-config ARCH_ARMV7
+config ARCH_ARM
bool
default n
source src/arch/x86/Kconfig
-source src/arch/armv7/Kconfig
+source src/arch/arm/Kconfig
source src/vendorcode/Kconfig
@@ -273,7 +273,7 @@ config TPM
bool
default n
select LPC_TPM if ARCH_X86
- select I2C_TPM if ARCH_ARMV7
+ select I2C_TPM if ARCH_ARM
help
Enable this option to enable TPM support in coreboot.
diff --git a/src/arch/armv7/Kconfig b/src/arch/arm/Kconfig
index e272474604..050cd62a20 100644
--- a/src/arch/armv7/Kconfig
+++ b/src/arch/arm/Kconfig
@@ -1,16 +1,18 @@
-config ARCH_BOOTBLOCK_ARMV7
+config ARCH_BOOTBLOCK_ARM
bool
default n
- select ARCH_ARMV7
+ select ARCH_ARM
-config ARCH_ROMSTAGE_ARMV7
+config ARCH_ROMSTAGE_ARM
bool
default n
-config ARCH_RAMSTAGE_ARMV7
+config ARCH_RAMSTAGE_ARM
bool
default n
+source src/arch/arm/armv7/Kconfig
+
# If a custom bootblock is necessary, this option should be "select"-ed by
# the thing that needs it, probably the CPU.
config ARM_BOOTBLOCK_CUSTOM
diff --git a/src/arch/armv7/Makefile.inc b/src/arch/arm/Makefile.inc
index 2022f2078b..8838edfd46 100644
--- a/src/arch/armv7/Makefile.inc
+++ b/src/arch/arm/Makefile.inc
@@ -23,98 +23,86 @@
###############################################################################
# Take care of subdirectories
###############################################################################
-subdirs-y += boot/
-subdirs-y += lib/
+subdirs-y += armv7/
###############################################################################
# ARM specific options
###############################################################################
-ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y)
-CBFSTOOL_PRE1_OPTS = -m armv7 -b $(CONFIG_BOOTBLOCK_ROM_OFFSET) -H $(CONFIG_CBFS_HEADER_ROM_OFFSET) -o $(CONFIG_CBFS_ROM_OFFSET)
+ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y)
+CBFSTOOL_PRE1_OPTS = -m arm -b $(CONFIG_BOOTBLOCK_ROM_OFFSET) -H $(CONFIG_CBFS_HEADER_ROM_OFFSET) -o $(CONFIG_CBFS_ROM_OFFSET)
CBFSTOOL_PRE_OPTS = -b 0
endif
-ifeq ($(CONFIG_ARCH_ARMV7),y)
-stages_c = $(src)/arch/armv7/stages.c
-stages_o = $(obj)/arch/armv7/stages.o
+ifeq ($(CONFIG_ARCH_ARM),y)
+stages_c = $(src)/arch/arm/stages.c
+stages_o = $(obj)/arch/arm/stages.o
$(stages_o): $(stages_c) $(obj)/config.h
@printf " CC $(subst $(obj)/,,$(@))\n"
- $(CC_armv7) -I. $(CPPFLAGS_armv7) -c -o $@ $< -marm
+ $(CC_arm) -I. $(CPPFLAGS_arm) -c -o $@ $< -marm
-endif # CONFIG_ARCH_ARMV7
+endif # CONFIG_ARCH_ARM
###############################################################################
# bootblock
###############################################################################
-ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7),y)
+ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM),y)
-ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y)
-bootblock-y += bootblock.S
-bootblock-$(CONFIG_BOOTBLOCK_SIMPLE) += bootblock_simple.c
-endif
bootblock-y += id.S
$(obj)/arch/arm/id.bootblock.o: $(obj)/build.h
bootblock-y += stages.c
-bootblock-y += cache.c
bootblock-y += eabi_compat.c
bootblock-y += memset.S
bootblock-y += memcpy.S
bootblock-y += memmove.S
-bootblock-y += mmu.c
-$(objcbfs)/bootblock.debug: $(src)/arch/armv7/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) $(obj)/config.h
+$(objcbfs)/bootblock.debug: $(src)/arch/arm/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) $(obj)/config.h
@printf " LINK $(subst $(obj)/,,$(@))\n"
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
- $(LD_bootblock) -m armelf_linux_eabi -static -o $@ -L$(obj) $< -T $(src)/arch/armv7/bootblock.ld
+ $(LD_bootblock) -m armelf_linux_eabi -static -o $@ -L$(obj) $< -T $(src)/arch/arm/bootblock.ld
else
- $(CC_bootblock) $(CFLAGS_bootblock) -nostartfiles -include $(obj)/config.h -static -o $@ -L$(obj) -T $(src)/arch/armv7/bootblock.ld -Wl,--start-group $(bootblock-objs) $(LIBGCC_FILE_NAME_bootblock) -Wl,--end-group
+ $(CC_bootblock) $(CFLAGS_bootblock) -nostartfiles -include $(obj)/config.h -static -o $@ -L$(obj) -T $(src)/arch/arm/bootblock.ld -Wl,--start-group $(bootblock-objs) $(LIBGCC_FILE_NAME_bootblock) -Wl,--end-group
endif
-endif # CONFIG_ARCH_BOOTBLOCK_ARMV7
+endif # CONFIG_ARCH_BOOTBLOCK_ARM
###############################################################################
# romstage
###############################################################################
-ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y)
+ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y)
romstage-y += stages.c
-romstage-y += cache.c
romstage-y += div0.c
romstage-y += eabi_compat.c
romstage-y += memset.S
romstage-y += memcpy.S
romstage-y += memmove.S
-VBOOT_STUB_DEPS += $(obj)/arch/armv7/eabi_compat.rmodules_arm.o
+VBOOT_STUB_DEPS += $(obj)/arch/arm/eabi_compat.rmodules_arm.o
-$(objcbfs)/romstage.debug: $$(romstage-objs) $(src)/arch/armv7/romstage.ld $(obj)/ldoptions
+$(objcbfs)/romstage.debug: $$(romstage-objs) $(src)/arch/arm/romstage.ld $(obj)/ldoptions
@printf " LINK $(subst $(obj)/,,$(@))\n"
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
- $(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(romstage-objs) -T $(src)/arch/armv7/romstage.ld
+ $(LD_romstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) $(romstage-objs) -T $(src)/arch/arm/romstage.ld
else
- $(CC_romstage) $(CFLAGS_romstage) -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/armv7/romstage.ld -Wl,--start-group $(romstage-objs) $(LIBGCC_FILE_NAME_romstage) -Wl,--end-group
+ $(CC_romstage) $(CFLAGS_romstage) -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/arm/romstage.ld -Wl,--start-group $(romstage-objs) $(LIBGCC_FILE_NAME_romstage) -Wl,--end-group
endif
-endif # CONFIG_ARCH_ROMSTAGE_ARMV7
+endif # CONFIG_ARCH_ROMSTAGE_ARM
###############################################################################
# ramstage
###############################################################################
-ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV7),y)
+ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM),y)
ramstage-y += stages.c
-ramstage-y += exception.c
-ramstage-y += exception_asm.S
ramstage-y += div0.c
-ramstage-y += cache.c
ramstage-y += cpu.c
-ramstage-y += mmu.c
ramstage-y += eabi_compat.c
ramstage-y += boot.c
ramstage-y += tables.c
@@ -123,12 +111,12 @@ ramstage-y += memcpy.S
ramstage-y += memmove.S
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
-$(objcbfs)/ramstage.debug: $$(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) $(src)/arch/armv7/ramstage.ld $(obj)/ldoptions
+$(objcbfs)/ramstage.debug: $$(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) $(src)/arch/arm/ramstage.ld $(obj)/ldoptions
@printf " CC $(subst $(obj)/,,$(@))\n"
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
- $(LD_ramstage) -m armelf_linux_eabi -o $@ -L$(obj) $< -T $(src)/arch/armv7/ramstage.ld
+ $(LD_ramstage) -m armelf_linux_eabi -o $@ -L$(obj) $< -T $(src)/arch/arm/ramstage.ld
else
- $(CC_ramstage) $(CFLAGS_ramstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) -Wl,--start-group $(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) -Wl,--end-group -T $(src)/arch/armv7/ramstage.ld
+ $(CC_ramstage) $(CFLAGS_ramstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) -Wl,--start-group $(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) -Wl,--end-group -T $(src)/arch/arm/ramstage.ld
endif
$(objgenerated)/ramstage.o: $(stages_o) $$(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage)
@@ -139,4 +127,4 @@ else
$(CC_ramstage) $(CFLAGS_ramstage) $(CPPFLAGS_ramstage) -nostdlib -r -o $@ -Wl,--start-group $(stages_o) $(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) -Wl,--end-group
endif
-endif # CONFIG_ARCH_RAMSTAGE_ARMV7
+endif # CONFIG_ARCH_RAMSTAGE_ARM
diff --git a/src/arch/arm/armv7/Kconfig b/src/arch/arm/armv7/Kconfig
new file mode 100644
index 0000000000..f8e0205c40
--- /dev/null
+++ b/src/arch/arm/armv7/Kconfig
@@ -0,0 +1,11 @@
+config ARCH_BOOTBLOCK_ARMV7
+ def_bool n
+ select ARCH_BOOTBLOCK_ARM
+
+config ARCH_ROMSTAGE_ARMV7
+ def_bool n
+ select ARCH_ROMSTAGE_ARM
+
+config ARCH_RAMSTAGE_ARMV7
+ def_bool n
+ select ARCH_RAMSTAGE_ARM
diff --git a/src/arch/arm/armv7/Makefile.inc b/src/arch/arm/armv7/Makefile.inc
new file mode 100644
index 0000000000..bcd7d9e46d
--- /dev/null
+++ b/src/arch/arm/armv7/Makefile.inc
@@ -0,0 +1,71 @@
+################################################################################
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2013 The ChromiumOS Authors
+##
+## 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
+##
+###############################################################################
+
+armv7_flags = -march=armv7-a -mthumb -mthumb-interwork \
+ -I$(src)/arch/arm/include/armv7/
+
+###############################################################################
+# bootblock
+###############################################################################
+
+ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7),y)
+
+ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y)
+bootblock-y += bootblock.S
+bootblock-$(CONFIG_BOOTBLOCK_SIMPLE) += bootblock_simple.c
+endif
+
+bootblock-y += cache.c
+bootblock-y += mmu.c
+
+CFLAGS_bootblock += $(armv7_flags)
+CPPFLAGS_bootblock += $(armv7_flags)
+
+endif # CONFIG_ARCH_BOOTBLOCK_ARMV7
+
+###############################################################################
+# romstage
+###############################################################################
+
+ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y)
+
+romstage-y += cache.c
+
+CFLAGS_romstage += $(armv7_flags)
+CPPFLAGS_romstage += $(armv7_flags)
+
+endif # CONFIG_ARCH_ROMSTAGE_ARMV7
+
+###############################################################################
+# ramstage
+###############################################################################
+
+ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV7),y)
+
+ramstage-y += cache.c
+ramstage-y += exception.c
+ramstage-y += exception_asm.S
+ramstage-y += mmu.c
+
+CFLAGS_ramstage += $(armv7_flags)
+CPPFLAGS_ramstage += $(armv7_flags)
+
+endif # CONFIG_ARCH_RAMSTAGE_ARMV7
diff --git a/src/arch/armv7/bootblock.S b/src/arch/arm/armv7/bootblock.S
index b28a787839..b28a787839 100644
--- a/src/arch/armv7/bootblock.S
+++ b/src/arch/arm/armv7/bootblock.S
diff --git a/src/arch/armv7/bootblock_simple.c b/src/arch/arm/armv7/bootblock_simple.c
index bcd83b8c36..f447034029 100644
--- a/src/arch/armv7/bootblock_simple.c
+++ b/src/arch/arm/armv7/bootblock_simple.c
@@ -39,7 +39,7 @@ void main(void)
sctlr &= ~(SCTLR_M | SCTLR_C | SCTLR_Z | SCTLR_I);
write_sctlr(sctlr);
- armv7_invalidate_caches();
+ arm_invalidate_caches();
/*
* Re-enable icache and branch prediction. MMU and dcache will be
diff --git a/src/arch/armv7/cache.c b/src/arch/arm/armv7/cache.c
index 1f466ce232..acd1f9aefa 100644
--- a/src/arch/armv7/cache.c
+++ b/src/arch/arm/armv7/cache.c
@@ -276,7 +276,7 @@ void dcache_mmu_enable(void)
write_sctlr(sctlr);
}
-void armv7_invalidate_caches(void)
+void arm_invalidate_caches(void)
{
uint32_t clidr;
int level;
diff --git a/src/arch/armv7/exception.c b/src/arch/arm/armv7/exception.c
index 3b32e8bbb1..3b32e8bbb1 100644
--- a/src/arch/armv7/exception.c
+++ b/src/arch/arm/armv7/exception.c
diff --git a/src/arch/armv7/exception_asm.S b/src/arch/arm/armv7/exception_asm.S
index 163fdbd52a..163fdbd52a 100644
--- a/src/arch/armv7/exception_asm.S
+++ b/src/arch/arm/armv7/exception_asm.S
diff --git a/src/arch/armv7/mmu.c b/src/arch/arm/armv7/mmu.c
index cc915a6a33..cc915a6a33 100644
--- a/src/arch/armv7/mmu.c
+++ b/src/arch/arm/armv7/mmu.c
diff --git a/src/arch/armv7/thread.c b/src/arch/arm/armv7/thread.c
index d0c23ff92d..d0c23ff92d 100644
--- a/src/arch/armv7/thread.c
+++ b/src/arch/arm/armv7/thread.c
diff --git a/src/arch/armv7/boot.c b/src/arch/arm/boot.c
index d872a79151..d872a79151 100644
--- a/src/arch/armv7/boot.c
+++ b/src/arch/arm/boot.c
diff --git a/src/arch/armv7/bootblock.ld b/src/arch/arm/bootblock.ld
index 706f0a2c2e..706f0a2c2e 100644
--- a/src/arch/armv7/bootblock.ld
+++ b/src/arch/arm/bootblock.ld
diff --git a/src/arch/armv7/cpu.c b/src/arch/arm/cpu.c
index f90c759559..f90c759559 100644
--- a/src/arch/armv7/cpu.c
+++ b/src/arch/arm/cpu.c
diff --git a/src/arch/armv7/div0.c b/src/arch/arm/div0.c
index ab06ad3bee..ab06ad3bee 100644
--- a/src/arch/armv7/div0.c
+++ b/src/arch/arm/div0.c
diff --git a/src/arch/armv7/eabi_compat.c b/src/arch/arm/eabi_compat.c
index 0c79cd51d3..0c79cd51d3 100644
--- a/src/arch/armv7/eabi_compat.c
+++ b/src/arch/arm/eabi_compat.c
diff --git a/src/arch/armv7/id.S b/src/arch/arm/id.S
index a588f1e1da..a588f1e1da 100644
--- a/src/arch/armv7/id.S
+++ b/src/arch/arm/id.S
diff --git a/src/arch/armv7/include/arch/boot/boot.h b/src/arch/arm/include/arch/boot/boot.h
index 08651cd1a8..08651cd1a8 100644
--- a/src/arch/armv7/include/arch/boot/boot.h
+++ b/src/arch/arm/include/arch/boot/boot.h
diff --git a/src/arch/armv7/include/arch/byteorder.h b/src/arch/arm/include/arch/byteorder.h
index 8dc069f486..8dc069f486 100644
--- a/src/arch/armv7/include/arch/byteorder.h
+++ b/src/arch/arm/include/arch/byteorder.h
diff --git a/src/arch/armv7/include/arch/early_variables.h b/src/arch/arm/include/arch/early_variables.h
index cec0a46239..cec0a46239 100644
--- a/src/arch/armv7/include/arch/early_variables.h
+++ b/src/arch/arm/include/arch/early_variables.h
diff --git a/src/arch/armv7/include/arch/exception.h b/src/arch/arm/include/arch/exception.h
index 57076bd57b..57076bd57b 100644
--- a/src/arch/armv7/include/arch/exception.h
+++ b/src/arch/arm/include/arch/exception.h
diff --git a/src/arch/armv7/include/arch/hlt.h b/src/arch/arm/include/arch/hlt.h
index 285b6f8786..285b6f8786 100644
--- a/src/arch/armv7/include/arch/hlt.h
+++ b/src/arch/arm/include/arch/hlt.h
diff --git a/src/arch/armv7/include/arch/io.h b/src/arch/arm/include/arch/io.h
index e044090e68..e53729708d 100644
--- a/src/arch/armv7/include/arch/io.h
+++ b/src/arch/arm/include/arch/io.h
@@ -23,48 +23,9 @@
#ifndef __ASM_ARM_IO_H
#define __ASM_ARM_IO_H
-#include <types.h>
-#include <arch/cache.h> /* for dmb() */
#include <arch/byteorder.h>
-
-static inline uint8_t read8(const void *addr)
-{
- dmb();
- return *(volatile uint8_t *)addr;
-}
-
-static inline uint16_t read16(const void *addr)
-{
- dmb();
- return *(volatile uint16_t *)addr;
-}
-
-static inline uint32_t read32(const void *addr)
-{
- dmb();
- return *(volatile uint32_t *)addr;
-}
-
-static inline void write8(uint8_t val, void *addr)
-{
- dmb();
- *(volatile uint8_t *)addr = val;
- dmb();
-}
-
-static inline void write16(uint16_t val, void *addr)
-{
- dmb();
- *(volatile uint16_t *)addr = val;
- dmb();
-}
-
-static inline void write32(uint32_t val, void *addr)
-{
- dmb();
- *(volatile uint32_t *)addr = val;
- dmb();
-}
+#include <arch/arch_io.h>
+#include <stdint.h>
/*
* FIXME: These are to avoid breaking existing ARM code. We should eventually
diff --git a/src/arch/armv7/include/arch/pci_ops.h b/src/arch/arm/include/arch/pci_ops.h
index 7a7ed32a67..faa77012d3 100644
--- a/src/arch/armv7/include/arch/pci_ops.h
+++ b/src/arch/arm/include/arch/pci_ops.h
@@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef ARCH_ARMV7_PCI_OPS_H
-#define ARCH_ARMV7_PCI_OPS_H
+#ifndef ARCH_ARM_PCI_OPS_H
+#define ARCH_ARM_PCI_OPS_H
/* Empty stub until PCI includes are properly fixed. */
diff --git a/src/arch/armv7/include/arch/stages.h b/src/arch/arm/include/arch/stages.h
index 671c02b3dd..39fed990c5 100644
--- a/src/arch/armv7/include/arch/stages.h
+++ b/src/arch/arm/include/arch/stages.h
@@ -22,7 +22,7 @@
extern void main(void);
-void stage_entry(void) __attribute__((section(".text.stage_entry.armv7")));
+void stage_entry(void) __attribute__((section(".text.stage_entry.arm")));
void stage_exit(void *);
#endif
diff --git a/src/arch/armv7/include/armv7.h b/src/arch/arm/include/armv7.h
index 147323457a..147323457a 100644
--- a/src/arch/armv7/include/armv7.h
+++ b/src/arch/arm/include/armv7.h
diff --git a/src/arch/arm/include/armv7/arch/arch_io.h b/src/arch/arm/include/armv7/arch/arch_io.h
new file mode 100644
index 0000000000..360fa6425a
--- /dev/null
+++ b/src/arch/arm/include/armv7/arch/arch_io.h
@@ -0,0 +1,68 @@
+/*
+ * Originally imported from linux/include/asm-arm/io.h. This file has changed
+ * substantially since then.
+ *
+ * Copyright 2013 Google Inc.
+ * Copyright (C) 1996-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 08-Apr-2013 G Replaced several macros with inlines for type safety.
+ * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both
+ * constant addresses and variable addresses.
+ * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture
+ * specific IO header files.
+ * 27-Mar-1999 PJB Second parameter of memcpy_toio is const..
+ * 04-Apr-1999 PJB Added check_signature.
+ * 12-Dec-1999 RMK More cleanups
+ * 18-Jun-2000 RMK Removed virt_to_* and friends definitions
+ */
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#include <arch/cache.h> /* for dmb() */
+#include <stdint.h>
+
+static inline uint8_t read8(const void *addr)
+{
+ dmb();
+ return *(volatile uint8_t *)addr;
+}
+
+static inline uint16_t read16(const void *addr)
+{
+ dmb();
+ return *(volatile uint16_t *)addr;
+}
+
+static inline uint32_t read32(const void *addr)
+{
+ dmb();
+ return *(volatile uint32_t *)addr;
+}
+
+static inline void write8(uint8_t val, void *addr)
+{
+ dmb();
+ *(volatile uint8_t *)addr = val;
+ dmb();
+}
+
+static inline void write16(uint16_t val, void *addr)
+{
+ dmb();
+ *(volatile uint16_t *)addr = val;
+ dmb();
+}
+
+static inline void write32(uint32_t val, void *addr)
+{
+ dmb();
+ *(volatile uint32_t *)addr = val;
+ dmb();
+}
+
+#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/payloads/libpayload/include/armv7/arch/cache.h b/src/arch/arm/include/armv7/arch/cache.h
index 1cd9958fc4..ffdb55a706 100644
--- a/payloads/libpayload/include/armv7/arch/cache.h
+++ b/src/arch/arm/include/armv7/arch/cache.h
@@ -26,11 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * cache.h: Cache maintenance API for ARMv7
+ * cache.h: Cache maintenance API for ARM
*/
-#ifndef ARMV7_CACHE_H
-#define ARMV7_CACHE_H
+#ifndef ARM_CACHE_H
+#define ARM_CACHE_H
#include <stddef.h>
#include <stdint.h>
@@ -320,8 +320,8 @@ void tlb_invalidate_all(void);
* Generalized setup/init functions
*/
-/* invalidate all caches on ARMv7 */
-void armv7_invalidate_caches(void);
+/* invalidate all caches on ARM */
+void arm_invalidate_caches(void);
/* mmu initialization (set page table address, set permissions, etc) */
void mmu_init(void);
@@ -338,4 +338,4 @@ void mmu_disable_range(unsigned long start_mb, unsigned long size_mb);
void mmu_config_range(unsigned long start_mb, unsigned long size_mb,
enum dcache_policy policy);
-#endif /* ARMV7_CACHE_H */
+#endif /* ARM_CACHE_H */
diff --git a/src/arch/armv7/include/arch/cpu.h b/src/arch/arm/include/armv7/arch/cpu.h
index 52cc8a3f50..52cc8a3f50 100644
--- a/src/arch/armv7/include/arch/cpu.h
+++ b/src/arch/arm/include/armv7/arch/cpu.h
diff --git a/src/arch/armv7/include/arch/types.h b/src/arch/arm/include/armv7/arch/types.h
index be7e76c5ab..be7e76c5ab 100644
--- a/src/arch/armv7/include/arch/types.h
+++ b/src/arch/arm/include/armv7/arch/types.h
diff --git a/src/arch/armv7/include/assembler.h b/src/arch/arm/include/assembler.h
index 10363c4e4e..10363c4e4e 100644
--- a/src/arch/armv7/include/assembler.h
+++ b/src/arch/arm/include/assembler.h
diff --git a/src/arch/armv7/include/bootblock_common.h b/src/arch/arm/include/bootblock_common.h
index 034a12bc36..034a12bc36 100644
--- a/src/arch/armv7/include/bootblock_common.h
+++ b/src/arch/arm/include/bootblock_common.h
diff --git a/src/arch/armv7/include/clocks.h b/src/arch/arm/include/clocks.h
index 58cf838621..58cf838621 100644
--- a/src/arch/armv7/include/clocks.h
+++ b/src/arch/arm/include/clocks.h
diff --git a/src/arch/armv7/include/smp/spinlock.h b/src/arch/arm/include/smp/spinlock.h
index 1dc397c19c..1dc397c19c 100644
--- a/src/arch/armv7/include/smp/spinlock.h
+++ b/src/arch/arm/include/smp/spinlock.h
diff --git a/src/arch/armv7/include/stdint.h b/src/arch/arm/include/stdint.h
index 9d41e6359a..9d41e6359a 100644
--- a/src/arch/armv7/include/stdint.h
+++ b/src/arch/arm/include/stdint.h
diff --git a/src/arch/armv7/include/utils.h b/src/arch/arm/include/utils.h
index 828b86cb36..828b86cb36 100644
--- a/src/arch/armv7/include/utils.h
+++ b/src/arch/arm/include/utils.h
diff --git a/src/arch/armv7/memcpy.S b/src/arch/arm/memcpy.S
index 921fc2a6bc..921fc2a6bc 100644
--- a/src/arch/armv7/memcpy.S
+++ b/src/arch/arm/memcpy.S
diff --git a/src/arch/armv7/memmove.S b/src/arch/arm/memmove.S
index a2f9ea18ae..a2f9ea18ae 100644
--- a/src/arch/armv7/memmove.S
+++ b/src/arch/arm/memmove.S
diff --git a/src/arch/armv7/memset.S b/src/arch/arm/memset.S
index a3cc9477f8..a3cc9477f8 100644
--- a/src/arch/armv7/memset.S
+++ b/src/arch/arm/memset.S
diff --git a/src/arch/armv7/ramstage.ld b/src/arch/arm/ramstage.ld
index 91efe2c4d0..cab512e99d 100644
--- a/src/arch/armv7/ramstage.ld
+++ b/src/arch/arm/ramstage.ld
@@ -38,7 +38,7 @@ SECTIONS
.text : {
_text = .;
_start = .;
- *(.text.stage_entry.armv7);
+ *(.text.stage_entry.arm);
*(.text);
*(.text.*);
. = ALIGN(16);
diff --git a/src/arch/armv7/romstage.ld b/src/arch/arm/romstage.ld
index a9c3f8bf04..65b133ad2c 100644
--- a/src/arch/armv7/romstage.ld
+++ b/src/arch/arm/romstage.ld
@@ -41,7 +41,7 @@ SECTIONS
.romtext . : {
_rom = .;
_start = .;
- *(.text.stage_entry.armv7);
+ *(.text.stage_entry.arm);
*(.text.startup);
*(.text);
} : to_load
diff --git a/src/arch/armv7/stages.c b/src/arch/arm/stages.c
index 38d1b1928a..38d1b1928a 100644
--- a/src/arch/armv7/stages.c
+++ b/src/arch/arm/stages.c
diff --git a/src/arch/armv7/tables.c b/src/arch/arm/tables.c
index 20c5a9f7a8..20c5a9f7a8 100644
--- a/src/arch/armv7/tables.c
+++ b/src/arch/arm/tables.c
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 054177f486..c7c3ea5dc0 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -2,7 +2,7 @@ menu "Console"
config BOOTBLOCK_CONSOLE
bool "Enable early (bootblock) console output."
- depends on ARCH_ARMV7
+ depends on ARCH_ARM
default n
help
Use console during the bootblock if supported
diff --git a/src/cpu/ti/am335x/Makefile.inc b/src/cpu/ti/am335x/Makefile.inc
index c5c1e645ca..032b1f41c6 100644
--- a/src/cpu/ti/am335x/Makefile.inc
+++ b/src/cpu/ti/am335x/Makefile.inc
@@ -16,7 +16,7 @@ ramstage-y += uart.c
endif
$(call add-class,omap-header)
-$(eval $(call create_class_compiler,omap-header,armv7))
+$(eval $(call create_class_compiler,omap-header,arm))
real-target: $(obj)/MLO
diff --git a/src/device/oprom/yabel/device.h b/src/device/oprom/yabel/device.h
index 017aab9384..63f1d8e50e 100644
--- a/src/device/oprom/yabel/device.h
+++ b/src/device/oprom/yabel/device.h
@@ -128,7 +128,7 @@ u8 biosemu_dev_translate_address(int type, unsigned long * addr);
static inline void
out32le(void *addr, u32 val)
{
-#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7
+#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARM
*((u32*) addr) = cpu_to_le32(val);
#else
asm volatile ("stwbrx %0, 0, %1"::"r" (val), "r"(addr));
@@ -139,7 +139,7 @@ static inline u32
in32le(void *addr)
{
u32 val;
-#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7
+#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARM
val = cpu_to_le32(*((u32 *) addr));
#else
asm volatile ("lwbrx %0, 0, %1":"=r" (val):"r"(addr));
@@ -150,7 +150,7 @@ in32le(void *addr)
static inline void
out16le(void *addr, u16 val)
{
-#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7
+#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARM
*((u16*) addr) = cpu_to_le16(val);
#else
asm volatile ("sthbrx %0, 0, %1"::"r" (val), "r"(addr));
@@ -161,7 +161,7 @@ static inline u16
in16le(void *addr)
{
u16 val;
-#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7
+#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARM
val = cpu_to_le16(*((u16*) addr));
#else
asm volatile ("lhbrx %0, 0, %1":"=r" (val):"r"(addr));
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig
index a979437023..fef745e418 100644
--- a/src/drivers/uart/Kconfig
+++ b/src/drivers/uart/Kconfig
@@ -5,7 +5,7 @@ config DRIVERS_UART
config DRIVERS_UART_8250IO
bool "Serial port on SuperIO"
- depends on !ARCH_ARMV7
+ depends on !ARCH_ARM
default n if NO_UART_ON_SUPERIO
default y if ARCH_X86
diff --git a/src/include/cbfs_core.h b/src/include/cbfs_core.h
index a1d8127de2..e74d618d92 100644
--- a/src/include/cbfs_core.h
+++ b/src/include/cbfs_core.h
@@ -107,7 +107,7 @@ struct cbfs_header {
*/
#define CBFS_ARCHITECTURE_UNKNOWN 0xFFFFFFFF
#define CBFS_ARCHITECTURE_X86 0x00000001
-#define CBFS_ARCHITECTURE_ARMV7 0x00000010
+#define CBFS_ARCHITECTURE_ARM 0x00000010
/** This is a component header - every entry in the CBFS
will have this header.
diff --git a/src/soc/nvidia/tegra124/bootblock_asm.S b/src/soc/nvidia/tegra124/bootblock_asm.S
index 8d0beb8711..5f7de13ee3 100644
--- a/src/soc/nvidia/tegra124/bootblock_asm.S
+++ b/src/soc/nvidia/tegra124/bootblock_asm.S
@@ -1,5 +1,5 @@
/*
- * Early initialization code for ARMv7 architecture.
+ * Early initialization code for ARM architecture.
*
* This file is based off of the OMAP3530/ARM Cortex start.S file from Das
* U-Boot, which itself got the file from armboot.
diff --git a/src/vendorcode/google/chromeos/fmap.c b/src/vendorcode/google/chromeos/fmap.c
index e0ec30b248..bc56a19066 100644
--- a/src/vendorcode/google/chromeos/fmap.c
+++ b/src/vendorcode/google/chromeos/fmap.c
@@ -41,7 +41,7 @@ const struct fmap *fmap_find(void)
/* wrapping around 0x100000000 */
const struct fmap *fmap = (void *)
(CONFIG_FLASHMAP_OFFSET - CONFIG_ROM_SIZE);
-#elif CONFIG_ARCH_ARMV7
+#elif CONFIG_ARCH_ARM
struct cbfs_media default_media, *media;
media = &default_media;
init_default_cbfs_media(media);
diff --git a/toolchain.inc b/toolchain.inc
index 3b9c5d297b..326e474bee 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -55,12 +55,9 @@ COREBOOT_STANDARD_STAGES := bootblock romstage ramstage
ARCHDIR-i386 := x86
ARCHDIR-x86_32 := x86
-ARCHDIR-armv7 := armv7
+ARCHDIR-arm := arm
-CFLAGS_armv7 += \
- -ffixed-r8\
- -march=armv7-a\
- -marm\
+CFLAGS_arm += \
-mno-unaligned-access\
-mthumb\
-mthumb-interwork
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 52a4a5097b..6a54bc81f8 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -51,7 +51,7 @@ struct cbfs_header {
#define CBFS_ARCHITECTURE_UNKNOWN 0xFFFFFFFF
#define CBFS_ARCHITECTURE_X86 0x00000001
-#define CBFS_ARCHITECTURE_ARMV7 0x00000010
+#define CBFS_ARCHITECTURE_ARM 0x00000010
#define CBFS_FILE_MAGIC "LARCHIVE"
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index f236d8b689..937b6105b5 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -586,7 +586,7 @@ static void usage(char *name)
"Updates the FIT table with microcode entries\n"
"\n"
"ARCHes:\n"
- " armv7, x86\n"
+ " arm, x86\n"
"TYPEs:\n", name, name
);
print_supported_filetypes();
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 6778eb9401..a28e74179d 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -130,7 +130,7 @@ static struct {
uint32_t arch;
const char *name;
} arch_names[] = {
- { CBFS_ARCHITECTURE_ARMV7, "armv7" },
+ { CBFS_ARCHITECTURE_ARM, "arm" },
{ CBFS_ARCHITECTURE_X86, "x86" },
{ CBFS_ARCHITECTURE_UNKNOWN, "unknown" }
};
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index fdd1599199..4c0de89090 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -610,7 +610,7 @@ elf_headers(const struct buffer *pinput,
// The tool may work in architecture-independent way.
if (arch != CBFS_ARCHITECTURE_UNKNOWN &&
- !((ehdr->e_machine == EM_ARM) && (arch == CBFS_ARCHITECTURE_ARMV7)) &&
+ !((ehdr->e_machine == EM_ARM) && (arch == CBFS_ARCHITECTURE_ARM)) &&
!((ehdr->e_machine == EM_386) && (arch == CBFS_ARCHITECTURE_X86))) {
ERROR("The stage file has the wrong architecture\n");
return -1;
diff --git a/util/runfw/googlesnow.c b/util/runfw/googlesnow.c
index 686b4bc969..125e0a20be 100644
--- a/util/runfw/googlesnow.c
+++ b/util/runfw/googlesnow.c
@@ -114,7 +114,7 @@ Error in re-setting breakpoint 3: No source file named runbios.c.
1: x/i $pc
=> 0x20234bc <call_bootblock+12>: blx 0x20244b8 <main>
(gdb)
-main (bist=0) at src/arch/armv7/bootblock_simple.c:37
+main (bist=0) at src/arch/arm/bootblock_simple.c:37
37 {
1: x/i $pc
=> 0x20244b8 <main>: push {r3, lr}
diff --git a/util/showdevicetree/showdt.c b/util/showdevicetree/showdt.c
index dc4e4d6fa3..4e904a2c87 100644
--- a/util/showdevicetree/showdt.c
+++ b/util/showdevicetree/showdt.c
@@ -165,5 +165,5 @@ main()
* Example: (yank this and paste into M-x compile in emacs)
* or tail -2 showdt.c | head -1 |sh
* or whatever.
- cc -I ../src -I ../src/include -I ../src/arch/armv7/include/ -include build/mainboard/google/snow/static.c showdt.c
+ cc -I ../src -I ../src/include -I ../src/arch/arm/include/ -include build/mainboard/google/snow/static.c showdt.c
*/
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 4b18942be2..e9f6d32689 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -167,10 +167,10 @@ EOF
}
# Architecture definition
-SUPPORTED_ARCHITECTURE="x86 armv7 aarch64"
+SUPPORTED_ARCHITECTURE="x86 arm aarch64"
-arch_config_armv7() {
- TARCH="armv7"
+arch_config_arm() {
+ TARCH="arm"
TBFDARCH="littlearm"
TCLIST="armv7a armv7-a"
TWIDTH="32"