Revision e1833e1f target-ppc/translate_init.c

b/target-ppc/translate_init.c
192 192
    DisasContext *ctx = opaque;
193 193

  
194 194
    gen_op_store_ibatu((sprn - SPR_IBAT0U) / 2);
195
    RET_STOP(ctx);
195
    GEN_STOP(ctx);
196 196
}
197 197

  
198 198
static void spr_write_ibatu_h (void *opaque, int sprn)
......
200 200
    DisasContext *ctx = opaque;
201 201

  
202 202
    gen_op_store_ibatu((sprn - SPR_IBAT4U) / 2);
203
    RET_STOP(ctx);
203
    GEN_STOP(ctx);
204 204
}
205 205

  
206 206
static void spr_write_ibatl (void *opaque, int sprn)
......
208 208
    DisasContext *ctx = opaque;
209 209

  
210 210
    gen_op_store_ibatl((sprn - SPR_IBAT0L) / 2);
211
    RET_STOP(ctx);
211
    GEN_STOP(ctx);
212 212
}
213 213

  
214 214
static void spr_write_ibatl_h (void *opaque, int sprn)
......
216 216
    DisasContext *ctx = opaque;
217 217

  
218 218
    gen_op_store_ibatl((sprn - SPR_IBAT4L) / 2);
219
    RET_STOP(ctx);
219
    GEN_STOP(ctx);
220 220
}
221 221

  
222 222
/* DBAT0U...DBAT7U */
......
236 236
    DisasContext *ctx = opaque;
237 237

  
238 238
    gen_op_store_dbatu((sprn - SPR_DBAT0U) / 2);
239
    RET_STOP(ctx);
239
    GEN_STOP(ctx);
240 240
}
241 241

  
242 242
static void spr_write_dbatu_h (void *opaque, int sprn)
......
244 244
    DisasContext *ctx = opaque;
245 245

  
246 246
    gen_op_store_dbatu((sprn - SPR_DBAT4U) / 2);
247
    RET_STOP(ctx);
247
    GEN_STOP(ctx);
248 248
}
249 249

  
250 250
static void spr_write_dbatl (void *opaque, int sprn)
......
252 252
    DisasContext *ctx = opaque;
253 253

  
254 254
    gen_op_store_dbatl((sprn - SPR_DBAT0L) / 2);
255
    RET_STOP(ctx);
255
    GEN_STOP(ctx);
256 256
}
257 257

  
258 258
static void spr_write_dbatl_h (void *opaque, int sprn)
......
260 260
    DisasContext *ctx = opaque;
261 261

  
262 262
    gen_op_store_dbatl((sprn - SPR_DBAT4L) / 2);
263
    RET_STOP(ctx);
263
    GEN_STOP(ctx);
264 264
}
265 265

  
266 266
/* SDR1 */
......
274 274
    DisasContext *ctx = opaque;
275 275

  
276 276
    gen_op_store_sdr1();
277
    RET_STOP(ctx);
277
    GEN_STOP(ctx);
278 278
}
279 279

  
280 280
/* 64 bits PowerPC specific SPRs */
......
291 291
    DisasContext *ctx = opaque;
292 292

  
293 293
    gen_op_store_asr();
294
    RET_STOP(ctx);
294
    GEN_STOP(ctx);
295 295
}
296 296
#endif
297 297
#endif
......
332 332
    DisasContext *ctx = opaque;
333 333

  
334 334
    gen_op_store_601_batu((sprn - SPR_IBAT0U) / 2);
335
    RET_STOP(ctx);
335
    GEN_STOP(ctx);
336 336
}
337 337

  
338 338
static void spr_write_601_ubatl (void *opaque, int sprn)
......
340 340
    DisasContext *ctx = opaque;
341 341

  
342 342
    gen_op_store_601_batl((sprn - SPR_IBAT0L) / 2);
343
    RET_STOP(ctx);
343
    GEN_STOP(ctx);
344 344
}
345 345
#endif
346 346

  
......
362 362

  
363 363
    gen_op_store_40x_dbcr0();
364 364
    /* We must stop translation as we may have rebooted */
