ARM: Generalize armv7 as arm.

There are ARM systems which are essentially heterogeneous multicores where
some cores implement a different ARM architecture version than other cores. A
specific example is the tegra124 which boots on an ARMv4 coprocessor while
most code, including most of the firmware, runs on the main ARMv7 core. To
support SOCs like this, the plan is to generalize the ARM architecture so that
all versions are available, and an SOC/CPU can then select what architecture
variant should be used for each component of the firmware; bootblock,
romstage, and ramstage.

BUG=chrome-os-partner:23009
TEST=Built libpayload and coreboot for link, pit and nyan. Booted into the
bootblock on nyan.
BRANCH=None

Change-Id: I22e048c3bc72bd56371e14200942e436c1e312c2
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/171338
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Gabe Black 2013-09-30 23:00:33 -07:00 committed by chrome-internal-fetch
commit 8423a41529
117 changed files with 123 additions and 126 deletions

View file

@ -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"

View file

@ -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))

View file

@ -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

View file

@ -27,5 +27,5 @@
## SUCH DAMAGE.
##
source "arch/armv7/Config.in"
source "arch/arm/Config.in"
source "arch/x86/Config.in"

View file

@ -27,7 +27,7 @@
## SUCH DAMAGE.
##
if ARCH_ARMV7
if ARCH_ARM
config ARCH_SPECIFIC_OPTIONS # dummy
def_bool y

View file

@ -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;

View file

@ -28,8 +28,8 @@
*/
/**
* @file armv7/timer.c
* ARMv7 specific timer routines
* @file arm/timer.c
* ARM specific timer routines
*/
#include <libpayload.h>

View file

@ -107,9 +107,9 @@ while [ $# -gt 0 ]; do
shift
done
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=""
fi

View file

@ -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_X86=y
# CONFIG_LP_MEMMAP_RAM_ONLY is not set
# CONFIG_LP_MULTIBOOT is not set

View file

@ -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

View file

@ -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

View file

@ -15,7 +15,7 @@ CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
CONFIG_LP_ARCH_ARMV7=y
CONFIG_LP_ARCH_ARM=y
# CONFIG_LP_ARCH_POWERPC is not set
# CONFIG_LP_ARCH_X86 is not set
# CONFIG_LP_MEMMAP_RAM_ONLY is not set

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -15,7 +15,7 @@ CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
CONFIG_LP_ARCH_ARMV7=y
CONFIG_LP_ARCH_ARM=y
# CONFIG_LP_ARCH_POWERPC is not set
# CONFIG_LP_ARCH_X86 is not set
# CONFIG_LP_MEMMAP_RAM_ONLY is not set

View file

@ -15,7 +15,7 @@ CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
CONFIG_LP_ARCH_ARMV7=y
CONFIG_LP_ARCH_ARM=y
# CONFIG_LP_ARCH_POWERPC is not set
# CONFIG_LP_ARCH_X86 is not set
# CONFIG_LP_MEMMAP_RAM_ONLY is not set

View file

@ -15,7 +15,7 @@ CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
CONFIG_LP_ARCH_ARMV7=y
CONFIG_LP_ARCH_ARM=y
# CONFIG_LP_ARCH_POWERPC is not set
# CONFIG_LP_ARCH_X86 is not set
# CONFIG_LP_MEMMAP_RAM_ONLY is not set

View file

@ -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

View file

@ -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

View file

@ -15,7 +15,7 @@
#
# 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

View file

@ -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 */

View file

@ -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.

View file

@ -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"

View file

@ -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