diff options
author | Robin Getz <robin.getz@analog.com> | 2009-12-21 16:35:48 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-01-17 20:36:09 -0500 |
commit | f19fd87e9387282b5abbfdafe46ac272320643d8 (patch) | |
tree | 853df8844855d7025a271f01abb45eb4d1c24fa1 /include | |
parent | 3869453f659c22396fecb7c8ed7af909e89f461c (diff) | |
download | u-boot-imx-f19fd87e9387282b5abbfdafe46ac272320643d8.zip u-boot-imx-f19fd87e9387282b5abbfdafe46ac272320643d8.tar.gz u-boot-imx-f19fd87e9387282b5abbfdafe46ac272320643d8.tar.bz2 |
Blackfin: add support for kgdb
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-blackfin/config.h | 7 | ||||
-rw-r--r-- | include/asm-blackfin/deferred.h | 20 | ||||
-rw-r--r-- | include/asm-blackfin/entry.h | 10 | ||||
-rw-r--r-- | include/asm-blackfin/mach-common/bits/core.h | 3 | ||||
-rw-r--r-- | include/asm-blackfin/signal.h | 1 | ||||
-rw-r--r-- | include/configs/bfin_adi_common.h | 1 |
6 files changed, 42 insertions, 0 deletions
diff --git a/include/asm-blackfin/config.h b/include/asm-blackfin/config.h index 0ae838a..7455685 100644 --- a/include/asm-blackfin/config.h +++ b/include/asm-blackfin/config.h @@ -66,6 +66,11 @@ # error CONFIG_PLL_BYPASS: Invalid value: must be 0 or 1 #endif +/* If we are using KGDB, make sure we defer exceptions */ +#ifdef CONFIG_CMD_KGDB +# define CONFIG_EXCEPTION_DEFER 1 +#endif + /* Using L1 scratch pad makes sense for everyone by default. */ #ifndef CONFIG_LINUX_CMDLINE_ADDR # define CONFIG_LINUX_CMDLINE_ADDR L1_SRAM_SCRATCH @@ -138,6 +143,8 @@ #endif #ifndef CONFIG_SYS_CBSIZE # define CONFIG_SYS_CBSIZE 1024 +#elif defined(CONFIG_CMD_KGDB) && CONFIG_SYS_CBSIZE < 1024 +# error "kgdb needs cbsize to be >= 1024" #endif #ifndef CONFIG_SYS_BARGSIZE # define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE diff --git a/include/asm-blackfin/deferred.h b/include/asm-blackfin/deferred.h new file mode 100644 index 0000000..82ceda3 --- /dev/null +++ b/include/asm-blackfin/deferred.h @@ -0,0 +1,20 @@ +/* + * U-boot - deferred register layout + * + * Copyright 2004-2009 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#ifndef _BLACKFIN_DEFER_H +#define _BLACKFIN_DEFER_H + +#define deferred_regs_DCPLB_FAULT_ADDR 0 +#define deferred_regs_ICPLB_FAULT_ADDR 1 +#define deferred_regs_retx 2 +#define deferred_regs_SEQSTAT 3 +#define deferred_regs_SYSCFG 4 +#define deferred_regs_IMASK 5 +#define deferred_regs_last 6 + +#endif /* _BLACKFIN_DEFER_H */ diff --git a/include/asm-blackfin/entry.h b/include/asm-blackfin/entry.h index ef74d68..404144f 100644 --- a/include/asm-blackfin/entry.h +++ b/include/asm-blackfin/entry.h @@ -86,6 +86,11 @@ [--sp] = RETE; [--sp] = SEQSTAT; [--sp] = SYSCFG; +#ifdef CONFIG_CMD_KGDB + p0.l = lo(IPEND) + p0.h = hi(IPEND) + r0 = [p0]; +#endif [--sp] = r0; /* Skip IPEND as well. */ .endm @@ -137,6 +142,11 @@ [--sp] = RETE; [--sp] = SEQSTAT; [--sp] = SYSCFG; +#ifdef CONFIG_CMD_KGDB + p0.l = lo(IPEND) + p0.h = hi(IPEND) + r0 = [p0]; +#endif [--sp] = r0; /* Skip IPEND as well. */ .endm diff --git a/include/asm-blackfin/mach-common/bits/core.h b/include/asm-blackfin/mach-common/bits/core.h index d8cee10..6db4f81 100644 --- a/include/asm-blackfin/mach-common/bits/core.h +++ b/include/asm-blackfin/mach-common/bits/core.h @@ -105,5 +105,8 @@ #define SSSTEP 0x00000001 /* Supervisor Single Step */ #define CCEN 0x00000002 /* Cycle Counter Enable */ #define SNEN 0x00000004 /* Self-Nesting Interrupt Enable */ +#define SYSCFG_SSSTEP_P 0 +#define SYSCFG_CCEN_P 1 +#define SYSCFG_SCEN_P 2 #endif diff --git a/include/asm-blackfin/signal.h b/include/asm-blackfin/signal.h new file mode 100644 index 0000000..7b1573c --- /dev/null +++ b/include/asm-blackfin/signal.h @@ -0,0 +1 @@ +#include <asm-generic/signal.h> diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 6a2f1c7..1896cf5 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -83,6 +83,7 @@ # define CONFIG_CMD_CPLBINFO # define CONFIG_CMD_ELF # define CONFIG_ELF_SIMPLE_LOAD +# define CONFIG_CMD_KGDB # define CONFIG_CMD_REGINFO # define CONFIG_CMD_STRINGS # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__) |