aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/tile
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/arch/abi.h96
-rw-r--r--arch/tile/include/arch/chip.h23
-rw-r--r--arch/tile/include/arch/chip_tile64.h258
-rw-r--r--arch/tile/include/arch/chip_tilegx.h258
-rw-r--r--arch/tile/include/arch/chip_tilepro.h258
-rw-r--r--arch/tile/include/arch/icache.h93
-rw-r--r--arch/tile/include/arch/interrupts.h19
-rw-r--r--arch/tile/include/arch/interrupts_32.h307
-rw-r--r--arch/tile/include/arch/interrupts_64.h276
-rw-r--r--arch/tile/include/arch/sim.h643
-rw-r--r--arch/tile/include/arch/sim_def.h505
-rw-r--r--arch/tile/include/arch/spr_def_32.h201
-rw-r--r--arch/tile/include/arch/spr_def_64.h173
-rw-r--r--arch/tile/include/asm/auxvec.h20
-rw-r--r--arch/tile/include/asm/bitsperlong.h26
-rw-r--r--arch/tile/include/asm/byteorder.h1
-rw-r--r--arch/tile/include/asm/memprof.h33
-rw-r--r--arch/tile/include/asm/mman.h41
-rw-r--r--arch/tile/include/asm/opcode-tile.h30
-rw-r--r--arch/tile/include/asm/opcode-tile_32.h1513
-rw-r--r--arch/tile/include/asm/opcode-tile_64.h1248
-rw-r--r--arch/tile/include/asm/opcode_constants.h26
-rw-r--r--arch/tile/include/asm/opcode_constants_32.h480
-rw-r--r--arch/tile/include/asm/opcode_constants_64.h609
-rw-r--r--arch/tile/include/asm/sigcontext.h35
-rw-r--r--arch/tile/include/asm/siginfo.h34
-rw-r--r--arch/tile/include/asm/stat.h4
-rw-r--r--arch/tile/include/asm/swab.h23
-rw-r--r--arch/tile/include/asm/system.h261
-rw-r--r--arch/tile/kernel/init_task.c59
-rw-r--r--arch/tile/kernel/relocate_kernel.S280
31 files changed, 7833 insertions, 0 deletions
diff --git a/arch/tile/include/arch/abi.h b/arch/tile/include/arch/abi.h
new file mode 100644
index 00000000000..8affc76f771
--- /dev/null
+++ b/arch/tile/include/arch/abi.h
@@ -0,0 +1,96 @@
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15/**
16 * @file
17 *
18 * ABI-related register definitions helpful when writing assembly code.
19 */
20
21#ifndef __ARCH_ABI_H__
22#define __ARCH_ABI_H__
23
24#include <arch/chip.h>
25
26/* Registers 0 - 55 are "normal", but some perform special roles. */
27
28#define TREG_FP 52 /**< Frame pointer. */
29#define TREG_TP 53 /**< Thread pointer. */
30#define TREG_SP 54 /**< Stack pointer. */
31#define TREG_LR 55 /**< Link to calling function PC. */
32
33/** Index of last normal general-purpose register. */
34#define TREG_LAST_GPR 55
35
36/* Registers 56 - 62 are "special" network registers. */
37
38#define TREG_SN 56 /**< Static network access. */
39#define TREG_IDN0 57 /**< IDN demux 0 access. */
40#define TREG_IDN1 58 /**< IDN demux 1 access. */
41#define TREG_UDN0 59 /**< UDN demux 0 access. */
42#define TREG_UDN1 60 /**< UDN demux 1 access. */
43#define TREG_UDN2 61 /**< UDN demux 2 access. */
44#define TREG_UDN3 62 /**< UDN demux 3 access. */
45
46/* Register 63 is the "special" zero register. */
47
48#define TREG_ZERO 63 /**< "Zero" register; always reads as "0". */
49
50
51/** By convention, this register is used to hold the syscall number. */
52#define TREG_SYSCALL_NR 10
53
54/** Name of register that holds the syscall number, for use in assembly. */
55#define TREG_SYSCALL_NR_NAME r10
56
57
58/**
59 * The ABI requires callers to allocate a caller state save area of
60 * this many bytes at the bottom of each stack frame.
61 */
62#define C_ABI_SAVE_AREA_SIZE (2 * (CHIP_WORD_SIZE() / 8))
63
64/**
65 * The operand to an 'info' opcode directing the backtracer to not
66 * try to find the calling frame.
67 */
68#define INFO_OP_CANNOT_BACKTRACE 2
69
70#ifndef __ASSEMBLER__
71#if CHIP_WORD_SIZE() > 32
72
73/** Unsigned type that can hold a register. */
74typedef unsigned long long uint_reg_t;
75
76/** Signed type that can hold a register. */
77typedef long long int_reg_t;
78
79/** String prefix to use for printf(). */
80#define INT_REG_FMT "ll"
81
82#elif !defined(__LP64__) /* avoid confusion with LP64 cross-build tools */
83
84/** Unsigned type that can hold a register. */
85typedef unsigned long uint_reg_t;
86
87/** Signed type that can hold a register. */
88typedef long int_reg_t;
89
90/** String prefix to use for printf(). */
91#define INT_REG_FMT "l"
92
93#endif
94#endif /* __ASSEMBLER__ */
95
96#endif /* !__ARCH_ABI_H__ */
diff --git a/arch/tile/include/arch/chip.h b/arch/tile/include/arch/chip.h
new file mode 100644
index 00000000000..926d3db0e91
--- /dev/null
+++ b/arch/tile/include/arch/chip.h
@@ -0,0 +1,23 @@
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15#if __tile_chip__ == 0
16#include <arch/chip_tile64.h>
17#elif __tile_chip__ == 1
18#include <arch/chip_tilepro.h>
19#elif defined(__tilegx__)
20#include <arch/chip_tilegx.h>
21#else
22#error Unexpected Tilera chip type
23#endif
diff --git a/arch/tile/include/arch/chip_tile64.h b/arch/tile/include/arch/chip_tile64.h
new file mode 100644
index 00000000000..261aaba092d
--- /dev/null
+++ b/arch/tile/include/arch/chip_tile64.h
@@ -0,0 +1,258 @@
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15/*
16 * @file
17 * Global header file.
18 * This header file specifies defines for TILE64.
19 */
20
21#ifndef __ARCH_CHIP_H__
22#define __ARCH_CHIP_H__
23
24/** Specify chip version.
25 * When possible, prefer the CHIP_xxx symbols below for future-proofing.
26 * This is intended for cross-compiling; native compilation should
27 * use the predefined __tile_chip__ symbol.
28 */
29#define TILE_CHIP 0
30
31/** Specify chip revision.
32 * This provides for the case of a respin of a particular chip type;
33 * the normal value for this symbol is "0".
34 * This is intended for cross-compiling; native compilation should
35 * use the predefined __tile_chip_rev__ symbol.
36 */
37#define TILE_CHIP_REV 0
38
39/** The name of this architecture. */
40#define CHIP_ARCH_NAME "tile64"
41
42/** The ELF e_machine type for binaries for this chip. */
43#define CHIP_ELF_TYPE() EM_TILE64
44
45/** The alternate ELF e_machine type for binaries for this chip. */
46#define CHIP_COMPAT_ELF_TYPE() 0x2506
47
<