365
    RET_STOP(ctx);
365
    GEN_STOP(ctx);
366 366
}
367 367

  
368 368
static void spr_write_40x_sler (void *opaque, int sprn)
......
373 373
    /* We must stop the translation as we may have changed
374 374
     * some regions endianness
375 375
     */
376
    RET_STOP(ctx);
376
    GEN_STOP(ctx);
377 377
}
378 378

  
379 379
static void spr_write_booke_tcr (void *opaque, int sprn)
......
400 400
    DisasContext *ctx = opaque;
401 401

  
402 402
    gen_op_store_403_pb(sprn - SPR_403_PBL1);
403
    RET_STOP(ctx);
403
    GEN_STOP(ctx);
404 404
}
405 405

  
406 406
static void spr_write_pir (void *opaque, int sprn)
......
2153 2153
 */
2154 2154

  
2155 2155
/*****************************************************************************/
2156
/* Exception vectors models                                                  */
2157
static void init_excp_4xx_real (CPUPPCState *env)
2158
{
2159
#if !defined(CONFIG_USER_ONLY)
2160
    env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100;
2161
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2162
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2163
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2164
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2165
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2166
    env->excp_vectors[POWERPC_EXCP_PIT]      = 0x00001000;
2167
    env->excp_vectors[POWERPC_EXCP_FIT]      = 0x00001010;
2168
    env->excp_vectors[POWERPC_EXCP_WDT]      = 0x00001020;
2169
    env->excp_vectors[POWERPC_EXCP_DEBUG]    = 0x00002000;
2170
#endif
2171
}
2172

  
2173
static void init_excp_4xx_softmmu (CPUPPCState *env)
2174
{
2175
#if !defined(CONFIG_USER_ONLY)
2176
    env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100;
2177
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2178
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2179
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2180
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2181
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2182
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2183
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2184
    env->excp_vectors[POWERPC_EXCP_PIT]      = 0x00001000;
2185
    env->excp_vectors[POWERPC_EXCP_FIT]      = 0x00001010;
2186
    env->excp_vectors[POWERPC_EXCP_WDT]      = 0x00001020;
2187
    env->excp_vectors[POWERPC_EXCP_DTLB]     = 0x00001100;
2188
    env->excp_vectors[POWERPC_EXCP_ITLB]     = 0x00001200;
2189
    env->excp_vectors[POWERPC_EXCP_DEBUG]    = 0x00002000;
2190
#endif
2191
}
2192

  
2193
static void init_excp_BookE (CPUPPCState *env)
2194
{
2195
#if !defined(CONFIG_USER_ONLY)
2196
    env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000000;
2197
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000000;
2198
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000000;
2199
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000000;
2200
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000000;
2201
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000000;
2202
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000000;
2203
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000000;
2204
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000000;
2205
    env->excp_vectors[POWERPC_EXCP_APU]      = 0x00000000;
2206
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000000;
2207
    env->excp_vectors[POWERPC_EXCP_FIT]      = 0x00000000;
2208
    env->excp_vectors[POWERPC_EXCP_WDT]      = 0x00000000;
2209
    env->excp_vectors[POWERPC_EXCP_DTLB]     = 0x00000000;
2210
    env->excp_vectors[POWERPC_EXCP_ITLB]     = 0x00000000;
2211
    env->excp_vectors[POWERPC_EXCP_DEBUG]    = 0x00000000;
2212
    env->excp_prefix = 0x00000000;
2213
    env->ivor_mask = 0x0000FFE0;
2214
    env->ivpr_mask = 0xFFFF0000;
2215
#endif
2216
}
2217

  
2218
static void init_excp_601 (CPUPPCState *env)
2219
{
2220
#if !defined(CONFIG_USER_ONLY)
2221
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2222
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2223
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2224
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2225
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2226
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2227
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2228
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2229
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2230
    env->excp_vectors[POWERPC_EXCP_IO]       = 0x00000A00;
2231
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2232
    env->excp_vectors[POWERPC_EXCP_RUNM]     = 0x00002000;
2233
    env->excp_prefix = 0xFFF00000;
2234
#endif
2235
}
2236

  
2237
static void init_excp_602 (CPUPPCState *env)
2238
{
2239
#if !defined(CONFIG_USER_ONLY)
2240
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2241
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2242
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2243
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2244
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2245
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2246
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2247
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2248
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2249
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2250
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2251
    env->excp_vectors[POWERPC_EXCP_FPA]      = 0x00000E00;
2252
    env->excp_vectors[POWERPC_EXCP_IFTLB]    = 0x00001000;
2253
    env->excp_vectors[POWERPC_EXCP_DLTLB]    = 0x00001100;
2254
    env->excp_vectors[POWERPC_EXCP_DSTLB]    = 0x00001200;
2255
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2256
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2257
    env->excp_vectors[POWERPC_EXCP_WDT]      = 0x00001500;
2258
    env->excp_vectors[POWERPC_EXCP_EMUL]     = 0x00001600;
2259
    env->excp_prefix = 0xFFF00000;
2260
#endif
2261
}
2262

  
2263
static void init_excp_603 (CPUPPCState *env)
2264
{
2265
#if !defined(CONFIG_USER_ONLY)
2266
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2267
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2268
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2269
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2270
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2271
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2272
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2273
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2274
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2275
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2276
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2277
    env->excp_vectors[POWERPC_EXCP_IFTLB]    = 0x00001000;
2278
    env->excp_vectors[POWERPC_EXCP_DLTLB]    = 0x00001100;
2279
    env->excp_vectors[POWERPC_EXCP_DSTLB]    = 0x00001200;
2280
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2281
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2282
#endif
2283
}
2284

  
2285
static void init_excp_G2 (CPUPPCState *env)
2286
{
2287
#if !defined(CONFIG_USER_ONLY)
2288
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2289
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2290
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2291
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2292
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2293
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2294
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2295
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2296
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2297
    env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000A00;
2298
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2299
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2300
    env->excp_vectors[POWERPC_EXCP_IFTLB]    = 0x00001000;
2301
    env->excp_vectors[POWERPC_EXCP_DLTLB]    = 0x00001100;
2302
    env->excp_vectors[POWERPC_EXCP_DSTLB]    = 0x00001200;
2303
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2304
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2305
#endif
2306
}
2307

  
2308
static void init_excp_604 (CPUPPCState *env)
2309
{
2310
#if !defined(CONFIG_USER_ONLY)
2311
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2312
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2313
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2314
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2315
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2316
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2317
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2318
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2319
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2320
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2321
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2322
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2323
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2324
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2325
#endif
2326
}
2327

  
2328
#if defined (TODO)
2329
static void init_excp_620 (CPUPPCState *env)
2330
{
2331
#if !defined(CONFIG_USER_ONLY)
2332
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2333
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2334
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2335
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2336
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2337
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2338
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2339
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2340
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2341
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2342
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2343
    env->excp_vectors[POWERPC_EXCP_FPA]      = 0x00000E00;
2344
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2345
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2346
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2347
#endif
2348
}
2349
#endif /* defined (TODO) */
2350

  
2351
static void init_excp_7x0 (CPUPPCState *env)
2352
{
2353
#if !defined(CONFIG_USER_ONLY)
2354
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2355
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2356
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2357
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2358
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2359
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2360
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2361
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2362
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2363
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2364
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2365
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2366
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2367
    env->excp_vectors[POWERPC_EXCP_THERM]    = 0x00001700;
2368
#endif
2369
}
2370

  
2371
static void init_excp_750FX (CPUPPCState *env)
2372
{
2373
#if !defined(CONFIG_USER_ONLY)
2374
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2375
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2376
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2377
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2378
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2379
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2380
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2381
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2382
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2383
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2384
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2385
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2386
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2387
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2388
    env->excp_vectors[POWERPC_EXCP_THERM]    = 0x00001700;
2389
#endif
2390
}
2391

  
2392
static void init_excp_7400 (CPUPPCState *env)
2393
{
2394
#if !defined(CONFIG_USER_ONLY)
2395
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2396
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2397
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2398
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2399
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2400
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2401
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2402
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2403
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2404
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2405
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2406
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2407
    env->excp_vectors[POWERPC_EXCP_VPU]      = 0x00000F20;
2408
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2409
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2410
    env->excp_vectors[POWERPC_EXCP_VPUA]     = 0x00001600;
2411
    env->excp_vectors[POWERPC_EXCP_THERM]    = 0x00001700;
2412
#endif
2413
}
2414

  
2415
#if defined (TODO)
2416
static void init_excp_7450 (CPUPPCState *env)
2417
{
2418
#if !defined(CONFIG_USER_ONLY)
2419
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2420
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2421
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2422
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2423
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2424
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2425
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2426
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2427
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2428
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2429
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2430
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2431
    env->excp_vectors[POWERPC_EXCP_VPU]      = 0x00000F20;
2432
    env->excp_vectors[POWERPC_EXCP_IFTLB]    = 0x00001000;
2433
    env->excp_vectors[POWERPC_EXCP_DLTLB]    = 0x00001100;
2434
    env->excp_vectors[POWERPC_EXCP_DSTLB]    = 0x00001200;
2435
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2436
    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
2437
    env->excp_vectors[POWERPC_EXCP_VPUA]     = 0x00001600;
2438
#endif
2439
}
2440
#endif /* defined (TODO) */
2441

  
2442
#if defined (TARGET_PPC64)
2443
static void init_excp_970 (CPUPPCState *env)
2444
{
2445
#if !defined(CONFIG_USER_ONLY)
2446
    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;
2447
    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;
2448
    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;
2449
    env->excp_vectors[POWERPC_EXCP_DSEG]     = 0x00000380;
2450
    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;
2451
    env->excp_vectors[POWERPC_EXCP_ISEG]     = 0x00000480;
2452
    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;
2453
    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;
2454
    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;
2455
    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;
2456
    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;
2457
#if defined(TARGET_PPC64H) /* PowerPC 64 with hypervisor mode support */
2458
    env->excp_vectors[POWERPC_EXCP_HDECR]    = 0x00000980;
2459
#endif
2460
    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;
2461
    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;
2462
    env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
2463
    env->excp_vectors[POWERPC_EXCP_VPU]      = 0x00000F20;
2464
    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
2465
    env->excp_vectors[POWERPC_EXCP_MAINT]    = 0x00001600;
2466
    env->excp_vectors[POWERPC_EXCP_VPUA]     = 0x00001700;
2467
    env->excp_vectors[POWERPC_EXCP_THERM]    = 0x00001800;
2468
#endif
2469
}
2470
#endif
2471

  
2472
/*****************************************************************************/
2156 2473
/* PowerPC implementations definitions                                       */
2157 2474

  
2158 2475
/* PowerPC 40x instruction set                                               */
......
2183 2500
                 SPR_NOACCESS, SPR_NOACCESS,
