OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [m68k/] [arch/] [v2_0/] [include/] [m68k_stub.h] - Blame information for rev 307

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_HAL_M68K_STUB_H
2
#define CYGONCE_HAL_M68K_STUB_H
3
//========================================================================
4
//
5
//      m68k_stub.h
6
//
7
//      M68K-specific definitions for generic stub
8
//
9
//========================================================================
10
//####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later version.
18
//
19
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
// for more details.
23
//
24
// You should have received a copy of the GNU General Public License along
25
// with eCos; if not, write to the Free Software Foundation, Inc.,
26
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27
//
28
// As a special exception, if other files instantiate templates or use macros
29
// or inline functions from this file, or you compile this file and link it
30
// with other works to produce a work based on this file, this file does not
31
// by itself cause the resulting work to be covered by the GNU General Public
32
// License. However the source code for this file must still be made available
33
// in accordance with section (3) of the GNU General Public License.
34
//
35
// This exception does not invalidate any other reasons why a work based on
36
// this file might be covered by the GNU General Public License.
37
//
38
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39
// at http://sources.redhat.com/ecos/ecos-license/
40
// -------------------------------------------
41
//####ECOSGPLCOPYRIGHTEND####
42
//========================================================================
43
 
44
#include <pkgconf/system.h>
45
#include <pkgconf/hal.h>
46
 
47
 
48
 
49
#ifdef CYGPKG_IO_SERIAL
50
#include <pkgconf/io_serial.h>
51
#endif
52
 
53
#include <cyg/hal/hal_diag.h>
54
 
55
#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
56
 
57
#include <cyg/infra/cyg_type.h>         // CYG_UNUSED_PARAM, externC
58
 
59
#define HAL_STUB_PLATFORM_INIT_SERIAL()       HAL_DIAG_INIT()
60
 
61
#define HAL_STUB_PLATFORM_GET_CHAR()                                        \
62
((cyg_int8)({                                                               \
63
    cyg_int8 _ch_;                                                          \
64
    HAL_DIAG_READ_CHAR(_ch_);                                               \
65
    _ch_;                                                                   \
66
}))
67
 
68
#define HAL_STUB_PLATFORM_PUT_CHAR(c)         HAL_DIAG_WRITE_CHAR((c))
69
 
70
#define HAL_STUB_PLATFORM_SET_BAUD_RATE(baud) CYG_UNUSED_PARAM(int,(baud))
71
 
72
#define HAL_STUB_PLATFORM_RESET()             HAL_DIAG_INIT()
73
 
74
#define HAL_STUB_PLATFORM_INIT()              HAL_DIAG_INIT()
75
 
76
#endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
77
 
78
 
79
 
80
#define NUMREGS 18
81
 
82
#define REGSIZE( _x_ ) (4)
83
 
84
typedef unsigned long target_register_t;
85
 
86
enum regnames {
87
    D0, D1, D2, D3, D4, D5, D6, D7,
88
    A0, A1, A2, A3, A4, A5, FP, SP,
89
    PS, PC,
90
};
91
 
92
typedef enum regnames regnames_t;
93
 
94
/* Given a trap value TRAP, return the corresponding signal. */
95
externC int __computeSignal (unsigned int trap_number);
96
 
97
/* Return the SPARC trap number corresponding to the last-taken trap. */
98
externC int __get_trap_number (void);
99
 
100
/* Return the currently-saved value corresponding to register REG. */
101
externC target_register_t get_register (regnames_t reg);
102
 
103
/* Store VALUE in the register corresponding to WHICH. */
104
externC void put_register (regnames_t which, target_register_t value);
105
 
106
/* Set the currently-saved pc register value to PC. This also updates NPC
107
   as needed. */
108
externC void set_pc (target_register_t pc);
109
 
110
/* Set things up so that the next user resume will execute one instruction.
111
   This may be done by setting breakpoints or setting a single step flag
112
   in the saved user registers, for example. */
113
externC void __single_step (void);
114
 
115
/* Clear the single-step state. */
116
externC void __clear_single_step (void);
117
 
118
/* If the breakpoint we hit is in the breakpoint() instruction, return a
119
   non-zero value. */
120
externC int __is_breakpoint_function (void);
121
 
122
/* Skip the current instruction. */
123
externC void __skipinst (void);
124
 
125
externC void __install_breakpoints (void);
126
 
127
externC void __clear_breakpoints (void);
128
 
129
#endif // ifndef CYGONCE_HAL_M68K_STUB_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.