]> Git Repo - J-u-boot.git/blame - common/kgdb_stubs.c
bootstash: Do not provide a default address for all
[J-u-boot.git] / common / kgdb_stubs.c
CommitLineData
0c909551 1/*
a187559e 2 * U-Boot - stub functions for common kgdb code,
0c909551
RG
3 * can be overridden in board specific files
4 *
5 * Copyright 2009 Analog Devices Inc.
6 *
7 * Licensed under the GPL-2 or later.
8 */
9
9edefc27 10#include <cpu_func.h>
0c909551 11#include <kgdb.h>
b03e0510 12#include <serial.h>
25a5818f 13#include <asm/ptrace.h>
0c909551
RG
14
15int (*debugger_exception_handler)(struct pt_regs *);
16
17__attribute__((weak))
18void kgdb_serial_init(void)
19{
20 puts("[on serial] ");
21}
22
23__attribute__((weak))
24void putDebugChar(int c)
25{
26 serial_putc(c);
27}
28
29__attribute__((weak))
30void putDebugStr(const char *str)
31{
32#ifdef DEBUG
33 serial_puts(str);
34#endif
35}
36
37__attribute__((weak))
38int getDebugChar(void)
39{
40 return serial_getc();
41}
42
43__attribute__((weak))
44void kgdb_interruptible(int yes)
45{
46 return;
47}
48
49__attribute__((weak))
50void kgdb_flush_cache_range(void *from, void *to)
51{
52 flush_cache((unsigned long)from, (unsigned long)(to - from));
53}
54
55__attribute__((weak))
56void kgdb_flush_cache_all(void)
57{
58 if (dcache_status()) {
59 dcache_disable();
60 dcache_enable();
61 }
62 if (icache_status()) {
63 icache_disable();
64 icache_enable();
65 }
66}
This page took 0.505044 seconds and 4 git commands to generate.