2184 2501
                 &spr_read_generic, &spr_write_generic,
2185 2502
                 0x00000000);
2503
    init_excp_4xx_real(env);
2186 2504
    /* XXX: TODO: allocate internal IRQ controller */
2187 2505
}
2188 2506

  
......
2218 2536
    env->nb_tlb = 64;
2219 2537
    env->nb_ways = 1;
2220 2538
    env->id_tlbs = 0;
2539
    init_excp_4xx_softmmu(env);
2221 2540
    /* XXX: TODO: allocate internal IRQ controller */
2222 2541
}
2223 2542

  
......
2234 2553
#define POWERPC_INPUT_401x3  (PPC_FLAGS_INPUT_401)
2235 2554
#define POWERPC_BFDM_401x3   (bfd_mach_ppc_403)
2236 2555

  
2237
static void init_proc_401x2 (CPUPPCState *env)
2556
static void init_proc_401x3 (CPUPPCState *env)
2238 2557
{
2558
    init_excp_4xx_softmmu(env);
2239 2559
}
2240 2560
#endif /* TODO */
2241 2561

  
......
2271 2591
    env->nb_tlb = 64;
2272 2592
    env->nb_ways = 1;
2273 2593
    env->id_tlbs = 0;
2594
    init_excp_4xx_softmmu(env);
