blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 21:50:22 +00:00
|
|
|
/*
|
|
|
|
* File: arch/blackfin/kernel/asm-offsets.c
|
|
|
|
* Based on:
|
|
|
|
* Author:
|
|
|
|
*
|
|
|
|
* Created:
|
|
|
|
* Description: generate definitions needed by assembly language modules.
|
|
|
|
*
|
|
|
|
* Modified:
|
|
|
|
* Copyright 2004-2006 Analog Devices Inc.
|
|
|
|
*
|
|
|
|
* Bugs: Enter bugs at http://blackfin.uclinux.org/
|
|
|
|
*
|
|
|
|
* 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; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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, see the file COPYING, or write
|
|
|
|
* to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/stddef.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/kernel_stat.h>
|
|
|
|
#include <linux/ptrace.h>
|
|
|
|
#include <linux/hardirq.h>
|
2007-07-12 14:58:21 +00:00
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/thread_info.h>
|
2008-04-29 08:04:03 +00:00
|
|
|
#include <linux/kbuild.h>
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 21:50:22 +00:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
/* offsets into the task struct */
|
|
|
|
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
|
|
|
|
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
|
|
|
|
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
|
|
|
|
DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
|
|
|
|
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
|
2007-05-09 09:35:16 +00:00
|
|
|
DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 21:50:22 +00:00
|
|
|
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
|
|
|
|
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
|
|
|
|
DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
|
|
|
|
|
|
|
|
/* offsets into the irq_cpustat_t struct */
|
|
|
|
DEFINE(CPUSTAT_SOFTIRQ_PENDING,
|
|
|
|
offsetof(irq_cpustat_t, __softirq_pending));
|
|
|
|
|
|
|
|
/* offsets into the thread struct */
|
|
|
|
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
|
|
|
|
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
|
|
|
|
DEFINE(THREAD_PC, offsetof(struct thread_struct, pc));
|
|
|
|
DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE);
|
|
|
|
|
|
|
|
/* offsets into the pt_regs */
|
2008-10-09 07:22:56 +00:00
|
|
|
DEFINE(PT_ORIG_R0, offsetof(struct pt_regs, orig_r0));
|
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-06 21:50:22 +00:00
|
|
|
DEFINE(PT_ORIG_P0, offsetof(struct pt_regs, orig_p0));
|
|
|
|
DEFINE(PT_ORIG_PC, offsetof(struct pt_regs, orig_pc));
|
|
|
|
DEFINE(PT_R0, offsetof(struct pt_regs, r0));
|
|
|
|
DEFINE(PT_R1, offsetof(struct pt_regs, r1));
|
|
|
|
DEFINE(PT_R2, offsetof(struct pt_regs, r2));
|
|
|
|
DEFINE(PT_R3, offsetof(struct pt_regs, r3));
|
|
|
|
DEFINE(PT_R4, offsetof(struct pt_regs, r4));
|
|
|
|
DEFINE(PT_R5, offsetof(struct pt_regs, r5));
|
|
|
|
DEFINE(PT_R6, offsetof(struct pt_regs, r6));
|
|
|
|
DEFINE(PT_R7, offsetof(struct pt_regs, r7));
|
|
|
|
|
|
|
|
DEFINE(PT_P0, offsetof(struct pt_regs, p0));
|
|
|
|
DEFINE(PT_P1, offsetof(struct pt_regs, p1));
|
|
|
|
DEFINE(PT_P2, offsetof(struct pt_regs, p2));
|
|
|
|
DEFINE(PT_P3, offsetof(struct pt_regs, p3));
|
|
|
|
DEFINE(PT_P4, offsetof(struct pt_regs, p4));
|
|
|
|
DEFINE(PT_P5, offsetof(struct pt_regs, p5));
|
|
|
|
|
|
|
|
DEFINE(PT_FP, offsetof(struct pt_regs, fp));
|
|
|
|
DEFINE(PT_USP, offsetof(struct pt_regs, usp));
|
|
|
|
DEFINE(PT_I0, offsetof(struct pt_regs, i0));
|
|
|
|
DEFINE(PT_I1, offsetof(struct pt_regs, i1));
|
|
|
|
DEFINE(PT_I2, offsetof(struct pt_regs, i2));
|
|
|
|
DEFINE(PT_I3, offsetof(struct pt_regs, i3));
|
|
|
|
DEFINE(PT_M0, offsetof(struct pt_regs, m0));
|
|
|
|
DEFINE(PT_M1, offsetof(struct pt_regs, m1));
|
|
|
|
DEFINE(PT_M2, offsetof(struct pt_regs, m2));
|
|
|
|
DEFINE(PT_M3, offsetof(struct pt_regs, m3));
|
|
|
|
DEFINE(PT_L0, offsetof(struct pt_regs, l0));
|
|
|
|
DEFINE(PT_L1, offsetof(struct pt_regs, l1));
|
|
|
|
DEFINE(PT_L2, offsetof(struct pt_regs, l2));
|
|
|
|
DEFINE(PT_L3, offsetof(struct pt_regs, l3));
|
|
|
|
DEFINE(PT_B0, offsetof(struct pt_regs, b0));
|
|
|
|
DEFINE(PT_B1, offsetof(struct pt_regs, b1));
|
|
|
|
DEFINE(PT_B2, offsetof(struct pt_regs, b2));
|
|
|
|
DEFINE(PT_B3, offsetof(struct pt_regs, b3));
|
|
|
|
DEFINE(PT_A0X, offsetof(struct pt_regs, a0x));
|
|
|
|
DEFINE(PT_A0W, offsetof(struct pt_regs, a0w));
|
|
|
|
DEFINE(PT_A1X, offsetof(struct pt_regs, a1x));
|
|
|
|
DEFINE(PT_A1W, offsetof(struct pt_regs, a1w));
|
|
|
|
DEFINE(PT_LC0, offsetof(struct pt_regs, lc0));
|
|
|
|
DEFINE(PT_LC1, offsetof(struct pt_regs, lc1));
|
|
|
|
DEFINE(PT_LT0, offsetof(struct pt_regs, lt0));
|
|
|
|
DEFINE(PT_LT1, offsetof(struct pt_regs, lt1));
|
|
|
|
DEFINE(PT_LB0, offsetof(struct pt_regs, lb0));
|
|
|
|
DEFINE(PT_LB1, offsetof(struct pt_regs, lb1));
|
|
|
|
DEFINE(PT_ASTAT, offsetof(struct pt_regs, astat));
|
|
|
|
DEFINE(PT_RESERVED, offsetof(struct pt_regs, reserved));
|
|
|
|
DEFINE(PT_RETS, offsetof(struct pt_regs, rets));
|
|
|
|
DEFINE(PT_PC, offsetof(struct pt_regs, pc));
|
|
|
|
DEFINE(PT_RETX, offsetof(struct pt_regs, retx));
|
|
|
|
DEFINE(PT_RETN, offsetof(struct pt_regs, retn));
|
|
|
|
DEFINE(PT_RETE, offsetof(struct pt_regs, rete));
|
|
|
|
DEFINE(PT_SEQSTAT, offsetof(struct pt_regs, seqstat));
|
|
|
|
DEFINE(PT_SYSCFG, offsetof(struct pt_regs, syscfg));
|
|
|
|
DEFINE(PT_IPEND, offsetof(struct pt_regs, ipend));
|
|
|
|
DEFINE(SIZEOF_PTREGS, sizeof(struct pt_regs));
|
|
|
|
DEFINE(PT_TEXT_ADDR, sizeof(struct pt_regs)); /* Needed by gdb */
|
|
|
|
DEFINE(PT_TEXT_END_ADDR, 4 + sizeof(struct pt_regs));/* Needed by gdb */
|
|
|
|
DEFINE(PT_DATA_ADDR, 8 + sizeof(struct pt_regs)); /* Needed by gdb */
|
|
|
|
DEFINE(PT_FDPIC_EXEC, 12 + sizeof(struct pt_regs)); /* Needed by gdb */
|
|
|
|
DEFINE(PT_FDPIC_INTERP, 16 + sizeof(struct pt_regs));/* Needed by gdb */
|
|
|
|
|
|
|
|
/* signal defines */
|
|
|
|
DEFINE(SIGSEGV, SIGSEGV);
|
|
|
|
DEFINE(SIGTRAP, SIGTRAP);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|