]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/common/sim-hw.h
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / sim / common / sim-hw.h
CommitLineData
c906108c 1/* Device definitions.
8acc9f48 2 Copyright (C) 1998-2013 Free Software Foundation, Inc.
c906108c
SS
3 Contributed by Cygnus Support.
4
5This file is part of GDB, the GNU debugger.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
4744ac1b
JB
9the Free Software Foundation; either version 3 of the License, or
10(at your option) any later version.
c906108c
SS
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
4744ac1b
JB
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
19
20#ifndef SIM_HW_H
21#define SIM_HW_H
22
23
24/* Establish this object */
25
26SIM_RC sim_hw_install
27(struct sim_state *sd);
28
29
30/* Parse a hardware definition */
31
32struct hw *sim_hw_parse
33(struct sim_state *sd,
34 const char *fmt,
35 ...) __attribute__ ((format (printf, 2, 3)));
36
37
38/* Print the hardware tree */
39
40void sim_hw_print
41(struct sim_state *sd,
42 void (*print) (struct sim_state *, const char *, va_list ap));
43
44
45/* Abort the simulation specifying HW as the reason */
46
47void sim_hw_abort
48(SIM_DESC sd,
49 struct hw *hw,
50 const char *fmt,
5f78776a 51 ...) __attribute__ ((format (printf, 3, 4), noreturn));
c906108c
SS
52
53
54
55/* CPU: The simulation is running and the current CPU/CIA
56 initiates a data transfer. */
57
58void sim_cpu_hw_io_read_buffer
59(sim_cpu *cpu,
60 sim_cia cia,
61 struct hw *hw,
62 void *dest,
63 int space,
64 unsigned_word addr,
65 unsigned nr_bytes);
66
67void sim_cpu_hw_io_write_buffer
68(sim_cpu *cpu,
69 sim_cia cia,
70 struct hw *hw,
71 const void *source,
72 int space,
73 unsigned_word addr,
74 unsigned nr_bytes);
75
76
77
78/* SYSTEM: A data transfer is being initiated by the system. */
79
80unsigned sim_hw_io_read_buffer
81(struct sim_state *sd,
82 struct hw *hw,
83 void *dest,
84 int space,
85 unsigned_word addr,
86 unsigned nr_bytes);
87
88unsigned sim_hw_io_write_buffer
89(struct sim_state *sd,
90 struct hw *hw,
91 const void *source,
92 int space,
93 unsigned_word addr,
94 unsigned nr_bytes);
95
96
97#endif