2274 2595
    /* XXX: TODO: allocate internal IRQ controller */
2275 2596
}
2276 2597

  
......
2291 2612
    gen_spr_401_403(env);
2292 2613
    gen_spr_403(env);
2293 2614
    gen_spr_403_real(env);
2615
    init_excp_4xx_real(env);
2294 2616
    /* XXX: TODO: allocate internal IRQ controller */
2295 2617
}
2296 2618

  
......
2326 2648
    env->nb_tlb = 64;
2327 2649
    env->nb_ways = 1;
2328 2650
    env->id_tlbs = 0;
2651
    init_excp_4xx_softmmu(env);
2329 2652
    /* XXX: TODO: allocate internal IRQ controller */
2330 2653
}
2331 2654

  
......
2361 2684
    env->nb_tlb = 64;
2362 2685
    env->nb_ways = 1;
2363 2686
    env->id_tlbs = 0;
2687
    init_excp_4xx_softmmu(env);
2364 2688
    /* Allocate hardware IRQ controller */
2365 2689
    ppc405_irq_init(env);
2366 2690
}
......
2402 2726
    env->nb_tlb = 64;
2403 2727
    env->nb_ways = 1;
2404 2728
    env->id_tlbs = 0;
2729
    init_excp_BookE(env);
2405 2730
    /* XXX: TODO: allocate internal IRQ controller */
