target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event
[qemu/ar7.git] / target / ppc / spr_tcg.h
blobf98d97c0ba171bd55274bd6b923391bd6c4d5c83
1 /*
2 * PowerPC emulation for qemu: read/write callbacks for SPRs
4 * Copyright (C) 2021 Instituto de Pesquisas Eldorado
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 #ifndef SPR_TCG_H
20 #define SPR_TCG_H
22 #define SPR_NOACCESS (&spr_noaccess)
24 /* prototypes for readers and writers for SPRs */
25 void spr_noaccess(DisasContext *ctx, int gprn, int sprn);
26 void spr_read_generic(DisasContext *ctx, int gprn, int sprn);
27 void spr_write_generic(DisasContext *ctx, int sprn, int gprn);
28 void spr_write_MMCR0(DisasContext *ctx, int sprn, int gprn);
29 void spr_write_MMCR1(DisasContext *ctx, int sprn, int gprn);
30 void spr_write_PMC(DisasContext *ctx, int sprn, int gprn);
31 void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn);
32 void spr_read_xer(DisasContext *ctx, int gprn, int sprn);
33 void spr_write_xer(DisasContext *ctx, int sprn, int gprn);
34 void spr_read_lr(DisasContext *ctx, int gprn, int sprn);
35 void spr_write_lr(DisasContext *ctx, int sprn, int gprn);
36 void spr_read_ctr(DisasContext *ctx, int gprn, int sprn);
37 void spr_write_ctr(DisasContext *ctx, int sprn, int gprn);
38 void spr_read_ureg(DisasContext *ctx, int gprn, int sprn);
39 void spr_read_MMCR0_ureg(DisasContext *ctx, int gprn, int sprn);
40 void spr_read_MMCR2_ureg(DisasContext *ctx, int gprn, int sprn);
41 void spr_read_PMC(DisasContext *ctx, int gprn, int sprn);
42 void spr_read_PMC14_ureg(DisasContext *ctx, int gprn, int sprn);
43 void spr_read_PMC56_ureg(DisasContext *ctx, int gprn, int sprn);
44 void spr_read_tbl(DisasContext *ctx, int gprn, int sprn);
45 void spr_read_tbu(DisasContext *ctx, int gprn, int sprn);
46 void spr_read_atbl(DisasContext *ctx, int gprn, int sprn);
47 void spr_read_atbu(DisasContext *ctx, int gprn, int sprn);
48 void spr_read_601_rtcl(DisasContext *ctx, int gprn, int sprn);
49 void spr_read_601_rtcu(DisasContext *ctx, int gprn, int sprn);
50 void spr_read_spefscr(DisasContext *ctx, int gprn, int sprn);
51 void spr_write_spefscr(DisasContext *ctx, int sprn, int gprn);
52 void spr_write_MMCR0_ureg(DisasContext *ctx, int sprn, int gprn);
53 void spr_write_MMCR2_ureg(DisasContext *ctx, int sprn, int gprn);
54 void spr_write_PMC14_ureg(DisasContext *ctx, int sprn, int gprn);
55 void spr_write_PMC56_ureg(DisasContext *ctx, int sprn, int gprn);
57 #ifndef CONFIG_USER_ONLY
58 void spr_write_generic32(DisasContext *ctx, int sprn, int gprn);
59 void spr_write_clear(DisasContext *ctx, int sprn, int gprn);
60 void spr_access_nop(DisasContext *ctx, int sprn, int gprn);
61 void spr_read_decr(DisasContext *ctx, int gprn, int sprn);
62 void spr_write_decr(DisasContext *ctx, int sprn, int gprn);
63 void spr_write_tbl(DisasContext *ctx, int sprn, int gprn);
64 void spr_write_tbu(DisasContext *ctx, int sprn, int gprn);
65 void spr_write_atbl(DisasContext *ctx, int sprn, int gprn);
66 void spr_write_atbu(DisasContext *ctx, int sprn, int gprn);
67 void spr_read_ibat(DisasContext *ctx, int gprn, int sprn);
68 void spr_read_ibat_h(DisasContext *ctx, int gprn, int sprn);
69 void spr_write_ibatu(DisasContext *ctx, int sprn, int gprn);
70 void spr_write_ibatu_h(DisasContext *ctx, int sprn, int gprn);
71 void spr_write_ibatl(DisasContext *ctx, int sprn, int gprn);
72 void spr_write_ibatl_h(DisasContext *ctx, int sprn, int gprn);
73 void spr_read_dbat(DisasContext *ctx, int gprn, int sprn);
74 void spr_read_dbat_h(DisasContext *ctx, int gprn, int sprn);
75 void spr_write_dbatu(DisasContext *ctx, int sprn, int gprn);
76 void spr_write_dbatu_h(DisasContext *ctx, int sprn, int gprn);
77 void spr_write_dbatl(DisasContext *ctx, int sprn, int gprn);
78 void spr_write_dbatl_h(DisasContext *ctx, int sprn, int gprn);
79 void spr_write_sdr1(DisasContext *ctx, int sprn, int gprn);
80 void spr_write_601_rtcu(DisasContext *ctx, int sprn, int gprn);
81 void spr_write_601_rtcl(DisasContext *ctx, int sprn, int gprn);
82 void spr_write_hid0_601(DisasContext *ctx, int sprn, int gprn);
83 void spr_read_601_ubat(DisasContext *ctx, int gprn, int sprn);
84 void spr_write_601_ubatu(DisasContext *ctx, int sprn, int gprn);
85 void spr_write_601_ubatl(DisasContext *ctx, int sprn, int gprn);
86 void spr_read_40x_pit(DisasContext *ctx, int gprn, int sprn);
87 void spr_write_40x_pit(DisasContext *ctx, int sprn, int gprn);
88 void spr_write_40x_dbcr0(DisasContext *ctx, int sprn, int gprn);
89 void spr_write_40x_sler(DisasContext *ctx, int sprn, int gprn);
90 void spr_write_booke_tcr(DisasContext *ctx, int sprn, int gprn);
91 void spr_write_booke_tsr(DisasContext *ctx, int sprn, int gprn);
92 void spr_read_403_pbr(DisasContext *ctx, int gprn, int sprn);
93 void spr_write_403_pbr(DisasContext *ctx, int sprn, int gprn);
94 void spr_write_pir(DisasContext *ctx, int sprn, int gprn);
95 void spr_write_excp_prefix(DisasContext *ctx, int sprn, int gprn);
96 void spr_write_excp_vector(DisasContext *ctx, int sprn, int gprn);
97 void spr_read_thrm(DisasContext *ctx, int gprn, int sprn);
98 void spr_write_e500_l1csr0(DisasContext *ctx, int sprn, int gprn);
99 void spr_write_e500_l1csr1(DisasContext *ctx, int sprn, int gprn);
100 void spr_write_e500_l2csr0(DisasContext *ctx, int sprn, int gprn);
101 void spr_write_booke206_mmucsr0(DisasContext *ctx, int sprn, int gprn);
102 void spr_write_booke_pid(DisasContext *ctx, int sprn, int gprn);
103 void spr_write_eplc(DisasContext *ctx, int sprn, int gprn);
104 void spr_write_epsc(DisasContext *ctx, int sprn, int gprn);
105 void spr_write_mas73(DisasContext *ctx, int sprn, int gprn);
106 void spr_read_mas73(DisasContext *ctx, int gprn, int sprn);
107 #ifdef TARGET_PPC64
108 void spr_read_cfar(DisasContext *ctx, int gprn, int sprn);
109 void spr_write_cfar(DisasContext *ctx, int sprn, int gprn);
110 void spr_write_ureg(DisasContext *ctx, int sprn, int gprn);
111 void spr_read_purr(DisasContext *ctx, int gprn, int sprn);
112 void spr_write_purr(DisasContext *ctx, int sprn, int gprn);
113 void spr_read_hdecr(DisasContext *ctx, int gprn, int sprn);
114 void spr_write_hdecr(DisasContext *ctx, int sprn, int gprn);
115 void spr_read_vtb(DisasContext *ctx, int gprn, int sprn);
116 void spr_write_vtb(DisasContext *ctx, int sprn, int gprn);
117 void spr_write_tbu40(DisasContext *ctx, int sprn, int gprn);
118 void spr_write_pidr(DisasContext *ctx, int sprn, int gprn);
119 void spr_write_lpidr(DisasContext *ctx, int sprn, int gprn);
120 void spr_read_hior(DisasContext *ctx, int gprn, int sprn);
121 void spr_write_hior(DisasContext *ctx, int sprn, int gprn);
122 void spr_write_ptcr(DisasContext *ctx, int sprn, int gprn);
123 void spr_write_pcr(DisasContext *ctx, int sprn, int gprn);
124 void spr_read_dpdes(DisasContext *ctx, int gprn, int sprn);
125 void spr_write_dpdes(DisasContext *ctx, int sprn, int gprn);
126 void spr_write_amr(DisasContext *ctx, int sprn, int gprn);
127 void spr_write_uamor(DisasContext *ctx, int sprn, int gprn);
128 void spr_write_iamr(DisasContext *ctx, int sprn, int gprn);
129 #endif
130 #endif
132 #ifdef TARGET_PPC64
133 void spr_read_prev_upper32(DisasContext *ctx, int gprn, int sprn);
134 void spr_write_prev_upper32(DisasContext *ctx, int sprn, int gprn);
135 void spr_read_tar(DisasContext *ctx, int gprn, int sprn);
136 void spr_write_tar(DisasContext *ctx, int sprn, int gprn);
137 void spr_read_tm(DisasContext *ctx, int gprn, int sprn);
138 void spr_write_tm(DisasContext *ctx, int sprn, int gprn);
139 void spr_read_tm_upper32(DisasContext *ctx, int gprn, int sprn);
140 void spr_write_tm_upper32(DisasContext *ctx, int sprn, int gprn);
141 void spr_read_ebb(DisasContext *ctx, int gprn, int sprn);
142 void spr_write_ebb(DisasContext *ctx, int sprn, int gprn);
143 void spr_read_ebb_upper32(DisasContext *ctx, int gprn, int sprn);
144 void spr_write_ebb_upper32(DisasContext *ctx, int sprn, int gprn);
145 void spr_write_hmer(DisasContext *ctx, int sprn, int gprn);
146 void spr_write_lpcr(DisasContext *ctx, int sprn, int gprn);
147 #endif
149 #endif