target/ppc: moved ppc_store_lpcr and ppc_store_msr to cpu.c
[qemu.git] / target / ppc / spr_tcg.h
blob0be5f347d5617d5c548ec0b69a889a4105a74790
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_read_xer(DisasContext *ctx, int gprn, int sprn);
29 void spr_write_xer(DisasContext *ctx, int sprn, int gprn);
30 void spr_read_lr(DisasContext *ctx, int gprn, int sprn);
31 void spr_write_lr(DisasContext *ctx, int sprn, int gprn);
32 void spr_read_ctr(DisasContext *ctx, int gprn, int sprn);
33 void spr_write_ctr(DisasContext *ctx, int sprn, int gprn);
34 void spr_read_ureg(DisasContext *ctx, int gprn, int sprn);
35 void spr_read_tbl(DisasContext *ctx, int gprn, int sprn);
36 void spr_read_tbu(DisasContext *ctx, int gprn, int sprn);
37 void spr_read_atbl(DisasContext *ctx, int gprn, int sprn);
38 void spr_read_atbu(DisasContext *ctx, int gprn, int sprn);
39 void spr_read_601_rtcl(DisasContext *ctx, int gprn, int sprn);
40 void spr_read_601_rtcu(DisasContext *ctx, int gprn, int sprn);
41 void spr_read_spefscr(DisasContext *ctx, int gprn, int sprn);
42 void spr_write_spefscr(DisasContext *ctx, int sprn, int gprn);
44 #ifndef CONFIG_USER_ONLY
45 void spr_write_generic32(DisasContext *ctx, int sprn, int gprn);
46 void spr_write_clear(DisasContext *ctx, int sprn, int gprn);
47 void spr_access_nop(DisasContext *ctx, int sprn, int gprn);
48 void spr_read_decr(DisasContext *ctx, int gprn, int sprn);
49 void spr_write_decr(DisasContext *ctx, int sprn, int gprn);
50 void spr_write_tbl(DisasContext *ctx, int sprn, int gprn);
51 void spr_write_tbu(DisasContext *ctx, int sprn, int gprn);
52 void spr_write_atbl(DisasContext *ctx, int sprn, int gprn);
53 void spr_write_atbu(DisasContext *ctx, int sprn, int gprn);
54 void spr_read_ibat(DisasContext *ctx, int gprn, int sprn);
55 void spr_read_ibat_h(DisasContext *ctx, int gprn, int sprn);
56 void spr_write_ibatu(DisasContext *ctx, int sprn, int gprn);
57 void spr_write_ibatu_h(DisasContext *ctx, int sprn, int gprn);
58 void spr_write_ibatl(DisasContext *ctx, int sprn, int gprn);
59 void spr_write_ibatl_h(DisasContext *ctx, int sprn, int gprn);
60 void spr_read_dbat(DisasContext *ctx, int gprn, int sprn);
61 void spr_read_dbat_h(DisasContext *ctx, int gprn, int sprn);
62 void spr_write_dbatu(DisasContext *ctx, int sprn, int gprn);
63 void spr_write_dbatu_h(DisasContext *ctx, int sprn, int gprn);
64 void spr_write_dbatl(DisasContext *ctx, int sprn, int gprn);
65 void spr_write_dbatl_h(DisasContext *ctx, int sprn, int gprn);
66 void spr_write_sdr1(DisasContext *ctx, int sprn, int gprn);
67 void spr_write_601_rtcu(DisasContext *ctx, int sprn, int gprn);
68 void spr_write_601_rtcl(DisasContext *ctx, int sprn, int gprn);
69 void spr_write_hid0_601(DisasContext *ctx, int sprn, int gprn);
70 void spr_read_601_ubat(DisasContext *ctx, int gprn, int sprn);
71 void spr_write_601_ubatu(DisasContext *ctx, int sprn, int gprn);
72 void spr_write_601_ubatl(DisasContext *ctx, int sprn, int gprn);
73 void spr_read_40x_pit(DisasContext *ctx, int gprn, int sprn);
74 void spr_write_40x_pit(DisasContext *ctx, int sprn, int gprn);
75 void spr_write_40x_dbcr0(DisasContext *ctx, int sprn, int gprn);
76 void spr_write_40x_sler(DisasContext *ctx, int sprn, int gprn);
77 void spr_write_booke_tcr(DisasContext *ctx, int sprn, int gprn);
78 void spr_write_booke_tsr(DisasContext *ctx, int sprn, int gprn);
79 void spr_read_403_pbr(DisasContext *ctx, int gprn, int sprn);
80 void spr_write_403_pbr(DisasContext *ctx, int sprn, int gprn);
81 void spr_write_pir(DisasContext *ctx, int sprn, int gprn);
82 void spr_write_excp_prefix(DisasContext *ctx, int sprn, int gprn);
83 void spr_write_excp_vector(DisasContext *ctx, int sprn, int gprn);
84 void spr_read_thrm(DisasContext *ctx, int gprn, int sprn);
85 void spr_write_e500_l1csr0(DisasContext *ctx, int sprn, int gprn);
86 void spr_write_e500_l1csr1(DisasContext *ctx, int sprn, int gprn);
87 void spr_write_e500_l2csr0(DisasContext *ctx, int sprn, int gprn);
88 void spr_write_booke206_mmucsr0(DisasContext *ctx, int sprn, int gprn);
89 void spr_write_booke_pid(DisasContext *ctx, int sprn, int gprn);
90 void spr_write_eplc(DisasContext *ctx, int sprn, int gprn);
91 void spr_write_epsc(DisasContext *ctx, int sprn, int gprn);
92 void spr_write_mas73(DisasContext *ctx, int sprn, int gprn);
93 void spr_read_mas73(DisasContext *ctx, int gprn, int sprn);
94 #ifdef TARGET_PPC64
95 void spr_read_cfar(DisasContext *ctx, int gprn, int sprn);
96 void spr_write_cfar(DisasContext *ctx, int sprn, int gprn);
97 void spr_write_ureg(DisasContext *ctx, int sprn, int gprn);
98 void spr_read_purr(DisasContext *ctx, int gprn, int sprn);
99 void spr_write_purr(DisasContext *ctx, int sprn, int gprn);
100 void spr_read_hdecr(DisasContext *ctx, int gprn, int sprn);
101 void spr_write_hdecr(DisasContext *ctx, int sprn, int gprn);
102 void spr_read_vtb(DisasContext *ctx, int gprn, int sprn);
103 void spr_write_vtb(DisasContext *ctx, int sprn, int gprn);
104 void spr_write_tbu40(DisasContext *ctx, int sprn, int gprn);
105 void spr_write_pidr(DisasContext *ctx, int sprn, int gprn);
106 void spr_write_lpidr(DisasContext *ctx, int sprn, int gprn);
107 void spr_read_hior(DisasContext *ctx, int gprn, int sprn);
108 void spr_write_hior(DisasContext *ctx, int sprn, int gprn);
109 void spr_write_ptcr(DisasContext *ctx, int sprn, int gprn);
110 void spr_write_pcr(DisasContext *ctx, int sprn, int gprn);
111 void spr_read_dpdes(DisasContext *ctx, int gprn, int sprn);
112 void spr_write_dpdes(DisasContext *ctx, int sprn, int gprn);
113 void spr_write_amr(DisasContext *ctx, int sprn, int gprn);
114 void spr_write_uamor(DisasContext *ctx, int sprn, int gprn);
115 void spr_write_iamr(DisasContext *ctx, int sprn, int gprn);
116 #endif
117 #endif
119 #ifdef TARGET_PPC64
120 void spr_read_prev_upper32(DisasContext *ctx, int gprn, int sprn);
121 void spr_write_prev_upper32(DisasContext *ctx, int sprn, int gprn);
122 void spr_read_tar(DisasContext *ctx, int gprn, int sprn);
123 void spr_write_tar(DisasContext *ctx, int sprn, int gprn);
124 void spr_read_tm(DisasContext *ctx, int gprn, int sprn);
125 void spr_write_tm(DisasContext *ctx, int sprn, int gprn);
126 void spr_read_tm_upper32(DisasContext *ctx, int gprn, int sprn);
127 void spr_write_tm_upper32(DisasContext *ctx, int sprn, int gprn);
128 void spr_read_ebb(DisasContext *ctx, int gprn, int sprn);
129 void spr_write_ebb(DisasContext *ctx, int sprn, int gprn);
130 void spr_read_ebb_upper32(DisasContext *ctx, int gprn, int sprn);
131 void spr_write_ebb_upper32(DisasContext *ctx, int sprn, int gprn);
132 void spr_write_hmer(DisasContext *ctx, int sprn, int gprn);
133 void spr_write_lpcr(DisasContext *ctx, int sprn, int gprn);
134 #endif
136 #endif