2406 2731
}
2407 2732

  
......
2426 2751
    env->nb_tlb = 64;
2427 2752
    env->nb_ways = 1;
2428 2753
    env->id_tlbs = 0;
2754
    init_excp_BookE(env);
2429 2755
    /* XXX: TODO: allocate internal IRQ controller */
2430 2756
}
2431 2757

  
......
2451 2777
    env->nb_tlb = 64;
2452 2778
    env->nb_ways = 1;
2453 2779
    env->id_tlbs = 0;
2780
    init_excp_BookE(env);
2454 2781
    /* XXX: TODO: allocate internal IRQ controller */
2455 2782
}
2456 2783
#endif /* TODO */
......
2492 2819
    env->nb_tlb = 64;
2493 2820
    env->nb_ways = 1;
2494 2821
    env->id_tlbs = 0;
2822
    init_excp_BookE(env);
2495 2823
    /* XXX: TODO: allocate internal IRQ controller */
2496 2824
}
2497 2825

  
......
2509 2837

  
2510 2838
static void init_proc_460 (CPUPPCState *env)
2511 2839
{
2840
    /* Time base */
2841
    gen_tbl(env);
2842
    gen_spr_BookE(env);
2843
    gen_spr_440(env);
2844
    spr_register(env, SPR_BOOKE_MCSR, "MCSR",
2845
                 SPR_NOACCESS, SPR_NOACCESS,
2846
                 &spr_read_generic, &spr_write_generic,
2847
                 0x00000000);
2848
    spr_register(env, SPR_BOOKE_MCSRR0, "MCSRR0",
2849
                 SPR_NOACCESS, SPR_NOACCESS,
2850
                 &spr_read_generic, &spr_write_generic,
2851
                 0x00000000);
2852
    spr_register(env, SPR_BOOKE_MCSRR1, "MCSRR1",
2853
                 SPR_NOACCESS, SPR_NOACCESS,
2854
                 &spr_read_generic, &spr_write_generic,
2855
                 0x00000000);
2856
    spr_register(env, SPR_440_CCR1, "CCR1",
2857
                 SPR_NOACCESS, SPR_NOACCESS,
2858
                 &spr_read_generic, &spr_write_generic,
2859
                 0x00000000);
2860
    spr_register(env, SPR_DCRIPR, "SPR_DCRIPR",
2861
                 &spr_read_generic, &spr_write_generic,
2862
                 &spr_read_generic, &spr_write_generic,
2863
                 0x00000000);
2864
    /* Memory management */
2865
    env->nb_tlb = 64;
2866
    env->nb_ways = 1;
2867
    env->id_tlbs = 0;
2868
    init_excp_BookE(env);
2869
    /* XXX: TODO: allocate internal IRQ controller */
2512 2870
}
2513 2871
#endif /* TODO */
2514 2872

  
......
2527 2885
#define POWERPC_INPUT_460F   (PPC_FLAGS_INPUT_BookE)
2528 2886
#define POWERPC_BFDM_460F    (bfd_mach_ppc_403)
2529 2887

  
2530
static void init_proc_460 (CPUPPCState *env)
2888
static void init_proc_460F (CPUPPCState *env)
2531 2889
{
2532 2890
    /* Time base */
2533 2891
    gen_tbl(env);
......
2557 2915
    env->nb_tlb = 64;
2558 2916
    env->nb_ways = 1;
2559 2917
    env->id_tlbs = 0;
2918
    init_excp_BookE(env);
2560 2919
    /* XXX: TODO: allocate internal IRQ controller */
2561 2920
}
2562 2921
#endif /* TODO */
......
2578 2937

  
2579 2938
static void init_proc_BookE (CPUPPCState *env)
2580 2939
{
2940
    init_excp_BookE(env);
2581 2941
}
2582 2942
#endif /* TODO */
2583 2943

  
......
2610 2970
    env->nb_tlb = 64;
