2010-05-29 03:09:12 +00:00
|
|
|
#
|
|
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
|
|
# for more details.
|
|
|
|
#
|
|
|
|
# This file is included by the global makefile so that you can add your own
|
|
|
|
# architecture-specific flags and dependencies. Remember to do have actions
|
|
|
|
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
|
|
|
# this architecture
|
|
|
|
|
|
|
|
# If building with TILERA_ROOT set (i.e. using the Tilera Multicore
|
|
|
|
# Development Environment) we can set CROSS_COMPILE based on that.
|
|
|
|
# If we're not cross-compiling, make sure we're on the right architecture.
|
2010-08-15 19:01:45 +00:00
|
|
|
# Only bother to test for a few common targets, to avoid useless errors.
|
2010-05-29 03:09:12 +00:00
|
|
|
ifeq ($(CROSS_COMPILE),)
|
2010-08-15 19:01:45 +00:00
|
|
|
ifdef TILERA_ROOT
|
|
|
|
CROSS_COMPILE := $(TILERA_ROOT)/bin/tile-
|
|
|
|
else
|
|
|
|
goals := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)
|
|
|
|
ifneq ($(strip $(filter vmlinux modules all,$(goals))),)
|
|
|
|
HOST_ARCH := $(shell uname -m)
|
|
|
|
ifneq ($(HOST_ARCH),$(ARCH))
|
2010-05-29 03:09:12 +00:00
|
|
|
$(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH))
|
2010-08-15 19:01:45 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2010-05-29 03:09:12 +00:00
|
|
|
endif
|
|
|
|
|
2010-10-14 19:16:59 +00:00
|
|
|
ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
|
2010-05-29 03:09:12 +00:00
|
|
|
KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS)
|
2010-10-14 19:16:59 +00:00
|
|
|
endif
|
2010-05-29 03:09:12 +00:00
|
|
|
|
2012-03-29 19:30:19 +00:00
|
|
|
LIBGCC_PATH := \
|
|
|
|
$(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
|
2010-05-29 03:09:12 +00:00
|
|
|
|
|
|
|
# Provide the path to use for "make defconfig".
|
2012-05-20 19:15:34 +00:00
|
|
|
# We default to the newer TILE-Gx architecture if only "tile" is given.
|
|
|
|
ifeq ($(ARCH),tile)
|
|
|
|
KBUILD_DEFCONFIG := tilegx_defconfig
|
|
|
|
else
|
|
|
|
KBUILD_DEFCONFIG := $(ARCH)_defconfig
|
|
|
|
endif
|
2010-05-29 03:09:12 +00:00
|
|
|
|
|
|
|
# Used as a file extension when useful, e.g. head_$(BITS).o
|
|
|
|
# Not needed for (e.g.) "$(CC) -m32" since the compiler automatically
|
|
|
|
# uses the right default anyway.
|
|
|
|
export BITS
|
|
|
|
ifeq ($(CONFIG_TILEGX),y)
|
|
|
|
BITS := 64
|
|
|
|
else
|
|
|
|
BITS := 32
|
|
|
|
endif
|
|
|
|
|
|
|
|
head-y := arch/tile/kernel/head_$(BITS).o
|
|
|
|
|
|
|
|
libs-y += arch/tile/lib/
|
|
|
|
libs-y += $(LIBGCC_PATH)
|
|
|
|
|
|
|
|
# See arch/tile/Kbuild for content of core part of the kernel
|
|
|
|
core-y += arch/tile/
|
2010-10-14 19:16:59 +00:00
|
|
|
|
arch/tile: introduce GXIO IORPC framework for tilegx
The GXIO I/O RPC subsystem handles exporting I/O hardware resources to
Linux and to applications running under Linux.
For instance, memory which is made available for I/O DMA must be mapped
by an I/O TLB; that means that such memory must be locked down by Linux,
so that it is not swapped or otherwise reused, as long as those I/O
TLB entries are active. Similarly, configuring direct hardware access
introduces new validation requirements. If a user application registers
memory, Linux must ensure that the supplied virtual addresses are valid,
and turn them into client physical addresses. Similarly, when Linux then
supplies those client physical addresses to the Tilera hypervisor, it
must in turn validate those before turning them into the real physical
addresses which are required by the hardware.
To the extent that these sorts of activities were required on previous
TILE architecture processors, they were implemented in a device-specific
fashion. This meant that every I/O device had its own Tilera hypervisor
driver, its own Linux driver, and in some cases its own user-level
library support. There was a large amount of more-or-less functionally
identical code in different places, particularly in the different Linux
drivers. For TILE-Gx, this support has been generalized into a common
framework, known as the I/O RPC framework or just IORPC.
The two "gxio" directories (one for headers, one for sources) start
with just a few files in each with this infrastructure commit, but
after adding support for the on-board I/O shims for networking, PCI,
USB, crypto, compression, I2CS, etc., there end up being about 20 files
in each directory.
More information on the IORPC framework is in the <hv/iorpc.h> header,
included in this commit.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-04-04 20:39:58 +00:00
|
|
|
core-$(CONFIG_TILE_GXIO) += arch/tile/gxio/
|
|
|
|
|
2010-10-14 19:16:59 +00:00
|
|
|
ifdef TILERA_ROOT
|
|
|
|
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
|
|
|
|
endif
|
|
|
|
|
|
|
|
install:
|
|
|
|
install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
|
|
|
|
install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
|
|
|
|
install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
|
|
|
|
|
|
|
|
define archhelp
|
|
|
|
echo ' install - install kernel into $(INSTALL_PATH)'
|
|
|
|
endef
|