2611 2971
    env->nb_ways = 1;
2612 2972
    env->id_tlbs = 0;
2973
    init_excp_BookE(env);
2613 2974
    /* XXX: TODO: allocate internal IRQ controller */
2614 2975
}
2615 2976
#endif /* TODO */
......
2678 3039
    env->nb_ways = 2;
2679 3040
    env->id_tlbs = 0;
2680 3041
    env->id_tlbs = 0;
3042
    init_excp_601(env);
2681 3043
    /* XXX: TODO: allocate internal IRQ controller */
2682 3044
}
2683 3045

  
......
2712 3074
    /* Memory management */
2713 3075
    gen_low_BATs(env);
2714 3076
    gen_6xx_7xx_soft_tlb(env, 64, 2);
3077
    init_excp_602(env);
2715 3078
    /* Allocate hardware IRQ controller */
2716 3079
    ppc6xx_irq_init(env);
2717 3080
}
......
2744 3107
    /* Memory management */
2745 3108
    gen_low_BATs(env);
2746 3109
    gen_6xx_7xx_soft_tlb(env, 64, 2);
3110
    init_excp_603(env);
2747 3111
    /* Allocate hardware IRQ controller */
2748 3112
    ppc6xx_irq_init(env);
2749 3113
}
......
2781 3145
    /* Memory management */
2782 3146
    gen_low_BATs(env);
2783 3147
    gen_6xx_7xx_soft_tlb(env, 64, 2);
3148
    init_excp_603(env);
2784 3149
    /* Allocate hardware IRQ controller */
2785 3150
    ppc6xx_irq_init(env);
2786 3151
}
......
2820 3185
    gen_low_BATs(env);
2821 3186
    gen_high_BATs(env);
2822 3187
    gen_6xx_7xx_soft_tlb(env, 64, 2);
3188
    init_excp_G2(env);
2823 3189
    /* Allocate hardware IRQ controller */
2824 3190
    ppc6xx_irq_init(env);
2825 3191
}
......
2859 3225
    gen_low_BATs(env);
2860 3226
    gen_high_BATs(env);
2861 3227
    gen_6xx_7xx_soft_tlb(env, 64, 2);
3228
    init_excp_G2(env);
2862 3229
    /* Allocate hardware IRQ controller */
2863 3230
    ppc6xx_irq_init(env);
2864 3231
}
......
2890 3257
                 0x00000000);
2891 3258
    /* Memory management */
2892 3259
    gen_low_BATs(env);
3260
    init_excp_604(env);
2893 3261
    /* Allocate hardware IRQ controller */
2894 3262
    ppc6xx_irq_init(env);
2895 3263
}
......
2923 3291
                 0x00000000);
2924 3292
    /* Memory management */
2925 3293
    gen_low_BATs(env);
3294
    init_excp_7x0(env);
2926 3295
    /* Allocate hardware IRQ controller */
2927 3296
    ppc6xx_irq_init(env);
2928 3297
}
......
2963 3332
    gen_low_BATs(env);
2964 3333
    /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
2965 3334
    gen_high_BATs(env);
3335
    init_excp_750FX(env);
2966 3336
    /* Allocate hardware IRQ controller */
2967 3337
    ppc6xx_irq_init(env);
2968 3338
}
......
3038 3408
    gen_spr_thrm(env);
3039 3409
    /* Memory management */
3040 3410
    gen_low_BATs(env);
3411
    init_excp_7400(env);
3041 3412
    /* Allocate hardware IRQ controller */
3042 3413
    ppc6xx_irq_init(env);
3043 3414
}
......
3076 3447
                 0x00000000);
3077 3448
    /* Memory management */
3078 3449
    gen_low_BATs(env);
3450
    init_excp_7400(env);
3079 3451
    /* Allocate hardware IRQ controller */
3080 3452
    ppc6xx_irq_init(env);
3081 3453
}
......
3201 3573
    /* Memory management */
3202 3574
    gen_low_BATs(env);
3203 3575
    gen_74xx_soft_tlb(env);
3576
    init_excp_7450(env);
3204 3577
    /* Allocate hardware IRQ controller */
3205 3578
    ppc6xx_irq_init(env);
3206 3579
}
......
3297 3670
    gen_low_BATs(env);
3298 3671
    gen_high_BATs(env);
3299 3672
    gen_74xx_soft_tlb(env);
3673
    init_excp_7450(env);
3300 3674
    /* Allocate hardware IRQ controller */
3301 3675
    ppc6xx_irq_init(env);
3302 3676
}
......
3395 3769
    gen_low_BATs(env);
3396 3770
    gen_high_BATs(env);
3397 3771
    gen_74xx_soft_tlb(env);
3772
    init_excp_7450(env);
3398 3773
    /* Allocate hardware IRQ controller */
3399 3774
    ppc6xx_irq_init(env);
3400 3775
}
......
3439 3814
#if 0 // TODO
3440 3815
    env->slb_nr = 32;
3441 3816
#endif
3817
    init_excp_970(env);
3442 3818
    /* Allocate hardware IRQ controller */
3443 3819
    ppc970_irq_init(env);
3444 3820
}
......
3481 3857
#if 0 // TODO
3482 3858
    env->slb_nr = 32;
3483 3859
#endif
3860
    init_excp_970(env);
3484 3861
    /* Allocate hardware IRQ controller */
3485 3862
    ppc970_irq_init(env);
3486 3863
}
......
3523 3900
#if 0 // TODO
3524 3901
    env->slb_nr = 32;
3525 3902
#endif
3903
    init_excp_970(env);
3526 3904
    /* Allocate hardware IRQ controller */
3527 3905
    ppc970_irq_init(env);
3528 3906
}
......
3552 3930
    /* Memory management */
3553 3931
    gen_low_BATs(env);
3554 3932
    gen_high_BATs(env);
3933
    init_excp_620(env);
3555 3934
    /* XXX: TODO: initialize internal interrupt controller */
3556 3935
}
3557 3936
#endif /* TODO */
......
5046 5425
static void init_ppc_proc (CPUPPCState *env, ppc_def_t *def)
5047 5426
{
5048 5427
#if !defined(CONFIG_USER_ONLY)
5428
    int i;
5429

  
5049 5430
    env->irq_inputs = NULL;
5431
    /* Set all exception vectors to an invalid address */
5432
    for (i = 0; i < POWERPC_EXCP_NB; i++)
5433
        env->excp_vectors[i] = (target_ulong)(-1ULL);
5434
    env->excp_prefix = 0x00000000;
5435
    env->ivor_mask = 0x00000000;
5436
    env->ivpr_mask = 0x00000000;
5050 5437
#endif
5051 5438
    /* Default MMU definitions */
5052 5439
    env->nb_BATs = 0;

Also available in: Unified diff