2 * PowerPC CPU initialization for qemu.
4 * Copyright (c) 2003-2007 Jocelyn Mayer
5 * Copyright 2011 Freescale Semiconductor, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
21 /* A lot of PowerPC definition have been included here.
22 * Most of them are not usable for now but have been kept
23 * inside "#if defined(TODO) ... #endif" statements to make tests easier.
31 //#define PPC_DUMP_CPU
32 //#define PPC_DEBUG_SPR
33 //#define PPC_DUMP_SPR_ACCESSES
34 #if defined(CONFIG_USER_ONLY)
35 #define TODO_USER_ONLY 1
38 /* For user-mode emulation, we don't emulate any IRQ controller */
39 #if defined(CONFIG_USER_ONLY)
40 #define PPC_IRQ_INIT_FN(name) \
41 static inline void glue(glue(ppc, name),_irq_init) (CPUPPCState *env) \
45 #define PPC_IRQ_INIT_FN(name) \
46 void glue(glue(ppc, name),_irq_init) (CPUPPCState *env);
52 PPC_IRQ_INIT_FN(POWER7
);
53 PPC_IRQ_INIT_FN(e500
);
56 * do nothing but store/retrieve spr value
58 static void spr_read_generic (void *opaque
, int gprn
, int sprn
)
60 gen_load_spr(cpu_gpr
[gprn
], sprn
);
61 #ifdef PPC_DUMP_SPR_ACCESSES
63 TCGv_i32 t0
= tcg_const_i32(sprn
);
64 gen_helper_load_dump_spr(t0
);
65 tcg_temp_free_i32(t0
);
70 static void spr_write_generic (void *opaque
, int sprn
, int gprn
)
72 gen_store_spr(sprn
, cpu_gpr
[gprn
]);
73 #ifdef PPC_DUMP_SPR_ACCESSES
75 TCGv_i32 t0
= tcg_const_i32(sprn
);
76 gen_helper_store_dump_spr(t0
);
77 tcg_temp_free_i32(t0
);
82 #if !defined(CONFIG_USER_ONLY)
83 static void spr_write_clear (void *opaque
, int sprn
, int gprn
)
85 TCGv t0
= tcg_temp_new();
86 TCGv t1
= tcg_temp_new();
87 gen_load_spr(t0
, sprn
);
88 tcg_gen_neg_tl(t1
, cpu_gpr
[gprn
]);
89 tcg_gen_and_tl(t0
, t0
, t1
);
90 gen_store_spr(sprn
, t0
);
96 /* SPR common to all PowerPC */
98 static void spr_read_xer (void *opaque
, int gprn
, int sprn
)
100 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_xer
);
103 static void spr_write_xer (void *opaque
, int sprn
, int gprn
)
105 tcg_gen_mov_tl(cpu_xer
, cpu_gpr
[gprn
]);
109 static void spr_read_lr (void *opaque
, int gprn
, int sprn
)
111 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_lr
);
114 static void spr_write_lr (void *opaque
, int sprn
, int gprn
)
116 tcg_gen_mov_tl(cpu_lr
, cpu_gpr
[gprn
]);
120 #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
121 static void spr_read_cfar (void *opaque
, int gprn
, int sprn
)
123 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_cfar
);
126 static void spr_write_cfar (void *opaque
, int sprn
, int gprn
)
128 tcg_gen_mov_tl(cpu_cfar
, cpu_gpr
[gprn
]);
130 #endif /* defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY) */
133 static void spr_read_ctr (void *opaque
, int gprn
, int sprn
)
135 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_ctr
);
138 static void spr_write_ctr (void *opaque
, int sprn
, int gprn
)
140 tcg_gen_mov_tl(cpu_ctr
, cpu_gpr
[gprn
]);
143 /* User read access to SPR */
149 static void spr_read_ureg (void *opaque
, int gprn
, int sprn
)
151 gen_load_spr(cpu_gpr
[gprn
], sprn
+ 0x10);
154 /* SPR common to all non-embedded PowerPC */
156 #if !defined(CONFIG_USER_ONLY)
157 static void spr_read_decr (void *opaque
, int gprn
, int sprn
)
162 gen_helper_load_decr(cpu_gpr
[gprn
]);
165 gen_stop_exception(opaque
);
169 static void spr_write_decr (void *opaque
, int sprn
, int gprn
)
174 gen_helper_store_decr(cpu_gpr
[gprn
]);
177 gen_stop_exception(opaque
);
182 /* SPR common to all non-embedded PowerPC, except 601 */
184 static void spr_read_tbl (void *opaque
, int gprn
, int sprn
)
189 gen_helper_load_tbl(cpu_gpr
[gprn
]);
192 gen_stop_exception(opaque
);
196 static void spr_read_tbu (void *opaque
, int gprn
, int sprn
)
201 gen_helper_load_tbu(cpu_gpr
[gprn
]);
204 gen_stop_exception(opaque
);
208 __attribute__ (( unused
))
209 static void spr_read_atbl (void *opaque
, int gprn
, int sprn
)
211 gen_helper_load_atbl(cpu_gpr
[gprn
]);
214 __attribute__ (( unused
))
215 static void spr_read_atbu (void *opaque
, int gprn
, int sprn
)
217 gen_helper_load_atbu(cpu_gpr
[gprn
]);
220 #if !defined(CONFIG_USER_ONLY)
221 static void spr_write_tbl (void *opaque
, int sprn
, int gprn
)
226 gen_helper_store_tbl(cpu_gpr
[gprn
]);
229 gen_stop_exception(opaque
);
233 static void spr_write_tbu (void *opaque
, int sprn
, int gprn
)
238 gen_helper_store_tbu(cpu_gpr
[gprn
]);
241 gen_stop_exception(opaque
);
245 __attribute__ (( unused
))
246 static void spr_write_atbl (void *opaque
, int sprn
, int gprn
)
248 gen_helper_store_atbl(cpu_gpr
[gprn
]);
251 __attribute__ (( unused
))
252 static void spr_write_atbu (void *opaque
, int sprn
, int gprn
)
254 gen_helper_store_atbu(cpu_gpr
[gprn
]);
257 #if defined(TARGET_PPC64)
258 __attribute__ (( unused
))
259 static void spr_read_purr (void *opaque
, int gprn
, int sprn
)
261 gen_helper_load_purr(cpu_gpr
[gprn
]);
266 #if !defined(CONFIG_USER_ONLY)
267 /* IBAT0U...IBAT0U */
268 /* IBAT0L...IBAT7L */
269 static void spr_read_ibat (void *opaque
, int gprn
, int sprn
)
271 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT0U
) / 2]));
274 static void spr_read_ibat_h (void *opaque
, int gprn
, int sprn
)
276 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT4U
) / 2]));
279 static void spr_write_ibatu (void *opaque
, int sprn
, int gprn
)
281 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
282 gen_helper_store_ibatu(t0
, cpu_gpr
[gprn
]);
283 tcg_temp_free_i32(t0
);
286 static void spr_write_ibatu_h (void *opaque
, int sprn
, int gprn
)
288 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_IBAT4U
) / 2) + 4);
289 gen_helper_store_ibatu(t0
, cpu_gpr
[gprn
]);
290 tcg_temp_free_i32(t0
);
293 static void spr_write_ibatl (void *opaque
, int sprn
, int gprn
)
295 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0L
) / 2);
296 gen_helper_store_ibatl(t0
, cpu_gpr
[gprn
]);
297 tcg_temp_free_i32(t0
);
300 static void spr_write_ibatl_h (void *opaque
, int sprn
, int gprn
)
302 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_IBAT4L
) / 2) + 4);
303 gen_helper_store_ibatl(t0
, cpu_gpr
[gprn
]);
304 tcg_temp_free_i32(t0
);
307 /* DBAT0U...DBAT7U */
308 /* DBAT0L...DBAT7L */
309 static void spr_read_dbat (void *opaque
, int gprn
, int sprn
)
311 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, DBAT
[sprn
& 1][(sprn
- SPR_DBAT0U
) / 2]));
314 static void spr_read_dbat_h (void *opaque
, int gprn
, int sprn
)
316 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, DBAT
[sprn
& 1][((sprn
- SPR_DBAT4U
) / 2) + 4]));
319 static void spr_write_dbatu (void *opaque
, int sprn
, int gprn
)
321 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_DBAT0U
) / 2);
322 gen_helper_store_dbatu(t0
, cpu_gpr
[gprn
]);
323 tcg_temp_free_i32(t0
);
326 static void spr_write_dbatu_h (void *opaque
, int sprn
, int gprn
)
328 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_DBAT4U
) / 2) + 4);
329 gen_helper_store_dbatu(t0
, cpu_gpr
[gprn
]);
330 tcg_temp_free_i32(t0
);
333 static void spr_write_dbatl (void *opaque
, int sprn
, int gprn
)
335 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_DBAT0L
) / 2);
336 gen_helper_store_dbatl(t0
, cpu_gpr
[gprn
]);
337 tcg_temp_free_i32(t0
);
340 static void spr_write_dbatl_h (void *opaque
, int sprn
, int gprn
)
342 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_DBAT4L
) / 2) + 4);
343 gen_helper_store_dbatl(t0
, cpu_gpr
[gprn
]);
344 tcg_temp_free_i32(t0
);
348 static void spr_write_sdr1 (void *opaque
, int sprn
, int gprn
)
350 gen_helper_store_sdr1(cpu_gpr
[gprn
]);
353 /* 64 bits PowerPC specific SPRs */
355 #if defined(TARGET_PPC64)
356 static void spr_read_hior (void *opaque
, int gprn
, int sprn
)
358 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, excp_prefix
));
361 static void spr_write_hior (void *opaque
, int sprn
, int gprn
)
363 TCGv t0
= tcg_temp_new();
364 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], 0x3FFFFF00000ULL
);
365 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_prefix
));
369 static void spr_read_asr (void *opaque
, int gprn
, int sprn
)
371 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, asr
));
374 static void spr_write_asr (void *opaque
, int sprn
, int gprn
)
376 gen_helper_store_asr(cpu_gpr
[gprn
]);
381 /* PowerPC 601 specific registers */
383 static void spr_read_601_rtcl (void *opaque
, int gprn
, int sprn
)
385 gen_helper_load_601_rtcl(cpu_gpr
[gprn
]);
388 static void spr_read_601_rtcu (void *opaque
, int gprn
, int sprn
)
390 gen_helper_load_601_rtcu(cpu_gpr
[gprn
]);
393 #if !defined(CONFIG_USER_ONLY)
394 static void spr_write_601_rtcu (void *opaque
, int sprn
, int gprn
)
396 gen_helper_store_601_rtcu(cpu_gpr
[gprn
]);
399 static void spr_write_601_rtcl (void *opaque
, int sprn
, int gprn
)
401 gen_helper_store_601_rtcl(cpu_gpr
[gprn
]);
404 static void spr_write_hid0_601 (void *opaque
, int sprn
, int gprn
)
406 DisasContext
*ctx
= opaque
;
408 gen_helper_store_hid0_601(cpu_gpr
[gprn
]);
409 /* Must stop the translation as endianness may have changed */
410 gen_stop_exception(ctx
);
415 #if !defined(CONFIG_USER_ONLY)
416 static void spr_read_601_ubat (void *opaque
, int gprn
, int sprn
)
418 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT0U
) / 2]));
421 static void spr_write_601_ubatu (void *opaque
, int sprn
, int gprn
)
423 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
424 gen_helper_store_601_batl(t0
, cpu_gpr
[gprn
]);
425 tcg_temp_free_i32(t0
);
428 static void spr_write_601_ubatl (void *opaque
, int sprn
, int gprn
)
430 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
431 gen_helper_store_601_batu(t0
, cpu_gpr
[gprn
]);
432 tcg_temp_free_i32(t0
);
436 /* PowerPC 40x specific registers */
437 #if !defined(CONFIG_USER_ONLY)
438 static void spr_read_40x_pit (void *opaque
, int gprn
, int sprn
)
440 gen_helper_load_40x_pit(cpu_gpr
[gprn
]);
443 static void spr_write_40x_pit (void *opaque
, int sprn
, int gprn
)
445 gen_helper_store_40x_pit(cpu_gpr
[gprn
]);
448 static void spr_write_40x_dbcr0 (void *opaque
, int sprn
, int gprn
)
450 DisasContext
*ctx
= opaque
;
452 gen_helper_store_40x_dbcr0(cpu_gpr
[gprn
]);
453 /* We must stop translation as we may have rebooted */
454 gen_stop_exception(ctx
);
457 static void spr_write_40x_sler (void *opaque
, int sprn
, int gprn
)
459 gen_helper_store_40x_sler(cpu_gpr
[gprn
]);
462 static void spr_write_booke_tcr (void *opaque
, int sprn
, int gprn
)
464 gen_helper_store_booke_tcr(cpu_gpr
[gprn
]);
467 static void spr_write_booke_tsr (void *opaque
, int sprn
, int gprn
)
469 gen_helper_store_booke_tsr(cpu_gpr
[gprn
]);
473 /* PowerPC 403 specific registers */
474 /* PBL1 / PBU1 / PBL2 / PBU2 */
475 #if !defined(CONFIG_USER_ONLY)
476 static void spr_read_403_pbr (void *opaque
, int gprn
, int sprn
)
478 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, pb
[sprn
- SPR_403_PBL1
]));
481 static void spr_write_403_pbr (void *opaque
, int sprn
, int gprn
)
483 TCGv_i32 t0
= tcg_const_i32(sprn
- SPR_403_PBL1
);
484 gen_helper_store_403_pbr(t0
, cpu_gpr
[gprn
]);
485 tcg_temp_free_i32(t0
);
488 static void spr_write_pir (void *opaque
, int sprn
, int gprn
)
490 TCGv t0
= tcg_temp_new();
491 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], 0xF);
492 gen_store_spr(SPR_PIR
, t0
);
497 /* SPE specific registers */
498 static void spr_read_spefscr (void *opaque
, int gprn
, int sprn
)
500 TCGv_i32 t0
= tcg_temp_new_i32();
501 tcg_gen_ld_i32(t0
, cpu_env
, offsetof(CPUState
, spe_fscr
));
502 tcg_gen_extu_i32_tl(cpu_gpr
[gprn
], t0
);
503 tcg_temp_free_i32(t0
);
506 static void spr_write_spefscr (void *opaque
, int sprn
, int gprn
)
508 TCGv_i32 t0
= tcg_temp_new_i32();
509 tcg_gen_trunc_tl_i32(t0
, cpu_gpr
[gprn
]);
510 tcg_gen_st_i32(t0
, cpu_env
, offsetof(CPUState
, spe_fscr
));
511 tcg_temp_free_i32(t0
);
514 #if !defined(CONFIG_USER_ONLY)
515 /* Callback used to write the exception vector base */
516 static void spr_write_excp_prefix (void *opaque
, int sprn
, int gprn
)
518 TCGv t0
= tcg_temp_new();
519 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivpr_mask
));
520 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
521 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_prefix
));
522 gen_store_spr(sprn
, t0
);
526 static void spr_write_excp_vector (void *opaque
, int sprn
, int gprn
)
528 DisasContext
*ctx
= opaque
;
531 if (sprn
>= SPR_BOOKE_IVOR0
&& sprn
<= SPR_BOOKE_IVOR15
) {
532 sprn_offs
= sprn
- SPR_BOOKE_IVOR0
;
533 } else if (sprn
>= SPR_BOOKE_IVOR32
&& sprn
<= SPR_BOOKE_IVOR37
) {
534 sprn_offs
= sprn
- SPR_BOOKE_IVOR32
+ 32;
535 } else if (sprn
>= SPR_BOOKE_IVOR38
&& sprn
<= SPR_BOOKE_IVOR42
) {
536 sprn_offs
= sprn
- SPR_BOOKE_IVOR38
+ 38;
538 printf("Trying to write an unknown exception vector %d %03x\n",
540 gen_inval_exception(ctx
, POWERPC_EXCP_PRIV_REG
);
544 TCGv t0
= tcg_temp_new();
545 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivor_mask
));
546 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
547 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_vectors
[sprn_offs
]));
548 gen_store_spr(sprn
, t0
);
553 static inline void vscr_init (CPUPPCState
*env
, uint32_t val
)
556 /* Altivec always uses round-to-nearest */
557 set_float_rounding_mode(float_round_nearest_even
, &env
->vec_status
);
558 set_flush_to_zero(vscr_nj
, &env
->vec_status
);
561 #if defined(CONFIG_USER_ONLY)
562 #define spr_register(env, num, name, uea_read, uea_write, \
563 oea_read, oea_write, initial_value) \
565 _spr_register(env, num, name, uea_read, uea_write, initial_value); \
567 static inline void _spr_register (CPUPPCState
*env
, int num
,
569 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
570 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
571 target_ulong initial_value
)
573 static inline void spr_register (CPUPPCState
*env
, int num
,
575 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
576 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
577 void (*oea_read
)(void *opaque
, int gprn
, int sprn
),
578 void (*oea_write
)(void *opaque
, int sprn
, int gprn
),
579 target_ulong initial_value
)
584 spr
= &env
->spr_cb
[num
];
585 if (spr
->name
!= NULL
||env
-> spr
[num
] != 0x00000000 ||
586 #if !defined(CONFIG_USER_ONLY)
587 spr
->oea_read
!= NULL
|| spr
->oea_write
!= NULL
||
589 spr
->uea_read
!= NULL
|| spr
->uea_write
!= NULL
) {
590 printf("Error: Trying to register SPR %d (%03x) twice !\n", num
, num
);
593 #if defined(PPC_DEBUG_SPR)
594 printf("*** register spr %d (%03x) %s val " TARGET_FMT_lx
"\n", num
, num
,
595 name
, initial_value
);
598 spr
->uea_read
= uea_read
;
599 spr
->uea_write
= uea_write
;
600 #if !defined(CONFIG_USER_ONLY)
601 spr
->oea_read
= oea_read
;
602 spr
->oea_write
= oea_write
;
604 env
->spr
[num
] = initial_value
;
607 /* Generic PowerPC SPRs */
608 static void gen_spr_generic (CPUPPCState
*env
)
610 /* Integer processing */
611 spr_register(env
, SPR_XER
, "XER",
612 &spr_read_xer
, &spr_write_xer
,
613 &spr_read_xer
, &spr_write_xer
,
616 spr_register(env
, SPR_LR
, "LR",
617 &spr_read_lr
, &spr_write_lr
,
618 &spr_read_lr
, &spr_write_lr
,
620 spr_register(env
, SPR_CTR
, "CTR",
621 &spr_read_ctr
, &spr_write_ctr
,
622 &spr_read_ctr
, &spr_write_ctr
,
624 /* Interrupt processing */
625 spr_register(env
, SPR_SRR0
, "SRR0",
626 SPR_NOACCESS
, SPR_NOACCESS
,
627 &spr_read_generic
, &spr_write_generic
,
629 spr_register(env
, SPR_SRR1
, "SRR1",
630 SPR_NOACCESS
, SPR_NOACCESS
,
631 &spr_read_generic
, &spr_write_generic
,
633 /* Processor control */
634 spr_register(env
, SPR_SPRG0
, "SPRG0",
635 SPR_NOACCESS
, SPR_NOACCESS
,
636 &spr_read_generic
, &spr_write_generic
,
638 spr_register(env
, SPR_SPRG1
, "SPRG1",
639 SPR_NOACCESS
, SPR_NOACCESS
,
640 &spr_read_generic
, &spr_write_generic
,
642 spr_register(env
, SPR_SPRG2
, "SPRG2",
643 SPR_NOACCESS
, SPR_NOACCESS
,
644 &spr_read_generic
, &spr_write_generic
,
646 spr_register(env
, SPR_SPRG3
, "SPRG3",
647 SPR_NOACCESS
, SPR_NOACCESS
,
648 &spr_read_generic
, &spr_write_generic
,
652 /* SPR common to all non-embedded PowerPC, including 601 */
653 static void gen_spr_ne_601 (CPUPPCState
*env
)
655 /* Exception processing */
656 spr_register(env
, SPR_DSISR
, "DSISR",
657 SPR_NOACCESS
, SPR_NOACCESS
,
658 &spr_read_generic
, &spr_write_generic
,
660 spr_register(env
, SPR_DAR
, "DAR",
661 SPR_NOACCESS
, SPR_NOACCESS
,
662 &spr_read_generic
, &spr_write_generic
,
665 spr_register(env
, SPR_DECR
, "DECR",
666 SPR_NOACCESS
, SPR_NOACCESS
,
667 &spr_read_decr
, &spr_write_decr
,
669 /* Memory management */
670 spr_register(env
, SPR_SDR1
, "SDR1",
671 SPR_NOACCESS
, SPR_NOACCESS
,
672 &spr_read_generic
, &spr_write_sdr1
,
677 static void gen_low_BATs (CPUPPCState
*env
)
679 #if !defined(CONFIG_USER_ONLY)
680 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
681 SPR_NOACCESS
, SPR_NOACCESS
,
682 &spr_read_ibat
, &spr_write_ibatu
,
684 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
685 SPR_NOACCESS
, SPR_NOACCESS
,
686 &spr_read_ibat
, &spr_write_ibatl
,
688 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
689 SPR_NOACCESS
, SPR_NOACCESS
,
690 &spr_read_ibat
, &spr_write_ibatu
,
692 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
693 SPR_NOACCESS
, SPR_NOACCESS
,
694 &spr_read_ibat
, &spr_write_ibatl
,
696 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
697 SPR_NOACCESS
, SPR_NOACCESS
,
698 &spr_read_ibat
, &spr_write_ibatu
,
700 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
701 SPR_NOACCESS
, SPR_NOACCESS
,
702 &spr_read_ibat
, &spr_write_ibatl
,
704 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
705 SPR_NOACCESS
, SPR_NOACCESS
,
706 &spr_read_ibat
, &spr_write_ibatu
,
708 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
709 SPR_NOACCESS
, SPR_NOACCESS
,
710 &spr_read_ibat
, &spr_write_ibatl
,
712 spr_register(env
, SPR_DBAT0U
, "DBAT0U",
713 SPR_NOACCESS
, SPR_NOACCESS
,
714 &spr_read_dbat
, &spr_write_dbatu
,
716 spr_register(env
, SPR_DBAT0L
, "DBAT0L",
717 SPR_NOACCESS
, SPR_NOACCESS
,
718 &spr_read_dbat
, &spr_write_dbatl
,
720 spr_register(env
, SPR_DBAT1U
, "DBAT1U",
721 SPR_NOACCESS
, SPR_NOACCESS
,
722 &spr_read_dbat
, &spr_write_dbatu
,
724 spr_register(env
, SPR_DBAT1L
, "DBAT1L",
725 SPR_NOACCESS
, SPR_NOACCESS
,
726 &spr_read_dbat
, &spr_write_dbatl
,
728 spr_register(env
, SPR_DBAT2U
, "DBAT2U",
729 SPR_NOACCESS
, SPR_NOACCESS
,
730 &spr_read_dbat
, &spr_write_dbatu
,
732 spr_register(env
, SPR_DBAT2L
, "DBAT2L",
733 SPR_NOACCESS
, SPR_NOACCESS
,
734 &spr_read_dbat
, &spr_write_dbatl
,
736 spr_register(env
, SPR_DBAT3U
, "DBAT3U",
737 SPR_NOACCESS
, SPR_NOACCESS
,
738 &spr_read_dbat
, &spr_write_dbatu
,
740 spr_register(env
, SPR_DBAT3L
, "DBAT3L",
741 SPR_NOACCESS
, SPR_NOACCESS
,
742 &spr_read_dbat
, &spr_write_dbatl
,
749 static void gen_high_BATs (CPUPPCState
*env
)
751 #if !defined(CONFIG_USER_ONLY)
752 spr_register(env
, SPR_IBAT4U
, "IBAT4U",
753 SPR_NOACCESS
, SPR_NOACCESS
,
754 &spr_read_ibat_h
, &spr_write_ibatu_h
,
756 spr_register(env
, SPR_IBAT4L
, "IBAT4L",
757 SPR_NOACCESS
, SPR_NOACCESS
,
758 &spr_read_ibat_h
, &spr_write_ibatl_h
,
760 spr_register(env
, SPR_IBAT5U
, "IBAT5U",
761 SPR_NOACCESS
, SPR_NOACCESS
,
762 &spr_read_ibat_h
, &spr_write_ibatu_h
,
764 spr_register(env
, SPR_IBAT5L
, "IBAT5L",
765 SPR_NOACCESS
, SPR_NOACCESS
,
766 &spr_read_ibat_h
, &spr_write_ibatl_h
,
768 spr_register(env
, SPR_IBAT6U
, "IBAT6U",
769 SPR_NOACCESS
, SPR_NOACCESS
,
770 &spr_read_ibat_h
, &spr_write_ibatu_h
,
772 spr_register(env
, SPR_IBAT6L
, "IBAT6L",
773 SPR_NOACCESS
, SPR_NOACCESS
,
774 &spr_read_ibat_h
, &spr_write_ibatl_h
,
776 spr_register(env
, SPR_IBAT7U
, "IBAT7U",
777 SPR_NOACCESS
, SPR_NOACCESS
,
778 &spr_read_ibat_h
, &spr_write_ibatu_h
,
780 spr_register(env
, SPR_IBAT7L
, "IBAT7L",
781 SPR_NOACCESS
, SPR_NOACCESS
,
782 &spr_read_ibat_h
, &spr_write_ibatl_h
,
784 spr_register(env
, SPR_DBAT4U
, "DBAT4U",
785 SPR_NOACCESS
, SPR_NOACCESS
,
786 &spr_read_dbat_h
, &spr_write_dbatu_h
,
788 spr_register(env
, SPR_DBAT4L
, "DBAT4L",
789 SPR_NOACCESS
, SPR_NOACCESS
,
790 &spr_read_dbat_h
, &spr_write_dbatl_h
,
792 spr_register(env
, SPR_DBAT5U
, "DBAT5U",
793 SPR_NOACCESS
, SPR_NOACCESS
,
794 &spr_read_dbat_h
, &spr_write_dbatu_h
,
796 spr_register(env
, SPR_DBAT5L
, "DBAT5L",
797 SPR_NOACCESS
, SPR_NOACCESS
,
798 &spr_read_dbat_h
, &spr_write_dbatl_h
,
800 spr_register(env
, SPR_DBAT6U
, "DBAT6U",
801 SPR_NOACCESS
, SPR_NOACCESS
,
802 &spr_read_dbat_h
, &spr_write_dbatu_h
,
804 spr_register(env
, SPR_DBAT6L
, "DBAT6L",
805 SPR_NOACCESS
, SPR_NOACCESS
,
806 &spr_read_dbat_h
, &spr_write_dbatl_h
,
808 spr_register(env
, SPR_DBAT7U
, "DBAT7U",
809 SPR_NOACCESS
, SPR_NOACCESS
,
810 &spr_read_dbat_h
, &spr_write_dbatu_h
,
812 spr_register(env
, SPR_DBAT7L
, "DBAT7L",
813 SPR_NOACCESS
, SPR_NOACCESS
,
814 &spr_read_dbat_h
, &spr_write_dbatl_h
,
820 /* Generic PowerPC time base */
821 static void gen_tbl (CPUPPCState
*env
)
823 spr_register(env
, SPR_VTBL
, "TBL",
824 &spr_read_tbl
, SPR_NOACCESS
,
825 &spr_read_tbl
, SPR_NOACCESS
,
827 spr_register(env
, SPR_TBL
, "TBL",
828 &spr_read_tbl
, SPR_NOACCESS
,
829 &spr_read_tbl
, &spr_write_tbl
,
831 spr_register(env
, SPR_VTBU
, "TBU",
832 &spr_read_tbu
, SPR_NOACCESS
,
833 &spr_read_tbu
, SPR_NOACCESS
,
835 spr_register(env
, SPR_TBU
, "TBU",
836 &spr_read_tbu
, SPR_NOACCESS
,
837 &spr_read_tbu
, &spr_write_tbu
,
841 /* Softare table search registers */
842 static void gen_6xx_7xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
844 #if !defined(CONFIG_USER_ONLY)
845 env
->nb_tlb
= nb_tlbs
;
846 env
->nb_ways
= nb_ways
;
848 env
->tlb_type
= TLB_6XX
;
849 spr_register(env
, SPR_DMISS
, "DMISS",
850 SPR_NOACCESS
, SPR_NOACCESS
,
851 &spr_read_generic
, SPR_NOACCESS
,
853 spr_register(env
, SPR_DCMP
, "DCMP",
854 SPR_NOACCESS
, SPR_NOACCESS
,
855 &spr_read_generic
, SPR_NOACCESS
,
857 spr_register(env
, SPR_HASH1
, "HASH1",
858 SPR_NOACCESS
, SPR_NOACCESS
,
859 &spr_read_generic
, SPR_NOACCESS
,
861 spr_register(env
, SPR_HASH2
, "HASH2",
862 SPR_NOACCESS
, SPR_NOACCESS
,
863 &spr_read_generic
, SPR_NOACCESS
,
865 spr_register(env
, SPR_IMISS
, "IMISS",
866 SPR_NOACCESS
, SPR_NOACCESS
,
867 &spr_read_generic
, SPR_NOACCESS
,
869 spr_register(env
, SPR_ICMP
, "ICMP",
870 SPR_NOACCESS
, SPR_NOACCESS
,
871 &spr_read_generic
, SPR_NOACCESS
,
873 spr_register(env
, SPR_RPA
, "RPA",
874 SPR_NOACCESS
, SPR_NOACCESS
,
875 &spr_read_generic
, &spr_write_generic
,
880 /* SPR common to MPC755 and G2 */
881 static void gen_spr_G2_755 (CPUPPCState
*env
)
884 spr_register(env
, SPR_SPRG4
, "SPRG4",
885 SPR_NOACCESS
, SPR_NOACCESS
,
886 &spr_read_generic
, &spr_write_generic
,
888 spr_register(env
, SPR_SPRG5
, "SPRG5",
889 SPR_NOACCESS
, SPR_NOACCESS
,
890 &spr_read_generic
, &spr_write_generic
,
892 spr_register(env
, SPR_SPRG6
, "SPRG6",
893 SPR_NOACCESS
, SPR_NOACCESS
,
894 &spr_read_generic
, &spr_write_generic
,
896 spr_register(env
, SPR_SPRG7
, "SPRG7",
897 SPR_NOACCESS
, SPR_NOACCESS
,
898 &spr_read_generic
, &spr_write_generic
,
902 /* SPR common to all 7xx PowerPC implementations */
903 static void gen_spr_7xx (CPUPPCState
*env
)
906 /* XXX : not implemented */
907 spr_register(env
, SPR_DABR
, "DABR",
908 SPR_NOACCESS
, SPR_NOACCESS
,
909 &spr_read_generic
, &spr_write_generic
,
911 /* XXX : not implemented */
912 spr_register(env
, SPR_IABR
, "IABR",
913 SPR_NOACCESS
, SPR_NOACCESS
,
914 &spr_read_generic
, &spr_write_generic
,
916 /* Cache management */
917 /* XXX : not implemented */
918 spr_register(env
, SPR_ICTC
, "ICTC",
919 SPR_NOACCESS
, SPR_NOACCESS
,
920 &spr_read_generic
, &spr_write_generic
,
922 /* Performance monitors */
923 /* XXX : not implemented */
924 spr_register(env
, SPR_MMCR0
, "MMCR0",
925 SPR_NOACCESS
, SPR_NOACCESS
,
926 &spr_read_generic
, &spr_write_generic
,
928 /* XXX : not implemented */
929 spr_register(env
, SPR_MMCR1
, "MMCR1",
930 SPR_NOACCESS
, SPR_NOACCESS
,
931 &spr_read_generic
, &spr_write_generic
,
933 /* XXX : not implemented */
934 spr_register(env
, SPR_PMC1
, "PMC1",
935 SPR_NOACCESS
, SPR_NOACCESS
,
936 &spr_read_generic
, &spr_write_generic
,
938 /* XXX : not implemented */
939 spr_register(env
, SPR_PMC2
, "PMC2",
940 SPR_NOACCESS
, SPR_NOACCESS
,
941 &spr_read_generic
, &spr_write_generic
,
943 /* XXX : not implemented */
944 spr_register(env
, SPR_PMC3
, "PMC3",
945 SPR_NOACCESS
, SPR_NOACCESS
,
946 &spr_read_generic
, &spr_write_generic
,
948 /* XXX : not implemented */
949 spr_register(env
, SPR_PMC4
, "PMC4",
950 SPR_NOACCESS
, SPR_NOACCESS
,
951 &spr_read_generic
, &spr_write_generic
,
953 /* XXX : not implemented */
954 spr_register(env
, SPR_SIAR
, "SIAR",
955 SPR_NOACCESS
, SPR_NOACCESS
,
956 &spr_read_generic
, SPR_NOACCESS
,
958 /* XXX : not implemented */
959 spr_register(env
, SPR_UMMCR0
, "UMMCR0",
960 &spr_read_ureg
, SPR_NOACCESS
,
961 &spr_read_ureg
, SPR_NOACCESS
,
963 /* XXX : not implemented */
964 spr_register(env
, SPR_UMMCR1
, "UMMCR1",
965 &spr_read_ureg
, SPR_NOACCESS
,
966 &spr_read_ureg
, SPR_NOACCESS
,
968 /* XXX : not implemented */
969 spr_register(env
, SPR_UPMC1
, "UPMC1",
970 &spr_read_ureg
, SPR_NOACCESS
,
971 &spr_read_ureg
, SPR_NOACCESS
,
973 /* XXX : not implemented */
974 spr_register(env
, SPR_UPMC2
, "UPMC2",
975 &spr_read_ureg
, SPR_NOACCESS
,
976 &spr_read_ureg
, SPR_NOACCESS
,
978 /* XXX : not implemented */
979 spr_register(env
, SPR_UPMC3
, "UPMC3",
980 &spr_read_ureg
, SPR_NOACCESS
,
981 &spr_read_ureg
, SPR_NOACCESS
,
983 /* XXX : not implemented */
984 spr_register(env
, SPR_UPMC4
, "UPMC4",
985 &spr_read_ureg
, SPR_NOACCESS
,
986 &spr_read_ureg
, SPR_NOACCESS
,
988 /* XXX : not implemented */
989 spr_register(env
, SPR_USIAR
, "USIAR",
990 &spr_read_ureg
, SPR_NOACCESS
,
991 &spr_read_ureg
, SPR_NOACCESS
,
993 /* External access control */
994 /* XXX : not implemented */
995 spr_register(env
, SPR_EAR
, "EAR",
996 SPR_NOACCESS
, SPR_NOACCESS
,
997 &spr_read_generic
, &spr_write_generic
,
1001 static void gen_spr_thrm (CPUPPCState
*env
)
1003 /* Thermal management */
1004 /* XXX : not implemented */
1005 spr_register(env
, SPR_THRM1
, "THRM1",
1006 SPR_NOACCESS
, SPR_NOACCESS
,
1007 &spr_read_generic
, &spr_write_generic
,
1009 /* XXX : not implemented */
1010 spr_register(env
, SPR_THRM2
, "THRM2",
1011 SPR_NOACCESS
, SPR_NOACCESS
,
1012 &spr_read_generic
, &spr_write_generic
,
1014 /* XXX : not implemented */
1015 spr_register(env
, SPR_THRM3
, "THRM3",
1016 SPR_NOACCESS
, SPR_NOACCESS
,
1017 &spr_read_generic
, &spr_write_generic
,
1021 /* SPR specific to PowerPC 604 implementation */
1022 static void gen_spr_604 (CPUPPCState
*env
)
1024 /* Processor identification */
1025 spr_register(env
, SPR_PIR
, "PIR",
1026 SPR_NOACCESS
, SPR_NOACCESS
,
1027 &spr_read_generic
, &spr_write_pir
,
1030 /* XXX : not implemented */
1031 spr_register(env
, SPR_IABR
, "IABR",
1032 SPR_NOACCESS
, SPR_NOACCESS
,
1033 &spr_read_generic
, &spr_write_generic
,
1035 /* XXX : not implemented */
1036 spr_register(env
, SPR_DABR
, "DABR",
1037 SPR_NOACCESS
, SPR_NOACCESS
,
1038 &spr_read_generic
, &spr_write_generic
,
1040 /* Performance counters */
1041 /* XXX : not implemented */
1042 spr_register(env
, SPR_MMCR0
, "MMCR0",
1043 SPR_NOACCESS
, SPR_NOACCESS
,
1044 &spr_read_generic
, &spr_write_generic
,
1046 /* XXX : not implemented */
1047 spr_register(env
, SPR_PMC1
, "PMC1",
1048 SPR_NOACCESS
, SPR_NOACCESS
,
1049 &spr_read_generic
, &spr_write_generic
,
1051 /* XXX : not implemented */
1052 spr_register(env
, SPR_PMC2
, "PMC2",
1053 SPR_NOACCESS
, SPR_NOACCESS
,
1054 &spr_read_generic
, &spr_write_generic
,
1056 /* XXX : not implemented */
1057 spr_register(env
, SPR_SIAR
, "SIAR",
1058 SPR_NOACCESS
, SPR_NOACCESS
,
1059 &spr_read_generic
, SPR_NOACCESS
,
1061 /* XXX : not implemented */
1062 spr_register(env
, SPR_SDA
, "SDA",
1063 SPR_NOACCESS
, SPR_NOACCESS
,
1064 &spr_read_generic
, SPR_NOACCESS
,
1066 /* External access control */
1067 /* XXX : not implemented */
1068 spr_register(env
, SPR_EAR
, "EAR",
1069 SPR_NOACCESS
, SPR_NOACCESS
,
1070 &spr_read_generic
, &spr_write_generic
,
1074 /* SPR specific to PowerPC 603 implementation */
1075 static void gen_spr_603 (CPUPPCState
*env
)
1077 /* External access control */
1078 /* XXX : not implemented */
1079 spr_register(env
, SPR_EAR
, "EAR",
1080 SPR_NOACCESS
, SPR_NOACCESS
,
1081 &spr_read_generic
, &spr_write_generic
,
1085 /* SPR specific to PowerPC G2 implementation */
1086 static void gen_spr_G2 (CPUPPCState
*env
)
1088 /* Memory base address */
1090 /* XXX : not implemented */
1091 spr_register(env
, SPR_MBAR
, "MBAR",
1092 SPR_NOACCESS
, SPR_NOACCESS
,
1093 &spr_read_generic
, &spr_write_generic
,
1095 /* Exception processing */
1096 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1097 SPR_NOACCESS
, SPR_NOACCESS
,
1098 &spr_read_generic
, &spr_write_generic
,
1100 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1101 SPR_NOACCESS
, SPR_NOACCESS
,
1102 &spr_read_generic
, &spr_write_generic
,
1105 /* XXX : not implemented */
1106 spr_register(env
, SPR_DABR
, "DABR",
1107 SPR_NOACCESS
, SPR_NOACCESS
,
1108 &spr_read_generic
, &spr_write_generic
,
1110 /* XXX : not implemented */
1111 spr_register(env
, SPR_DABR2
, "DABR2",
1112 SPR_NOACCESS
, SPR_NOACCESS
,
1113 &spr_read_generic
, &spr_write_generic
,
1115 /* XXX : not implemented */
1116 spr_register(env
, SPR_IABR
, "IABR",
1117 SPR_NOACCESS
, SPR_NOACCESS
,
1118 &spr_read_generic
, &spr_write_generic
,
1120 /* XXX : not implemented */
1121 spr_register(env
, SPR_IABR2
, "IABR2",
1122 SPR_NOACCESS
, SPR_NOACCESS
,
1123 &spr_read_generic
, &spr_write_generic
,
1125 /* XXX : not implemented */
1126 spr_register(env
, SPR_IBCR
, "IBCR",
1127 SPR_NOACCESS
, SPR_NOACCESS
,
1128 &spr_read_generic
, &spr_write_generic
,
1130 /* XXX : not implemented */
1131 spr_register(env
, SPR_DBCR
, "DBCR",
1132 SPR_NOACCESS
, SPR_NOACCESS
,
1133 &spr_read_generic
, &spr_write_generic
,
1137 /* SPR specific to PowerPC 602 implementation */
1138 static void gen_spr_602 (CPUPPCState
*env
)
1141 /* XXX : not implemented */
1142 spr_register(env
, SPR_SER
, "SER",
1143 SPR_NOACCESS
, SPR_NOACCESS
,
1144 &spr_read_generic
, &spr_write_generic
,
1146 /* XXX : not implemented */
1147 spr_register(env
, SPR_SEBR
, "SEBR",
1148 SPR_NOACCESS
, SPR_NOACCESS
,
1149 &spr_read_generic
, &spr_write_generic
,
1151 /* XXX : not implemented */
1152 spr_register(env
, SPR_ESASRR
, "ESASRR",
1153 SPR_NOACCESS
, SPR_NOACCESS
,
1154 &spr_read_generic
, &spr_write_generic
,
1156 /* Floating point status */
1157 /* XXX : not implemented */
1158 spr_register(env
, SPR_SP
, "SP",
1159 SPR_NOACCESS
, SPR_NOACCESS
,
1160 &spr_read_generic
, &spr_write_generic
,
1162 /* XXX : not implemented */
1163 spr_register(env
, SPR_LT
, "LT",
1164 SPR_NOACCESS
, SPR_NOACCESS
,
1165 &spr_read_generic
, &spr_write_generic
,
1167 /* Watchdog timer */
1168 /* XXX : not implemented */
1169 spr_register(env
, SPR_TCR
, "TCR",
1170 SPR_NOACCESS
, SPR_NOACCESS
,
1171 &spr_read_generic
, &spr_write_generic
,
1173 /* Interrupt base */
1174 spr_register(env
, SPR_IBR
, "IBR",
1175 SPR_NOACCESS
, SPR_NOACCESS
,
1176 &spr_read_generic
, &spr_write_generic
,
1178 /* XXX : not implemented */
1179 spr_register(env
, SPR_IABR
, "IABR",
1180 SPR_NOACCESS
, SPR_NOACCESS
,
1181 &spr_read_generic
, &spr_write_generic
,
1185 /* SPR specific to PowerPC 601 implementation */
1186 static void gen_spr_601 (CPUPPCState
*env
)
1188 /* Multiplication/division register */
1190 spr_register(env
, SPR_MQ
, "MQ",
1191 &spr_read_generic
, &spr_write_generic
,
1192 &spr_read_generic
, &spr_write_generic
,
1195 spr_register(env
, SPR_601_RTCU
, "RTCU",
1196 SPR_NOACCESS
, SPR_NOACCESS
,
1197 SPR_NOACCESS
, &spr_write_601_rtcu
,
1199 spr_register(env
, SPR_601_VRTCU
, "RTCU",
1200 &spr_read_601_rtcu
, SPR_NOACCESS
,
1201 &spr_read_601_rtcu
, SPR_NOACCESS
,
1203 spr_register(env
, SPR_601_RTCL
, "RTCL",
1204 SPR_NOACCESS
, SPR_NOACCESS
,
1205 SPR_NOACCESS
, &spr_write_601_rtcl
,
1207 spr_register(env
, SPR_601_VRTCL
, "RTCL",
1208 &spr_read_601_rtcl
, SPR_NOACCESS
,
1209 &spr_read_601_rtcl
, SPR_NOACCESS
,
1213 spr_register(env
, SPR_601_UDECR
, "UDECR",
1214 &spr_read_decr
, SPR_NOACCESS
,
1215 &spr_read_decr
, SPR_NOACCESS
,
1218 /* External access control */
1219 /* XXX : not implemented */
1220 spr_register(env
, SPR_EAR
, "EAR",
1221 SPR_NOACCESS
, SPR_NOACCESS
,
1222 &spr_read_generic
, &spr_write_generic
,
1224 /* Memory management */
1225 #if !defined(CONFIG_USER_ONLY)
1226 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
1227 SPR_NOACCESS
, SPR_NOACCESS
,
1228 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1230 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
1231 SPR_NOACCESS
, SPR_NOACCESS
,
1232 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1234 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
1235 SPR_NOACCESS
, SPR_NOACCESS
,
1236 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1238 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
1239 SPR_NOACCESS
, SPR_NOACCESS
,
1240 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1242 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
1243 SPR_NOACCESS
, SPR_NOACCESS
,
1244 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1246 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
1247 SPR_NOACCESS
, SPR_NOACCESS
,
1248 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1250 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
1251 SPR_NOACCESS
, SPR_NOACCESS
,
1252 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1254 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
1255 SPR_NOACCESS
, SPR_NOACCESS
,
1256 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1262 static void gen_spr_74xx (CPUPPCState
*env
)
1264 /* Processor identification */
1265 spr_register(env
, SPR_PIR
, "PIR",
1266 SPR_NOACCESS
, SPR_NOACCESS
,
1267 &spr_read_generic
, &spr_write_pir
,
1269 /* XXX : not implemented */
1270 spr_register(env
, SPR_MMCR2
, "MMCR2",
1271 SPR_NOACCESS
, SPR_NOACCESS
,
1272 &spr_read_generic
, &spr_write_generic
,
1274 /* XXX : not implemented */
1275 spr_register(env
, SPR_UMMCR2
, "UMMCR2",
1276 &spr_read_ureg
, SPR_NOACCESS
,
1277 &spr_read_ureg
, SPR_NOACCESS
,
1279 /* XXX: not implemented */
1280 spr_register(env
, SPR_BAMR
, "BAMR",
1281 SPR_NOACCESS
, SPR_NOACCESS
,
1282 &spr_read_generic
, &spr_write_generic
,
1284 /* XXX : not implemented */
1285 spr_register(env
, SPR_MSSCR0
, "MSSCR0",
1286 SPR_NOACCESS
, SPR_NOACCESS
,
1287 &spr_read_generic
, &spr_write_generic
,
1289 /* Hardware implementation registers */
1290 /* XXX : not implemented */
1291 spr_register(env
, SPR_HID0
, "HID0",
1292 SPR_NOACCESS
, SPR_NOACCESS
,
1293 &spr_read_generic
, &spr_write_generic
,
1295 /* XXX : not implemented */
1296 spr_register(env
, SPR_HID1
, "HID1",
1297 SPR_NOACCESS
, SPR_NOACCESS
,
1298 &spr_read_generic
, &spr_write_generic
,
1301 spr_register(env
, SPR_VRSAVE
, "VRSAVE",
1302 &spr_read_generic
, &spr_write_generic
,
1303 &spr_read_generic
, &spr_write_generic
,
1305 /* XXX : not implemented */
1306 spr_register(env
, SPR_L2CR
, "L2CR",
1307 SPR_NOACCESS
, SPR_NOACCESS
,
1308 &spr_read_generic
, &spr_write_generic
,
1310 /* Not strictly an SPR */
1311 vscr_init(env
, 0x00010000);
1314 static void gen_l3_ctrl (CPUPPCState
*env
)
1317 /* XXX : not implemented */
1318 spr_register(env
, SPR_L3CR
, "L3CR",
1319 SPR_NOACCESS
, SPR_NOACCESS
,
1320 &spr_read_generic
, &spr_write_generic
,
1323 /* XXX : not implemented */
1324 spr_register(env
, SPR_L3ITCR0
, "L3ITCR0",
1325 SPR_NOACCESS
, SPR_NOACCESS
,
1326 &spr_read_generic
, &spr_write_generic
,
1329 /* XXX : not implemented */
1330 spr_register(env
, SPR_L3PM
, "L3PM",
1331 SPR_NOACCESS
, SPR_NOACCESS
,
1332 &spr_read_generic
, &spr_write_generic
,
1336 static void gen_74xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
1338 #if !defined(CONFIG_USER_ONLY)
1339 env
->nb_tlb
= nb_tlbs
;
1340 env
->nb_ways
= nb_ways
;
1342 env
->tlb_type
= TLB_6XX
;
1343 /* XXX : not implemented */
1344 spr_register(env
, SPR_PTEHI
, "PTEHI",
1345 SPR_NOACCESS
, SPR_NOACCESS
,
1346 &spr_read_generic
, &spr_write_generic
,
1348 /* XXX : not implemented */
1349 spr_register(env
, SPR_PTELO
, "PTELO",
1350 SPR_NOACCESS
, SPR_NOACCESS
,
1351 &spr_read_generic
, &spr_write_generic
,
1353 /* XXX : not implemented */
1354 spr_register(env
, SPR_TLBMISS
, "TLBMISS",
1355 SPR_NOACCESS
, SPR_NOACCESS
,
1356 &spr_read_generic
, &spr_write_generic
,
1361 #if !defined(CONFIG_USER_ONLY)
1362 static void spr_write_e500_l1csr0 (void *opaque
, int sprn
, int gprn
)
1364 TCGv t0
= tcg_temp_new();
1366 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], ~256);
1367 gen_store_spr(sprn
, t0
);
1371 static void spr_write_booke206_mmucsr0 (void *opaque
, int sprn
, int gprn
)
1373 TCGv_i32 t0
= tcg_const_i32(sprn
);
1374 gen_helper_booke206_tlbflush(t0
);
1375 tcg_temp_free_i32(t0
);
1378 static void spr_write_booke_pid (void *opaque
, int sprn
, int gprn
)
1380 TCGv_i32 t0
= tcg_const_i32(sprn
);
1381 gen_helper_booke_setpid(t0
, cpu_gpr
[gprn
]);
1382 tcg_temp_free_i32(t0
);
1386 static void gen_spr_usprgh (CPUPPCState
*env
)
1388 spr_register(env
, SPR_USPRG4
, "USPRG4",
1389 &spr_read_ureg
, SPR_NOACCESS
,
1390 &spr_read_ureg
, SPR_NOACCESS
,
1392 spr_register(env
, SPR_USPRG5
, "USPRG5",
1393 &spr_read_ureg
, SPR_NOACCESS
,
1394 &spr_read_ureg
, SPR_NOACCESS
,
1396 spr_register(env
, SPR_USPRG6
, "USPRG6",
1397 &spr_read_ureg
, SPR_NOACCESS
,
1398 &spr_read_ureg
, SPR_NOACCESS
,
1400 spr_register(env
, SPR_USPRG7
, "USPRG7",
1401 &spr_read_ureg
, SPR_NOACCESS
,
1402 &spr_read_ureg
, SPR_NOACCESS
,
1406 /* PowerPC BookE SPR */
1407 static void gen_spr_BookE (CPUPPCState
*env
, uint64_t ivor_mask
)
1409 const char *ivor_names
[64] = {
1410 "IVOR0", "IVOR1", "IVOR2", "IVOR3",
1411 "IVOR4", "IVOR5", "IVOR6", "IVOR7",
1412 "IVOR8", "IVOR9", "IVOR10", "IVOR11",
1413 "IVOR12", "IVOR13", "IVOR14", "IVOR15",
1414 "IVOR16", "IVOR17", "IVOR18", "IVOR19",
1415 "IVOR20", "IVOR21", "IVOR22", "IVOR23",
1416 "IVOR24", "IVOR25", "IVOR26", "IVOR27",
1417 "IVOR28", "IVOR29", "IVOR30", "IVOR31",
1418 "IVOR32", "IVOR33", "IVOR34", "IVOR35",
1419 "IVOR36", "IVOR37", "IVOR38", "IVOR39",
1420 "IVOR40", "IVOR41", "IVOR42", "IVOR43",
1421 "IVOR44", "IVOR45", "IVOR46", "IVOR47",
1422 "IVOR48", "IVOR49", "IVOR50", "IVOR51",
1423 "IVOR52", "IVOR53", "IVOR54", "IVOR55",
1424 "IVOR56", "IVOR57", "IVOR58", "IVOR59",
1425 "IVOR60", "IVOR61", "IVOR62", "IVOR63",
1427 #define SPR_BOOKE_IVORxx (-1)
1428 int ivor_sprn
[64] = {
1429 SPR_BOOKE_IVOR0
, SPR_BOOKE_IVOR1
, SPR_BOOKE_IVOR2
, SPR_BOOKE_IVOR3
,
1430 SPR_BOOKE_IVOR4
, SPR_BOOKE_IVOR5
, SPR_BOOKE_IVOR6
, SPR_BOOKE_IVOR7
,
1431 SPR_BOOKE_IVOR8
, SPR_BOOKE_IVOR9
, SPR_BOOKE_IVOR10
, SPR_BOOKE_IVOR11
,
1432 SPR_BOOKE_IVOR12
, SPR_BOOKE_IVOR13
, SPR_BOOKE_IVOR14
, SPR_BOOKE_IVOR15
,
1433 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1434 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1435 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1436 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1437 SPR_BOOKE_IVOR32
, SPR_BOOKE_IVOR33
, SPR_BOOKE_IVOR34
, SPR_BOOKE_IVOR35
,
1438 SPR_BOOKE_IVOR36
, SPR_BOOKE_IVOR37
, SPR_BOOKE_IVOR38
, SPR_BOOKE_IVOR39
,
1439 SPR_BOOKE_IVOR40
, SPR_BOOKE_IVOR41
, SPR_BOOKE_IVOR42
, SPR_BOOKE_IVORxx
,
1440 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1441 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1442 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1443 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1444 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1448 /* Interrupt processing */
1449 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1450 SPR_NOACCESS
, SPR_NOACCESS
,
1451 &spr_read_generic
, &spr_write_generic
,
1453 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1454 SPR_NOACCESS
, SPR_NOACCESS
,
1455 &spr_read_generic
, &spr_write_generic
,
1458 /* XXX : not implemented */
1459 spr_register(env
, SPR_BOOKE_IAC1
, "IAC1",
1460 SPR_NOACCESS
, SPR_NOACCESS
,
1461 &spr_read_generic
, &spr_write_generic
,
1463 /* XXX : not implemented */
1464 spr_register(env
, SPR_BOOKE_IAC2
, "IAC2",
1465 SPR_NOACCESS
, SPR_NOACCESS
,
1466 &spr_read_generic
, &spr_write_generic
,
1468 /* XXX : not implemented */
1469 spr_register(env
, SPR_BOOKE_DAC1
, "DAC1",
1470 SPR_NOACCESS
, SPR_NOACCESS
,
1471 &spr_read_generic
, &spr_write_generic
,
1473 /* XXX : not implemented */
1474 spr_register(env
, SPR_BOOKE_DAC2
, "DAC2",
1475 SPR_NOACCESS
, SPR_NOACCESS
,
1476 &spr_read_generic
, &spr_write_generic
,
1478 /* XXX : not implemented */
1479 spr_register(env
, SPR_BOOKE_DBCR0
, "DBCR0",
1480 SPR_NOACCESS
, SPR_NOACCESS
,
1481 &spr_read_generic
, &spr_write_generic
,
1483 /* XXX : not implemented */
1484 spr_register(env
, SPR_BOOKE_DBCR1
, "DBCR1",
1485 SPR_NOACCESS
, SPR_NOACCESS
,
1486 &spr_read_generic
, &spr_write_generic
,
1488 /* XXX : not implemented */
1489 spr_register(env
, SPR_BOOKE_DBCR2
, "DBCR2",
1490 SPR_NOACCESS
, SPR_NOACCESS
,
1491 &spr_read_generic
, &spr_write_generic
,
1493 /* XXX : not implemented */
1494 spr_register(env
, SPR_BOOKE_DBSR
, "DBSR",
1495 SPR_NOACCESS
, SPR_NOACCESS
,
1496 &spr_read_generic
, &spr_write_clear
,
1498 spr_register(env
, SPR_BOOKE_DEAR
, "DEAR",
1499 SPR_NOACCESS
, SPR_NOACCESS
,
1500 &spr_read_generic
, &spr_write_generic
,
1502 spr_register(env
, SPR_BOOKE_ESR
, "ESR",
1503 SPR_NOACCESS
, SPR_NOACCESS
,
1504 &spr_read_generic
, &spr_write_generic
,
1506 spr_register(env
, SPR_BOOKE_IVPR
, "IVPR",
1507 SPR_NOACCESS
, SPR_NOACCESS
,
1508 &spr_read_generic
, &spr_write_excp_prefix
,
1510 /* Exception vectors */
1511 for (i
= 0; i
< 64; i
++) {
1512 if (ivor_mask
& (1ULL << i
)) {
1513 if (ivor_sprn
[i
] == SPR_BOOKE_IVORxx
) {
1514 fprintf(stderr
, "ERROR: IVOR %d SPR is not defined\n", i
);
1517 spr_register(env
, ivor_sprn
[i
], ivor_names
[i
],
1518 SPR_NOACCESS
, SPR_NOACCESS
,
1519 &spr_read_generic
, &spr_write_excp_vector
,
1523 spr_register(env
, SPR_BOOKE_PID
, "PID",
1524 SPR_NOACCESS
, SPR_NOACCESS
,
1525 &spr_read_generic
, &spr_write_booke_pid
,
1527 spr_register(env
, SPR_BOOKE_TCR
, "TCR",
1528 SPR_NOACCESS
, SPR_NOACCESS
,
1529 &spr_read_generic
, &spr_write_booke_tcr
,
1531 spr_register(env
, SPR_BOOKE_TSR
, "TSR",
1532 SPR_NOACCESS
, SPR_NOACCESS
,
1533 &spr_read_generic
, &spr_write_booke_tsr
,
1536 spr_register(env
, SPR_DECR
, "DECR",
1537 SPR_NOACCESS
, SPR_NOACCESS
,
1538 &spr_read_decr
, &spr_write_decr
,
1540 spr_register(env
, SPR_BOOKE_DECAR
, "DECAR",
1541 SPR_NOACCESS
, SPR_NOACCESS
,
1542 SPR_NOACCESS
, &spr_write_generic
,
1545 spr_register(env
, SPR_USPRG0
, "USPRG0",
1546 &spr_read_generic
, &spr_write_generic
,
1547 &spr_read_generic
, &spr_write_generic
,
1549 spr_register(env
, SPR_SPRG4
, "SPRG4",
1550 SPR_NOACCESS
, SPR_NOACCESS
,
1551 &spr_read_generic
, &spr_write_generic
,
1553 spr_register(env
, SPR_SPRG5
, "SPRG5",
1554 SPR_NOACCESS
, SPR_NOACCESS
,
1555 &spr_read_generic
, &spr_write_generic
,
1557 spr_register(env
, SPR_SPRG6
, "SPRG6",
1558 SPR_NOACCESS
, SPR_NOACCESS
,
1559 &spr_read_generic
, &spr_write_generic
,
1561 spr_register(env
, SPR_SPRG7
, "SPRG7",
1562 SPR_NOACCESS
, SPR_NOACCESS
,
1563 &spr_read_generic
, &spr_write_generic
,
1567 static inline uint32_t gen_tlbncfg(uint32_t assoc
, uint32_t minsize
,
1568 uint32_t maxsize
, uint32_t flags
,
1571 return (assoc
<< TLBnCFG_ASSOC_SHIFT
) |
1572 (minsize
<< TLBnCFG_MINSIZE_SHIFT
) |
1573 (maxsize
<< TLBnCFG_MAXSIZE_SHIFT
) |
1577 /* BookE 2.06 storage control registers */
1578 static void gen_spr_BookE206(CPUPPCState
*env
, uint32_t mas_mask
,
1581 #if !defined(CONFIG_USER_ONLY)
1582 const char *mas_names
[8] = {
1583 "MAS0", "MAS1", "MAS2", "MAS3", "MAS4", "MAS5", "MAS6", "MAS7",
1586 SPR_BOOKE_MAS0
, SPR_BOOKE_MAS1
, SPR_BOOKE_MAS2
, SPR_BOOKE_MAS3
,
1587 SPR_BOOKE_MAS4
, SPR_BOOKE_MAS5
, SPR_BOOKE_MAS6
, SPR_BOOKE_MAS7
,
1591 /* TLB assist registers */
1592 /* XXX : not implemented */
1593 for (i
= 0; i
< 8; i
++) {
1594 if (mas_mask
& (1 << i
)) {
1595 spr_register(env
, mas_sprn
[i
], mas_names
[i
],
1596 SPR_NOACCESS
, SPR_NOACCESS
,
1597 &spr_read_generic
, &spr_write_generic
,
1601 if (env
->nb_pids
> 1) {
1602 /* XXX : not implemented */
1603 spr_register(env
, SPR_BOOKE_PID1
, "PID1",
1604 SPR_NOACCESS
, SPR_NOACCESS
,
1605 &spr_read_generic
, &spr_write_booke_pid
,
1608 if (env
->nb_pids
> 2) {
1609 /* XXX : not implemented */
1610 spr_register(env
, SPR_BOOKE_PID2
, "PID2",
1611 SPR_NOACCESS
, SPR_NOACCESS
,
1612 &spr_read_generic
, &spr_write_booke_pid
,
1615 /* XXX : not implemented */
1616 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
1617 SPR_NOACCESS
, SPR_NOACCESS
,
1618 &spr_read_generic
, SPR_NOACCESS
,
1619 0x00000000); /* TOFIX */
1620 switch (env
->nb_ways
) {
1622 spr_register(env
, SPR_BOOKE_TLB3CFG
, "TLB3CFG",
1623 SPR_NOACCESS
, SPR_NOACCESS
,
1624 &spr_read_generic
, SPR_NOACCESS
,
1628 spr_register(env
, SPR_BOOKE_TLB2CFG
, "TLB2CFG",
1629 SPR_NOACCESS
, SPR_NOACCESS
,
1630 &spr_read_generic
, SPR_NOACCESS
,
1634 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
1635 SPR_NOACCESS
, SPR_NOACCESS
,
1636 &spr_read_generic
, SPR_NOACCESS
,
1640 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
1641 SPR_NOACCESS
, SPR_NOACCESS
,
1642 &spr_read_generic
, SPR_NOACCESS
,
1651 gen_spr_usprgh(env
);
1654 /* SPR specific to PowerPC 440 implementation */
1655 static void gen_spr_440 (CPUPPCState
*env
)
1658 /* XXX : not implemented */
1659 spr_register(env
, SPR_440_DNV0
, "DNV0",
1660 SPR_NOACCESS
, SPR_NOACCESS
,
1661 &spr_read_generic
, &spr_write_generic
,
1663 /* XXX : not implemented */
1664 spr_register(env
, SPR_440_DNV1
, "DNV1",
1665 SPR_NOACCESS
, SPR_NOACCESS
,
1666 &spr_read_generic
, &spr_write_generic
,
1668 /* XXX : not implemented */
1669 spr_register(env
, SPR_440_DNV2
, "DNV2",
1670 SPR_NOACCESS
, SPR_NOACCESS
,
1671 &spr_read_generic
, &spr_write_generic
,
1673 /* XXX : not implemented */
1674 spr_register(env
, SPR_440_DNV3
, "DNV3",
1675 SPR_NOACCESS
, SPR_NOACCESS
,
1676 &spr_read_generic
, &spr_write_generic
,
1678 /* XXX : not implemented */
1679 spr_register(env
, SPR_440_DTV0
, "DTV0",
1680 SPR_NOACCESS
, SPR_NOACCESS
,
1681 &spr_read_generic
, &spr_write_generic
,
1683 /* XXX : not implemented */
1684 spr_register(env
, SPR_440_DTV1
, "DTV1",
1685 SPR_NOACCESS
, SPR_NOACCESS
,
1686 &spr_read_generic
, &spr_write_generic
,
1688 /* XXX : not implemented */
1689 spr_register(env
, SPR_440_DTV2
, "DTV2",
1690 SPR_NOACCESS
, SPR_NOACCESS
,
1691 &spr_read_generic
, &spr_write_generic
,
1693 /* XXX : not implemented */
1694 spr_register(env
, SPR_440_DTV3
, "DTV3",
1695 SPR_NOACCESS
, SPR_NOACCESS
,
1696 &spr_read_generic
, &spr_write_generic
,
1698 /* XXX : not implemented */
1699 spr_register(env
, SPR_440_DVLIM
, "DVLIM",
1700 SPR_NOACCESS
, SPR_NOACCESS
,
1701 &spr_read_generic
, &spr_write_generic
,
1703 /* XXX : not implemented */
1704 spr_register(env
, SPR_440_INV0
, "INV0",
1705 SPR_NOACCESS
, SPR_NOACCESS
,
1706 &spr_read_generic
, &spr_write_generic
,
1708 /* XXX : not implemented */
1709 spr_register(env
, SPR_440_INV1
, "INV1",
1710 SPR_NOACCESS
, SPR_NOACCESS
,
1711 &spr_read_generic
, &spr_write_generic
,
1713 /* XXX : not implemented */
1714 spr_register(env
, SPR_440_INV2
, "INV2",
1715 SPR_NOACCESS
, SPR_NOACCESS
,
1716 &spr_read_generic
, &spr_write_generic
,
1718 /* XXX : not implemented */
1719 spr_register(env
, SPR_440_INV3
, "INV3",
1720 SPR_NOACCESS
, SPR_NOACCESS
,
1721 &spr_read_generic
, &spr_write_generic
,
1723 /* XXX : not implemented */
1724 spr_register(env
, SPR_440_ITV0
, "ITV0",
1725 SPR_NOACCESS
, SPR_NOACCESS
,
1726 &spr_read_generic
, &spr_write_generic
,
1728 /* XXX : not implemented */
1729 spr_register(env
, SPR_440_ITV1
, "ITV1",
1730 SPR_NOACCESS
, SPR_NOACCESS
,
1731 &spr_read_generic
, &spr_write_generic
,
1733 /* XXX : not implemented */
1734 spr_register(env
, SPR_440_ITV2
, "ITV2",
1735 SPR_NOACCESS
, SPR_NOACCESS
,
1736 &spr_read_generic
, &spr_write_generic
,
1738 /* XXX : not implemented */
1739 spr_register(env
, SPR_440_ITV3
, "ITV3",
1740 SPR_NOACCESS
, SPR_NOACCESS
,
1741 &spr_read_generic
, &spr_write_generic
,
1743 /* XXX : not implemented */
1744 spr_register(env
, SPR_440_IVLIM
, "IVLIM",
1745 SPR_NOACCESS
, SPR_NOACCESS
,
1746 &spr_read_generic
, &spr_write_generic
,
1749 /* XXX : not implemented */
1750 spr_register(env
, SPR_BOOKE_DCDBTRH
, "DCDBTRH",
1751 SPR_NOACCESS
, SPR_NOACCESS
,
1752 &spr_read_generic
, SPR_NOACCESS
,
1754 /* XXX : not implemented */
1755 spr_register(env
, SPR_BOOKE_DCDBTRL
, "DCDBTRL",
1756 SPR_NOACCESS
, SPR_NOACCESS
,
1757 &spr_read_generic
, SPR_NOACCESS
,
1759 /* XXX : not implemented */
1760 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1761 SPR_NOACCESS
, SPR_NOACCESS
,
1762 &spr_read_generic
, SPR_NOACCESS
,
1764 /* XXX : not implemented */
1765 spr_register(env
, SPR_BOOKE_ICDBTRH
, "ICDBTRH",
1766 SPR_NOACCESS
, SPR_NOACCESS
,
1767 &spr_read_generic
, SPR_NOACCESS
,
1769 /* XXX : not implemented */
1770 spr_register(env
, SPR_BOOKE_ICDBTRL
, "ICDBTRL",
1771 SPR_NOACCESS
, SPR_NOACCESS
,
1772 &spr_read_generic
, SPR_NOACCESS
,
1774 /* XXX : not implemented */
1775 spr_register(env
, SPR_440_DBDR
, "DBDR",
1776 SPR_NOACCESS
, SPR_NOACCESS
,
1777 &spr_read_generic
, &spr_write_generic
,
1779 /* Processor control */
1780 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1781 SPR_NOACCESS
, SPR_NOACCESS
,
1782 &spr_read_generic
, &spr_write_generic
,
1784 spr_register(env
, SPR_440_RSTCFG
, "RSTCFG",
1785 SPR_NOACCESS
, SPR_NOACCESS
,
1786 &spr_read_generic
, SPR_NOACCESS
,
1788 /* Storage control */
1789 spr_register(env
, SPR_440_MMUCR
, "MMUCR",
1790 SPR_NOACCESS
, SPR_NOACCESS
,
1791 &spr_read_generic
, &spr_write_generic
,
1795 /* SPR shared between PowerPC 40x implementations */
1796 static void gen_spr_40x (CPUPPCState
*env
)
1799 /* not emulated, as Qemu do not emulate caches */
1800 spr_register(env
, SPR_40x_DCCR
, "DCCR",
1801 SPR_NOACCESS
, SPR_NOACCESS
,
1802 &spr_read_generic
, &spr_write_generic
,
1804 /* not emulated, as Qemu do not emulate caches */
1805 spr_register(env
, SPR_40x_ICCR
, "ICCR",
1806 SPR_NOACCESS
, SPR_NOACCESS
,
1807 &spr_read_generic
, &spr_write_generic
,
1809 /* not emulated, as Qemu do not emulate caches */
1810 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1811 SPR_NOACCESS
, SPR_NOACCESS
,
1812 &spr_read_generic
, SPR_NOACCESS
,
1815 spr_register(env
, SPR_40x_DEAR
, "DEAR",
1816 SPR_NOACCESS
, SPR_NOACCESS
,
1817 &spr_read_generic
, &spr_write_generic
,
1819 spr_register(env
, SPR_40x_ESR
, "ESR",
1820 SPR_NOACCESS
, SPR_NOACCESS
,
1821 &spr_read_generic
, &spr_write_generic
,
1823 spr_register(env
, SPR_40x_EVPR
, "EVPR",
1824 SPR_NOACCESS
, SPR_NOACCESS
,
1825 &spr_read_generic
, &spr_write_excp_prefix
,
1827 spr_register(env
, SPR_40x_SRR2
, "SRR2",
1828 &spr_read_generic
, &spr_write_generic
,
1829 &spr_read_generic
, &spr_write_generic
,
1831 spr_register(env
, SPR_40x_SRR3
, "SRR3",
1832 &spr_read_generic
, &spr_write_generic
,
1833 &spr_read_generic
, &spr_write_generic
,
1836 spr_register(env
, SPR_40x_PIT
, "PIT",
1837 SPR_NOACCESS
, SPR_NOACCESS
,
1838 &spr_read_40x_pit
, &spr_write_40x_pit
,
1840 spr_register(env
, SPR_40x_TCR
, "TCR",
1841 SPR_NOACCESS
, SPR_NOACCESS
,
1842 &spr_read_generic
, &spr_write_booke_tcr
,
1844 spr_register(env
, SPR_40x_TSR
, "TSR",
1845 SPR_NOACCESS
, SPR_NOACCESS
,
1846 &spr_read_generic
, &spr_write_booke_tsr
,
1850 /* SPR specific to PowerPC 405 implementation */
1851 static void gen_spr_405 (CPUPPCState
*env
)
1854 spr_register(env
, SPR_40x_PID
, "PID",
1855 SPR_NOACCESS
, SPR_NOACCESS
,
1856 &spr_read_generic
, &spr_write_generic
,
1858 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1859 SPR_NOACCESS
, SPR_NOACCESS
,
1860 &spr_read_generic
, &spr_write_generic
,
1862 /* Debug interface */
1863 /* XXX : not implemented */
1864 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
1865 SPR_NOACCESS
, SPR_NOACCESS
,
1866 &spr_read_generic
, &spr_write_40x_dbcr0
,
1868 /* XXX : not implemented */
1869 spr_register(env
, SPR_405_DBCR1
, "DBCR1",
1870 SPR_NOACCESS
, SPR_NOACCESS
,
1871 &spr_read_generic
, &spr_write_generic
,
1873 /* XXX : not implemented */
1874 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1875 SPR_NOACCESS
, SPR_NOACCESS
,
1876 &spr_read_generic
, &spr_write_clear
,
1877 /* Last reset was system reset */
1879 /* XXX : not implemented */
1880 spr_register(env
, SPR_40x_DAC1
, "DAC1",
1881 SPR_NOACCESS
, SPR_NOACCESS
,
1882 &spr_read_generic
, &spr_write_generic
,
1884 spr_register(env
, SPR_40x_DAC2
, "DAC2",
1885 SPR_NOACCESS
, SPR_NOACCESS
,
1886 &spr_read_generic
, &spr_write_generic
,
1888 /* XXX : not implemented */
1889 spr_register(env
, SPR_405_DVC1
, "DVC1",
1890 SPR_NOACCESS
, SPR_NOACCESS
,
1891 &spr_read_generic
, &spr_write_generic
,
1893 /* XXX : not implemented */
1894 spr_register(env
, SPR_405_DVC2
, "DVC2",
1895 SPR_NOACCESS
, SPR_NOACCESS
,
1896 &spr_read_generic
, &spr_write_generic
,
1898 /* XXX : not implemented */
1899 spr_register(env
, SPR_40x_IAC1
, "IAC1",
1900 SPR_NOACCESS
, SPR_NOACCESS
,
1901 &spr_read_generic
, &spr_write_generic
,
1903 spr_register(env
, SPR_40x_IAC2
, "IAC2",
1904 SPR_NOACCESS
, SPR_NOACCESS
,
1905 &spr_read_generic
, &spr_write_generic
,
1907 /* XXX : not implemented */
1908 spr_register(env
, SPR_405_IAC3
, "IAC3",
1909 SPR_NOACCESS
, SPR_NOACCESS
,
1910 &spr_read_generic
, &spr_write_generic
,
1912 /* XXX : not implemented */
1913 spr_register(env
, SPR_405_IAC4
, "IAC4",
1914 SPR_NOACCESS
, SPR_NOACCESS
,
1915 &spr_read_generic
, &spr_write_generic
,
1917 /* Storage control */
1918 /* XXX: TODO: not implemented */
1919 spr_register(env
, SPR_405_SLER
, "SLER",
1920 SPR_NOACCESS
, SPR_NOACCESS
,
1921 &spr_read_generic
, &spr_write_40x_sler
,
1923 spr_register(env
, SPR_40x_ZPR
, "ZPR",
1924 SPR_NOACCESS
, SPR_NOACCESS
,
1925 &spr_read_generic
, &spr_write_generic
,
1927 /* XXX : not implemented */
1928 spr_register(env
, SPR_405_SU0R
, "SU0R",
1929 SPR_NOACCESS
, SPR_NOACCESS
,
1930 &spr_read_generic
, &spr_write_generic
,
1933 spr_register(env
, SPR_USPRG0
, "USPRG0",
1934 &spr_read_ureg
, SPR_NOACCESS
,
1935 &spr_read_ureg
, SPR_NOACCESS
,
1937 spr_register(env
, SPR_SPRG4
, "SPRG4",
1938 SPR_NOACCESS
, SPR_NOACCESS
,
1939 &spr_read_generic
, &spr_write_generic
,
1941 spr_register(env
, SPR_SPRG5
, "SPRG5",
1942 SPR_NOACCESS
, SPR_NOACCESS
,
1943 spr_read_generic
, &spr_write_generic
,
1945 spr_register(env
, SPR_SPRG6
, "SPRG6",
1946 SPR_NOACCESS
, SPR_NOACCESS
,
1947 spr_read_generic
, &spr_write_generic
,
1949 spr_register(env
, SPR_SPRG7
, "SPRG7",
1950 SPR_NOACCESS
, SPR_NOACCESS
,
1951 spr_read_generic
, &spr_write_generic
,
1953 gen_spr_usprgh(env
);
1956 /* SPR shared between PowerPC 401 & 403 implementations */
1957 static void gen_spr_401_403 (CPUPPCState
*env
)
1960 spr_register(env
, SPR_403_VTBL
, "TBL",
1961 &spr_read_tbl
, SPR_NOACCESS
,
1962 &spr_read_tbl
, SPR_NOACCESS
,
1964 spr_register(env
, SPR_403_TBL
, "TBL",
1965 SPR_NOACCESS
, SPR_NOACCESS
,
1966 SPR_NOACCESS
, &spr_write_tbl
,
1968 spr_register(env
, SPR_403_VTBU
, "TBU",
1969 &spr_read_tbu
, SPR_NOACCESS
,
1970 &spr_read_tbu
, SPR_NOACCESS
,
1972 spr_register(env
, SPR_403_TBU
, "TBU",
1973 SPR_NOACCESS
, SPR_NOACCESS
,
1974 SPR_NOACCESS
, &spr_write_tbu
,
1977 /* not emulated, as Qemu do not emulate caches */
1978 spr_register(env
, SPR_403_CDBCR
, "CDBCR",
1979 SPR_NOACCESS
, SPR_NOACCESS
,
1980 &spr_read_generic
, &spr_write_generic
,
1984 /* SPR specific to PowerPC 401 implementation */
1985 static void gen_spr_401 (CPUPPCState
*env
)
1987 /* Debug interface */
1988 /* XXX : not implemented */
1989 spr_register(env
, SPR_40x_DBCR0
, "DBCR",
1990 SPR_NOACCESS
, SPR_NOACCESS
,
1991 &spr_read_generic
, &spr_write_40x_dbcr0
,
1993 /* XXX : not implemented */
1994 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1995 SPR_NOACCESS
, SPR_NOACCESS
,
1996 &spr_read_generic
, &spr_write_clear
,
1997 /* Last reset was system reset */
1999 /* XXX : not implemented */
2000 spr_register(env
, SPR_40x_DAC1
, "DAC",
2001 SPR_NOACCESS
, SPR_NOACCESS
,
2002 &spr_read_generic
, &spr_write_generic
,
2004 /* XXX : not implemented */
2005 spr_register(env
, SPR_40x_IAC1
, "IAC",
2006 SPR_NOACCESS
, SPR_NOACCESS
,
2007 &spr_read_generic
, &spr_write_generic
,
2009 /* Storage control */
2010 /* XXX: TODO: not implemented */
2011 spr_register(env
, SPR_405_SLER
, "SLER",
2012 SPR_NOACCESS
, SPR_NOACCESS
,
2013 &spr_read_generic
, &spr_write_40x_sler
,
2015 /* not emulated, as Qemu never does speculative access */
2016 spr_register(env
, SPR_40x_SGR
, "SGR",
2017 SPR_NOACCESS
, SPR_NOACCESS
,
2018 &spr_read_generic
, &spr_write_generic
,
2020 /* not emulated, as Qemu do not emulate caches */
2021 spr_register(env
, SPR_40x_DCWR
, "DCWR",
2022 SPR_NOACCESS
, SPR_NOACCESS
,
2023 &spr_read_generic
, &spr_write_generic
,
2027 static void gen_spr_401x2 (CPUPPCState
*env
)
2030 spr_register(env
, SPR_40x_PID
, "PID",
2031 SPR_NOACCESS
, SPR_NOACCESS
,
2032 &spr_read_generic
, &spr_write_generic
,
2034 spr_register(env
, SPR_40x_ZPR
, "ZPR",
2035 SPR_NOACCESS
, SPR_NOACCESS
,
2036 &spr_read_generic
, &spr_write_generic
,
2040 /* SPR specific to PowerPC 403 implementation */
2041 static void gen_spr_403 (CPUPPCState
*env
)
2043 /* Debug interface */
2044 /* XXX : not implemented */
2045 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
2046 SPR_NOACCESS
, SPR_NOACCESS
,
2047 &spr_read_generic
, &spr_write_40x_dbcr0
,
2049 /* XXX : not implemented */
2050 spr_register(env
, SPR_40x_DBSR
, "DBSR",
2051 SPR_NOACCESS
, SPR_NOACCESS
,
2052 &spr_read_generic
, &spr_write_clear
,
2053 /* Last reset was system reset */
2055 /* XXX : not implemented */
2056 spr_register(env
, SPR_40x_DAC1
, "DAC1",
2057 SPR_NOACCESS
, SPR_NOACCESS
,
2058 &spr_read_generic
, &spr_write_generic
,
2060 /* XXX : not implemented */
2061 spr_register(env
, SPR_40x_DAC2
, "DAC2",
2062 SPR_NOACCESS
, SPR_NOACCESS
,
2063 &spr_read_generic
, &spr_write_generic
,
2065 /* XXX : not implemented */
2066 spr_register(env
, SPR_40x_IAC1
, "IAC1",
2067 SPR_NOACCESS
, SPR_NOACCESS
,
2068 &spr_read_generic
, &spr_write_generic
,
2070 /* XXX : not implemented */
2071 spr_register(env
, SPR_40x_IAC2
, "IAC2",
2072 SPR_NOACCESS
, SPR_NOACCESS
,
2073 &spr_read_generic
, &spr_write_generic
,
2077 static void gen_spr_403_real (CPUPPCState
*env
)
2079 spr_register(env
, SPR_403_PBL1
, "PBL1",
2080 SPR_NOACCESS
, SPR_NOACCESS
,
2081 &spr_read_403_pbr
, &spr_write_403_pbr
,
2083 spr_register(env
, SPR_403_PBU1
, "PBU1",
2084 SPR_NOACCESS
, SPR_NOACCESS
,
2085 &spr_read_403_pbr
, &spr_write_403_pbr
,
2087 spr_register(env
, SPR_403_PBL2
, "PBL2",
2088 SPR_NOACCESS
, SPR_NOACCESS
,
2089 &spr_read_403_pbr
, &spr_write_403_pbr
,
2091 spr_register(env
, SPR_403_PBU2
, "PBU2",
2092 SPR_NOACCESS
, SPR_NOACCESS
,
2093 &spr_read_403_pbr
, &spr_write_403_pbr
,
2097 static void gen_spr_403_mmu (CPUPPCState
*env
)
2100 spr_register(env
, SPR_40x_PID
, "PID",
2101 SPR_NOACCESS
, SPR_NOACCESS
,
2102 &spr_read_generic
, &spr_write_generic
,
2104 spr_register(env
, SPR_40x_ZPR
, "ZPR",
2105 SPR_NOACCESS
, SPR_NOACCESS
,
2106 &spr_read_generic
, &spr_write_generic
,
2110 /* SPR specific to PowerPC compression coprocessor extension */
2111 static void gen_spr_compress (CPUPPCState
*env
)
2113 /* XXX : not implemented */
2114 spr_register(env
, SPR_401_SKR
, "SKR",
2115 SPR_NOACCESS
, SPR_NOACCESS
,
2116 &spr_read_generic
, &spr_write_generic
,
2120 #if defined (TARGET_PPC64)
2121 /* SPR specific to PowerPC 620 */
2122 static void gen_spr_620 (CPUPPCState
*env
)
2124 /* Processor identification */
2125 spr_register(env
, SPR_PIR
, "PIR",
2126 SPR_NOACCESS
, SPR_NOACCESS
,
2127 &spr_read_generic
, &spr_write_pir
,
2129 spr_register(env
, SPR_ASR
, "ASR",
2130 SPR_NOACCESS
, SPR_NOACCESS
,
2131 &spr_read_asr
, &spr_write_asr
,
2134 /* XXX : not implemented */
2135 spr_register(env
, SPR_IABR
, "IABR",
2136 SPR_NOACCESS
, SPR_NOACCESS
,
2137 &spr_read_generic
, &spr_write_generic
,
2139 /* XXX : not implemented */
2140 spr_register(env
, SPR_DABR
, "DABR",
2141 SPR_NOACCESS
, SPR_NOACCESS
,
2142 &spr_read_generic
, &spr_write_generic
,
2144 /* XXX : not implemented */
2145 spr_register(env
, SPR_SIAR
, "SIAR",
2146 SPR_NOACCESS
, SPR_NOACCESS
,
2147 &spr_read_generic
, SPR_NOACCESS
,
2149 /* XXX : not implemented */
2150 spr_register(env
, SPR_SDA
, "SDA",
2151 SPR_NOACCESS
, SPR_NOACCESS
,
2152 &spr_read_generic
, SPR_NOACCESS
,
2154 /* XXX : not implemented */
2155 spr_register(env
, SPR_620_PMC1R
, "PMC1",
2156 SPR_NOACCESS
, SPR_NOACCESS
,
2157 &spr_read_generic
, SPR_NOACCESS
,
2159 spr_register(env
, SPR_620_PMC1W
, "PMC1",
2160 SPR_NOACCESS
, SPR_NOACCESS
,
2161 SPR_NOACCESS
, &spr_write_generic
,
2163 /* XXX : not implemented */
2164 spr_register(env
, SPR_620_PMC2R
, "PMC2",
2165 SPR_NOACCESS
, SPR_NOACCESS
,
2166 &spr_read_generic
, SPR_NOACCESS
,
2168 spr_register(env
, SPR_620_PMC2W
, "PMC2",
2169 SPR_NOACCESS
, SPR_NOACCESS
,
2170 SPR_NOACCESS
, &spr_write_generic
,
2172 /* XXX : not implemented */
2173 spr_register(env
, SPR_620_MMCR0R
, "MMCR0",
2174 SPR_NOACCESS
, SPR_NOACCESS
,
2175 &spr_read_generic
, SPR_NOACCESS
,
2177 spr_register(env
, SPR_620_MMCR0W
, "MMCR0",
2178 SPR_NOACCESS
, SPR_NOACCESS
,
2179 SPR_NOACCESS
, &spr_write_generic
,
2181 /* External access control */
2182 /* XXX : not implemented */
2183 spr_register(env
, SPR_EAR
, "EAR",
2184 SPR_NOACCESS
, SPR_NOACCESS
,
2185 &spr_read_generic
, &spr_write_generic
,
2187 #if 0 // XXX: check this
2188 /* XXX : not implemented */
2189 spr_register(env
, SPR_620_PMR0
, "PMR0",
2190 SPR_NOACCESS
, SPR_NOACCESS
,
2191 &spr_read_generic
, &spr_write_generic
,
2193 /* XXX : not implemented */
2194 spr_register(env
, SPR_620_PMR1
, "PMR1",
2195 SPR_NOACCESS
, SPR_NOACCESS
,
2196 &spr_read_generic
, &spr_write_generic
,
2198 /* XXX : not implemented */
2199 spr_register(env
, SPR_620_PMR2
, "PMR2",
2200 SPR_NOACCESS
, SPR_NOACCESS
,
2201 &spr_read_generic
, &spr_write_generic
,
2203 /* XXX : not implemented */
2204 spr_register(env
, SPR_620_PMR3
, "PMR3",
2205 SPR_NOACCESS
, SPR_NOACCESS
,
2206 &spr_read_generic
, &spr_write_generic
,
2208 /* XXX : not implemented */
2209 spr_register(env
, SPR_620_PMR4
, "PMR4",
2210 SPR_NOACCESS
, SPR_NOACCESS
,
2211 &spr_read_generic
, &spr_write_generic
,
2213 /* XXX : not implemented */
2214 spr_register(env
, SPR_620_PMR5
, "PMR5",
2215 SPR_NOACCESS
, SPR_NOACCESS
,
2216 &spr_read_generic
, &spr_write_generic
,
2218 /* XXX : not implemented */
2219 spr_register(env
, SPR_620_PMR6
, "PMR6",
2220 SPR_NOACCESS
, SPR_NOACCESS
,
2221 &spr_read_generic
, &spr_write_generic
,
2223 /* XXX : not implemented */
2224 spr_register(env
, SPR_620_PMR7
, "PMR7",
2225 SPR_NOACCESS
, SPR_NOACCESS
,
2226 &spr_read_generic
, &spr_write_generic
,
2228 /* XXX : not implemented */
2229 spr_register(env
, SPR_620_PMR8
, "PMR8",
2230 SPR_NOACCESS
, SPR_NOACCESS
,
2231 &spr_read_generic
, &spr_write_generic
,
2233 /* XXX : not implemented */
2234 spr_register(env
, SPR_620_PMR9
, "PMR9",
2235 SPR_NOACCESS
, SPR_NOACCESS
,
2236 &spr_read_generic
, &spr_write_generic
,
2238 /* XXX : not implemented */
2239 spr_register(env
, SPR_620_PMRA
, "PMR10",
2240 SPR_NOACCESS
, SPR_NOACCESS
,
2241 &spr_read_generic
, &spr_write_generic
,
2243 /* XXX : not implemented */
2244 spr_register(env
, SPR_620_PMRB
, "PMR11",
2245 SPR_NOACCESS
, SPR_NOACCESS
,
2246 &spr_read_generic
, &spr_write_generic
,
2248 /* XXX : not implemented */
2249 spr_register(env
, SPR_620_PMRC
, "PMR12",
2250 SPR_NOACCESS
, SPR_NOACCESS
,
2251 &spr_read_generic
, &spr_write_generic
,
2253 /* XXX : not implemented */
2254 spr_register(env
, SPR_620_PMRD
, "PMR13",
2255 SPR_NOACCESS
, SPR_NOACCESS
,
2256 &spr_read_generic
, &spr_write_generic
,
2258 /* XXX : not implemented */
2259 spr_register(env
, SPR_620_PMRE
, "PMR14",
2260 SPR_NOACCESS
, SPR_NOACCESS
,
2261 &spr_read_generic
, &spr_write_generic
,
2263 /* XXX : not implemented */
2264 spr_register(env
, SPR_620_PMRF
, "PMR15",
2265 SPR_NOACCESS
, SPR_NOACCESS
,
2266 &spr_read_generic
, &spr_write_generic
,
2269 /* XXX : not implemented */
2270 spr_register(env
, SPR_620_BUSCSR
, "BUSCSR",
2271 SPR_NOACCESS
, SPR_NOACCESS
,
2272 &spr_read_generic
, &spr_write_generic
,
2274 /* XXX : not implemented */
2275 spr_register(env
, SPR_620_L2CR
, "L2CR",
2276 SPR_NOACCESS
, SPR_NOACCESS
,
2277 &spr_read_generic
, &spr_write_generic
,
2279 /* XXX : not implemented */
2280 spr_register(env
, SPR_620_L2SR
, "L2SR",
2281 SPR_NOACCESS
, SPR_NOACCESS
,
2282 &spr_read_generic
, &spr_write_generic
,
2285 #endif /* defined (TARGET_PPC64) */
2287 static void gen_spr_5xx_8xx (CPUPPCState
*env
)
2289 /* Exception processing */
2290 spr_register(env
, SPR_DSISR
, "DSISR",
2291 SPR_NOACCESS
, SPR_NOACCESS
,
2292 &spr_read_generic
, &spr_write_generic
,
2294 spr_register(env
, SPR_DAR
, "DAR",
2295 SPR_NOACCESS
, SPR_NOACCESS
,
2296 &spr_read_generic
, &spr_write_generic
,
2299 spr_register(env
, SPR_DECR
, "DECR",
2300 SPR_NOACCESS
, SPR_NOACCESS
,
2301 &spr_read_decr
, &spr_write_decr
,
2303 /* XXX : not implemented */
2304 spr_register(env
, SPR_MPC_EIE
, "EIE",
2305 SPR_NOACCESS
, SPR_NOACCESS
,
2306 &spr_read_generic
, &spr_write_generic
,
2308 /* XXX : not implemented */
2309 spr_register(env
, SPR_MPC_EID
, "EID",
2310 SPR_NOACCESS
, SPR_NOACCESS
,
2311 &spr_read_generic
, &spr_write_generic
,
2313 /* XXX : not implemented */
2314 spr_register(env
, SPR_MPC_NRI
, "NRI",
2315 SPR_NOACCESS
, SPR_NOACCESS
,
2316 &spr_read_generic
, &spr_write_generic
,
2318 /* XXX : not implemented */
2319 spr_register(env
, SPR_MPC_CMPA
, "CMPA",
2320 SPR_NOACCESS
, SPR_NOACCESS
,
2321 &spr_read_generic
, &spr_write_generic
,
2323 /* XXX : not implemented */
2324 spr_register(env
, SPR_MPC_CMPB
, "CMPB",
2325 SPR_NOACCESS
, SPR_NOACCESS
,
2326 &spr_read_generic
, &spr_write_generic
,
2328 /* XXX : not implemented */
2329 spr_register(env
, SPR_MPC_CMPC
, "CMPC",
2330 SPR_NOACCESS
, SPR_NOACCESS
,
2331 &spr_read_generic
, &spr_write_generic
,
2333 /* XXX : not implemented */
2334 spr_register(env
, SPR_MPC_CMPD
, "CMPD",
2335 SPR_NOACCESS
, SPR_NOACCESS
,
2336 &spr_read_generic
, &spr_write_generic
,
2338 /* XXX : not implemented */
2339 spr_register(env
, SPR_MPC_ECR
, "ECR",
2340 SPR_NOACCESS
, SPR_NOACCESS
,
2341 &spr_read_generic
, &spr_write_generic
,
2343 /* XXX : not implemented */
2344 spr_register(env
, SPR_MPC_DER
, "DER",
2345 SPR_NOACCESS
, SPR_NOACCESS
,
2346 &spr_read_generic
, &spr_write_generic
,
2348 /* XXX : not implemented */
2349 spr_register(env
, SPR_MPC_COUNTA
, "COUNTA",
2350 SPR_NOACCESS
, SPR_NOACCESS
,
2351 &spr_read_generic
, &spr_write_generic
,
2353 /* XXX : not implemented */
2354 spr_register(env
, SPR_MPC_COUNTB
, "COUNTB",
2355 SPR_NOACCESS
, SPR_NOACCESS
,
2356 &spr_read_generic
, &spr_write_generic
,
2358 /* XXX : not implemented */
2359 spr_register(env
, SPR_MPC_CMPE
, "CMPE",
2360 SPR_NOACCESS
, SPR_NOACCESS
,
2361 &spr_read_generic
, &spr_write_generic
,
2363 /* XXX : not implemented */
2364 spr_register(env
, SPR_MPC_CMPF
, "CMPF",
2365 SPR_NOACCESS
, SPR_NOACCESS
,
2366 &spr_read_generic
, &spr_write_generic
,
2368 /* XXX : not implemented */
2369 spr_register(env
, SPR_MPC_CMPG
, "CMPG",
2370 SPR_NOACCESS
, SPR_NOACCESS
,
2371 &spr_read_generic
, &spr_write_generic
,
2373 /* XXX : not implemented */
2374 spr_register(env
, SPR_MPC_CMPH
, "CMPH",
2375 SPR_NOACCESS
, SPR_NOACCESS
,
2376 &spr_read_generic
, &spr_write_generic
,
2378 /* XXX : not implemented */
2379 spr_register(env
, SPR_MPC_LCTRL1
, "LCTRL1",
2380 SPR_NOACCESS
, SPR_NOACCESS
,
2381 &spr_read_generic
, &spr_write_generic
,
2383 /* XXX : not implemented */
2384 spr_register(env
, SPR_MPC_LCTRL2
, "LCTRL2",
2385 SPR_NOACCESS
, SPR_NOACCESS
,
2386 &spr_read_generic
, &spr_write_generic
,
2388 /* XXX : not implemented */
2389 spr_register(env
, SPR_MPC_BAR
, "BAR",
2390 SPR_NOACCESS
, SPR_NOACCESS
,
2391 &spr_read_generic
, &spr_write_generic
,
2393 /* XXX : not implemented */
2394 spr_register(env
, SPR_MPC_DPDR
, "DPDR",
2395 SPR_NOACCESS
, SPR_NOACCESS
,
2396 &spr_read_generic
, &spr_write_generic
,
2398 /* XXX : not implemented */
2399 spr_register(env
, SPR_MPC_IMMR
, "IMMR",
2400 SPR_NOACCESS
, SPR_NOACCESS
,
2401 &spr_read_generic
, &spr_write_generic
,
2405 static void gen_spr_5xx (CPUPPCState
*env
)
2407 /* XXX : not implemented */
2408 spr_register(env
, SPR_RCPU_MI_GRA
, "MI_GRA",
2409 SPR_NOACCESS
, SPR_NOACCESS
,
2410 &spr_read_generic
, &spr_write_generic
,
2412 /* XXX : not implemented */
2413 spr_register(env
, SPR_RCPU_L2U_GRA
, "L2U_GRA",
2414 SPR_NOACCESS
, SPR_NOACCESS
,
2415 &spr_read_generic
, &spr_write_generic
,
2417 /* XXX : not implemented */
2418 spr_register(env
, SPR_RPCU_BBCMCR
, "L2U_BBCMCR",
2419 SPR_NOACCESS
, SPR_NOACCESS
,
2420 &spr_read_generic
, &spr_write_generic
,
2422 /* XXX : not implemented */
2423 spr_register(env
, SPR_RCPU_L2U_MCR
, "L2U_MCR",
2424 SPR_NOACCESS
, SPR_NOACCESS
,
2425 &spr_read_generic
, &spr_write_generic
,
2427 /* XXX : not implemented */
2428 spr_register(env
, SPR_RCPU_MI_RBA0
, "MI_RBA0",
2429 SPR_NOACCESS
, SPR_NOACCESS
,
2430 &spr_read_generic
, &spr_write_generic
,
2432 /* XXX : not implemented */
2433 spr_register(env
, SPR_RCPU_MI_RBA1
, "MI_RBA1",
2434 SPR_NOACCESS
, SPR_NOACCESS
,
2435 &spr_read_generic
, &spr_write_generic
,
2437 /* XXX : not implemented */
2438 spr_register(env
, SPR_RCPU_MI_RBA2
, "MI_RBA2",
2439 SPR_NOACCESS
, SPR_NOACCESS
,
2440 &spr_read_generic
, &spr_write_generic
,
2442 /* XXX : not implemented */
2443 spr_register(env
, SPR_RCPU_MI_RBA3
, "MI_RBA3",
2444 SPR_NOACCESS
, SPR_NOACCESS
,
2445 &spr_read_generic
, &spr_write_generic
,
2447 /* XXX : not implemented */
2448 spr_register(env
, SPR_RCPU_L2U_RBA0
, "L2U_RBA0",
2449 SPR_NOACCESS
, SPR_NOACCESS
,
2450 &spr_read_generic
, &spr_write_generic
,
2452 /* XXX : not implemented */
2453 spr_register(env
, SPR_RCPU_L2U_RBA1
, "L2U_RBA1",
2454 SPR_NOACCESS
, SPR_NOACCESS
,
2455 &spr_read_generic
, &spr_write_generic
,
2457 /* XXX : not implemented */
2458 spr_register(env
, SPR_RCPU_L2U_RBA2
, "L2U_RBA2",
2459 SPR_NOACCESS
, SPR_NOACCESS
,
2460 &spr_read_generic
, &spr_write_generic
,
2462 /* XXX : not implemented */
2463 spr_register(env
, SPR_RCPU_L2U_RBA3
, "L2U_RBA3",
2464 SPR_NOACCESS
, SPR_NOACCESS
,
2465 &spr_read_generic
, &spr_write_generic
,
2467 /* XXX : not implemented */
2468 spr_register(env
, SPR_RCPU_MI_RA0
, "MI_RA0",
2469 SPR_NOACCESS
, SPR_NOACCESS
,
2470 &spr_read_generic
, &spr_write_generic
,
2472 /* XXX : not implemented */
2473 spr_register(env
, SPR_RCPU_MI_RA1
, "MI_RA1",
2474 SPR_NOACCESS
, SPR_NOACCESS
,
2475 &spr_read_generic
, &spr_write_generic
,
2477 /* XXX : not implemented */
2478 spr_register(env
, SPR_RCPU_MI_RA2
, "MI_RA2",
2479 SPR_NOACCESS
, SPR_NOACCESS
,
2480 &spr_read_generic
, &spr_write_generic
,
2482 /* XXX : not implemented */
2483 spr_register(env
, SPR_RCPU_MI_RA3
, "MI_RA3",
2484 SPR_NOACCESS
, SPR_NOACCESS
,
2485 &spr_read_generic
, &spr_write_generic
,
2487 /* XXX : not implemented */
2488 spr_register(env
, SPR_RCPU_L2U_RA0
, "L2U_RA0",
2489 SPR_NOACCESS
, SPR_NOACCESS
,
2490 &spr_read_generic
, &spr_write_generic
,
2492 /* XXX : not implemented */
2493 spr_register(env
, SPR_RCPU_L2U_RA1
, "L2U_RA1",
2494 SPR_NOACCESS
, SPR_NOACCESS
,
2495 &spr_read_generic
, &spr_write_generic
,
2497 /* XXX : not implemented */
2498 spr_register(env
, SPR_RCPU_L2U_RA2
, "L2U_RA2",
2499 SPR_NOACCESS
, SPR_NOACCESS
,
2500 &spr_read_generic
, &spr_write_generic
,
2502 /* XXX : not implemented */
2503 spr_register(env
, SPR_RCPU_L2U_RA3
, "L2U_RA3",
2504 SPR_NOACCESS
, SPR_NOACCESS
,
2505 &spr_read_generic
, &spr_write_generic
,
2507 /* XXX : not implemented */
2508 spr_register(env
, SPR_RCPU_FPECR
, "FPECR",
2509 SPR_NOACCESS
, SPR_NOACCESS
,
2510 &spr_read_generic
, &spr_write_generic
,
2514 static void gen_spr_8xx (CPUPPCState
*env
)
2516 /* XXX : not implemented */
2517 spr_register(env
, SPR_MPC_IC_CST
, "IC_CST",
2518 SPR_NOACCESS
, SPR_NOACCESS
,
2519 &spr_read_generic
, &spr_write_generic
,
2521 /* XXX : not implemented */
2522 spr_register(env
, SPR_MPC_IC_ADR
, "IC_ADR",
2523 SPR_NOACCESS
, SPR_NOACCESS
,
2524 &spr_read_generic
, &spr_write_generic
,
2526 /* XXX : not implemented */
2527 spr_register(env
, SPR_MPC_IC_DAT
, "IC_DAT",
2528 SPR_NOACCESS
, SPR_NOACCESS
,
2529 &spr_read_generic
, &spr_write_generic
,
2531 /* XXX : not implemented */
2532 spr_register(env
, SPR_MPC_DC_CST
, "DC_CST",
2533 SPR_NOACCESS
, SPR_NOACCESS
,
2534 &spr_read_generic
, &spr_write_generic
,
2536 /* XXX : not implemented */
2537 spr_register(env
, SPR_MPC_DC_ADR
, "DC_ADR",
2538 SPR_NOACCESS
, SPR_NOACCESS
,
2539 &spr_read_generic
, &spr_write_generic
,
2541 /* XXX : not implemented */
2542 spr_register(env
, SPR_MPC_DC_DAT
, "DC_DAT",
2543 SPR_NOACCESS
, SPR_NOACCESS
,
2544 &spr_read_generic
, &spr_write_generic
,
2546 /* XXX : not implemented */
2547 spr_register(env
, SPR_MPC_MI_CTR
, "MI_CTR",
2548 SPR_NOACCESS
, SPR_NOACCESS
,
2549 &spr_read_generic
, &spr_write_generic
,
2551 /* XXX : not implemented */
2552 spr_register(env
, SPR_MPC_MI_AP
, "MI_AP",
2553 SPR_NOACCESS
, SPR_NOACCESS
,
2554 &spr_read_generic
, &spr_write_generic
,
2556 /* XXX : not implemented */
2557 spr_register(env
, SPR_MPC_MI_EPN
, "MI_EPN",
2558 SPR_NOACCESS
, SPR_NOACCESS
,
2559 &spr_read_generic
, &spr_write_generic
,
2561 /* XXX : not implemented */
2562 spr_register(env
, SPR_MPC_MI_TWC
, "MI_TWC",
2563 SPR_NOACCESS
, SPR_NOACCESS
,
2564 &spr_read_generic
, &spr_write_generic
,
2566 /* XXX : not implemented */
2567 spr_register(env
, SPR_MPC_MI_RPN
, "MI_RPN",
2568 SPR_NOACCESS
, SPR_NOACCESS
,
2569 &spr_read_generic
, &spr_write_generic
,
2571 /* XXX : not implemented */
2572 spr_register(env
, SPR_MPC_MI_DBCAM
, "MI_DBCAM",
2573 SPR_NOACCESS
, SPR_NOACCESS
,
2574 &spr_read_generic
, &spr_write_generic
,
2576 /* XXX : not implemented */
2577 spr_register(env
, SPR_MPC_MI_DBRAM0
, "MI_DBRAM0",
2578 SPR_NOACCESS
, SPR_NOACCESS
,
2579 &spr_read_generic
, &spr_write_generic
,
2581 /* XXX : not implemented */
2582 spr_register(env
, SPR_MPC_MI_DBRAM1
, "MI_DBRAM1",
2583 SPR_NOACCESS
, SPR_NOACCESS
,
2584 &spr_read_generic
, &spr_write_generic
,
2586 /* XXX : not implemented */
2587 spr_register(env
, SPR_MPC_MD_CTR
, "MD_CTR",
2588 SPR_NOACCESS
, SPR_NOACCESS
,
2589 &spr_read_generic
, &spr_write_generic
,
2591 /* XXX : not implemented */
2592 spr_register(env
, SPR_MPC_MD_CASID
, "MD_CASID",
2593 SPR_NOACCESS
, SPR_NOACCESS
,
2594 &spr_read_generic
, &spr_write_generic
,
2596 /* XXX : not implemented */
2597 spr_register(env
, SPR_MPC_MD_AP
, "MD_AP",
2598 SPR_NOACCESS
, SPR_NOACCESS
,
2599 &spr_read_generic
, &spr_write_generic
,
2601 /* XXX : not implemented */
2602 spr_register(env
, SPR_MPC_MD_EPN
, "MD_EPN",
2603 SPR_NOACCESS
, SPR_NOACCESS
,
2604 &spr_read_generic
, &spr_write_generic
,
2606 /* XXX : not implemented */
2607 spr_register(env
, SPR_MPC_MD_TWB
, "MD_TWB",
2608 SPR_NOACCESS
, SPR_NOACCESS
,
2609 &spr_read_generic
, &spr_write_generic
,
2611 /* XXX : not implemented */
2612 spr_register(env
, SPR_MPC_MD_TWC
, "MD_TWC",
2613 SPR_NOACCESS
, SPR_NOACCESS
,
2614 &spr_read_generic
, &spr_write_generic
,
2616 /* XXX : not implemented */
2617 spr_register(env
, SPR_MPC_MD_RPN
, "MD_RPN",
2618 SPR_NOACCESS
, SPR_NOACCESS
,
2619 &spr_read_generic
, &spr_write_generic
,
2621 /* XXX : not implemented */
2622 spr_register(env
, SPR_MPC_MD_TW
, "MD_TW",
2623 SPR_NOACCESS
, SPR_NOACCESS
,
2624 &spr_read_generic
, &spr_write_generic
,
2626 /* XXX : not implemented */
2627 spr_register(env
, SPR_MPC_MD_DBCAM
, "MD_DBCAM",
2628 SPR_NOACCESS
, SPR_NOACCESS
,
2629 &spr_read_generic
, &spr_write_generic
,
2631 /* XXX : not implemented */
2632 spr_register(env
, SPR_MPC_MD_DBRAM0
, "MD_DBRAM0",
2633 SPR_NOACCESS
, SPR_NOACCESS
,
2634 &spr_read_generic
, &spr_write_generic
,
2636 /* XXX : not implemented */
2637 spr_register(env
, SPR_MPC_MD_DBRAM1
, "MD_DBRAM1",
2638 SPR_NOACCESS
, SPR_NOACCESS
,
2639 &spr_read_generic
, &spr_write_generic
,
2645 * AMR => SPR 29 (Power 2.04)
2646 * CTRL => SPR 136 (Power 2.04)
2647 * CTRL => SPR 152 (Power 2.04)
2648 * SCOMC => SPR 276 (64 bits ?)
2649 * SCOMD => SPR 277 (64 bits ?)
2650 * TBU40 => SPR 286 (Power 2.04 hypv)
2651 * HSPRG0 => SPR 304 (Power 2.04 hypv)
2652 * HSPRG1 => SPR 305 (Power 2.04 hypv)
2653 * HDSISR => SPR 306 (Power 2.04 hypv)
2654 * HDAR => SPR 307 (Power 2.04 hypv)
2655 * PURR => SPR 309 (Power 2.04 hypv)
2656 * HDEC => SPR 310 (Power 2.04 hypv)
2657 * HIOR => SPR 311 (hypv)
2658 * RMOR => SPR 312 (970)
2659 * HRMOR => SPR 313 (Power 2.04 hypv)
2660 * HSRR0 => SPR 314 (Power 2.04 hypv)
2661 * HSRR1 => SPR 315 (Power 2.04 hypv)
2662 * LPCR => SPR 316 (970)
2663 * LPIDR => SPR 317 (970)
2664 * EPR => SPR 702 (Power 2.04 emb)
2665 * perf => 768-783 (Power 2.04)
2666 * perf => 784-799 (Power 2.04)
2667 * PPR => SPR 896 (Power 2.04)
2668 * EPLC => SPR 947 (Power 2.04 emb)
2669 * EPSC => SPR 948 (Power 2.04 emb)
2670 * DABRX => 1015 (Power 2.04 hypv)
2671 * FPECR => SPR 1022 (?)
2672 * ... and more (thermal management, performance counters, ...)
2675 /*****************************************************************************/
2676 /* Exception vectors models */
2677 static void init_excp_4xx_real (CPUPPCState
*env
)
2679 #if !defined(CONFIG_USER_ONLY)
2680 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2681 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2682 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2683 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2684 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2685 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2686 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2687 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2688 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2689 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2690 env
->hreset_excp_prefix
= 0x00000000UL
;
2691 env
->ivor_mask
= 0x0000FFF0UL
;
2692 env
->ivpr_mask
= 0xFFFF0000UL
;
2693 /* Hardware reset vector */
2694 env
->hreset_vector
= 0xFFFFFFFCUL
;
2698 static void init_excp_4xx_softmmu (CPUPPCState
*env
)
2700 #if !defined(CONFIG_USER_ONLY)
2701 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2702 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2703 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2704 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2705 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2706 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2707 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2708 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2709 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2710 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2711 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2712 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001100;
2713 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001200;
2714 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2715 env
->hreset_excp_prefix
= 0x00000000UL
;
2716 env
->ivor_mask
= 0x0000FFF0UL
;
2717 env
->ivpr_mask
= 0xFFFF0000UL
;
2718 /* Hardware reset vector */
2719 env
->hreset_vector
= 0xFFFFFFFCUL
;
2723 static void init_excp_MPC5xx (CPUPPCState
*env
)
2725 #if !defined(CONFIG_USER_ONLY)
2726 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2727 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2728 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2729 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2730 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2731 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2732 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2733 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2734 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2735 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2736 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2737 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2738 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2739 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2740 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2741 env
->hreset_excp_prefix
= 0x00000000UL
;
2742 env
->ivor_mask
= 0x0000FFF0UL
;
2743 env
->ivpr_mask
= 0xFFFF0000UL
;
2744 /* Hardware reset vector */
2745 env
->hreset_vector
= 0xFFFFFFFCUL
;
2749 static void init_excp_MPC8xx (CPUPPCState
*env
)
2751 #if !defined(CONFIG_USER_ONLY)
2752 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2753 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2754 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2755 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2756 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2757 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2758 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2759 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2760 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2761 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2762 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2763 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2764 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2765 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001100;
2766 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001200;
2767 env
->excp_vectors
[POWERPC_EXCP_ITLBE
] = 0x00001300;
2768 env
->excp_vectors
[POWERPC_EXCP_DTLBE
] = 0x00001400;
2769 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2770 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2771 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2772 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2773 env
->hreset_excp_prefix
= 0x00000000UL
;
2774 env
->ivor_mask
= 0x0000FFF0UL
;
2775 env
->ivpr_mask
= 0xFFFF0000UL
;
2776 /* Hardware reset vector */
2777 env
->hreset_vector
= 0xFFFFFFFCUL
;
2781 static void init_excp_G2 (CPUPPCState
*env
)
2783 #if !defined(CONFIG_USER_ONLY)
2784 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2785 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2786 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2787 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2788 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2789 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2790 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2791 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2792 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2793 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000A00;
2794 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2795 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2796 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2797 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2798 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2799 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2800 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2801 env
->hreset_excp_prefix
= 0x00000000UL
;
2802 /* Hardware reset vector */
2803 env
->hreset_vector
= 0xFFFFFFFCUL
;
2807 static void init_excp_e200 (CPUPPCState
*env
)
2809 #if !defined(CONFIG_USER_ONLY)
2810 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000FFC;
2811 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2812 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2813 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2814 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2815 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2816 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2817 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2818 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2819 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2820 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2821 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2822 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2823 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2824 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2825 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2826 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2827 env
->excp_vectors
[POWERPC_EXCP_SPEU
] = 0x00000000;
2828 env
->excp_vectors
[POWERPC_EXCP_EFPDI
] = 0x00000000;
2829 env
->excp_vectors
[POWERPC_EXCP_EFPRI
] = 0x00000000;
2830 env
->hreset_excp_prefix
= 0x00000000UL
;
2831 env
->ivor_mask
= 0x0000FFF7UL
;
2832 env
->ivpr_mask
= 0xFFFF0000UL
;
2833 /* Hardware reset vector */
2834 env
->hreset_vector
= 0xFFFFFFFCUL
;
2838 static void init_excp_BookE (CPUPPCState
*env
)
2840 #if !defined(CONFIG_USER_ONLY)
2841 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2842 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2843 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2844 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2845 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2846 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2847 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2848 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2849 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2850 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2851 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2852 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2853 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2854 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2855 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2856 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2857 env
->hreset_excp_prefix
= 0x00000000UL
;
2858 env
->ivor_mask
= 0x0000FFE0UL
;
2859 env
->ivpr_mask
= 0xFFFF0000UL
;
2860 /* Hardware reset vector */
2861 env
->hreset_vector
= 0xFFFFFFFCUL
;
2865 static void init_excp_601 (CPUPPCState
*env
)
2867 #if !defined(CONFIG_USER_ONLY)
2868 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2869 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2870 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2871 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2872 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2873 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2874 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2875 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2876 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2877 env
->excp_vectors
[POWERPC_EXCP_IO
] = 0x00000A00;
2878 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2879 env
->excp_vectors
[POWERPC_EXCP_RUNM
] = 0x00002000;
2880 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2881 /* Hardware reset vector */
2882 env
->hreset_vector
= 0x00000100UL
;
2886 static void init_excp_602 (CPUPPCState
*env
)
2888 #if !defined(CONFIG_USER_ONLY)
2889 /* XXX: exception prefix has a special behavior on 602 */
2890 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2891 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2892 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2893 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2894 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2895 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2896 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2897 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2898 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2899 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2900 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2901 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2902 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2903 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2904 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2905 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2906 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001500;
2907 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001600;
2908 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2909 /* Hardware reset vector */
2910 env
->hreset_vector
= 0xFFFFFFFCUL
;
2914 static void init_excp_603 (CPUPPCState
*env
)
2916 #if !defined(CONFIG_USER_ONLY)
2917 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2918 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2919 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2920 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2921 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2922 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2923 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2924 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2925 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2926 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2927 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2928 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2929 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2930 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2931 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2932 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2933 env
->hreset_excp_prefix
= 0x00000000UL
;
2934 /* Hardware reset vector */
2935 env
->hreset_vector
= 0xFFFFFFFCUL
;
2939 static void init_excp_604 (CPUPPCState
*env
)
2941 #if !defined(CONFIG_USER_ONLY)
2942 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2943 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2944 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2945 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2946 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2947 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2948 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2949 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2950 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2951 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2952 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2953 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2954 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2955 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2956 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2957 /* Hardware reset vector */
2958 env
->hreset_vector
= 0x00000100UL
;
2962 #if defined(TARGET_PPC64)
2963 static void init_excp_620 (CPUPPCState
*env
)
2965 #if !defined(CONFIG_USER_ONLY)
2966 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2967 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2968 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2969 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2970 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2971 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2972 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2973 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2974 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2975 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2976 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2977 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2978 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2979 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2980 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2981 /* Hardware reset vector */
2982 env
->hreset_vector
= 0x0000000000000100ULL
;
2985 #endif /* defined(TARGET_PPC64) */
2987 static void init_excp_7x0 (CPUPPCState
*env
)
2989 #if !defined(CONFIG_USER_ONLY)
2990 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2991 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2992 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2993 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2994 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2995 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2996 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2997 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2998 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2999 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3000 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3001 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3002 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3003 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3004 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3005 env
->hreset_excp_prefix
= 0x00000000UL
;
3006 /* Hardware reset vector */
3007 env
->hreset_vector
= 0xFFFFFFFCUL
;
3011 static void init_excp_750cl (CPUPPCState
*env
)
3013 #if !defined(CONFIG_USER_ONLY)
3014 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3015 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3016 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3017 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3018 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3019 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3020 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3021 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3022 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3023 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3024 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3025 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3026 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3027 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3028 env
->hreset_excp_prefix
= 0x00000000UL
;
3029 /* Hardware reset vector */
3030 env
->hreset_vector
= 0xFFFFFFFCUL
;
3034 static void init_excp_750cx (CPUPPCState
*env
)
3036 #if !defined(CONFIG_USER_ONLY)
3037 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3038 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3039 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3040 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3041 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3042 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3043 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3044 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3045 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3046 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3047 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3048 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3049 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3050 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3051 env
->hreset_excp_prefix
= 0x00000000UL
;
3052 /* Hardware reset vector */
3053 env
->hreset_vector
= 0xFFFFFFFCUL
;
3057 /* XXX: Check if this is correct */
3058 static void init_excp_7x5 (CPUPPCState
*env
)
3060 #if !defined(CONFIG_USER_ONLY)
3061 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3062 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3063 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3064 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3065 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3066 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3067 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3068 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3069 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3070 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3071 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3072 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3073 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
3074 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
3075 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
3076 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3077 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3078 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3079 env
->hreset_excp_prefix
= 0x00000000UL
;
3080 /* Hardware reset vector */
3081 env
->hreset_vector
= 0xFFFFFFFCUL
;
3085 static void init_excp_7400 (CPUPPCState
*env
)
3087 #if !defined(CONFIG_USER_ONLY)
3088 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3089 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3090 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3091 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3092 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3093 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3094 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3095 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3096 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3097 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3098 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3099 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3100 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3101 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3102 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3103 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3104 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3105 env
->hreset_excp_prefix
= 0x00000000UL
;
3106 /* Hardware reset vector */
3107 env
->hreset_vector
= 0xFFFFFFFCUL
;
3111 static void init_excp_7450 (CPUPPCState
*env
)
3113 #if !defined(CONFIG_USER_ONLY)
3114 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3115 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3116 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3117 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3118 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3119 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3120 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3121 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3122 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3123 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3124 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3125 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3126 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3127 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
3128 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
3129 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
3130 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3131 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3132 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3133 env
->hreset_excp_prefix
= 0x00000000UL
;
3134 /* Hardware reset vector */
3135 env
->hreset_vector
= 0xFFFFFFFCUL
;
3139 #if defined (TARGET_PPC64)
3140 static void init_excp_970 (CPUPPCState
*env
)
3142 #if !defined(CONFIG_USER_ONLY)
3143 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3144 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3145 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3146 env
->excp_vectors
[POWERPC_EXCP_DSEG
] = 0x00000380;
3147 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3148 env
->excp_vectors
[POWERPC_EXCP_ISEG
] = 0x00000480;
3149 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3150 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3151 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3152 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3153 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3154 env
->excp_vectors
[POWERPC_EXCP_HDECR
] = 0x00000980;
3155 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3156 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3157 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3158 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3159 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3160 env
->excp_vectors
[POWERPC_EXCP_MAINT
] = 0x00001600;
3161 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001700;
3162 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001800;
3163 env
->hreset_excp_prefix
= 0x00000000FFF00000ULL
;
3164 /* Hardware reset vector */
3165 env
->hreset_vector
= 0x0000000000000100ULL
;
3169 static void init_excp_POWER7 (CPUPPCState
*env
)
3171 #if !defined(CONFIG_USER_ONLY)
3172 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3173 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3174 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3175 env
->excp_vectors
[POWERPC_EXCP_DSEG
] = 0x00000380;
3176 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3177 env
->excp_vectors
[POWERPC_EXCP_ISEG
] = 0x00000480;
3178 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3179 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3180 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3181 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3182 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3183 env
->excp_vectors
[POWERPC_EXCP_HDECR
] = 0x00000980;
3184 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3185 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3186 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3187 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3188 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3189 env
->excp_vectors
[POWERPC_EXCP_MAINT
] = 0x00001600;
3190 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001700;
3191 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001800;
3192 env
->hreset_excp_prefix
= 0;
3193 /* Hardware reset vector */
3194 env
->hreset_vector
= 0x0000000000000100ULL
;
3199 /*****************************************************************************/
3200 /* Power management enable checks */
3201 static int check_pow_none (CPUPPCState
*env
)
3206 static int check_pow_nocheck (CPUPPCState
*env
)
3211 static int check_pow_hid0 (CPUPPCState
*env
)
3213 if (env
->spr
[SPR_HID0
] & 0x00E00000)
3219 static int check_pow_hid0_74xx (CPUPPCState
*env
)
3221 if (env
->spr
[SPR_HID0
] & 0x00600000)
3227 /*****************************************************************************/
3228 /* PowerPC implementations definitions */
3231 #define POWERPC_INSNS_401 (PPC_INSNS_BASE | PPC_STRING | \
3232 PPC_WRTEE | PPC_DCR | \
3233 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3235 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3236 PPC_4xx_COMMON | PPC_40x_EXCP)
3237 #define POWERPC_INSNS2_401 (PPC_NONE)
3238 #define POWERPC_MSRM_401 (0x00000000000FD201ULL)
3239 #define POWERPC_MMU_401 (POWERPC_MMU_REAL)
3240 #define POWERPC_EXCP_401 (POWERPC_EXCP_40x)
3241 #define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401)
3242 #define POWERPC_BFDM_401 (bfd_mach_ppc_403)
3243 #define POWERPC_FLAG_401 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3244 POWERPC_FLAG_BUS_CLK)
3245 #define check_pow_401 check_pow_nocheck
3247 static void init_proc_401 (CPUPPCState
*env
)
3250 gen_spr_401_403(env
);
3252 init_excp_4xx_real(env
);
3253 env
->dcache_line_size
= 32;
3254 env
->icache_line_size
= 32;
3255 /* Allocate hardware IRQ controller */
3256 ppc40x_irq_init(env
);
3258 SET_FIT_PERIOD(12, 16, 20, 24);
3259 SET_WDT_PERIOD(16, 20, 24, 28);
3263 #define POWERPC_INSNS_401x2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3264 PPC_DCR | PPC_WRTEE | \
3265 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3266 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3267 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3268 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3269 PPC_4xx_COMMON | PPC_40x_EXCP)
3270 #define POWERPC_INSNS2_401x2 (PPC_NONE)
3271 #define POWERPC_MSRM_401x2 (0x00000000001FD231ULL)
3272 #define POWERPC_MMU_401x2 (POWERPC_MMU_SOFT_4xx_Z)
3273 #define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x)
3274 #define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401)
3275 #define POWERPC_BFDM_401x2 (bfd_mach_ppc_403)
3276 #define POWERPC_FLAG_401x2 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3277 POWERPC_FLAG_BUS_CLK)
3278 #define check_pow_401x2 check_pow_nocheck
3280 static void init_proc_401x2 (CPUPPCState
*env
)
3283 gen_spr_401_403(env
);
3285 gen_spr_compress(env
);
3286 /* Memory management */
3287 #if !defined(CONFIG_USER_ONLY)
3291 env
->tlb_type
= TLB_EMB
;
3293 init_excp_4xx_softmmu(env
);
3294 env
->dcache_line_size
= 32;
3295 env
->icache_line_size
= 32;
3296 /* Allocate hardware IRQ controller */
3297 ppc40x_irq_init(env
);
3299 SET_FIT_PERIOD(12, 16, 20, 24);
3300 SET_WDT_PERIOD(16, 20, 24, 28);
3304 #define POWERPC_INSNS_401x3 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3305 PPC_DCR | PPC_WRTEE | \
3306 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3307 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3308 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3309 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3310 PPC_4xx_COMMON | PPC_40x_EXCP)
3311 #define POWERPC_INSNS2_401x3 (PPC_NONE)
3312 #define POWERPC_MSRM_401x3 (0x00000000001FD631ULL)
3313 #define POWERPC_MMU_401x3 (POWERPC_MMU_SOFT_4xx_Z)
3314 #define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x)
3315 #define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401)
3316 #define POWERPC_BFDM_401x3 (bfd_mach_ppc_403)
3317 #define POWERPC_FLAG_401x3 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3318 POWERPC_FLAG_BUS_CLK)
3319 #define check_pow_401x3 check_pow_nocheck
3321 __attribute__ (( unused
))
3322 static void init_proc_401x3 (CPUPPCState
*env
)
3325 gen_spr_401_403(env
);
3328 gen_spr_compress(env
);
3329 init_excp_4xx_softmmu(env
);
3330 env
->dcache_line_size
= 32;
3331 env
->icache_line_size
= 32;
3332 /* Allocate hardware IRQ controller */
3333 ppc40x_irq_init(env
);
3335 SET_FIT_PERIOD(12, 16, 20, 24);
3336 SET_WDT_PERIOD(16, 20, 24, 28);
3340 #define POWERPC_INSNS_IOP480 (PPC_INSNS_BASE | PPC_STRING | \
3341 PPC_DCR | PPC_WRTEE | \
3342 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3343 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3344 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3345 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3346 PPC_4xx_COMMON | PPC_40x_EXCP)
3347 #define POWERPC_INSNS2_IOP480 (PPC_NONE)
3348 #define POWERPC_MSRM_IOP480 (0x00000000001FD231ULL)
3349 #define POWERPC_MMU_IOP480 (POWERPC_MMU_SOFT_4xx_Z)
3350 #define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x)
3351 #define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401)
3352 #define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403)
3353 #define POWERPC_FLAG_IOP480 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3354 POWERPC_FLAG_BUS_CLK)
3355 #define check_pow_IOP480 check_pow_nocheck
3357 static void init_proc_IOP480 (CPUPPCState
*env
)
3360 gen_spr_401_403(env
);
3362 gen_spr_compress(env
);
3363 /* Memory management */
3364 #if !defined(CONFIG_USER_ONLY)
3368 env
->tlb_type
= TLB_EMB
;
3370 init_excp_4xx_softmmu(env
);
3371 env
->dcache_line_size
= 32;
3372 env
->icache_line_size
= 32;
3373 /* Allocate hardware IRQ controller */
3374 ppc40x_irq_init(env
);
3376 SET_FIT_PERIOD(8, 12, 16, 20);
3377 SET_WDT_PERIOD(16, 20, 24, 28);
3381 #define POWERPC_INSNS_403 (PPC_INSNS_BASE | PPC_STRING | \
3382 PPC_DCR | PPC_WRTEE | \
3383 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3385 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3386 PPC_4xx_COMMON | PPC_40x_EXCP)
3387 #define POWERPC_INSNS2_403 (PPC_NONE)
3388 #define POWERPC_MSRM_403 (0x000000000007D00DULL)
3389 #define POWERPC_MMU_403 (POWERPC_MMU_REAL)
3390 #define POWERPC_EXCP_403 (POWERPC_EXCP_40x)
3391 #define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401)
3392 #define POWERPC_BFDM_403 (bfd_mach_ppc_403)
3393 #define POWERPC_FLAG_403 (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3394 POWERPC_FLAG_BUS_CLK)
3395 #define check_pow_403 check_pow_nocheck
3397 static void init_proc_403 (CPUPPCState
*env
)
3400 gen_spr_401_403(env
);
3402 gen_spr_403_real(env
);
3403 init_excp_4xx_real(env
);
3404 env
->dcache_line_size
= 32;
3405 env
->icache_line_size
= 32;
3406 /* Allocate hardware IRQ controller */
3407 ppc40x_irq_init(env
);
3409 SET_FIT_PERIOD(8, 12, 16, 20);
3410 SET_WDT_PERIOD(16, 20, 24, 28);
3413 /* PowerPC 403 GCX */
3414 #define POWERPC_INSNS_403GCX (PPC_INSNS_BASE | PPC_STRING | \
3415 PPC_DCR | PPC_WRTEE | \
3416 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3418 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3419 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3420 PPC_4xx_COMMON | PPC_40x_EXCP)
3421 #define POWERPC_INSNS2_403GCX (PPC_NONE)
3422 #define POWERPC_MSRM_403GCX (0x000000000007D00DULL)
3423 #define POWERPC_MMU_403GCX (POWERPC_MMU_SOFT_4xx_Z)
3424 #define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x)
3425 #define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401)
3426 #define POWERPC_BFDM_403GCX (bfd_mach_ppc_403)
3427 #define POWERPC_FLAG_403GCX (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3428 POWERPC_FLAG_BUS_CLK)
3429 #define check_pow_403GCX check_pow_nocheck
3431 static void init_proc_403GCX (CPUPPCState
*env
)
3434 gen_spr_401_403(env
);
3436 gen_spr_403_real(env
);
3437 gen_spr_403_mmu(env
);
3438 /* Bus access control */
3439 /* not emulated, as Qemu never does speculative access */
3440 spr_register(env
, SPR_40x_SGR
, "SGR",
3441 SPR_NOACCESS
, SPR_NOACCESS
,
3442 &spr_read_generic
, &spr_write_generic
,
3444 /* not emulated, as Qemu do not emulate caches */
3445 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3446 SPR_NOACCESS
, SPR_NOACCESS
,
3447 &spr_read_generic
, &spr_write_generic
,
3449 /* Memory management */
3450 #if !defined(CONFIG_USER_ONLY)
3454 env
->tlb_type
= TLB_EMB
;
3456 init_excp_4xx_softmmu(env
);
3457 env
->dcache_line_size
= 32;
3458 env
->icache_line_size
= 32;
3459 /* Allocate hardware IRQ controller */
3460 ppc40x_irq_init(env
);
3462 SET_FIT_PERIOD(8, 12, 16, 20);
3463 SET_WDT_PERIOD(16, 20, 24, 28);
3467 #define POWERPC_INSNS_405 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3468 PPC_DCR | PPC_WRTEE | \
3469 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3470 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3471 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3472 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3473 PPC_4xx_COMMON | PPC_405_MAC | PPC_40x_EXCP)
3474 #define POWERPC_INSNS2_405 (PPC_NONE)
3475 #define POWERPC_MSRM_405 (0x000000000006E630ULL)
3476 #define POWERPC_MMU_405 (POWERPC_MMU_SOFT_4xx)
3477 #define POWERPC_EXCP_405 (POWERPC_EXCP_40x)
3478 #define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405)
3479 #define POWERPC_BFDM_405 (bfd_mach_ppc_403)
3480 #define POWERPC_FLAG_405 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3481 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3482 #define check_pow_405 check_pow_nocheck
3484 static void init_proc_405 (CPUPPCState
*env
)
3490 /* Bus access control */
3491 /* not emulated, as Qemu never does speculative access */
3492 spr_register(env
, SPR_40x_SGR
, "SGR",
3493 SPR_NOACCESS
, SPR_NOACCESS
,
3494 &spr_read_generic
, &spr_write_generic
,
3496 /* not emulated, as Qemu do not emulate caches */
3497 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3498 SPR_NOACCESS
, SPR_NOACCESS
,
3499 &spr_read_generic
, &spr_write_generic
,
3501 /* Memory management */
3502 #if !defined(CONFIG_USER_ONLY)
3506 env
->tlb_type
= TLB_EMB
;
3508 init_excp_4xx_softmmu(env
);
3509 env
->dcache_line_size
= 32;
3510 env
->icache_line_size
= 32;
3511 /* Allocate hardware IRQ controller */
3512 ppc40x_irq_init(env
);
3514 SET_FIT_PERIOD(8, 12, 16, 20);
3515 SET_WDT_PERIOD(16, 20, 24, 28);
3518 /* PowerPC 440 EP */
3519 #define POWERPC_INSNS_440EP (PPC_INSNS_BASE | PPC_STRING | \
3520 PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
3521 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
3522 PPC_FLOAT_STFIWX | \
3523 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3524 PPC_CACHE | PPC_CACHE_ICBI | \
3525 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3526 PPC_MEM_TLBSYNC | PPC_MFTB | \
3527 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3529 #define POWERPC_INSNS2_440EP (PPC_NONE)
3530 #define POWERPC_MSRM_440EP (0x000000000006FF30ULL)
3531 #define POWERPC_MMU_440EP (POWERPC_MMU_BOOKE)
3532 #define POWERPC_EXCP_440EP (POWERPC_EXCP_BOOKE)
3533 #define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE)
3534 #define POWERPC_BFDM_440EP (bfd_mach_ppc_403)
3535 #define POWERPC_FLAG_440EP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3536 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3537 #define check_pow_440EP check_pow_nocheck
3539 static void init_proc_440EP (CPUPPCState
*env
)
3543 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3545 gen_spr_usprgh(env
);
3546 /* Processor identification */
3547 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3548 SPR_NOACCESS
, SPR_NOACCESS
,
3549 &spr_read_generic
, &spr_write_pir
,
3551 /* XXX : not implemented */
3552 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3553 SPR_NOACCESS
, SPR_NOACCESS
,
3554 &spr_read_generic
, &spr_write_generic
,
3556 /* XXX : not implemented */
3557 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3558 SPR_NOACCESS
, SPR_NOACCESS
,
3559 &spr_read_generic
, &spr_write_generic
,
3561 /* XXX : not implemented */
3562 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3563 SPR_NOACCESS
, SPR_NOACCESS
,
3564 &spr_read_generic
, &spr_write_generic
,
3566 /* XXX : not implemented */
3567 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3568 SPR_NOACCESS
, SPR_NOACCESS
,
3569 &spr_read_generic
, &spr_write_generic
,
3571 /* XXX : not implemented */
3572 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3573 SPR_NOACCESS
, SPR_NOACCESS
,
3574 &spr_read_generic
, &spr_write_generic
,
3576 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3577 SPR_NOACCESS
, SPR_NOACCESS
,
3578 &spr_read_generic
, &spr_write_generic
,
3580 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3581 SPR_NOACCESS
, SPR_NOACCESS
,
3582 &spr_read_generic
, &spr_write_generic
,
3584 /* XXX : not implemented */
3585 spr_register(env
, SPR_440_CCR1
, "CCR1",
3586 SPR_NOACCESS
, SPR_NOACCESS
,
3587 &spr_read_generic
, &spr_write_generic
,
3589 /* Memory management */
3590 #if !defined(CONFIG_USER_ONLY)
3594 env
->tlb_type
= TLB_EMB
;
3596 init_excp_BookE(env
);
3597 env
->dcache_line_size
= 32;
3598 env
->icache_line_size
= 32;
3599 ppc40x_irq_init(env
);
3601 SET_FIT_PERIOD(12, 16, 20, 24);
3602 SET_WDT_PERIOD(20, 24, 28, 32);
3605 /* PowerPC 440 GP */
3606 #define POWERPC_INSNS_440GP (PPC_INSNS_BASE | PPC_STRING | \
3607 PPC_DCR | PPC_DCRX | PPC_WRTEE | PPC_MFAPIDI | \
3608 PPC_CACHE | PPC_CACHE_ICBI | \
3609 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3610 PPC_MEM_TLBSYNC | PPC_TLBIVA | PPC_MFTB | \
3611 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3613 #define POWERPC_INSNS2_440GP (PPC_NONE)
3614 #define POWERPC_MSRM_440GP (0x000000000006FF30ULL)
3615 #define POWERPC_MMU_440GP (POWERPC_MMU_BOOKE)
3616 #define POWERPC_EXCP_440GP (POWERPC_EXCP_BOOKE)
3617 #define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE)
3618 #define POWERPC_BFDM_440GP (bfd_mach_ppc_403)
3619 #define POWERPC_FLAG_440GP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3620 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3621 #define check_pow_440GP check_pow_nocheck
3623 __attribute__ (( unused
))
3624 static void init_proc_440GP (CPUPPCState
*env
)
3628 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3630 gen_spr_usprgh(env
);
3631 /* Processor identification */
3632 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3633 SPR_NOACCESS
, SPR_NOACCESS
,
3634 &spr_read_generic
, &spr_write_pir
,
3636 /* XXX : not implemented */
3637 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3638 SPR_NOACCESS
, SPR_NOACCESS
,
3639 &spr_read_generic
, &spr_write_generic
,
3641 /* XXX : not implemented */
3642 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3643 SPR_NOACCESS
, SPR_NOACCESS
,
3644 &spr_read_generic
, &spr_write_generic
,
3646 /* XXX : not implemented */
3647 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3648 SPR_NOACCESS
, SPR_NOACCESS
,
3649 &spr_read_generic
, &spr_write_generic
,
3651 /* XXX : not implemented */
3652 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3653 SPR_NOACCESS
, SPR_NOACCESS
,
3654 &spr_read_generic
, &spr_write_generic
,
3656 /* Memory management */
3657 #if !defined(CONFIG_USER_ONLY)
3661 env
->tlb_type
= TLB_EMB
;
3663 init_excp_BookE(env
);
3664 env
->dcache_line_size
= 32;
3665 env
->icache_line_size
= 32;
3666 /* XXX: TODO: allocate internal IRQ controller */
3668 SET_FIT_PERIOD(12, 16, 20, 24);
3669 SET_WDT_PERIOD(20, 24, 28, 32);
3673 #define POWERPC_INSNS_440x4 (PPC_INSNS_BASE | PPC_STRING | \
3674 PPC_DCR | PPC_WRTEE | \
3675 PPC_CACHE | PPC_CACHE_ICBI | \
3676 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3677 PPC_MEM_TLBSYNC | PPC_MFTB | \
3678 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3680 #define POWERPC_INSNS2_440x4 (PPC_NONE)
3681 #define POWERPC_MSRM_440x4 (0x000000000006FF30ULL)
3682 #define POWERPC_MMU_440x4 (POWERPC_MMU_BOOKE)
3683 #define POWERPC_EXCP_440x4 (POWERPC_EXCP_BOOKE)
3684 #define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE)
3685 #define POWERPC_BFDM_440x4 (bfd_mach_ppc_403)
3686 #define POWERPC_FLAG_440x4 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3687 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3688 #define check_pow_440x4 check_pow_nocheck
3690 __attribute__ (( unused
))
3691 static void init_proc_440x4 (CPUPPCState
*env
)
3695 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3697 gen_spr_usprgh(env
);
3698 /* Processor identification */
3699 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3700 SPR_NOACCESS
, SPR_NOACCESS
,
3701 &spr_read_generic
, &spr_write_pir
,
3703 /* XXX : not implemented */
3704 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3705 SPR_NOACCESS
, SPR_NOACCESS
,
3706 &spr_read_generic
, &spr_write_generic
,
3708 /* XXX : not implemented */
3709 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3710 SPR_NOACCESS
, SPR_NOACCESS
,
3711 &spr_read_generic
, &spr_write_generic
,
3713 /* XXX : not implemented */
3714 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3715 SPR_NOACCESS
, SPR_NOACCESS
,
3716 &spr_read_generic
, &spr_write_generic
,
3718 /* XXX : not implemented */
3719 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3720 SPR_NOACCESS
, SPR_NOACCESS
,
3721 &spr_read_generic
, &spr_write_generic
,
3723 /* Memory management */
3724 #if !defined(CONFIG_USER_ONLY)
3728 env
->tlb_type
= TLB_EMB
;
3730 init_excp_BookE(env
);
3731 env
->dcache_line_size
= 32;
3732 env
->icache_line_size
= 32;
3733 /* XXX: TODO: allocate internal IRQ controller */
3735 SET_FIT_PERIOD(12, 16, 20, 24);
3736 SET_WDT_PERIOD(20, 24, 28, 32);
3740 #define POWERPC_INSNS_440x5 (PPC_INSNS_BASE | PPC_STRING | \
3741 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3742 PPC_CACHE | PPC_CACHE_ICBI | \
3743 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3744 PPC_MEM_TLBSYNC | PPC_MFTB | \
3745 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3747 #define POWERPC_INSNS2_440x5 (PPC_NONE)
3748 #define POWERPC_MSRM_440x5 (0x000000000006FF30ULL)
3749 #define POWERPC_MMU_440x5 (POWERPC_MMU_BOOKE)
3750 #define POWERPC_EXCP_440x5 (POWERPC_EXCP_BOOKE)
3751 #define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE)
3752 #define POWERPC_BFDM_440x5 (bfd_mach_ppc_403)
3753 #define POWERPC_FLAG_440x5 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3754 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3755 #define check_pow_440x5 check_pow_nocheck
3757 static void init_proc_440x5 (CPUPPCState
*env
)
3761 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3763 gen_spr_usprgh(env
);
3764 /* Processor identification */
3765 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3766 SPR_NOACCESS
, SPR_NOACCESS
,
3767 &spr_read_generic
, &spr_write_pir
,
3769 /* XXX : not implemented */
3770 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3771 SPR_NOACCESS
, SPR_NOACCESS
,
3772 &spr_read_generic
, &spr_write_generic
,
3774 /* XXX : not implemented */
3775 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3776 SPR_NOACCESS
, SPR_NOACCESS
,
3777 &spr_read_generic
, &spr_write_generic
,
3779 /* XXX : not implemented */
3780 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3781 SPR_NOACCESS
, SPR_NOACCESS
,
3782 &spr_read_generic
, &spr_write_generic
,
3784 /* XXX : not implemented */
3785 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3786 SPR_NOACCESS
, SPR_NOACCESS
,
3787 &spr_read_generic
, &spr_write_generic
,
3789 /* XXX : not implemented */
3790 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3791 SPR_NOACCESS
, SPR_NOACCESS
,
3792 &spr_read_generic
, &spr_write_generic
,
3794 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3795 SPR_NOACCESS
, SPR_NOACCESS
,
3796 &spr_read_generic
, &spr_write_generic
,
3798 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3799 SPR_NOACCESS
, SPR_NOACCESS
,
3800 &spr_read_generic
, &spr_write_generic
,
3802 /* XXX : not implemented */
3803 spr_register(env
, SPR_440_CCR1
, "CCR1",
3804 SPR_NOACCESS
, SPR_NOACCESS
,
3805 &spr_read_generic
, &spr_write_generic
,
3807 /* Memory management */
3808 #if !defined(CONFIG_USER_ONLY)
3812 env
->tlb_type
= TLB_EMB
;
3814 init_excp_BookE(env
);
3815 env
->dcache_line_size
= 32;
3816 env
->icache_line_size
= 32;
3817 ppc40x_irq_init(env
);
3819 SET_FIT_PERIOD(12, 16, 20, 24);
3820 SET_WDT_PERIOD(20, 24, 28, 32);
3823 /* PowerPC 460 (guessed) */
3824 #define POWERPC_INSNS_460 (PPC_INSNS_BASE | PPC_STRING | \
3825 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3826 PPC_WRTEE | PPC_MFAPIDI | PPC_MFTB | \
3827 PPC_CACHE | PPC_CACHE_ICBI | \
3828 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3829 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3830 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3832 #define POWERPC_INSNS2_460 (PPC_NONE)
3833 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3834 #define POWERPC_MMU_460 (POWERPC_MMU_BOOKE)
3835 #define POWERPC_EXCP_460 (POWERPC_EXCP_BOOKE)
3836 #define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE)
3837 #define POWERPC_BFDM_460 (bfd_mach_ppc_403)
3838 #define POWERPC_FLAG_460 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3839 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3840 #define check_pow_460 check_pow_nocheck
3842 __attribute__ (( unused
))
3843 static void init_proc_460 (CPUPPCState
*env
)
3847 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3849 gen_spr_usprgh(env
);
3850 /* Processor identification */
3851 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3852 SPR_NOACCESS
, SPR_NOACCESS
,
3853 &spr_read_generic
, &spr_write_pir
,
3855 /* XXX : not implemented */
3856 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3857 SPR_NOACCESS
, SPR_NOACCESS
,
3858 &spr_read_generic
, &spr_write_generic
,
3860 /* XXX : not implemented */
3861 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3862 SPR_NOACCESS
, SPR_NOACCESS
,
3863 &spr_read_generic
, &spr_write_generic
,
3865 /* XXX : not implemented */
3866 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3867 SPR_NOACCESS
, SPR_NOACCESS
,
3868 &spr_read_generic
, &spr_write_generic
,
3870 /* XXX : not implemented */
3871 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3872 SPR_NOACCESS
, SPR_NOACCESS
,
3873 &spr_read_generic
, &spr_write_generic
,
3875 /* XXX : not implemented */
3876 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3877 SPR_NOACCESS
, SPR_NOACCESS
,
3878 &spr_read_generic
, &spr_write_generic
,
3880 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3881 SPR_NOACCESS
, SPR_NOACCESS
,
3882 &spr_read_generic
, &spr_write_generic
,
3884 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3885 SPR_NOACCESS
, SPR_NOACCESS
,
3886 &spr_read_generic
, &spr_write_generic
,
3888 /* XXX : not implemented */
3889 spr_register(env
, SPR_440_CCR1
, "CCR1",
3890 SPR_NOACCESS
, SPR_NOACCESS
,
3891 &spr_read_generic
, &spr_write_generic
,
3893 /* XXX : not implemented */
3894 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3895 &spr_read_generic
, &spr_write_generic
,
3896 &spr_read_generic
, &spr_write_generic
,
3898 /* Memory management */
3899 #if !defined(CONFIG_USER_ONLY)
3903 env
->tlb_type
= TLB_EMB
;
3905 init_excp_BookE(env
);
3906 env
->dcache_line_size
= 32;
3907 env
->icache_line_size
= 32;
3908 /* XXX: TODO: allocate internal IRQ controller */
3910 SET_FIT_PERIOD(12, 16, 20, 24);
3911 SET_WDT_PERIOD(20, 24, 28, 32);
3914 /* PowerPC 460F (guessed) */
3915 #define POWERPC_INSNS_460F (PPC_INSNS_BASE | PPC_STRING | \
3916 PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
3917 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
3918 PPC_FLOAT_STFIWX | PPC_MFTB | \
3919 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3920 PPC_WRTEE | PPC_MFAPIDI | \
3921 PPC_CACHE | PPC_CACHE_ICBI | \
3922 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3923 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3924 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3926 #define POWERPC_INSNS2_460F (PPC_NONE)
3927 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3928 #define POWERPC_MMU_460F (POWERPC_MMU_BOOKE)
3929 #define POWERPC_EXCP_460F (POWERPC_EXCP_BOOKE)
3930 #define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE)
3931 #define POWERPC_BFDM_460F (bfd_mach_ppc_403)
3932 #define POWERPC_FLAG_460F (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3933 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3934 #define check_pow_460F check_pow_nocheck
3936 __attribute__ (( unused
))
3937 static void init_proc_460F (CPUPPCState
*env
)
3941 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3943 gen_spr_usprgh(env
);
3944 /* Processor identification */
3945 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3946 SPR_NOACCESS
, SPR_NOACCESS
,
3947 &spr_read_generic
, &spr_write_pir
,
3949 /* XXX : not implemented */
3950 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3951 SPR_NOACCESS
, SPR_NOACCESS
,
3952 &spr_read_generic
, &spr_write_generic
,
3954 /* XXX : not implemented */
3955 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3956 SPR_NOACCESS
, SPR_NOACCESS
,
3957 &spr_read_generic
, &spr_write_generic
,
3959 /* XXX : not implemented */
3960 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3961 SPR_NOACCESS
, SPR_NOACCESS
,
3962 &spr_read_generic
, &spr_write_generic
,
3964 /* XXX : not implemented */
3965 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3966 SPR_NOACCESS
, SPR_NOACCESS
,
3967 &spr_read_generic
, &spr_write_generic
,
3969 /* XXX : not implemented */
3970 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3971 SPR_NOACCESS
, SPR_NOACCESS
,
3972 &spr_read_generic
, &spr_write_generic
,
3974 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3975 SPR_NOACCESS
, SPR_NOACCESS
,
3976 &spr_read_generic
, &spr_write_generic
,
3978 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3979 SPR_NOACCESS
, SPR_NOACCESS
,
3980 &spr_read_generic
, &spr_write_generic
,
3982 /* XXX : not implemented */
3983 spr_register(env
, SPR_440_CCR1
, "CCR1",
3984 SPR_NOACCESS
, SPR_NOACCESS
,
3985 &spr_read_generic
, &spr_write_generic
,
3987 /* XXX : not implemented */
3988 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3989 &spr_read_generic
, &spr_write_generic
,
3990 &spr_read_generic
, &spr_write_generic
,
3992 /* Memory management */
3993 #if !defined(CONFIG_USER_ONLY)
3997 env
->tlb_type
= TLB_EMB
;
3999 init_excp_BookE(env
);
4000 env
->dcache_line_size
= 32;
4001 env
->icache_line_size
= 32;
4002 /* XXX: TODO: allocate internal IRQ controller */
4004 SET_FIT_PERIOD(12, 16, 20, 24);
4005 SET_WDT_PERIOD(20, 24, 28, 32);
4008 /* Freescale 5xx cores (aka RCPU) */
4009 #define POWERPC_INSNS_MPC5xx (PPC_INSNS_BASE | PPC_STRING | \
4010 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
4011 PPC_CACHE_ICBI | PPC_FLOAT | PPC_FLOAT_STFIWX | \
4013 #define POWERPC_INSNS2_MPC5xx (PPC_NONE)
4014 #define POWERPC_MSRM_MPC5xx (0x000000000001FF43ULL)
4015 #define POWERPC_MMU_MPC5xx (POWERPC_MMU_REAL)
4016 #define POWERPC_EXCP_MPC5xx (POWERPC_EXCP_603)
4017 #define POWERPC_INPUT_MPC5xx (PPC_FLAGS_INPUT_RCPU)
4018 #define POWERPC_BFDM_MPC5xx (bfd_mach_ppc_505)
4019 #define POWERPC_FLAG_MPC5xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4020 POWERPC_FLAG_BUS_CLK)
4021 #define check_pow_MPC5xx check_pow_none
4023 __attribute__ (( unused
))
4024 static void init_proc_MPC5xx (CPUPPCState
*env
)
4028 gen_spr_5xx_8xx(env
);
4030 init_excp_MPC5xx(env
);
4031 env
->dcache_line_size
= 32;
4032 env
->icache_line_size
= 32;
4033 /* XXX: TODO: allocate internal IRQ controller */
4036 /* Freescale 8xx cores (aka PowerQUICC) */
4037 #define POWERPC_INSNS_MPC8xx (PPC_INSNS_BASE | PPC_STRING | \
4038 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
4039 PPC_CACHE_ICBI | PPC_MFTB)
4040 #define POWERPC_INSNS2_MPC8xx (PPC_NONE)
4041 #define POWERPC_MSRM_MPC8xx (0x000000000001F673ULL)
4042 #define POWERPC_MMU_MPC8xx (POWERPC_MMU_MPC8xx)
4043 #define POWERPC_EXCP_MPC8xx (POWERPC_EXCP_603)
4044 #define POWERPC_INPUT_MPC8xx (PPC_FLAGS_INPUT_RCPU)
4045 #define POWERPC_BFDM_MPC8xx (bfd_mach_ppc_860)
4046 #define POWERPC_FLAG_MPC8xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4047 POWERPC_FLAG_BUS_CLK)
4048 #define check_pow_MPC8xx check_pow_none
4050 __attribute__ (( unused
))
4051 static void init_proc_MPC8xx (CPUPPCState
*env
)
4055 gen_spr_5xx_8xx(env
);
4057 init_excp_MPC8xx(env
);
4058 env
->dcache_line_size
= 32;
4059 env
->icache_line_size
= 32;
4060 /* XXX: TODO: allocate internal IRQ controller */
4063 /* Freescale 82xx cores (aka PowerQUICC-II) */
4065 #define POWERPC_INSNS_G2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4066 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4067 PPC_FLOAT_STFIWX | \
4068 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4069 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4070 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4071 PPC_SEGMENT | PPC_EXTERN)
4072 #define POWERPC_INSNS2_G2 (PPC_NONE)
4073 #define POWERPC_MSRM_G2 (0x000000000006FFF2ULL)
4074 #define POWERPC_MMU_G2 (POWERPC_MMU_SOFT_6xx)
4075 //#define POWERPC_EXCP_G2 (POWERPC_EXCP_G2)
4076 #define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx)
4077 #define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e)
4078 #define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4079 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4080 #define check_pow_G2 check_pow_hid0
4082 static void init_proc_G2 (CPUPPCState
*env
)
4084 gen_spr_ne_601(env
);
4085 gen_spr_G2_755(env
);
4089 /* External access control */
4090 /* XXX : not implemented */
4091 spr_register(env
, SPR_EAR
, "EAR",
4092 SPR_NOACCESS
, SPR_NOACCESS
,
4093 &spr_read_generic
, &spr_write_generic
,
4095 /* Hardware implementation register */
4096 /* XXX : not implemented */
4097 spr_register(env
, SPR_HID0
, "HID0",
4098 SPR_NOACCESS
, SPR_NOACCESS
,
4099 &spr_read_generic
, &spr_write_generic
,
4101 /* XXX : not implemented */
4102 spr_register(env
, SPR_HID1
, "HID1",
4103 SPR_NOACCESS
, SPR_NOACCESS
,
4104 &spr_read_generic
, &spr_write_generic
,
4106 /* XXX : not implemented */
4107 spr_register(env
, SPR_HID2
, "HID2",
4108 SPR_NOACCESS
, SPR_NOACCESS
,
4109 &spr_read_generic
, &spr_write_generic
,
4111 /* Memory management */
4114 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4116 env
->dcache_line_size
= 32;
4117 env
->icache_line_size
= 32;
4118 /* Allocate hardware IRQ controller */
4119 ppc6xx_irq_init(env
);
4123 #define POWERPC_INSNS_G2LE (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4124 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4125 PPC_FLOAT_STFIWX | \
4126 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4127 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4128 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4129 PPC_SEGMENT | PPC_EXTERN)
4130 #define POWERPC_INSNS2_G2LE (PPC_NONE)
4131 #define POWERPC_MSRM_G2LE (0x000000000007FFF3ULL)
4132 #define POWERPC_MMU_G2LE (POWERPC_MMU_SOFT_6xx)
4133 #define POWERPC_EXCP_G2LE (POWERPC_EXCP_G2)
4134 #define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx)
4135 #define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e)
4136 #define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4137 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4138 #define check_pow_G2LE check_pow_hid0
4140 static void init_proc_G2LE (CPUPPCState
*env
)
4142 gen_spr_ne_601(env
);
4143 gen_spr_G2_755(env
);
4147 /* External access control */
4148 /* XXX : not implemented */
4149 spr_register(env
, SPR_EAR
, "EAR",
4150 SPR_NOACCESS
, SPR_NOACCESS
,
4151 &spr_read_generic
, &spr_write_generic
,
4153 /* Hardware implementation register */
4154 /* XXX : not implemented */
4155 spr_register(env
, SPR_HID0
, "HID0",
4156 SPR_NOACCESS
, SPR_NOACCESS
,
4157 &spr_read_generic
, &spr_write_generic
,
4159 /* XXX : not implemented */
4160 spr_register(env
, SPR_HID1
, "HID1",
4161 SPR_NOACCESS
, SPR_NOACCESS
,
4162 &spr_read_generic
, &spr_write_generic
,
4164 /* XXX : not implemented */
4165 spr_register(env
, SPR_HID2
, "HID2",
4166 SPR_NOACCESS
, SPR_NOACCESS
,
4167 &spr_read_generic
, &spr_write_generic
,
4169 /* Memory management */
4172 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4174 env
->dcache_line_size
= 32;
4175 env
->icache_line_size
= 32;
4176 /* Allocate hardware IRQ controller */
4177 ppc6xx_irq_init(env
);
4181 /* XXX: unimplemented instructions:
4188 * all SPE multiply-accumulate instructions
4190 #define POWERPC_INSNS_e200 (PPC_INSNS_BASE | PPC_ISEL | \
4191 PPC_SPE | PPC_SPE_SINGLE | \
4192 PPC_WRTEE | PPC_RFDI | \
4193 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4194 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4195 PPC_MEM_TLBSYNC | PPC_TLBIVAX | \
4197 #define POWERPC_INSNS2_e200 (PPC_NONE)
4198 #define POWERPC_MSRM_e200 (0x000000000606FF30ULL)
4199 #define POWERPC_MMU_e200 (POWERPC_MMU_BOOKE206)
4200 #define POWERPC_EXCP_e200 (POWERPC_EXCP_BOOKE)
4201 #define POWERPC_INPUT_e200 (PPC_FLAGS_INPUT_BookE)
4202 #define POWERPC_BFDM_e200 (bfd_mach_ppc_860)
4203 #define POWERPC_FLAG_e200 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4204 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4205 POWERPC_FLAG_BUS_CLK)
4206 #define check_pow_e200 check_pow_hid0
4208 __attribute__ (( unused
))
4209 static void init_proc_e200 (CPUPPCState
*env
)
4213 gen_spr_BookE(env
, 0x000000070000FFFFULL
);
4214 /* XXX : not implemented */
4215 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4216 &spr_read_spefscr
, &spr_write_spefscr
,
4217 &spr_read_spefscr
, &spr_write_spefscr
,
4219 /* Memory management */
4220 gen_spr_BookE206(env
, 0x0000005D, NULL
);
4221 /* XXX : not implemented */
4222 spr_register(env
, SPR_HID0
, "HID0",
4223 SPR_NOACCESS
, SPR_NOACCESS
,
4224 &spr_read_generic
, &spr_write_generic
,
4226 /* XXX : not implemented */
4227 spr_register(env
, SPR_HID1
, "HID1",
4228 SPR_NOACCESS
, SPR_NOACCESS
,
4229 &spr_read_generic
, &spr_write_generic
,
4231 /* XXX : not implemented */
4232 spr_register(env
, SPR_Exxx_ALTCTXCR
, "ALTCTXCR",
4233 SPR_NOACCESS
, SPR_NOACCESS
,
4234 &spr_read_generic
, &spr_write_generic
,
4236 /* XXX : not implemented */
4237 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4238 SPR_NOACCESS
, SPR_NOACCESS
,
4239 &spr_read_generic
, &spr_write_generic
,
4241 /* XXX : not implemented */
4242 spr_register(env
, SPR_Exxx_CTXCR
, "CTXCR",
4243 SPR_NOACCESS
, SPR_NOACCESS
,
4244 &spr_read_generic
, &spr_write_generic
,
4246 /* XXX : not implemented */
4247 spr_register(env
, SPR_Exxx_DBCNT
, "DBCNT",
4248 SPR_NOACCESS
, SPR_NOACCESS
,
4249 &spr_read_generic
, &spr_write_generic
,
4251 /* XXX : not implemented */
4252 spr_register(env
, SPR_Exxx_DBCR3
, "DBCR3",
4253 SPR_NOACCESS
, SPR_NOACCESS
,
4254 &spr_read_generic
, &spr_write_generic
,
4256 /* XXX : not implemented */
4257 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4258 SPR_NOACCESS
, SPR_NOACCESS
,
4259 &spr_read_generic
, &spr_write_generic
,
4261 /* XXX : not implemented */
4262 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4263 SPR_NOACCESS
, SPR_NOACCESS
,
4264 &spr_read_generic
, &spr_write_generic
,
4266 /* XXX : not implemented */
4267 spr_register(env
, SPR_Exxx_L1FINV0
, "L1FINV0",
4268 SPR_NOACCESS
, SPR_NOACCESS
,
4269 &spr_read_generic
, &spr_write_generic
,
4271 /* XXX : not implemented */
4272 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
4273 SPR_NOACCESS
, SPR_NOACCESS
,
4274 &spr_read_generic
, &spr_write_generic
,
4276 /* XXX : not implemented */
4277 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
4278 SPR_NOACCESS
, SPR_NOACCESS
,
4279 &spr_read_generic
, &spr_write_generic
,
4281 /* XXX : not implemented */
4282 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
4283 SPR_NOACCESS
, SPR_NOACCESS
,
4284 &spr_read_generic
, &spr_write_generic
,
4286 /* XXX : not implemented */
4287 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
4288 SPR_NOACCESS
, SPR_NOACCESS
,
4289 &spr_read_generic
, &spr_write_generic
,
4291 /* XXX : not implemented */
4292 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
4293 SPR_NOACCESS
, SPR_NOACCESS
,
4294 &spr_read_generic
, &spr_write_generic
,
4295 0x00000000); /* TOFIX */
4296 spr_register(env
, SPR_BOOKE_DSRR0
, "DSRR0",
4297 SPR_NOACCESS
, SPR_NOACCESS
,
4298 &spr_read_generic
, &spr_write_generic
,
4300 spr_register(env
, SPR_BOOKE_DSRR1
, "DSRR1",
4301 SPR_NOACCESS
, SPR_NOACCESS
,
4302 &spr_read_generic
, &spr_write_generic
,
4304 #if !defined(CONFIG_USER_ONLY)
4308 env
->tlb_type
= TLB_EMB
;
4310 init_excp_e200(env
);
4311 env
->dcache_line_size
= 32;
4312 env
->icache_line_size
= 32;
4313 /* XXX: TODO: allocate internal IRQ controller */
4317 #define POWERPC_INSNS_e300 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4318 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4319 PPC_FLOAT_STFIWX | \
4320 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4321 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4322 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4323 PPC_SEGMENT | PPC_EXTERN)
4324 #define POWERPC_INSNS2_e300 (PPC_NONE)
4325 #define POWERPC_MSRM_e300 (0x000000000007FFF3ULL)
4326 #define POWERPC_MMU_e300 (POWERPC_MMU_SOFT_6xx)
4327 #define POWERPC_EXCP_e300 (POWERPC_EXCP_603)
4328 #define POWERPC_INPUT_e300 (PPC_FLAGS_INPUT_6xx)
4329 #define POWERPC_BFDM_e300 (bfd_mach_ppc_603)
4330 #define POWERPC_FLAG_e300 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4331 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4332 #define check_pow_e300 check_pow_hid0
4334 __attribute__ (( unused
))
4335 static void init_proc_e300 (CPUPPCState
*env
)
4337 gen_spr_ne_601(env
);
4341 /* hardware implementation registers */
4342 /* XXX : not implemented */
4343 spr_register(env
, SPR_HID0
, "HID0",
4344 SPR_NOACCESS
, SPR_NOACCESS
,
4345 &spr_read_generic
, &spr_write_generic
,
4347 /* XXX : not implemented */
4348 spr_register(env
, SPR_HID1
, "HID1",
4349 SPR_NOACCESS
, SPR_NOACCESS
,
4350 &spr_read_generic
, &spr_write_generic
,
4352 /* XXX : not implemented */
4353 spr_register(env
, SPR_HID2
, "HID2",
4354 SPR_NOACCESS
, SPR_NOACCESS
,
4355 &spr_read_generic
, &spr_write_generic
,
4357 /* Memory management */
4360 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4362 env
->dcache_line_size
= 32;
4363 env
->icache_line_size
= 32;
4364 /* Allocate hardware IRQ controller */
4365 ppc6xx_irq_init(env
);
4369 #define POWERPC_INSNS_e500v1 (PPC_INSNS_BASE | PPC_ISEL | \
4370 PPC_SPE | PPC_SPE_SINGLE | \
4371 PPC_WRTEE | PPC_RFDI | \
4372 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4373 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4374 PPC_MEM_TLBSYNC | PPC_TLBIVAX | PPC_MEM_SYNC)
4375 #define POWERPC_INSNS2_e500v1 (PPC2_BOOKE206)
4376 #define POWERPC_MSRM_e500v1 (0x000000000606FF30ULL)
4377 #define POWERPC_MMU_e500v1 (POWERPC_MMU_BOOKE206)
4378 #define POWERPC_EXCP_e500v1 (POWERPC_EXCP_BOOKE)
4379 #define POWERPC_INPUT_e500v1 (PPC_FLAGS_INPUT_BookE)
4380 #define POWERPC_BFDM_e500v1 (bfd_mach_ppc_860)
4381 #define POWERPC_FLAG_e500v1 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4382 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4383 POWERPC_FLAG_BUS_CLK)
4384 #define check_pow_e500v1 check_pow_hid0
4385 #define init_proc_e500v1 init_proc_e500v1
4388 #define POWERPC_INSNS_e500v2 (PPC_INSNS_BASE | PPC_ISEL | \
4389 PPC_SPE | PPC_SPE_SINGLE | PPC_SPE_DOUBLE | \
4390 PPC_WRTEE | PPC_RFDI | \
4391 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4392 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4393 PPC_MEM_TLBSYNC | PPC_TLBIVAX | PPC_MEM_SYNC)
4394 #define POWERPC_INSNS2_e500v2 (PPC2_BOOKE206)
4395 #define POWERPC_MSRM_e500v2 (0x000000000606FF30ULL)
4396 #define POWERPC_MMU_e500v2 (POWERPC_MMU_BOOKE206)
4397 #define POWERPC_EXCP_e500v2 (POWERPC_EXCP_BOOKE)
4398 #define POWERPC_INPUT_e500v2 (PPC_FLAGS_INPUT_BookE)
4399 #define POWERPC_BFDM_e500v2 (bfd_mach_ppc_860)
4400 #define POWERPC_FLAG_e500v2 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4401 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4402 POWERPC_FLAG_BUS_CLK)
4403 #define check_pow_e500v2 check_pow_hid0
4404 #define init_proc_e500v2 init_proc_e500v2
4407 #define POWERPC_INSNS_e500mc (PPC_INSNS_BASE | PPC_ISEL | \
4408 PPC_WRTEE | PPC_RFDI | PPC_RFMCI | \
4409 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4410 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4411 PPC_FLOAT | PPC_FLOAT_FRES | \
4412 PPC_FLOAT_FRSQRTE | PPC_FLOAT_FSEL | \
4413 PPC_FLOAT_STFIWX | PPC_WAIT | \
4414 PPC_MEM_TLBSYNC | PPC_TLBIVAX | PPC_MEM_SYNC)
4415 #define POWERPC_INSNS2_e500mc (PPC2_BOOKE206 | PPC2_PRCNTL)
4416 #define POWERPC_MSRM_e500mc (0x000000001402FB36ULL)
4417 #define POWERPC_MMU_e500mc (POWERPC_MMU_BOOKE206)
4418 #define POWERPC_EXCP_e500mc (POWERPC_EXCP_BOOKE)
4419 #define POWERPC_INPUT_e500mc (PPC_FLAGS_INPUT_BookE)
4420 /* Fixme: figure out the correct flag for e500mc */
4421 #define POWERPC_BFDM_e500mc (bfd_mach_ppc_e500)
4422 #define POWERPC_FLAG_e500mc (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
4423 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4424 #define check_pow_e500mc check_pow_none
4425 #define init_proc_e500mc init_proc_e500mc
4427 enum fsl_e500_version
{
4433 static void init_proc_e500 (CPUPPCState
*env
, int version
)
4435 uint32_t tlbncfg
[2];
4436 uint64_t ivor_mask
= 0x0000000F0000FFFFULL
;
4437 uint32_t l1cfg0
= 0x3800 /* 8 ways */
4438 | 0x0020; /* 32 kb */
4439 #if !defined(CONFIG_USER_ONLY)
4446 * XXX The e500 doesn't implement IVOR7 and IVOR9, but doesn't
4447 * complain when accessing them.
4448 * gen_spr_BookE(env, 0x0000000F0000FD7FULL);
4450 if (version
== fsl_e500mc
) {
4451 ivor_mask
= 0x000003FE0000FFFFULL
;
4453 gen_spr_BookE(env
, ivor_mask
);
4454 /* Processor identification */
4455 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
4456 SPR_NOACCESS
, SPR_NOACCESS
,
4457 &spr_read_generic
, &spr_write_pir
,
4459 /* XXX : not implemented */
4460 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4461 &spr_read_spefscr
, &spr_write_spefscr
,
4462 &spr_read_spefscr
, &spr_write_spefscr
,
4464 /* Memory management */
4465 #if !defined(CONFIG_USER_ONLY)
4472 tlbncfg
[0] = gen_tlbncfg(2, 1, 1, 0, 256);
4473 tlbncfg
[1] = gen_tlbncfg(16, 1, 9, TLBnCFG_AVAIL
| TLBnCFG_IPROT
, 16);
4474 env
->dcache_line_size
= 32;
4475 env
->icache_line_size
= 32;
4479 tlbncfg
[0] = gen_tlbncfg(4, 1, 1, 0, 512);
4480 tlbncfg
[1] = gen_tlbncfg(16, 1, 12, TLBnCFG_AVAIL
| TLBnCFG_IPROT
, 16);
4481 env
->dcache_line_size
= 32;
4482 env
->icache_line_size
= 32;
4486 tlbncfg
[0] = gen_tlbncfg(4, 1, 1, 0, 512);
4487 tlbncfg
[1] = gen_tlbncfg(64, 1, 12, TLBnCFG_AVAIL
| TLBnCFG_IPROT
, 64);
4488 env
->dcache_line_size
= 64;
4489 env
->icache_line_size
= 64;
4490 l1cfg0
|= 0x1000000; /* 64 byte cache block size */
4493 cpu_abort(env
, "Unknown CPU: " TARGET_FMT_lx
"\n", env
->spr
[SPR_PVR
]);
4496 gen_spr_BookE206(env
, 0x000000DF, tlbncfg
);
4497 /* XXX : not implemented */
4498 spr_register(env
, SPR_HID0
, "HID0",
4499 SPR_NOACCESS
, SPR_NOACCESS
,
4500 &spr_read_generic
, &spr_write_generic
,
4502 /* XXX : not implemented */
4503 spr_register(env
, SPR_HID1
, "HID1",
4504 SPR_NOACCESS
, SPR_NOACCESS
,
4505 &spr_read_generic
, &spr_write_generic
,
4507 /* XXX : not implemented */
4508 spr_register(env
, SPR_Exxx_BBEAR
, "BBEAR",
4509 SPR_NOACCESS
, SPR_NOACCESS
,
4510 &spr_read_generic
, &spr_write_generic
,
4512 /* XXX : not implemented */
4513 spr_register(env
, SPR_Exxx_BBTAR
, "BBTAR",
4514 SPR_NOACCESS
, SPR_NOACCESS
,
4515 &spr_read_generic
, &spr_write_generic
,
4517 /* XXX : not implemented */
4518 spr_register(env
, SPR_Exxx_MCAR
, "MCAR",
4519 SPR_NOACCESS
, SPR_NOACCESS
,
4520 &spr_read_generic
, &spr_write_generic
,
4522 /* XXX : not implemented */
4523 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
4524 SPR_NOACCESS
, SPR_NOACCESS
,
4525 &spr_read_generic
, &spr_write_generic
,
4527 /* XXX : not implemented */
4528 spr_register(env
, SPR_Exxx_NPIDR
, "NPIDR",
4529 SPR_NOACCESS
, SPR_NOACCESS
,
4530 &spr_read_generic
, &spr_write_generic
,
4532 /* XXX : not implemented */
4533 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4534 SPR_NOACCESS
, SPR_NOACCESS
,
4535 &spr_read_generic
, &spr_write_generic
,
4537 /* XXX : not implemented */
4538 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4539 SPR_NOACCESS
, SPR_NOACCESS
,
4540 &spr_read_generic
, &spr_write_generic
,
4542 /* XXX : not implemented */
4543 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4544 SPR_NOACCESS
, SPR_NOACCESS
,
4545 &spr_read_generic
, &spr_write_e500_l1csr0
,
4547 /* XXX : not implemented */
4548 spr_register(env
, SPR_Exxx_L1CSR1
, "L1CSR1",
4549 SPR_NOACCESS
, SPR_NOACCESS
,
4550 &spr_read_generic
, &spr_write_generic
,
4552 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
4553 SPR_NOACCESS
, SPR_NOACCESS
,
4554 &spr_read_generic
, &spr_write_generic
,
4556 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
4557 SPR_NOACCESS
, SPR_NOACCESS
,
4558 &spr_read_generic
, &spr_write_generic
,
4560 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
4561 SPR_NOACCESS
, SPR_NOACCESS
,
4562 &spr_read_generic
, &spr_write_booke206_mmucsr0
,
4565 #if !defined(CONFIG_USER_ONLY)
4567 env
->tlb_type
= TLB_MAS
;
4568 for (i
= 0; i
< BOOKE206_MAX_TLBN
; i
++) {
4569 env
->nb_tlb
+= booke206_tlb_size(env
, i
);
4573 init_excp_e200(env
);
4574 /* Allocate hardware IRQ controller */
4575 ppce500_irq_init(env
);
4578 static void init_proc_e500v1(CPUPPCState
*env
)
4580 init_proc_e500(env
, fsl_e500v1
);
4583 static void init_proc_e500v2(CPUPPCState
*env
)
4585 init_proc_e500(env
, fsl_e500v2
);
4588 static void init_proc_e500mc(CPUPPCState
*env
)
4590 init_proc_e500(env
, fsl_e500mc
);
4593 /* Non-embedded PowerPC */
4595 /* POWER : same as 601, without mfmsr, mfsr */
4597 #define POWERPC_INSNS_POWER (XXX_TODO)
4598 /* POWER RSC (from RAD6000) */
4599 #define POWERPC_MSRM_POWER (0x00000000FEF0ULL)
4603 #define POWERPC_INSNS_601 (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4605 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4606 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4607 PPC_SEGMENT | PPC_EXTERN)
4608 #define POWERPC_INSNS2_601 (PPC_NONE)
4609 #define POWERPC_MSRM_601 (0x000000000000FD70ULL)
4610 #define POWERPC_MSRR_601 (0x0000000000001040ULL)
4611 //#define POWERPC_MMU_601 (POWERPC_MMU_601)
4612 //#define POWERPC_EXCP_601 (POWERPC_EXCP_601)
4613 #define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx)
4614 #define POWERPC_BFDM_601 (bfd_mach_ppc_601)
4615 #define POWERPC_FLAG_601 (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4616 #define check_pow_601 check_pow_none
4618 static void init_proc_601 (CPUPPCState
*env
)
4620 gen_spr_ne_601(env
);
4622 /* Hardware implementation registers */
4623 /* XXX : not implemented */
4624 spr_register(env
, SPR_HID0
, "HID0",
4625 SPR_NOACCESS
, SPR_NOACCESS
,
4626 &spr_read_generic
, &spr_write_hid0_601
,
4628 /* XXX : not implemented */
4629 spr_register(env
, SPR_HID1
, "HID1",
4630 SPR_NOACCESS
, SPR_NOACCESS
,
4631 &spr_read_generic
, &spr_write_generic
,
4633 /* XXX : not implemented */
4634 spr_register(env
, SPR_601_HID2
, "HID2",
4635 SPR_NOACCESS
, SPR_NOACCESS
,
4636 &spr_read_generic
, &spr_write_generic
,
4638 /* XXX : not implemented */
4639 spr_register(env
, SPR_601_HID5
, "HID5",
4640 SPR_NOACCESS
, SPR_NOACCESS
,
4641 &spr_read_generic
, &spr_write_generic
,
4643 /* Memory management */
4645 /* XXX: beware that dcache line size is 64
4646 * but dcbz uses 32 bytes "sectors"
4647 * XXX: this breaks clcs instruction !
4649 env
->dcache_line_size
= 32;
4650 env
->icache_line_size
= 64;
4651 /* Allocate hardware IRQ controller */
4652 ppc6xx_irq_init(env
);
4656 #define POWERPC_INSNS_601v (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4658 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4659 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4660 PPC_SEGMENT | PPC_EXTERN)
4661 #define POWERPC_INSNS2_601v (PPC_NONE)
4662 #define POWERPC_MSRM_601v (0x000000000000FD70ULL)
4663 #define POWERPC_MSRR_601v (0x0000000000001040ULL)
4664 #define POWERPC_MMU_601v (POWERPC_MMU_601)
4665 #define POWERPC_EXCP_601v (POWERPC_EXCP_601)
4666 #define POWERPC_INPUT_601v (PPC_FLAGS_INPUT_6xx)
4667 #define POWERPC_BFDM_601v (bfd_mach_ppc_601)
4668 #define POWERPC_FLAG_601v (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4669 #define check_pow_601v check_pow_none
4671 static void init_proc_601v (CPUPPCState
*env
)
4674 /* XXX : not implemented */
4675 spr_register(env
, SPR_601_HID15
, "HID15",
4676 SPR_NOACCESS
, SPR_NOACCESS
,
4677 &spr_read_generic
, &spr_write_generic
,
4682 #define POWERPC_INSNS_602 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4683 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4684 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4685 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4686 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4687 PPC_MEM_TLBIE | PPC_6xx_TLB | PPC_MEM_TLBSYNC | \
4688 PPC_SEGMENT | PPC_602_SPEC)
4689 #define POWERPC_INSNS2_602 (PPC_NONE)
4690 #define POWERPC_MSRM_602 (0x0000000000C7FF73ULL)
4691 /* XXX: 602 MMU is quite specific. Should add a special case */
4692 #define POWERPC_MMU_602 (POWERPC_MMU_SOFT_6xx)
4693 //#define POWERPC_EXCP_602 (POWERPC_EXCP_602)
4694 #define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx)
4695 #define POWERPC_BFDM_602 (bfd_mach_ppc_602)
4696 #define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4697 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4698 #define check_pow_602 check_pow_hid0
4700 static void init_proc_602 (CPUPPCState
*env
)
4702 gen_spr_ne_601(env
);
4706 /* hardware implementation registers */
4707 /* XXX : not implemented */
4708 spr_register(env
, SPR_HID0
, "HID0",
4709 SPR_NOACCESS
, SPR_NOACCESS
,
4710 &spr_read_generic
, &spr_write_generic
,
4712 /* XXX : not implemented */
4713 spr_register(env
, SPR_HID1
, "HID1",
4714 SPR_NOACCESS
, SPR_NOACCESS
,
4715 &spr_read_generic
, &spr_write_generic
,
4717 /* Memory management */
4719 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4721 env
->dcache_line_size
= 32;
4722 env
->icache_line_size
= 32;
4723 /* Allocate hardware IRQ controller */
4724 ppc6xx_irq_init(env
);
4728 #define POWERPC_INSNS_603 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4729 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4730 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4731 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4732 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4733 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4734 PPC_SEGMENT | PPC_EXTERN)
4735 #define POWERPC_INSNS2_603 (PPC_NONE)
4736 #define POWERPC_MSRM_603 (0x000000000007FF73ULL)
4737 #define POWERPC_MMU_603 (POWERPC_MMU_SOFT_6xx)
4738 //#define POWERPC_EXCP_603 (POWERPC_EXCP_603)
4739 #define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx)
4740 #define POWERPC_BFDM_603 (bfd_mach_ppc_603)
4741 #define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4742 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4743 #define check_pow_603 check_pow_hid0
4745 static void init_proc_603 (CPUPPCState
*env
)
4747 gen_spr_ne_601(env
);
4751 /* hardware implementation registers */
4752 /* XXX : not implemented */
4753 spr_register(env
, SPR_HID0
, "HID0",
4754 SPR_NOACCESS
, SPR_NOACCESS
,
4755 &spr_read_generic
, &spr_write_generic
,
4757 /* XXX : not implemented */
4758 spr_register(env
, SPR_HID1
, "HID1",
4759 SPR_NOACCESS
, SPR_NOACCESS
,
4760 &spr_read_generic
, &spr_write_generic
,
4762 /* Memory management */
4764 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4766 env
->dcache_line_size
= 32;
4767 env
->icache_line_size
= 32;
4768 /* Allocate hardware IRQ controller */
4769 ppc6xx_irq_init(env
);
4773 #define POWERPC_INSNS_603E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4774 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4775 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4776 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4777 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4778 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4779 PPC_SEGMENT | PPC_EXTERN)
4780 #define POWERPC_INSNS2_603E (PPC_NONE)
4781 #define POWERPC_MSRM_603E (0x000000000007FF73ULL)
4782 #define POWERPC_MMU_603E (POWERPC_MMU_SOFT_6xx)
4783 //#define POWERPC_EXCP_603E (POWERPC_EXCP_603E)
4784 #define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx)
4785 #define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e)
4786 #define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4787 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4788 #define check_pow_603E check_pow_hid0
4790 static void init_proc_603E (CPUPPCState
*env
)
4792 gen_spr_ne_601(env
);
4796 /* hardware implementation registers */
4797 /* XXX : not implemented */
4798 spr_register(env
, SPR_HID0
, "HID0",
4799 SPR_NOACCESS
, SPR_NOACCESS
,
4800 &spr_read_generic
, &spr_write_generic
,
4802 /* XXX : not implemented */
4803 spr_register(env
, SPR_HID1
, "HID1",
4804 SPR_NOACCESS
, SPR_NOACCESS
,
4805 &spr_read_generic
, &spr_write_generic
,
4807 /* XXX : not implemented */
4808 spr_register(env
, SPR_IABR
, "IABR",
4809 SPR_NOACCESS
, SPR_NOACCESS
,
4810 &spr_read_generic
, &spr_write_generic
,
4812 /* Memory management */
4814 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4816 env
->dcache_line_size
= 32;
4817 env
->icache_line_size
= 32;
4818 /* Allocate hardware IRQ controller */
4819 ppc6xx_irq_init(env
);
4823 #define POWERPC_INSNS_604 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4824 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4825 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4826 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4827 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4828 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4829 PPC_SEGMENT | PPC_EXTERN)
4830 #define POWERPC_INSNS2_604 (PPC_NONE)
4831 #define POWERPC_MSRM_604 (0x000000000005FF77ULL)
4832 #define POWERPC_MMU_604 (POWERPC_MMU_32B)
4833 //#define POWERPC_EXCP_604 (POWERPC_EXCP_604)
4834 #define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx)
4835 #define POWERPC_BFDM_604 (bfd_mach_ppc_604)
4836 #define POWERPC_FLAG_604 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4837 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4838 #define check_pow_604 check_pow_nocheck
4840 static void init_proc_604 (CPUPPCState
*env
)
4842 gen_spr_ne_601(env
);
4846 /* Hardware implementation registers */
4847 /* XXX : not implemented */
4848 spr_register(env
, SPR_HID0
, "HID0",
4849 SPR_NOACCESS
, SPR_NOACCESS
,
4850 &spr_read_generic
, &spr_write_generic
,
4852 /* Memory management */
4855 env
->dcache_line_size
= 32;
4856 env
->icache_line_size
= 32;
4857 /* Allocate hardware IRQ controller */
4858 ppc6xx_irq_init(env
);
4862 #define POWERPC_INSNS_604E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4863 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4864 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4865 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4866 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4867 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4868 PPC_SEGMENT | PPC_EXTERN)
4869 #define POWERPC_INSNS2_604E (PPC_NONE)
4870 #define POWERPC_MSRM_604E (0x000000000005FF77ULL)
4871 #define POWERPC_MMU_604E (POWERPC_MMU_32B)
4872 #define POWERPC_EXCP_604E (POWERPC_EXCP_604)
4873 #define POWERPC_INPUT_604E (PPC_FLAGS_INPUT_6xx)
4874 #define POWERPC_BFDM_604E (bfd_mach_ppc_604)
4875 #define POWERPC_FLAG_604E (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4876 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4877 #define check_pow_604E check_pow_nocheck
4879 static void init_proc_604E (CPUPPCState
*env
)
4881 gen_spr_ne_601(env
);
4883 /* XXX : not implemented */
4884 spr_register(env
, SPR_MMCR1
, "MMCR1",
4885 SPR_NOACCESS
, SPR_NOACCESS
,
4886 &spr_read_generic
, &spr_write_generic
,
4888 /* XXX : not implemented */
4889 spr_register(env
, SPR_PMC3
, "PMC3",
4890 SPR_NOACCESS
, SPR_NOACCESS
,
4891 &spr_read_generic
, &spr_write_generic
,
4893 /* XXX : not implemented */
4894 spr_register(env
, SPR_PMC4
, "PMC4",
4895 SPR_NOACCESS
, SPR_NOACCESS
,
4896 &spr_read_generic
, &spr_write_generic
,
4900 /* Hardware implementation registers */
4901 /* XXX : not implemented */
4902 spr_register(env
, SPR_HID0
, "HID0",
4903 SPR_NOACCESS
, SPR_NOACCESS
,
4904 &spr_read_generic
, &spr_write_generic
,
4906 /* XXX : not implemented */
4907 spr_register(env
, SPR_HID1
, "HID1",
4908 SPR_NOACCESS
, SPR_NOACCESS
,
4909 &spr_read_generic
, &spr_write_generic
,
4911 /* Memory management */
4914 env
->dcache_line_size
= 32;
4915 env
->icache_line_size
= 32;
4916 /* Allocate hardware IRQ controller */
4917 ppc6xx_irq_init(env
);
4921 #define POWERPC_INSNS_740 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4922 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4923 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4924 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4925 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4926 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4927 PPC_SEGMENT | PPC_EXTERN)
4928 #define POWERPC_INSNS2_740 (PPC_NONE)
4929 #define POWERPC_MSRM_740 (0x000000000005FF77ULL)
4930 #define POWERPC_MMU_740 (POWERPC_MMU_32B)
4931 #define POWERPC_EXCP_740 (POWERPC_EXCP_7x0)
4932 #define POWERPC_INPUT_740 (PPC_FLAGS_INPUT_6xx)
4933 #define POWERPC_BFDM_740 (bfd_mach_ppc_750)
4934 #define POWERPC_FLAG_740 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4935 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4936 #define check_pow_740 check_pow_hid0
4938 static void init_proc_740 (CPUPPCState
*env
)
4940 gen_spr_ne_601(env
);
4944 /* Thermal management */
4946 /* Hardware implementation registers */
4947 /* XXX : not implemented */
4948 spr_register(env
, SPR_HID0
, "HID0",
4949 SPR_NOACCESS
, SPR_NOACCESS
,
4950 &spr_read_generic
, &spr_write_generic
,
4952 /* XXX : not implemented */
4953 spr_register(env
, SPR_HID1
, "HID1",
4954 SPR_NOACCESS
, SPR_NOACCESS
,
4955 &spr_read_generic
, &spr_write_generic
,
4957 /* Memory management */
4960 env
->dcache_line_size
= 32;
4961 env
->icache_line_size
= 32;
4962 /* Allocate hardware IRQ controller */
4963 ppc6xx_irq_init(env
);
4967 #define POWERPC_INSNS_750 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4968 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4969 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4970 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4971 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4972 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4973 PPC_SEGMENT | PPC_EXTERN)
4974 #define POWERPC_INSNS2_750 (PPC_NONE)
4975 #define POWERPC_MSRM_750 (0x000000000005FF77ULL)
4976 #define POWERPC_MMU_750 (POWERPC_MMU_32B)
4977 #define POWERPC_EXCP_750 (POWERPC_EXCP_7x0)
4978 #define POWERPC_INPUT_750 (PPC_FLAGS_INPUT_6xx)
4979 #define POWERPC_BFDM_750 (bfd_mach_ppc_750)
4980 #define POWERPC_FLAG_750 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4981 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4982 #define check_pow_750 check_pow_hid0
4984 static void init_proc_750 (CPUPPCState
*env
)
4986 gen_spr_ne_601(env
);
4988 /* XXX : not implemented */
4989 spr_register(env
, SPR_L2CR
, "L2CR",
4990 SPR_NOACCESS
, SPR_NOACCESS
,
4991 &spr_read_generic
, &spr_write_generic
,
4995 /* Thermal management */
4997 /* Hardware implementation registers */
4998 /* XXX : not implemented */
4999 spr_register(env
, SPR_HID0
, "HID0",
5000 SPR_NOACCESS
, SPR_NOACCESS
,
5001 &spr_read_generic
, &spr_write_generic
,
5003 /* XXX : not implemented */
5004 spr_register(env
, SPR_HID1
, "HID1",
5005 SPR_NOACCESS
, SPR_NOACCESS
,
5006 &spr_read_generic
, &spr_write_generic
,
5008 /* Memory management */
5010 /* XXX: high BATs are also present but are known to be bugged on
5014 env
->dcache_line_size
= 32;
5015 env
->icache_line_size
= 32;
5016 /* Allocate hardware IRQ controller */
5017 ppc6xx_irq_init(env
);
5020 /* PowerPC 750 CL */
5021 /* XXX: not implemented:
5022 * cache lock instructions:
5024 * floating point paired instructions
5059 #define POWERPC_INSNS_750cl (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5060 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5061 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5062 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5063 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5064 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5065 PPC_SEGMENT | PPC_EXTERN)
5066 #define POWERPC_INSNS2_750cl (PPC_NONE)
5067 #define POWERPC_MSRM_750cl (0x000000000005FF77ULL)
5068 #define POWERPC_MMU_750cl (POWERPC_MMU_32B)
5069 #define POWERPC_EXCP_750cl (POWERPC_EXCP_7x0)
5070 #define POWERPC_INPUT_750cl (PPC_FLAGS_INPUT_6xx)
5071 #define POWERPC_BFDM_750cl (bfd_mach_ppc_750)
5072 #define POWERPC_FLAG_750cl (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5073 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5074 #define check_pow_750cl check_pow_hid0
5076 static void init_proc_750cl (CPUPPCState
*env
)
5078 gen_spr_ne_601(env
);
5080 /* XXX : not implemented */
5081 spr_register(env
, SPR_L2CR
, "L2CR",
5082 SPR_NOACCESS
, SPR_NOACCESS
,
5083 &spr_read_generic
, &spr_write_generic
,
5087 /* Thermal management */
5088 /* Those registers are fake on 750CL */
5089 spr_register(env
, SPR_THRM1
, "THRM1",
5090 SPR_NOACCESS
, SPR_NOACCESS
,
5091 &spr_read_generic
, &spr_write_generic
,
5093 spr_register(env
, SPR_THRM2
, "THRM2",
5094 SPR_NOACCESS
, SPR_NOACCESS
,
5095 &spr_read_generic
, &spr_write_generic
,
5097 spr_register(env
, SPR_THRM3
, "THRM3",
5098 SPR_NOACCESS
, SPR_NOACCESS
,
5099 &spr_read_generic
, &spr_write_generic
,
5101 /* XXX: not implemented */
5102 spr_register(env
, SPR_750_TDCL
, "TDCL",
5103 SPR_NOACCESS
, SPR_NOACCESS
,
5104 &spr_read_generic
, &spr_write_generic
,
5106 spr_register(env
, SPR_750_TDCH
, "TDCH",
5107 SPR_NOACCESS
, SPR_NOACCESS
,
5108 &spr_read_generic
, &spr_write_generic
,
5111 /* XXX : not implemented */
5112 spr_register(env
, SPR_750_WPAR
, "WPAR",
5113 SPR_NOACCESS
, SPR_NOACCESS
,
5114 &spr_read_generic
, &spr_write_generic
,
5116 spr_register(env
, SPR_750_DMAL
, "DMAL",
5117 SPR_NOACCESS
, SPR_NOACCESS
,
5118 &spr_read_generic
, &spr_write_generic
,
5120 spr_register(env
, SPR_750_DMAU
, "DMAU",
5121 SPR_NOACCESS
, SPR_NOACCESS
,
5122 &spr_read_generic
, &spr_write_generic
,
5124 /* Hardware implementation registers */
5125 /* XXX : not implemented */
5126 spr_register(env
, SPR_HID0
, "HID0",
5127 SPR_NOACCESS
, SPR_NOACCESS
,
5128 &spr_read_generic
, &spr_write_generic
,
5130 /* XXX : not implemented */
5131 spr_register(env
, SPR_HID1
, "HID1",
5132 SPR_NOACCESS
, SPR_NOACCESS
,
5133 &spr_read_generic
, &spr_write_generic
,
5135 /* XXX : not implemented */
5136 spr_register(env
, SPR_750CL_HID2
, "HID2",
5137 SPR_NOACCESS
, SPR_NOACCESS
,
5138 &spr_read_generic
, &spr_write_generic
,
5140 /* XXX : not implemented */
5141 spr_register(env
, SPR_750CL_HID4
, "HID4",
5142 SPR_NOACCESS
, SPR_NOACCESS
,
5143 &spr_read_generic
, &spr_write_generic
,
5145 /* Quantization registers */
5146 /* XXX : not implemented */
5147 spr_register(env
, SPR_750_GQR0
, "GQR0",
5148 SPR_NOACCESS
, SPR_NOACCESS
,
5149 &spr_read_generic
, &spr_write_generic
,
5151 /* XXX : not implemented */
5152 spr_register(env
, SPR_750_GQR1
, "GQR1",
5153 SPR_NOACCESS
, SPR_NOACCESS
,
5154 &spr_read_generic
, &spr_write_generic
,
5156 /* XXX : not implemented */
5157 spr_register(env
, SPR_750_GQR2
, "GQR2",
5158 SPR_NOACCESS
, SPR_NOACCESS
,
5159 &spr_read_generic
, &spr_write_generic
,
5161 /* XXX : not implemented */
5162 spr_register(env
, SPR_750_GQR3
, "GQR3",
5163 SPR_NOACCESS
, SPR_NOACCESS
,
5164 &spr_read_generic
, &spr_write_generic
,
5166 /* XXX : not implemented */
5167 spr_register(env
, SPR_750_GQR4
, "GQR4",
5168 SPR_NOACCESS
, SPR_NOACCESS
,
5169 &spr_read_generic
, &spr_write_generic
,
5171 /* XXX : not implemented */
5172 spr_register(env
, SPR_750_GQR5
, "GQR5",
5173 SPR_NOACCESS
, SPR_NOACCESS
,
5174 &spr_read_generic
, &spr_write_generic
,
5176 /* XXX : not implemented */
5177 spr_register(env
, SPR_750_GQR6
, "GQR6",
5178 SPR_NOACCESS
, SPR_NOACCESS
,
5179 &spr_read_generic
, &spr_write_generic
,
5181 /* XXX : not implemented */
5182 spr_register(env
, SPR_750_GQR7
, "GQR7",
5183 SPR_NOACCESS
, SPR_NOACCESS
,
5184 &spr_read_generic
, &spr_write_generic
,
5186 /* Memory management */
5188 /* PowerPC 750cl has 8 DBATs and 8 IBATs */
5190 init_excp_750cl(env
);
5191 env
->dcache_line_size
= 32;
5192 env
->icache_line_size
= 32;
5193 /* Allocate hardware IRQ controller */
5194 ppc6xx_irq_init(env
);
5198 #define POWERPC_INSNS_750cx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5199 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5200 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5201 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5202 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5203 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5204 PPC_SEGMENT | PPC_EXTERN)
5205 #define POWERPC_INSNS2_750cx (PPC_NONE)
5206 #define POWERPC_MSRM_750cx (0x000000000005FF77ULL)
5207 #define POWERPC_MMU_750cx (POWERPC_MMU_32B)
5208 #define POWERPC_EXCP_750cx (POWERPC_EXCP_7x0)
5209 #define POWERPC_INPUT_750cx (PPC_FLAGS_INPUT_6xx)
5210 #define POWERPC_BFDM_750cx (bfd_mach_ppc_750)
5211 #define POWERPC_FLAG_750cx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5212 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5213 #define check_pow_750cx check_pow_hid0
5215 static void init_proc_750cx (CPUPPCState
*env
)
5217 gen_spr_ne_601(env
);
5219 /* XXX : not implemented */
5220 spr_register(env
, SPR_L2CR
, "L2CR",
5221 SPR_NOACCESS
, SPR_NOACCESS
,
5222 &spr_read_generic
, &spr_write_generic
,
5226 /* Thermal management */
5228 /* This register is not implemented but is present for compatibility */
5229 spr_register(env
, SPR_SDA
, "SDA",
5230 SPR_NOACCESS
, SPR_NOACCESS
,
5231 &spr_read_generic
, &spr_write_generic
,
5233 /* Hardware implementation registers */
5234 /* XXX : not implemented */
5235 spr_register(env
, SPR_HID0
, "HID0",
5236 SPR_NOACCESS
, SPR_NOACCESS
,
5237 &spr_read_generic
, &spr_write_generic
,
5239 /* XXX : not implemented */
5240 spr_register(env
, SPR_HID1
, "HID1",
5241 SPR_NOACCESS
, SPR_NOACCESS
,
5242 &spr_read_generic
, &spr_write_generic
,
5244 /* Memory management */
5246 /* PowerPC 750cx has 8 DBATs and 8 IBATs */
5248 init_excp_750cx(env
);
5249 env
->dcache_line_size
= 32;
5250 env
->icache_line_size
= 32;
5251 /* Allocate hardware IRQ controller */
5252 ppc6xx_irq_init(env
);
5256 #define POWERPC_INSNS_750fx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5257 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5258 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5259 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5260 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5261 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5262 PPC_SEGMENT | PPC_EXTERN)
5263 #define POWERPC_INSNS2_750fx (PPC_NONE)
5264 #define POWERPC_MSRM_750fx (0x000000000005FF77ULL)
5265 #define POWERPC_MMU_750fx (POWERPC_MMU_32B)
5266 #define POWERPC_EXCP_750fx (POWERPC_EXCP_7x0)
5267 #define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx)
5268 #define POWERPC_BFDM_750fx (bfd_mach_ppc_750)
5269 #define POWERPC_FLAG_750fx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5270 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5271 #define check_pow_750fx check_pow_hid0
5273 static void init_proc_750fx (CPUPPCState
*env
)
5275 gen_spr_ne_601(env
);
5277 /* XXX : not implemented */
5278 spr_register(env
, SPR_L2CR
, "L2CR",
5279 SPR_NOACCESS
, SPR_NOACCESS
,
5280 &spr_read_generic
, &spr_write_generic
,
5284 /* Thermal management */
5286 /* XXX : not implemented */
5287 spr_register(env
, SPR_750_THRM4
, "THRM4",
5288 SPR_NOACCESS
, SPR_NOACCESS
,
5289 &spr_read_generic
, &spr_write_generic
,
5291 /* Hardware implementation registers */
5292 /* XXX : not implemented */
5293 spr_register(env
, SPR_HID0
, "HID0",
5294 SPR_NOACCESS
, SPR_NOACCESS
,
5295 &spr_read_generic
, &spr_write_generic
,
5297 /* XXX : not implemented */
5298 spr_register(env
, SPR_HID1
, "HID1",
5299 SPR_NOACCESS
, SPR_NOACCESS
,
5300 &spr_read_generic
, &spr_write_generic
,
5302 /* XXX : not implemented */
5303 spr_register(env
, SPR_750FX_HID2
, "HID2",
5304 SPR_NOACCESS
, SPR_NOACCESS
,
5305 &spr_read_generic
, &spr_write_generic
,
5307 /* Memory management */
5309 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5312 env
->dcache_line_size
= 32;
5313 env
->icache_line_size
= 32;
5314 /* Allocate hardware IRQ controller */
5315 ppc6xx_irq_init(env
);
5319 #define POWERPC_INSNS_750gx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5320 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5321 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5322 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5323 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5324 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5325 PPC_SEGMENT | PPC_EXTERN)
5326 #define POWERPC_INSNS2_750gx (PPC_NONE)
5327 #define POWERPC_MSRM_750gx (0x000000000005FF77ULL)
5328 #define POWERPC_MMU_750gx (POWERPC_MMU_32B)
5329 #define POWERPC_EXCP_750gx (POWERPC_EXCP_7x0)
5330 #define POWERPC_INPUT_750gx (PPC_FLAGS_INPUT_6xx)
5331 #define POWERPC_BFDM_750gx (bfd_mach_ppc_750)
5332 #define POWERPC_FLAG_750gx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5333 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5334 #define check_pow_750gx check_pow_hid0
5336 static void init_proc_750gx (CPUPPCState
*env
)
5338 gen_spr_ne_601(env
);
5340 /* XXX : not implemented (XXX: different from 750fx) */
5341 spr_register(env
, SPR_L2CR
, "L2CR",
5342 SPR_NOACCESS
, SPR_NOACCESS
,
5343 &spr_read_generic
, &spr_write_generic
,
5347 /* Thermal management */
5349 /* XXX : not implemented */
5350 spr_register(env
, SPR_750_THRM4
, "THRM4",
5351 SPR_NOACCESS
, SPR_NOACCESS
,
5352 &spr_read_generic
, &spr_write_generic
,
5354 /* Hardware implementation registers */
5355 /* XXX : not implemented (XXX: different from 750fx) */
5356 spr_register(env
, SPR_HID0
, "HID0",
5357 SPR_NOACCESS
, SPR_NOACCESS
,
5358 &spr_read_generic
, &spr_write_generic
,
5360 /* XXX : not implemented */
5361 spr_register(env
, SPR_HID1
, "HID1",
5362 SPR_NOACCESS
, SPR_NOACCESS
,
5363 &spr_read_generic
, &spr_write_generic
,
5365 /* XXX : not implemented (XXX: different from 750fx) */
5366 spr_register(env
, SPR_750FX_HID2
, "HID2",
5367 SPR_NOACCESS
, SPR_NOACCESS
,
5368 &spr_read_generic
, &spr_write_generic
,
5370 /* Memory management */
5372 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5375 env
->dcache_line_size
= 32;
5376 env
->icache_line_size
= 32;
5377 /* Allocate hardware IRQ controller */
5378 ppc6xx_irq_init(env
);
5382 #define POWERPC_INSNS_745 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5383 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5384 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5385 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5386 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5387 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5388 PPC_SEGMENT | PPC_EXTERN)
5389 #define POWERPC_INSNS2_745 (PPC_NONE)
5390 #define POWERPC_MSRM_745 (0x000000000005FF77ULL)
5391 #define POWERPC_MMU_745 (POWERPC_MMU_SOFT_6xx)
5392 #define POWERPC_EXCP_745 (POWERPC_EXCP_7x5)
5393 #define POWERPC_INPUT_745 (PPC_FLAGS_INPUT_6xx)
5394 #define POWERPC_BFDM_745 (bfd_mach_ppc_750)
5395 #define POWERPC_FLAG_745 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5396 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5397 #define check_pow_745 check_pow_hid0
5399 static void init_proc_745 (CPUPPCState
*env
)
5401 gen_spr_ne_601(env
);
5403 gen_spr_G2_755(env
);
5406 /* Thermal management */
5408 /* Hardware implementation registers */
5409 /* XXX : not implemented */
5410 spr_register(env
, SPR_HID0
, "HID0",
5411 SPR_NOACCESS
, SPR_NOACCESS
,
5412 &spr_read_generic
, &spr_write_generic
,
5414 /* XXX : not implemented */
5415 spr_register(env
, SPR_HID1
, "HID1",
5416 SPR_NOACCESS
, SPR_NOACCESS
,
5417 &spr_read_generic
, &spr_write_generic
,
5419 /* XXX : not implemented */
5420 spr_register(env
, SPR_HID2
, "HID2",
5421 SPR_NOACCESS
, SPR_NOACCESS
,
5422 &spr_read_generic
, &spr_write_generic
,
5424 /* Memory management */
5427 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5429 env
->dcache_line_size
= 32;
5430 env
->icache_line_size
= 32;
5431 /* Allocate hardware IRQ controller */
5432 ppc6xx_irq_init(env
);
5436 #define POWERPC_INSNS_755 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5437 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5438 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5439 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5440 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5441 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5442 PPC_SEGMENT | PPC_EXTERN)
5443 #define POWERPC_INSNS2_755 (PPC_NONE)
5444 #define POWERPC_MSRM_755 (0x000000000005FF77ULL)
5445 #define POWERPC_MMU_755 (POWERPC_MMU_SOFT_6xx)
5446 #define POWERPC_EXCP_755 (POWERPC_EXCP_7x5)
5447 #define POWERPC_INPUT_755 (PPC_FLAGS_INPUT_6xx)
5448 #define POWERPC_BFDM_755 (bfd_mach_ppc_750)
5449 #define POWERPC_FLAG_755 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5450 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5451 #define check_pow_755 check_pow_hid0
5453 static void init_proc_755 (CPUPPCState
*env
)
5455 gen_spr_ne_601(env
);
5457 gen_spr_G2_755(env
);
5460 /* L2 cache control */
5461 /* XXX : not implemented */
5462 spr_register(env
, SPR_L2CR
, "L2CR",
5463 SPR_NOACCESS
, SPR_NOACCESS
,
5464 &spr_read_generic
, &spr_write_generic
,
5466 /* XXX : not implemented */
5467 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5468 SPR_NOACCESS
, SPR_NOACCESS
,
5469 &spr_read_generic
, &spr_write_generic
,
5471 /* Thermal management */
5473 /* Hardware implementation registers */
5474 /* XXX : not implemented */
5475 spr_register(env
, SPR_HID0
, "HID0",
5476 SPR_NOACCESS
, SPR_NOACCESS
,
5477 &spr_read_generic
, &spr_write_generic
,
5479 /* XXX : not implemented */
5480 spr_register(env
, SPR_HID1
, "HID1",
5481 SPR_NOACCESS
, SPR_NOACCESS
,
5482 &spr_read_generic
, &spr_write_generic
,
5484 /* XXX : not implemented */
5485 spr_register(env
, SPR_HID2
, "HID2",
5486 SPR_NOACCESS
, SPR_NOACCESS
,
5487 &spr_read_generic
, &spr_write_generic
,
5489 /* Memory management */
5492 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5494 env
->dcache_line_size
= 32;
5495 env
->icache_line_size
= 32;
5496 /* Allocate hardware IRQ controller */
5497 ppc6xx_irq_init(env
);
5500 /* PowerPC 7400 (aka G4) */
5501 #define POWERPC_INSNS_7400 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5502 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5503 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5504 PPC_FLOAT_STFIWX | \
5505 PPC_CACHE | PPC_CACHE_ICBI | \
5506 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5507 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5508 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5510 PPC_SEGMENT | PPC_EXTERN | \
5512 #define POWERPC_INSNS2_7400 (PPC_NONE)
5513 #define POWERPC_MSRM_7400 (0x000000000205FF77ULL)
5514 #define POWERPC_MMU_7400 (POWERPC_MMU_32B)
5515 #define POWERPC_EXCP_7400 (POWERPC_EXCP_74xx)
5516 #define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx)
5517 #define POWERPC_BFDM_7400 (bfd_mach_ppc_7400)
5518 #define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5519 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5520 POWERPC_FLAG_BUS_CLK)
5521 #define check_pow_7400 check_pow_hid0
5523 static void init_proc_7400 (CPUPPCState
*env
)
5525 gen_spr_ne_601(env
);
5529 /* 74xx specific SPR */
5531 /* XXX : not implemented */
5532 spr_register(env
, SPR_UBAMR
, "UBAMR",
5533 &spr_read_ureg
, SPR_NOACCESS
,
5534 &spr_read_ureg
, SPR_NOACCESS
,
5536 /* XXX: this seems not implemented on all revisions. */
5537 /* XXX : not implemented */
5538 spr_register(env
, SPR_MSSCR1
, "MSSCR1",
5539 SPR_NOACCESS
, SPR_NOACCESS
,
5540 &spr_read_generic
, &spr_write_generic
,
5542 /* Thermal management */
5544 /* Memory management */
5546 init_excp_7400(env
);
5547 env
->dcache_line_size
= 32;
5548 env
->icache_line_size
= 32;
5549 /* Allocate hardware IRQ controller */
5550 ppc6xx_irq_init(env
);
5553 /* PowerPC 7410 (aka G4) */
5554 #define POWERPC_INSNS_7410 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5555 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5556 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5557 PPC_FLOAT_STFIWX | \
5558 PPC_CACHE | PPC_CACHE_ICBI | \
5559 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5560 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5561 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5563 PPC_SEGMENT | PPC_EXTERN | \
5565 #define POWERPC_INSNS2_7410 (PPC_NONE)
5566 #define POWERPC_MSRM_7410 (0x000000000205FF77ULL)
5567 #define POWERPC_MMU_7410 (POWERPC_MMU_32B)
5568 #define POWERPC_EXCP_7410 (POWERPC_EXCP_74xx)
5569 #define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx)
5570 #define POWERPC_BFDM_7410 (bfd_mach_ppc_7400)
5571 #define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5572 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5573 POWERPC_FLAG_BUS_CLK)
5574 #define check_pow_7410 check_pow_hid0
5576 static void init_proc_7410 (CPUPPCState
*env
)
5578 gen_spr_ne_601(env
);
5582 /* 74xx specific SPR */
5584 /* XXX : not implemented */
5585 spr_register(env
, SPR_UBAMR
, "UBAMR",
5586 &spr_read_ureg
, SPR_NOACCESS
,
5587 &spr_read_ureg
, SPR_NOACCESS
,
5589 /* Thermal management */
5592 /* XXX : not implemented */
5593 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5594 SPR_NOACCESS
, SPR_NOACCESS
,
5595 &spr_read_generic
, &spr_write_generic
,
5598 /* XXX : not implemented */
5599 spr_register(env
, SPR_LDSTDB
, "LDSTDB",
5600 SPR_NOACCESS
, SPR_NOACCESS
,
5601 &spr_read_generic
, &spr_write_generic
,
5603 /* Memory management */
5605 init_excp_7400(env
);
5606 env
->dcache_line_size
= 32;
5607 env
->icache_line_size
= 32;
5608 /* Allocate hardware IRQ controller */
5609 ppc6xx_irq_init(env
);
5612 /* PowerPC 7440 (aka G4) */
5613 #define POWERPC_INSNS_7440 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5614 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5615 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5616 PPC_FLOAT_STFIWX | \
5617 PPC_CACHE | PPC_CACHE_ICBI | \
5618 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5619 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5620 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5621 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5622 PPC_SEGMENT | PPC_EXTERN | \
5624 #define POWERPC_INSNS2_7440 (PPC_NONE)
5625 #define POWERPC_MSRM_7440 (0x000000000205FF77ULL)
5626 #define POWERPC_MMU_7440 (POWERPC_MMU_SOFT_74xx)
5627 #define POWERPC_EXCP_7440 (POWERPC_EXCP_74xx)
5628 #define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx)
5629 #define POWERPC_BFDM_7440 (bfd_mach_ppc_7400)
5630 #define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5631 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5632 POWERPC_FLAG_BUS_CLK)
5633 #define check_pow_7440 check_pow_hid0_74xx
5635 __attribute__ (( unused
))
5636 static void init_proc_7440 (CPUPPCState
*env
)
5638 gen_spr_ne_601(env
);
5642 /* 74xx specific SPR */
5644 /* XXX : not implemented */
5645 spr_register(env
, SPR_UBAMR
, "UBAMR",
5646 &spr_read_ureg
, SPR_NOACCESS
,
5647 &spr_read_ureg
, SPR_NOACCESS
,
5650 /* XXX : not implemented */
5651 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5652 SPR_NOACCESS
, SPR_NOACCESS
,
5653 &spr_read_generic
, &spr_write_generic
,
5656 /* XXX : not implemented */
5657 spr_register(env
, SPR_ICTRL
, "ICTRL",
5658 SPR_NOACCESS
, SPR_NOACCESS
,
5659 &spr_read_generic
, &spr_write_generic
,
5662 /* XXX : not implemented */
5663 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5664 SPR_NOACCESS
, SPR_NOACCESS
,
5665 &spr_read_generic
, &spr_write_generic
,
5668 /* XXX : not implemented */
5669 spr_register(env
, SPR_PMC5
, "PMC5",
5670 SPR_NOACCESS
, SPR_NOACCESS
,
5671 &spr_read_generic
, &spr_write_generic
,
5673 /* XXX : not implemented */
5674 spr_register(env
, SPR_UPMC5
, "UPMC5",
5675 &spr_read_ureg
, SPR_NOACCESS
,
5676 &spr_read_ureg
, SPR_NOACCESS
,
5678 /* XXX : not implemented */
5679 spr_register(env
, SPR_PMC6
, "PMC6",
5680 SPR_NOACCESS
, SPR_NOACCESS
,
5681 &spr_read_generic
, &spr_write_generic
,
5683 /* XXX : not implemented */
5684 spr_register(env
, SPR_UPMC6
, "UPMC6",
5685 &spr_read_ureg
, SPR_NOACCESS
,
5686 &spr_read_ureg
, SPR_NOACCESS
,
5688 /* Memory management */
5690 gen_74xx_soft_tlb(env
, 128, 2);
5691 init_excp_7450(env
);
5692 env
->dcache_line_size
= 32;
5693 env
->icache_line_size
= 32;
5694 /* Allocate hardware IRQ controller */
5695 ppc6xx_irq_init(env
);
5698 /* PowerPC 7450 (aka G4) */
5699 #define POWERPC_INSNS_7450 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5700 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5701 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5702 PPC_FLOAT_STFIWX | \
5703 PPC_CACHE | PPC_CACHE_ICBI | \
5704 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5705 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5706 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5707 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5708 PPC_SEGMENT | PPC_EXTERN | \
5710 #define POWERPC_INSNS2_7450 (PPC_NONE)
5711 #define POWERPC_MSRM_7450 (0x000000000205FF77ULL)
5712 #define POWERPC_MMU_7450 (POWERPC_MMU_SOFT_74xx)
5713 #define POWERPC_EXCP_7450 (POWERPC_EXCP_74xx)
5714 #define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx)
5715 #define POWERPC_BFDM_7450 (bfd_mach_ppc_7400)
5716 #define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5717 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5718 POWERPC_FLAG_BUS_CLK)
5719 #define check_pow_7450 check_pow_hid0_74xx
5721 __attribute__ (( unused
))
5722 static void init_proc_7450 (CPUPPCState
*env
)
5724 gen_spr_ne_601(env
);
5728 /* 74xx specific SPR */
5730 /* Level 3 cache control */
5733 /* XXX : not implemented */
5734 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
5735 SPR_NOACCESS
, SPR_NOACCESS
,
5736 &spr_read_generic
, &spr_write_generic
,
5739 /* XXX : not implemented */
5740 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
5741 SPR_NOACCESS
, SPR_NOACCESS
,
5742 &spr_read_generic
, &spr_write_generic
,
5745 /* XXX : not implemented */
5746 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
5747 SPR_NOACCESS
, SPR_NOACCESS
,
5748 &spr_read_generic
, &spr_write_generic
,
5751 /* XXX : not implemented */
5752 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
5753 SPR_NOACCESS
, SPR_NOACCESS
,
5754 &spr_read_generic
, &spr_write_generic
,
5756 /* XXX : not implemented */
5757 spr_register(env
, SPR_UBAMR
, "UBAMR",
5758 &spr_read_ureg
, SPR_NOACCESS
,
5759 &spr_read_ureg
, SPR_NOACCESS
,
5762 /* XXX : not implemented */
5763 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5764 SPR_NOACCESS
, SPR_NOACCESS
,
5765 &spr_read_generic
, &spr_write_generic
,
5768 /* XXX : not implemented */
5769 spr_register(env
, SPR_ICTRL
, "ICTRL",
5770 SPR_NOACCESS
, SPR_NOACCESS
,
5771 &spr_read_generic
, &spr_write_generic
,
5774 /* XXX : not implemented */
5775 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5776 SPR_NOACCESS
, SPR_NOACCESS
,
5777 &spr_read_generic
, &spr_write_generic
,
5780 /* XXX : not implemented */
5781 spr_register(env
, SPR_PMC5
, "PMC5",
5782 SPR_NOACCESS
, SPR_NOACCESS
,
5783 &spr_read_generic
, &spr_write_generic
,
5785 /* XXX : not implemented */
5786 spr_register(env
, SPR_UPMC5
, "UPMC5",
5787 &spr_read_ureg
, SPR_NOACCESS
,
5788 &spr_read_ureg
, SPR_NOACCESS
,
5790 /* XXX : not implemented */
5791 spr_register(env
, SPR_PMC6
, "PMC6",
5792 SPR_NOACCESS
, SPR_NOACCESS
,
5793 &spr_read_generic
, &spr_write_generic
,
5795 /* XXX : not implemented */
5796 spr_register(env
, SPR_UPMC6
, "UPMC6",
5797 &spr_read_ureg
, SPR_NOACCESS
,
5798 &spr_read_ureg
, SPR_NOACCESS
,
5800 /* Memory management */
5802 gen_74xx_soft_tlb(env
, 128, 2);
5803 init_excp_7450(env
);
5804 env
->dcache_line_size
= 32;
5805 env
->icache_line_size
= 32;
5806 /* Allocate hardware IRQ controller */
5807 ppc6xx_irq_init(env
);
5810 /* PowerPC 7445 (aka G4) */
5811 #define POWERPC_INSNS_7445 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5812 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5813 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5814 PPC_FLOAT_STFIWX | \
5815 PPC_CACHE | PPC_CACHE_ICBI | \
5816 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5817 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5818 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5819 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5820 PPC_SEGMENT | PPC_EXTERN | \
5822 #define POWERPC_INSNS2_7445 (PPC_NONE)
5823 #define POWERPC_MSRM_7445 (0x000000000205FF77ULL)
5824 #define POWERPC_MMU_7445 (POWERPC_MMU_SOFT_74xx)
5825 #define POWERPC_EXCP_7445 (POWERPC_EXCP_74xx)
5826 #define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx)
5827 #define POWERPC_BFDM_7445 (bfd_mach_ppc_7400)
5828 #define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5829 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5830 POWERPC_FLAG_BUS_CLK)
5831 #define check_pow_7445 check_pow_hid0_74xx
5833 __attribute__ (( unused
))
5834 static void init_proc_7445 (CPUPPCState
*env
)
5836 gen_spr_ne_601(env
);
5840 /* 74xx specific SPR */
5843 /* XXX : not implemented */
5844 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5845 SPR_NOACCESS
, SPR_NOACCESS
,
5846 &spr_read_generic
, &spr_write_generic
,
5849 /* XXX : not implemented */
5850 spr_register(env
, SPR_ICTRL
, "ICTRL",
5851 SPR_NOACCESS
, SPR_NOACCESS
,
5852 &spr_read_generic
, &spr_write_generic
,
5855 /* XXX : not implemented */
5856 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5857 SPR_NOACCESS
, SPR_NOACCESS
,
5858 &spr_read_generic
, &spr_write_generic
,
5861 /* XXX : not implemented */
5862 spr_register(env
, SPR_PMC5
, "PMC5",
5863 SPR_NOACCESS
, SPR_NOACCESS
,
5864 &spr_read_generic
, &spr_write_generic
,
5866 /* XXX : not implemented */
5867 spr_register(env
, SPR_UPMC5
, "UPMC5",
5868 &spr_read_ureg
, SPR_NOACCESS
,
5869 &spr_read_ureg
, SPR_NOACCESS
,
5871 /* XXX : not implemented */
5872 spr_register(env
, SPR_PMC6
, "PMC6",
5873 SPR_NOACCESS
, SPR_NOACCESS
,
5874 &spr_read_generic
, &spr_write_generic
,
5876 /* XXX : not implemented */
5877 spr_register(env
, SPR_UPMC6
, "UPMC6",
5878 &spr_read_ureg
, SPR_NOACCESS
,
5879 &spr_read_ureg
, SPR_NOACCESS
,
5882 spr_register(env
, SPR_SPRG4
, "SPRG4",
5883 SPR_NOACCESS
, SPR_NOACCESS
,
5884 &spr_read_generic
, &spr_write_generic
,
5886 spr_register(env
, SPR_USPRG4
, "USPRG4",
5887 &spr_read_ureg
, SPR_NOACCESS
,
5888 &spr_read_ureg
, SPR_NOACCESS
,
5890 spr_register(env
, SPR_SPRG5
, "SPRG5",
5891 SPR_NOACCESS
, SPR_NOACCESS
,
5892 &spr_read_generic
, &spr_write_generic
,
5894 spr_register(env
, SPR_USPRG5
, "USPRG5",
5895 &spr_read_ureg
, SPR_NOACCESS
,
5896 &spr_read_ureg
, SPR_NOACCESS
,
5898 spr_register(env
, SPR_SPRG6
, "SPRG6",
5899 SPR_NOACCESS
, SPR_NOACCESS
,
5900 &spr_read_generic
, &spr_write_generic
,
5902 spr_register(env
, SPR_USPRG6
, "USPRG6",
5903 &spr_read_ureg
, SPR_NOACCESS
,
5904 &spr_read_ureg
, SPR_NOACCESS
,
5906 spr_register(env
, SPR_SPRG7
, "SPRG7",
5907 SPR_NOACCESS
, SPR_NOACCESS
,
5908 &spr_read_generic
, &spr_write_generic
,
5910 spr_register(env
, SPR_USPRG7
, "USPRG7",
5911 &spr_read_ureg
, SPR_NOACCESS
,
5912 &spr_read_ureg
, SPR_NOACCESS
,
5914 /* Memory management */
5917 gen_74xx_soft_tlb(env
, 128, 2);
5918 init_excp_7450(env
);
5919 env
->dcache_line_size
= 32;
5920 env
->icache_line_size
= 32;
5921 /* Allocate hardware IRQ controller */
5922 ppc6xx_irq_init(env
);
5925 /* PowerPC 7455 (aka G4) */
5926 #define POWERPC_INSNS_7455 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5927 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5928 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5929 PPC_FLOAT_STFIWX | \
5930 PPC_CACHE | PPC_CACHE_ICBI | \
5931 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5932 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5933 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5934 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5935 PPC_SEGMENT | PPC_EXTERN | \
5937 #define POWERPC_INSNS2_7455 (PPC_NONE)
5938 #define POWERPC_MSRM_7455 (0x000000000205FF77ULL)
5939 #define POWERPC_MMU_7455 (POWERPC_MMU_SOFT_74xx)
5940 #define POWERPC_EXCP_7455 (POWERPC_EXCP_74xx)
5941 #define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx)
5942 #define POWERPC_BFDM_7455 (bfd_mach_ppc_7400)
5943 #define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5944 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5945 POWERPC_FLAG_BUS_CLK)
5946 #define check_pow_7455 check_pow_hid0_74xx
5948 __attribute__ (( unused
))
5949 static void init_proc_7455 (CPUPPCState
*env
)
5951 gen_spr_ne_601(env
);
5955 /* 74xx specific SPR */
5957 /* Level 3 cache control */
5960 /* XXX : not implemented */
5961 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5962 SPR_NOACCESS
, SPR_NOACCESS
,
5963 &spr_read_generic
, &spr_write_generic
,
5966 /* XXX : not implemented */
5967 spr_register(env
, SPR_ICTRL
, "ICTRL",
5968 SPR_NOACCESS
, SPR_NOACCESS
,
5969 &spr_read_generic
, &spr_write_generic
,
5972 /* XXX : not implemented */
5973 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5974 SPR_NOACCESS
, SPR_NOACCESS
,
5975 &spr_read_generic
, &spr_write_generic
,
5978 /* XXX : not implemented */
5979 spr_register(env
, SPR_PMC5
, "PMC5",
5980 SPR_NOACCESS
, SPR_NOACCESS
,
5981 &spr_read_generic
, &spr_write_generic
,
5983 /* XXX : not implemented */
5984 spr_register(env
, SPR_UPMC5
, "UPMC5",
5985 &spr_read_ureg
, SPR_NOACCESS
,
5986 &spr_read_ureg
, SPR_NOACCESS
,
5988 /* XXX : not implemented */
5989 spr_register(env
, SPR_PMC6
, "PMC6",
5990 SPR_NOACCESS
, SPR_NOACCESS
,
5991 &spr_read_generic
, &spr_write_generic
,
5993 /* XXX : not implemented */
5994 spr_register(env
, SPR_UPMC6
, "UPMC6",
5995 &spr_read_ureg
, SPR_NOACCESS
,
5996 &spr_read_ureg
, SPR_NOACCESS
,
5999 spr_register(env
, SPR_SPRG4
, "SPRG4",
6000 SPR_NOACCESS
, SPR_NOACCESS
,
6001 &spr_read_generic
, &spr_write_generic
,
6003 spr_register(env
, SPR_USPRG4
, "USPRG4",
6004 &spr_read_ureg
, SPR_NOACCESS
,
6005 &spr_read_ureg
, SPR_NOACCESS
,
6007 spr_register(env
, SPR_SPRG5
, "SPRG5",
6008 SPR_NOACCESS
, SPR_NOACCESS
,
6009 &spr_read_generic
, &spr_write_generic
,
6011 spr_register(env
, SPR_USPRG5
, "USPRG5",
6012 &spr_read_ureg
, SPR_NOACCESS
,
6013 &spr_read_ureg
, SPR_NOACCESS
,
6015 spr_register(env
, SPR_SPRG6
, "SPRG6",
6016 SPR_NOACCESS
, SPR_NOACCESS
,
6017 &spr_read_generic
, &spr_write_generic
,
6019 spr_register(env
, SPR_USPRG6
, "USPRG6",
6020 &spr_read_ureg
, SPR_NOACCESS
,
6021 &spr_read_ureg
, SPR_NOACCESS
,
6023 spr_register(env
, SPR_SPRG7
, "SPRG7",
6024 SPR_NOACCESS
, SPR_NOACCESS
,
6025 &spr_read_generic
, &spr_write_generic
,
6027 spr_register(env
, SPR_USPRG7
, "USPRG7",
6028 &spr_read_ureg
, SPR_NOACCESS
,
6029 &spr_read_ureg
, SPR_NOACCESS
,
6031 /* Memory management */
6034 gen_74xx_soft_tlb(env
, 128, 2);
6035 init_excp_7450(env
);
6036 env
->dcache_line_size
= 32;
6037 env
->icache_line_size
= 32;
6038 /* Allocate hardware IRQ controller */
6039 ppc6xx_irq_init(env
);
6042 /* PowerPC 7457 (aka G4) */
6043 #define POWERPC_INSNS_7457 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6044 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6045 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6046 PPC_FLOAT_STFIWX | \
6047 PPC_CACHE | PPC_CACHE_ICBI | \
6048 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
6049 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6050 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6051 PPC_MEM_TLBIA | PPC_74xx_TLB | \
6052 PPC_SEGMENT | PPC_EXTERN | \
6054 #define POWERPC_INSNS2_7457 (PPC_NONE)
6055 #define POWERPC_MSRM_7457 (0x000000000205FF77ULL)
6056 #define POWERPC_MMU_7457 (POWERPC_MMU_SOFT_74xx)
6057 #define POWERPC_EXCP_7457 (POWERPC_EXCP_74xx)
6058 #define POWERPC_INPUT_7457 (PPC_FLAGS_INPUT_6xx)
6059 #define POWERPC_BFDM_7457 (bfd_mach_ppc_7400)
6060 #define POWERPC_FLAG_7457 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6061 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6062 POWERPC_FLAG_BUS_CLK)
6063 #define check_pow_7457 check_pow_hid0_74xx
6065 __attribute__ (( unused
))
6066 static void init_proc_7457 (CPUPPCState
*env
)
6068 gen_spr_ne_601(env
);
6072 /* 74xx specific SPR */
6074 /* Level 3 cache control */
6077 /* XXX : not implemented */
6078 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
6079 SPR_NOACCESS
, SPR_NOACCESS
,
6080 &spr_read_generic
, &spr_write_generic
,
6083 /* XXX : not implemented */
6084 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
6085 SPR_NOACCESS
, SPR_NOACCESS
,
6086 &spr_read_generic
, &spr_write_generic
,
6089 /* XXX : not implemented */
6090 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
6091 SPR_NOACCESS
, SPR_NOACCESS
,
6092 &spr_read_generic
, &spr_write_generic
,
6095 /* XXX : not implemented */
6096 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
6097 SPR_NOACCESS
, SPR_NOACCESS
,
6098 &spr_read_generic
, &spr_write_generic
,
6101 /* XXX : not implemented */
6102 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
6103 SPR_NOACCESS
, SPR_NOACCESS
,
6104 &spr_read_generic
, &spr_write_generic
,
6107 /* XXX : not implemented */
6108 spr_register(env
, SPR_ICTRL
, "ICTRL",
6109 SPR_NOACCESS
, SPR_NOACCESS
,
6110 &spr_read_generic
, &spr_write_generic
,
6113 /* XXX : not implemented */
6114 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
6115 SPR_NOACCESS
, SPR_NOACCESS
,
6116 &spr_read_generic
, &spr_write_generic
,
6119 /* XXX : not implemented */
6120 spr_register(env
, SPR_PMC5
, "PMC5",
6121 SPR_NOACCESS
, SPR_NOACCESS
,
6122 &spr_read_generic
, &spr_write_generic
,
6124 /* XXX : not implemented */
6125 spr_register(env
, SPR_UPMC5
, "UPMC5",
6126 &spr_read_ureg
, SPR_NOACCESS
,
6127 &spr_read_ureg
, SPR_NOACCESS
,
6129 /* XXX : not implemented */
6130 spr_register(env
, SPR_PMC6
, "PMC6",
6131 SPR_NOACCESS
, SPR_NOACCESS
,
6132 &spr_read_generic
, &spr_write_generic
,
6134 /* XXX : not implemented */
6135 spr_register(env
, SPR_UPMC6
, "UPMC6",
6136 &spr_read_ureg
, SPR_NOACCESS
,
6137 &spr_read_ureg
, SPR_NOACCESS
,
6140 spr_register(env
, SPR_SPRG4
, "SPRG4",
6141 SPR_NOACCESS
, SPR_NOACCESS
,
6142 &spr_read_generic
, &spr_write_generic
,
6144 spr_register(env
, SPR_USPRG4
, "USPRG4",
6145 &spr_read_ureg
, SPR_NOACCESS
,
6146 &spr_read_ureg
, SPR_NOACCESS
,
6148 spr_register(env
, SPR_SPRG5
, "SPRG5",
6149 SPR_NOACCESS
, SPR_NOACCESS
,
6150 &spr_read_generic
, &spr_write_generic
,
6152 spr_register(env
, SPR_USPRG5
, "USPRG5",
6153 &spr_read_ureg
, SPR_NOACCESS
,
6154 &spr_read_ureg
, SPR_NOACCESS
,
6156 spr_register(env
, SPR_SPRG6
, "SPRG6",
6157 SPR_NOACCESS
, SPR_NOACCESS
,
6158 &spr_read_generic
, &spr_write_generic
,
6160 spr_register(env
, SPR_USPRG6
, "USPRG6",
6161 &spr_read_ureg
, SPR_NOACCESS
,
6162 &spr_read_ureg
, SPR_NOACCESS
,
6164 spr_register(env
, SPR_SPRG7
, "SPRG7",
6165 SPR_NOACCESS
, SPR_NOACCESS
,
6166 &spr_read_generic
, &spr_write_generic
,
6168 spr_register(env
, SPR_USPRG7
, "USPRG7",
6169 &spr_read_ureg
, SPR_NOACCESS
,
6170 &spr_read_ureg
, SPR_NOACCESS
,
6172 /* Memory management */
6175 gen_74xx_soft_tlb(env
, 128, 2);
6176 init_excp_7450(env
);
6177 env
->dcache_line_size
= 32;
6178 env
->icache_line_size
= 32;
6179 /* Allocate hardware IRQ controller */
6180 ppc6xx_irq_init(env
);
6183 #if defined (TARGET_PPC64)
6185 #define POWERPC_INSNS_970 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6186 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6187 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6188 PPC_FLOAT_STFIWX | \
6189 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6190 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6191 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6192 PPC_64B | PPC_ALTIVEC | \
6193 PPC_SEGMENT_64B | PPC_SLBI)
6194 #define POWERPC_INSNS2_970 (PPC_NONE)
6195 #define POWERPC_MSRM_970 (0x900000000204FF36ULL)
6196 #define POWERPC_MMU_970 (POWERPC_MMU_64B)
6197 //#define POWERPC_EXCP_970 (POWERPC_EXCP_970)
6198 #define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970)
6199 #define POWERPC_BFDM_970 (bfd_mach_ppc64)
6200 #define POWERPC_FLAG_970 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6201 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6202 POWERPC_FLAG_BUS_CLK)
6204 #if defined(CONFIG_USER_ONLY)
6205 #define POWERPC970_HID5_INIT 0x00000080
6207 #define POWERPC970_HID5_INIT 0x00000000
6210 static int check_pow_970 (CPUPPCState
*env
)
6212 if (env
->spr
[SPR_HID0
] & 0x00600000)
6218 static void init_proc_970 (CPUPPCState
*env
)
6220 gen_spr_ne_601(env
);
6224 /* Hardware implementation registers */
6225 /* XXX : not implemented */
6226 spr_register(env
, SPR_HID0
, "HID0",
6227 SPR_NOACCESS
, SPR_NOACCESS
,
6228 &spr_read_generic
, &spr_write_clear
,
6230 /* XXX : not implemented */
6231 spr_register(env
, SPR_HID1
, "HID1",
6232 SPR_NOACCESS
, SPR_NOACCESS
,
6233 &spr_read_generic
, &spr_write_generic
,
6235 /* XXX : not implemented */
6236 spr_register(env
, SPR_750FX_HID2
, "HID2",
6237 SPR_NOACCESS
, SPR_NOACCESS
,
6238 &spr_read_generic
, &spr_write_generic
,
6240 /* XXX : not implemented */
6241 spr_register(env
, SPR_970_HID5
, "HID5",
6242 SPR_NOACCESS
, SPR_NOACCESS
,
6243 &spr_read_generic
, &spr_write_generic
,
6244 POWERPC970_HID5_INIT
);
6245 /* XXX : not implemented */
6246 spr_register(env
, SPR_L2CR
, "L2CR",
6247 SPR_NOACCESS
, SPR_NOACCESS
,
6248 &spr_read_generic
, &spr_write_generic
,
6250 /* Memory management */
6251 /* XXX: not correct */
6253 /* XXX : not implemented */
6254 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6255 SPR_NOACCESS
, SPR_NOACCESS
,
6256 &spr_read_generic
, SPR_NOACCESS
,
6257 0x00000000); /* TOFIX */
6258 /* XXX : not implemented */
6259 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6260 SPR_NOACCESS
, SPR_NOACCESS
,
6261 &spr_read_generic
, &spr_write_generic
,
6262 0x00000000); /* TOFIX */
6263 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6264 SPR_NOACCESS
, SPR_NOACCESS
,
6265 &spr_read_hior
, &spr_write_hior
,
6267 #if !defined(CONFIG_USER_ONLY)
6271 env
->dcache_line_size
= 128;
6272 env
->icache_line_size
= 128;
6273 /* Allocate hardware IRQ controller */
6274 ppc970_irq_init(env
);
6275 /* Can't find information on what this should be on reset. This
6276 * value is the one used by 74xx processors. */
6277 vscr_init(env
, 0x00010000);
6280 /* PowerPC 970FX (aka G5) */
6281 #define POWERPC_INSNS_970FX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6282 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6283 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6284 PPC_FLOAT_STFIWX | \
6285 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6286 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6287 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6288 PPC_64B | PPC_ALTIVEC | \
6289 PPC_SEGMENT_64B | PPC_SLBI)
6290 #define POWERPC_INSNS2_970FX (PPC_NONE)
6291 #define POWERPC_MSRM_970FX (0x800000000204FF36ULL)
6292 #define POWERPC_MMU_970FX (POWERPC_MMU_64B)
6293 #define POWERPC_EXCP_970FX (POWERPC_EXCP_970)
6294 #define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970)
6295 #define POWERPC_BFDM_970FX (bfd_mach_ppc64)
6296 #define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6297 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6298 POWERPC_FLAG_BUS_CLK)
6300 static int check_pow_970FX (CPUPPCState
*env
)
6302 if (env
->spr
[SPR_HID0
] & 0x00600000)
6308 static void init_proc_970FX (CPUPPCState
*env
)
6310 gen_spr_ne_601(env
);
6314 /* Hardware implementation registers */
6315 /* XXX : not implemented */
6316 spr_register(env
, SPR_HID0
, "HID0",
6317 SPR_NOACCESS
, SPR_NOACCESS
,
6318 &spr_read_generic
, &spr_write_clear
,
6320 /* XXX : not implemented */
6321 spr_register(env
, SPR_HID1
, "HID1",
6322 SPR_NOACCESS
, SPR_NOACCESS
,
6323 &spr_read_generic
, &spr_write_generic
,
6325 /* XXX : not implemented */
6326 spr_register(env
, SPR_750FX_HID2
, "HID2",
6327 SPR_NOACCESS
, SPR_NOACCESS
,
6328 &spr_read_generic
, &spr_write_generic
,
6330 /* XXX : not implemented */
6331 spr_register(env
, SPR_970_HID5
, "HID5",
6332 SPR_NOACCESS
, SPR_NOACCESS
,
6333 &spr_read_generic
, &spr_write_generic
,
6334 POWERPC970_HID5_INIT
);
6335 /* XXX : not implemented */
6336 spr_register(env
, SPR_L2CR
, "L2CR",
6337 SPR_NOACCESS
, SPR_NOACCESS
,
6338 &spr_read_generic
, &spr_write_generic
,
6340 /* Memory management */
6341 /* XXX: not correct */
6343 /* XXX : not implemented */
6344 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6345 SPR_NOACCESS
, SPR_NOACCESS
,
6346 &spr_read_generic
, SPR_NOACCESS
,
6347 0x00000000); /* TOFIX */
6348 /* XXX : not implemented */
6349 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6350 SPR_NOACCESS
, SPR_NOACCESS
,
6351 &spr_read_generic
, &spr_write_generic
,
6352 0x00000000); /* TOFIX */
6353 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6354 SPR_NOACCESS
, SPR_NOACCESS
,
6355 &spr_read_hior
, &spr_write_hior
,
6357 spr_register(env
, SPR_CTRL
, "SPR_CTRL",
6358 SPR_NOACCESS
, SPR_NOACCESS
,
6359 &spr_read_generic
, &spr_write_generic
,
6361 spr_register(env
, SPR_UCTRL
, "SPR_UCTRL",
6362 SPR_NOACCESS
, SPR_NOACCESS
,
6363 &spr_read_generic
, &spr_write_generic
,
6365 spr_register(env
, SPR_VRSAVE
, "SPR_VRSAVE",
6366 &spr_read_generic
, &spr_write_generic
,
6367 &spr_read_generic
, &spr_write_generic
,
6369 #if !defined(CONFIG_USER_ONLY)
6373 env
->dcache_line_size
= 128;
6374 env
->icache_line_size
= 128;
6375 /* Allocate hardware IRQ controller */
6376 ppc970_irq_init(env
);
6377 /* Can't find information on what this should be on reset. This
6378 * value is the one used by 74xx processors. */
6379 vscr_init(env
, 0x00010000);
6382 /* PowerPC 970 GX */
6383 #define POWERPC_INSNS_970GX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6384 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6385 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6386 PPC_FLOAT_STFIWX | \
6387 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6388 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6389 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6390 PPC_64B | PPC_ALTIVEC | \
6391 PPC_SEGMENT_64B | PPC_SLBI)
6392 #define POWERPC_INSNS2_970GX (PPC_NONE)
6393 #define POWERPC_MSRM_970GX (0x800000000204FF36ULL)
6394 #define POWERPC_MMU_970GX (POWERPC_MMU_64B)
6395 #define POWERPC_EXCP_970GX (POWERPC_EXCP_970)
6396 #define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970)
6397 #define POWERPC_BFDM_970GX (bfd_mach_ppc64)
6398 #define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6399 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6400 POWERPC_FLAG_BUS_CLK)
6402 static int check_pow_970GX (CPUPPCState
*env
)
6404 if (env
->spr
[SPR_HID0
] & 0x00600000)
6410 static void init_proc_970GX (CPUPPCState
*env
)
6412 gen_spr_ne_601(env
);
6416 /* Hardware implementation registers */
6417 /* XXX : not implemented */
6418 spr_register(env
, SPR_HID0
, "HID0",
6419 SPR_NOACCESS
, SPR_NOACCESS
,
6420 &spr_read_generic
, &spr_write_clear
,
6422 /* XXX : not implemented */
6423 spr_register(env
, SPR_HID1
, "HID1",
6424 SPR_NOACCESS
, SPR_NOACCESS
,
6425 &spr_read_generic
, &spr_write_generic
,
6427 /* XXX : not implemented */
6428 spr_register(env
, SPR_750FX_HID2
, "HID2",
6429 SPR_NOACCESS
, SPR_NOACCESS
,
6430 &spr_read_generic
, &spr_write_generic
,
6432 /* XXX : not implemented */
6433 spr_register(env
, SPR_970_HID5
, "HID5",
6434 SPR_NOACCESS
, SPR_NOACCESS
,
6435 &spr_read_generic
, &spr_write_generic
,
6436 POWERPC970_HID5_INIT
);
6437 /* XXX : not implemented */
6438 spr_register(env
, SPR_L2CR
, "L2CR",
6439 SPR_NOACCESS
, SPR_NOACCESS
,
6440 &spr_read_generic
, &spr_write_generic
,
6442 /* Memory management */
6443 /* XXX: not correct */
6445 /* XXX : not implemented */
6446 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6447 SPR_NOACCESS
, SPR_NOACCESS
,
6448 &spr_read_generic
, SPR_NOACCESS
,
6449 0x00000000); /* TOFIX */
6450 /* XXX : not implemented */
6451 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6452 SPR_NOACCESS
, SPR_NOACCESS
,
6453 &spr_read_generic
, &spr_write_generic
,
6454 0x00000000); /* TOFIX */
6455 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6456 SPR_NOACCESS
, SPR_NOACCESS
,
6457 &spr_read_hior
, &spr_write_hior
,
6459 #if !defined(CONFIG_USER_ONLY)
6463 env
->dcache_line_size
= 128;
6464 env
->icache_line_size
= 128;
6465 /* Allocate hardware IRQ controller */
6466 ppc970_irq_init(env
);
6467 /* Can't find information on what this should be on reset. This
6468 * value is the one used by 74xx processors. */
6469 vscr_init(env
, 0x00010000);
6472 /* PowerPC 970 MP */
6473 #define POWERPC_INSNS_970MP (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6474 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6475 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6476 PPC_FLOAT_STFIWX | \
6477 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6478 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6479 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6480 PPC_64B | PPC_ALTIVEC | \
6481 PPC_SEGMENT_64B | PPC_SLBI)
6482 #define POWERPC_INSNS2_970MP (PPC_NONE)
6483 #define POWERPC_MSRM_970MP (0x900000000204FF36ULL)
6484 #define POWERPC_MMU_970MP (POWERPC_MMU_64B)
6485 #define POWERPC_EXCP_970MP (POWERPC_EXCP_970)
6486 #define POWERPC_INPUT_970MP (PPC_FLAGS_INPUT_970)
6487 #define POWERPC_BFDM_970MP (bfd_mach_ppc64)
6488 #define POWERPC_FLAG_970MP (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6489 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6490 POWERPC_FLAG_BUS_CLK)
6492 static int check_pow_970MP (CPUPPCState
*env
)
6494 if (env
->spr
[SPR_HID0
] & 0x01C00000)
6500 static void init_proc_970MP (CPUPPCState
*env
)
6502 gen_spr_ne_601(env
);
6506 /* Hardware implementation registers */
6507 /* XXX : not implemented */
6508 spr_register(env
, SPR_HID0
, "HID0",
6509 SPR_NOACCESS
, SPR_NOACCESS
,
6510 &spr_read_generic
, &spr_write_clear
,
6512 /* XXX : not implemented */
6513 spr_register(env
, SPR_HID1
, "HID1",
6514 SPR_NOACCESS
, SPR_NOACCESS
,
6515 &spr_read_generic
, &spr_write_generic
,
6517 /* XXX : not implemented */
6518 spr_register(env
, SPR_750FX_HID2
, "HID2",
6519 SPR_NOACCESS
, SPR_NOACCESS
,
6520 &spr_read_generic
, &spr_write_generic
,
6522 /* XXX : not implemented */
6523 spr_register(env
, SPR_970_HID5
, "HID5",
6524 SPR_NOACCESS
, SPR_NOACCESS
,
6525 &spr_read_generic
, &spr_write_generic
,
6526 POWERPC970_HID5_INIT
);
6527 /* XXX : not implemented */
6528 spr_register(env
, SPR_L2CR
, "L2CR",
6529 SPR_NOACCESS
, SPR_NOACCESS
,
6530 &spr_read_generic
, &spr_write_generic
,
6532 /* Memory management */
6533 /* XXX: not correct */
6535 /* XXX : not implemented */
6536 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6537 SPR_NOACCESS
, SPR_NOACCESS
,
6538 &spr_read_generic
, SPR_NOACCESS
,
6539 0x00000000); /* TOFIX */
6540 /* XXX : not implemented */
6541 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6542 SPR_NOACCESS
, SPR_NOACCESS
,
6543 &spr_read_generic
, &spr_write_generic
,
6544 0x00000000); /* TOFIX */
6545 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6546 SPR_NOACCESS
, SPR_NOACCESS
,
6547 &spr_read_hior
, &spr_write_hior
,
6549 #if !defined(CONFIG_USER_ONLY)
6553 env
->dcache_line_size
= 128;
6554 env
->icache_line_size
= 128;
6555 /* Allocate hardware IRQ controller */
6556 ppc970_irq_init(env
);
6557 /* Can't find information on what this should be on reset. This
6558 * value is the one used by 74xx processors. */
6559 vscr_init(env
, 0x00010000);
6562 #if defined(TARGET_PPC64)
6564 #define POWERPC_INSNS_POWER7 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6565 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6566 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6567 PPC_FLOAT_STFIWX | \
6568 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6569 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6570 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6571 PPC_64B | PPC_ALTIVEC | \
6572 PPC_SEGMENT_64B | PPC_SLBI | \
6573 PPC_POPCNTB | PPC_POPCNTWD)
6574 #define POWERPC_INSNS2_POWER7 (PPC2_VSX | PPC2_DFP)
6575 #define POWERPC_MSRM_POWER7 (0x800000000204FF36ULL)
6576 #define POWERPC_MMU_POWER7 (POWERPC_MMU_2_06)
6577 #define POWERPC_EXCP_POWER7 (POWERPC_EXCP_POWER7)
6578 #define POWERPC_INPUT_POWER7 (PPC_FLAGS_INPUT_POWER7)
6579 #define POWERPC_BFDM_POWER7 (bfd_mach_ppc64)
6580 #define POWERPC_FLAG_POWER7 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6581 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6582 POWERPC_FLAG_BUS_CLK | POWERPC_FLAG_CFAR)
6583 #define check_pow_POWER7 check_pow_nocheck
6585 static void init_proc_POWER7 (CPUPPCState
*env
)
6587 gen_spr_ne_601(env
);
6591 #if !defined(CONFIG_USER_ONLY)
6592 /* PURR & SPURR: Hack - treat these as aliases for the TB for now */
6593 spr_register(env
, SPR_PURR
, "PURR",
6594 &spr_read_purr
, SPR_NOACCESS
,
6595 &spr_read_purr
, SPR_NOACCESS
,
6597 spr_register(env
, SPR_SPURR
, "SPURR",
6598 &spr_read_purr
, SPR_NOACCESS
,
6599 &spr_read_purr
, SPR_NOACCESS
,
6601 spr_register(env
, SPR_CFAR
, "SPR_CFAR",
6602 SPR_NOACCESS
, SPR_NOACCESS
,
6603 &spr_read_cfar
, &spr_write_cfar
,
6605 spr_register(env
, SPR_DSCR
, "SPR_DSCR",
6606 SPR_NOACCESS
, SPR_NOACCESS
,
6607 &spr_read_generic
, &spr_write_generic
,
6609 #endif /* !CONFIG_USER_ONLY */
6610 /* Memory management */
6611 /* XXX : not implemented */
6612 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6613 SPR_NOACCESS
, SPR_NOACCESS
,
6614 &spr_read_generic
, SPR_NOACCESS
,
6615 0x00000000); /* TOFIX */
6616 /* XXX : not implemented */
6617 spr_register(env
, SPR_CTRL
, "SPR_CTRLT",
6618 SPR_NOACCESS
, SPR_NOACCESS
,
6619 &spr_read_generic
, &spr_write_generic
,
6621 spr_register(env
, SPR_UCTRL
, "SPR_CTRLF",
6622 SPR_NOACCESS
, SPR_NOACCESS
,
6623 &spr_read_generic
, &spr_write_generic
,
6625 spr_register(env
, SPR_VRSAVE
, "SPR_VRSAVE",
6626 &spr_read_generic
, &spr_write_generic
,
6627 &spr_read_generic
, &spr_write_generic
,
6629 #if !defined(CONFIG_USER_ONLY)
6632 init_excp_POWER7(env
);
6633 env
->dcache_line_size
= 128;
6634 env
->icache_line_size
= 128;
6635 /* Allocate hardware IRQ controller */
6636 ppcPOWER7_irq_init(env
);
6637 /* Can't find information on what this should be on reset. This
6638 * value is the one used by 74xx processors. */
6639 vscr_init(env
, 0x00010000);
6641 #endif /* TARGET_PPC64 */
6644 #define POWERPC_INSNS_620 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6645 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6646 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6647 PPC_FLOAT_STFIWX | \
6648 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
6649 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6650 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6651 PPC_SEGMENT | PPC_EXTERN | \
6653 #define POWERPC_INSNS2_620 (PPC_NONE)
6654 #define POWERPC_MSRM_620 (0x800000000005FF77ULL)
6655 //#define POWERPC_MMU_620 (POWERPC_MMU_620)
6656 #define POWERPC_EXCP_620 (POWERPC_EXCP_970)
6657 #define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_6xx)
6658 #define POWERPC_BFDM_620 (bfd_mach_ppc64)
6659 #define POWERPC_FLAG_620 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
6660 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
6661 #define check_pow_620 check_pow_nocheck /* Check this */
6663 __attribute__ (( unused
))
6664 static void init_proc_620 (CPUPPCState
*env
)
6666 gen_spr_ne_601(env
);
6670 /* Hardware implementation registers */
6671 /* XXX : not implemented */
6672 spr_register(env
, SPR_HID0
, "HID0",
6673 SPR_NOACCESS
, SPR_NOACCESS
,
6674 &spr_read_generic
, &spr_write_generic
,
6676 /* Memory management */
6679 env
->dcache_line_size
= 64;
6680 env
->icache_line_size
= 64;
6681 /* Allocate hardware IRQ controller */
6682 ppc6xx_irq_init(env
);
6684 #endif /* defined (TARGET_PPC64) */
6686 /* Default 32 bits PowerPC target will be 604 */
6687 #define CPU_POWERPC_PPC32 CPU_POWERPC_604
6688 #define POWERPC_INSNS_PPC32 POWERPC_INSNS_604
6689 #define POWERPC_INSNS2_PPC32 POWERPC_INSNS2_604
6690 #define POWERPC_MSRM_PPC32 POWERPC_MSRM_604
6691 #define POWERPC_MMU_PPC32 POWERPC_MMU_604
6692 #define POWERPC_EXCP_PPC32 POWERPC_EXCP_604
6693 #define POWERPC_INPUT_PPC32 POWERPC_INPUT_604
6694 #define POWERPC_BFDM_PPC32 POWERPC_BFDM_604
6695 #define POWERPC_FLAG_PPC32 POWERPC_FLAG_604
6696 #define check_pow_PPC32 check_pow_604
6697 #define init_proc_PPC32 init_proc_604
6699 /* Default 64 bits PowerPC target will be 970 FX */
6700 #define CPU_POWERPC_PPC64 CPU_POWERPC_970FX
6701 #define POWERPC_INSNS_PPC64 POWERPC_INSNS_970FX
6702 #define POWERPC_INSNS2_PPC64 POWERPC_INSNS2_970FX
6703 #define POWERPC_MSRM_PPC64 POWERPC_MSRM_970FX
6704 #define POWERPC_MMU_PPC64 POWERPC_MMU_970FX
6705 #define POWERPC_EXCP_PPC64 POWERPC_EXCP_970FX
6706 #define POWERPC_INPUT_PPC64 POWERPC_INPUT_970FX
6707 #define POWERPC_BFDM_PPC64 POWERPC_BFDM_970FX
6708 #define POWERPC_FLAG_PPC64 POWERPC_FLAG_970FX
6709 #define check_pow_PPC64 check_pow_970FX
6710 #define init_proc_PPC64 init_proc_970FX
6712 /* Default PowerPC target will be PowerPC 32 */
6713 #if defined (TARGET_PPC64) && 0 // XXX: TODO
6714 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC64
6715 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC64
6716 #define POWERPC_INSNS2_DEFAULT POWERPC_INSNS_PPC64
6717 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC64
6718 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC64
6719 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC64
6720 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC64
6721 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC64
6722 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC64
6723 #define check_pow_DEFAULT check_pow_PPC64
6724 #define init_proc_DEFAULT init_proc_PPC64
6726 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC32
6727 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC32
6728 #define POWERPC_INSNS2_DEFAULT POWERPC_INSNS_PPC32
6729 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC32
6730 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC32
6731 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC32
6732 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC32
6733 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC32
6734 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC32
6735 #define check_pow_DEFAULT check_pow_PPC32
6736 #define init_proc_DEFAULT init_proc_PPC32
6739 /*****************************************************************************/
6740 /* PVR definitions for most known PowerPC */
6742 /* PowerPC 401 family */
6743 /* Generic PowerPC 401 */
6744 #define CPU_POWERPC_401 CPU_POWERPC_401G2
6745 /* PowerPC 401 cores */
6746 CPU_POWERPC_401A1
= 0x00210000,
6747 CPU_POWERPC_401B2
= 0x00220000,
6749 CPU_POWERPC_401B3
= xxx
,
6751 CPU_POWERPC_401C2
= 0x00230000,
6752 CPU_POWERPC_401D2
= 0x00240000,
6753 CPU_POWERPC_401E2
= 0x00250000,
6754 CPU_POWERPC_401F2
= 0x00260000,
6755 CPU_POWERPC_401G2
= 0x00270000,
6756 /* PowerPC 401 microcontrolers */
6758 CPU_POWERPC_401GF
= xxx
,
6760 #define CPU_POWERPC_IOP480 CPU_POWERPC_401B2
6761 /* IBM Processor for Network Resources */
6762 CPU_POWERPC_COBRA
= 0x10100000, /* XXX: 405 ? */
6764 CPU_POWERPC_XIPCHIP
= xxx
,
6766 /* PowerPC 403 family */
6767 /* Generic PowerPC 403 */
6768 #define CPU_POWERPC_403 CPU_POWERPC_403GC
6769 /* PowerPC 403 microcontrollers */
6770 CPU_POWERPC_403GA
= 0x00200011,
6771 CPU_POWERPC_403GB
= 0x00200100,
6772 CPU_POWERPC_403GC
= 0x00200200,
6773 CPU_POWERPC_403GCX
= 0x00201400,
6775 CPU_POWERPC_403GP
= xxx
,
6777 /* PowerPC 405 family */
6778 /* Generic PowerPC 405 */
6779 #define CPU_POWERPC_405 CPU_POWERPC_405D4
6780 /* PowerPC 405 cores */
6782 CPU_POWERPC_405A3
= xxx
,
6785 CPU_POWERPC_405A4
= xxx
,
6788 CPU_POWERPC_405B3
= xxx
,
6791 CPU_POWERPC_405B4
= xxx
,
6794 CPU_POWERPC_405C3
= xxx
,
6797 CPU_POWERPC_405C4
= xxx
,
6799 CPU_POWERPC_405D2
= 0x20010000,
6801 CPU_POWERPC_405D3
= xxx
,
6803 CPU_POWERPC_405D4
= 0x41810000,
6805 CPU_POWERPC_405D5
= xxx
,
6808 CPU_POWERPC_405E4
= xxx
,
6811 CPU_POWERPC_405F4
= xxx
,
6814 CPU_POWERPC_405F5
= xxx
,
6817 CPU_POWERPC_405F6
= xxx
,
6819 /* PowerPC 405 microcontrolers */
6820 /* XXX: missing 0x200108a0 */
6821 #define CPU_POWERPC_405CR CPU_POWERPC_405CRc
6822 CPU_POWERPC_405CRa
= 0x40110041,
6823 CPU_POWERPC_405CRb
= 0x401100C5,
6824 CPU_POWERPC_405CRc
= 0x40110145,
6825 CPU_POWERPC_405EP
= 0x51210950,
6827 CPU_POWERPC_405EXr
= xxx
,
6829 CPU_POWERPC_405EZ
= 0x41511460, /* 0x51210950 ? */
6831 CPU_POWERPC_405FX
= xxx
,
6833 #define CPU_POWERPC_405GP CPU_POWERPC_405GPd
6834 CPU_POWERPC_405GPa
= 0x40110000,
6835 CPU_POWERPC_405GPb
= 0x40110040,
6836 CPU_POWERPC_405GPc
= 0x40110082,
6837 CPU_POWERPC_405GPd
= 0x401100C4,
6838 #define CPU_POWERPC_405GPe CPU_POWERPC_405CRc
6839 CPU_POWERPC_405GPR
= 0x50910951,
6841 CPU_POWERPC_405H
= xxx
,
6844 CPU_POWERPC_405L
= xxx
,
6846 CPU_POWERPC_405LP
= 0x41F10000,
6848 CPU_POWERPC_405PM
= xxx
,
6851 CPU_POWERPC_405PS
= xxx
,
6854 CPU_POWERPC_405S
= xxx
,
6856 /* IBM network processors */
6857 CPU_POWERPC_NPE405H
= 0x414100C0,
6858 CPU_POWERPC_NPE405H2
= 0x41410140,
6859 CPU_POWERPC_NPE405L
= 0x416100C0,
6860 CPU_POWERPC_NPE4GS3
= 0x40B10000,
6862 CPU_POWERPC_NPCxx1
= xxx
,
6865 CPU_POWERPC_NPR161
= xxx
,
6868 CPU_POWERPC_LC77700
= xxx
,
6870 /* IBM STBxxx (PowerPC 401/403/405 core based microcontrollers) */
6872 CPU_POWERPC_STB01000
= xxx
,
6875 CPU_POWERPC_STB01010
= xxx
,
6878 CPU_POWERPC_STB0210
= xxx
, /* 401B3 */
6880 CPU_POWERPC_STB03
= 0x40310000, /* 0x40130000 ? */
6882 CPU_POWERPC_STB043
= xxx
,
6885 CPU_POWERPC_STB045
= xxx
,
6887 CPU_POWERPC_STB04
= 0x41810000,
6888 CPU_POWERPC_STB25
= 0x51510950,
6890 CPU_POWERPC_STB130
= xxx
,
6893 CPU_POWERPC_X2VP4
= 0x20010820,
6894 #define CPU_POWERPC_X2VP7 CPU_POWERPC_X2VP4
6895 CPU_POWERPC_X2VP20
= 0x20010860,
6896 #define CPU_POWERPC_X2VP50 CPU_POWERPC_X2VP20
6898 CPU_POWERPC_ZL10310
= xxx
,
6901 CPU_POWERPC_ZL10311
= xxx
,
6904 CPU_POWERPC_ZL10320
= xxx
,
6907 CPU_POWERPC_ZL10321
= xxx
,
6909 /* PowerPC 440 family */
6910 /* Generic PowerPC 440 */
6911 #define CPU_POWERPC_440 CPU_POWERPC_440GXf
6912 /* PowerPC 440 cores */
6914 CPU_POWERPC_440A4
= xxx
,
6916 CPU_POWERPC_440_XILINX
= 0x7ff21910,
6918 CPU_POWERPC_440A5
= xxx
,
6921 CPU_POWERPC_440B4
= xxx
,
6924 CPU_POWERPC_440F5
= xxx
,
6927 CPU_POWERPC_440G5
= xxx
,
6930 CPU_POWERPC_440H4
= xxx
,
6933 CPU_POWERPC_440H6
= xxx
,
6935 /* PowerPC 440 microcontrolers */
6936 #define CPU_POWERPC_440EP CPU_POWERPC_440EPb
6937 CPU_POWERPC_440EPa
= 0x42221850,
6938 CPU_POWERPC_440EPb
= 0x422218D3,
6939 #define CPU_POWERPC_440GP CPU_POWERPC_440GPc
6940 CPU_POWERPC_440GPb
= 0x40120440,
6941 CPU_POWERPC_440GPc
= 0x40120481,
6942 #define CPU_POWERPC_440GR CPU_POWERPC_440GRa
6943 #define CPU_POWERPC_440GRa CPU_POWERPC_440EPb
6944 CPU_POWERPC_440GRX
= 0x200008D0,
6945 #define CPU_POWERPC_440EPX CPU_POWERPC_440GRX
6946 #define CPU_POWERPC_440GX CPU_POWERPC_440GXf
6947 CPU_POWERPC_440GXa
= 0x51B21850,
6948 CPU_POWERPC_440GXb
= 0x51B21851,
6949 CPU_POWERPC_440GXc
= 0x51B21892,
6950 CPU_POWERPC_440GXf
= 0x51B21894,
6952 CPU_POWERPC_440S
= xxx
,
6954 CPU_POWERPC_440SP
= 0x53221850,
6955 CPU_POWERPC_440SP2
= 0x53221891,
6956 CPU_POWERPC_440SPE
= 0x53421890,
6957 /* PowerPC 460 family */
6959 /* Generic PowerPC 464 */
6960 #define CPU_POWERPC_464 CPU_POWERPC_464H90
6962 /* PowerPC 464 microcontrolers */
6964 CPU_POWERPC_464H90
= xxx
,
6967 CPU_POWERPC_464H90FP
= xxx
,
6969 /* Freescale embedded PowerPC cores */
6970 /* PowerPC MPC 5xx cores (aka RCPU) */
6971 CPU_POWERPC_MPC5xx
= 0x00020020,
6972 #define CPU_POWERPC_MGT560 CPU_POWERPC_MPC5xx
6973 #define CPU_POWERPC_MPC509 CPU_POWERPC_MPC5xx
6974 #define CPU_POWERPC_MPC533 CPU_POWERPC_MPC5xx
6975 #define CPU_POWERPC_MPC534 CPU_POWERPC_MPC5xx
6976 #define CPU_POWERPC_MPC555 CPU_POWERPC_MPC5xx
6977 #define CPU_POWERPC_MPC556 CPU_POWERPC_MPC5xx
6978 #define CPU_POWERPC_MPC560 CPU_POWERPC_MPC5xx
6979 #define CPU_POWERPC_MPC561 CPU_POWERPC_MPC5xx
6980 #define CPU_POWERPC_MPC562 CPU_POWERPC_MPC5xx
6981 #define CPU_POWERPC_MPC563 CPU_POWERPC_MPC5xx
6982 #define CPU_POWERPC_MPC564 CPU_POWERPC_MPC5xx
6983 #define CPU_POWERPC_MPC565 CPU_POWERPC_MPC5xx
6984 #define CPU_POWERPC_MPC566 CPU_POWERPC_MPC5xx
6985 /* PowerPC MPC 8xx cores (aka PowerQUICC) */
6986 CPU_POWERPC_MPC8xx
= 0x00500000,
6987 #define CPU_POWERPC_MGT823 CPU_POWERPC_MPC8xx
6988 #define CPU_POWERPC_MPC821 CPU_POWERPC_MPC8xx
6989 #define CPU_POWERPC_MPC823 CPU_POWERPC_MPC8xx
6990 #define CPU_POWERPC_MPC850 CPU_POWERPC_MPC8xx
6991 #define CPU_POWERPC_MPC852T CPU_POWERPC_MPC8xx
6992 #define CPU_POWERPC_MPC855T CPU_POWERPC_MPC8xx
6993 #define CPU_POWERPC_MPC857 CPU_POWERPC_MPC8xx
6994 #define CPU_POWERPC_MPC859 CPU_POWERPC_MPC8xx
6995 #define CPU_POWERPC_MPC860 CPU_POWERPC_MPC8xx
6996 #define CPU_POWERPC_MPC862 CPU_POWERPC_MPC8xx
6997 #define CPU_POWERPC_MPC866 CPU_POWERPC_MPC8xx
6998 #define CPU_POWERPC_MPC870 CPU_POWERPC_MPC8xx
6999 #define CPU_POWERPC_MPC875 CPU_POWERPC_MPC8xx
7000 #define CPU_POWERPC_MPC880 CPU_POWERPC_MPC8xx
7001 #define CPU_POWERPC_MPC885 CPU_POWERPC_MPC8xx
7002 /* G2 cores (aka PowerQUICC-II) */
7003 CPU_POWERPC_G2
= 0x00810011,
7004 CPU_POWERPC_G2H4
= 0x80811010,
7005 CPU_POWERPC_G2gp
= 0x80821010,
7006 CPU_POWERPC_G2ls
= 0x90810010,
7007 CPU_POWERPC_MPC603
= 0x00810100,
7008 CPU_POWERPC_G2_HIP3
= 0x00810101,
7009 CPU_POWERPC_G2_HIP4
= 0x80811014,
7010 /* G2_LE core (aka PowerQUICC-II) */
7011 CPU_POWERPC_G2LE
= 0x80820010,
7012 CPU_POWERPC_G2LEgp
= 0x80822010,
7013 CPU_POWERPC_G2LEls
= 0xA0822010,
7014 CPU_POWERPC_G2LEgp1
= 0x80822011,
7015 CPU_POWERPC_G2LEgp3
= 0x80822013,
7016 /* MPC52xx microcontrollers */
7017 /* XXX: MPC 5121 ? */
7018 #define CPU_POWERPC_MPC52xx CPU_POWERPC_MPC5200
7019 #define CPU_POWERPC_MPC5200 CPU_POWERPC_MPC5200_v12
7020 #define CPU_POWERPC_MPC5200_v10 CPU_POWERPC_G2LEgp1
7021 #define CPU_POWERPC_MPC5200_v11 CPU_POWERPC_G2LEgp1
7022 #define CPU_POWERPC_MPC5200_v12 CPU_POWERPC_G2LEgp1
7023 #define CPU_POWERPC_MPC5200B CPU_POWERPC_MPC5200B_v21
7024 #define CPU_POWERPC_MPC5200B_v20 CPU_POWERPC_G2LEgp1
7025 #define CPU_POWERPC_MPC5200B_v21 CPU_POWERPC_G2LEgp1
7026 /* MPC82xx microcontrollers */
7027 #define CPU_POWERPC_MPC82xx CPU_POWERPC_MPC8280
7028 #define CPU_POWERPC_MPC8240 CPU_POWERPC_MPC603
7029 #define CPU_POWERPC_MPC8241 CPU_POWERPC_G2_HIP4
7030 #define CPU_POWERPC_MPC8245 CPU_POWERPC_G2_HIP4
7031 #define CPU_POWERPC_MPC8247 CPU_POWERPC_G2LEgp3
7032 #define CPU_POWERPC_MPC8248 CPU_POWERPC_G2LEgp3
7033 #define CPU_POWERPC_MPC8250 CPU_POWERPC_MPC8250_HiP4
7034 #define CPU_POWERPC_MPC8250_HiP3 CPU_POWERPC_G2_HIP3
7035 #define CPU_POWERPC_MPC8250_HiP4 CPU_POWERPC_G2_HIP4
7036 #define CPU_POWERPC_MPC8255 CPU_POWERPC_MPC8255_HiP4
7037 #define CPU_POWERPC_MPC8255_HiP3 CPU_POWERPC_G2_HIP3
7038 #define CPU_POWERPC_MPC8255_HiP4 CPU_POWERPC_G2_HIP4
7039 #define CPU_POWERPC_MPC8260 CPU_POWERPC_MPC8260_HiP4
7040 #define CPU_POWERPC_MPC8260_HiP3 CPU_POWERPC_G2_HIP3
7041 #define CPU_POWERPC_MPC8260_HiP4 CPU_POWERPC_G2_HIP4
7042 #define CPU_POWERPC_MPC8264 CPU_POWERPC_MPC8264_HiP4
7043 #define CPU_POWERPC_MPC8264_HiP3 CPU_POWERPC_G2_HIP3
7044 #define CPU_POWERPC_MPC8264_HiP4 CPU_POWERPC_G2_HIP4
7045 #define CPU_POWERPC_MPC8265 CPU_POWERPC_MPC8265_HiP4
7046 #define CPU_POWERPC_MPC8265_HiP3 CPU_POWERPC_G2_HIP3
7047 #define CPU_POWERPC_MPC8265_HiP4 CPU_POWERPC_G2_HIP4
7048 #define CPU_POWERPC_MPC8266 CPU_POWERPC_MPC8266_HiP4
7049 #define CPU_POWERPC_MPC8266_HiP3 CPU_POWERPC_G2_HIP3
7050 #define CPU_POWERPC_MPC8266_HiP4 CPU_POWERPC_G2_HIP4
7051 #define CPU_POWERPC_MPC8270 CPU_POWERPC_G2LEgp3
7052 #define CPU_POWERPC_MPC8271 CPU_POWERPC_G2LEgp3
7053 #define CPU_POWERPC_MPC8272 CPU_POWERPC_G2LEgp3
7054 #define CPU_POWERPC_MPC8275 CPU_POWERPC_G2LEgp3
7055 #define CPU_POWERPC_MPC8280 CPU_POWERPC_G2LEgp3
7058 #define CPU_POWERPC_e200 CPU_POWERPC_e200z6
7060 CPU_POWERPC_e200z0
= xxx
,
7063 CPU_POWERPC_e200z1
= xxx
,
7066 CPU_POWERPC_e200z3
= 0x81120000,
7068 CPU_POWERPC_e200z5
= 0x81000000,
7069 CPU_POWERPC_e200z6
= 0x81120000,
7070 /* MPC55xx microcontrollers */
7071 #define CPU_POWERPC_MPC55xx CPU_POWERPC_MPC5567
7073 #define CPU_POWERPC_MPC5514E CPU_POWERPC_MPC5514E_v1
7074 #define CPU_POWERPC_MPC5514E_v0 CPU_POWERPC_e200z0
7075 #define CPU_POWERPC_MPC5514E_v1 CPU_POWERPC_e200z1
7076 #define CPU_POWERPC_MPC5514G CPU_POWERPC_MPC5514G_v1
7077 #define CPU_POWERPC_MPC5514G_v0 CPU_POWERPC_e200z0
7078 #define CPU_POWERPC_MPC5514G_v1 CPU_POWERPC_e200z1
7079 #define CPU_POWERPC_MPC5515S CPU_POWERPC_e200z1
7080 #define CPU_POWERPC_MPC5516E CPU_POWERPC_MPC5516E_v1
7081 #define CPU_POWERPC_MPC5516E_v0 CPU_POWERPC_e200z0
7082 #define CPU_POWERPC_MPC5516E_v1 CPU_POWERPC_e200z1
7083 #define CPU_POWERPC_MPC5516G CPU_POWERPC_MPC5516G_v1
7084 #define CPU_POWERPC_MPC5516G_v0 CPU_POWERPC_e200z0
7085 #define CPU_POWERPC_MPC5516G_v1 CPU_POWERPC_e200z1
7086 #define CPU_POWERPC_MPC5516S CPU_POWERPC_e200z1
7089 #define CPU_POWERPC_MPC5533 CPU_POWERPC_e200z3
7090 #define CPU_POWERPC_MPC5534 CPU_POWERPC_e200z3
7092 #define CPU_POWERPC_MPC5553 CPU_POWERPC_e200z6
7093 #define CPU_POWERPC_MPC5554 CPU_POWERPC_e200z6
7094 #define CPU_POWERPC_MPC5561 CPU_POWERPC_e200z6
7095 #define CPU_POWERPC_MPC5565 CPU_POWERPC_e200z6
7096 #define CPU_POWERPC_MPC5566 CPU_POWERPC_e200z6
7097 #define CPU_POWERPC_MPC5567 CPU_POWERPC_e200z6
7100 #define CPU_POWERPC_e300 CPU_POWERPC_e300c3
7101 CPU_POWERPC_e300c1
= 0x00830010,
7102 CPU_POWERPC_e300c2
= 0x00840010,
7103 CPU_POWERPC_e300c3
= 0x00850010,
7104 CPU_POWERPC_e300c4
= 0x00860010,
7105 /* MPC83xx microcontrollers */
7106 #define CPU_POWERPC_MPC831x CPU_POWERPC_e300c3
7107 #define CPU_POWERPC_MPC832x CPU_POWERPC_e300c2
7108 #define CPU_POWERPC_MPC834x CPU_POWERPC_e300c1
7109 #define CPU_POWERPC_MPC835x CPU_POWERPC_e300c1
7110 #define CPU_POWERPC_MPC836x CPU_POWERPC_e300c1
7111 #define CPU_POWERPC_MPC837x CPU_POWERPC_e300c4
7114 #define CPU_POWERPC_e500 CPU_POWERPC_e500v2_v22
7115 #define CPU_POWERPC_e500v1 CPU_POWERPC_e500v1_v20
7116 #define CPU_POWERPC_e500v2 CPU_POWERPC_e500v2_v22
7117 CPU_POWERPC_e500v1_v10
= 0x80200010,
7118 CPU_POWERPC_e500v1_v20
= 0x80200020,
7119 CPU_POWERPC_e500v2_v10
= 0x80210010,
7120 CPU_POWERPC_e500v2_v11
= 0x80210011,
7121 CPU_POWERPC_e500v2_v20
= 0x80210020,
7122 CPU_POWERPC_e500v2_v21
= 0x80210021,
7123 CPU_POWERPC_e500v2_v22
= 0x80210022,
7124 CPU_POWERPC_e500v2_v30
= 0x80210030,
7125 CPU_POWERPC_e500mc
= 0x80230020,
7126 /* MPC85xx microcontrollers */
7127 #define CPU_POWERPC_MPC8533 CPU_POWERPC_MPC8533_v11
7128 #define CPU_POWERPC_MPC8533_v10 CPU_POWERPC_e500v2_v21
7129 #define CPU_POWERPC_MPC8533_v11 CPU_POWERPC_e500v2_v22
7130 #define CPU_POWERPC_MPC8533E CPU_POWERPC_MPC8533E_v11
7131 #define CPU_POWERPC_MPC8533E_v10 CPU_POWERPC_e500v2_v21
7132 #define CPU_POWERPC_MPC8533E_v11 CPU_POWERPC_e500v2_v22
7133 #define CPU_POWERPC_MPC8540 CPU_POWERPC_MPC8540_v21
7134 #define CPU_POWERPC_MPC8540_v10 CPU_POWERPC_e500v1_v10
7135 #define CPU_POWERPC_MPC8540_v20 CPU_POWERPC_e500v1_v20
7136 #define CPU_POWERPC_MPC8540_v21 CPU_POWERPC_e500v1_v20
7137 #define CPU_POWERPC_MPC8541 CPU_POWERPC_MPC8541_v11
7138 #define CPU_POWERPC_MPC8541_v10 CPU_POWERPC_e500v1_v20
7139 #define CPU_POWERPC_MPC8541_v11 CPU_POWERPC_e500v1_v20
7140 #define CPU_POWERPC_MPC8541E CPU_POWERPC_MPC8541E_v11
7141 #define CPU_POWERPC_MPC8541E_v10 CPU_POWERPC_e500v1_v20
7142 #define CPU_POWERPC_MPC8541E_v11 CPU_POWERPC_e500v1_v20
7143 #define CPU_POWERPC_MPC8543 CPU_POWERPC_MPC8543_v21
7144 #define CPU_POWERPC_MPC8543_v10 CPU_POWERPC_e500v2_v10
7145 #define CPU_POWERPC_MPC8543_v11 CPU_POWERPC_e500v2_v11
7146 #define CPU_POWERPC_MPC8543_v20 CPU_POWERPC_e500v2_v20
7147 #define CPU_POWERPC_MPC8543_v21 CPU_POWERPC_e500v2_v21
7148 #define CPU_POWERPC_MPC8543E CPU_POWERPC_MPC8543E_v21
7149 #define CPU_POWERPC_MPC8543E_v10 CPU_POWERPC_e500v2_v10
7150 #define CPU_POWERPC_MPC8543E_v11 CPU_POWERPC_e500v2_v11
7151 #define CPU_POWERPC_MPC8543E_v20 CPU_POWERPC_e500v2_v20
7152 #define CPU_POWERPC_MPC8543E_v21 CPU_POWERPC_e500v2_v21
7153 #define CPU_POWERPC_MPC8544 CPU_POWERPC_MPC8544_v11
7154 #define CPU_POWERPC_MPC8544_v10 CPU_POWERPC_e500v2_v21
7155 #define CPU_POWERPC_MPC8544_v11 CPU_POWERPC_e500v2_v22
7156 #define CPU_POWERPC_MPC8544E_v11 CPU_POWERPC_e500v2_v22
7157 #define CPU_POWERPC_MPC8544E CPU_POWERPC_MPC8544E_v11
7158 #define CPU_POWERPC_MPC8544E_v10 CPU_POWERPC_e500v2_v21
7159 #define CPU_POWERPC_MPC8545 CPU_POWERPC_MPC8545_v21
7160 #define CPU_POWERPC_MPC8545_v10 CPU_POWERPC_e500v2_v10
7161 #define CPU_POWERPC_MPC8545_v20 CPU_POWERPC_e500v2_v20
7162 #define CPU_POWERPC_MPC8545_v21 CPU_POWERPC_e500v2_v21
7163 #define CPU_POWERPC_MPC8545E CPU_POWERPC_MPC8545E_v21
7164 #define CPU_POWERPC_MPC8545E_v10 CPU_POWERPC_e500v2_v10
7165 #define CPU_POWERPC_MPC8545E_v20 CPU_POWERPC_e500v2_v20
7166 #define CPU_POWERPC_MPC8545E_v21 CPU_POWERPC_e500v2_v21
7167 #define CPU_POWERPC_MPC8547E CPU_POWERPC_MPC8545E_v21
7168 #define CPU_POWERPC_MPC8547E_v10 CPU_POWERPC_e500v2_v10
7169 #define CPU_POWERPC_MPC8547E_v20 CPU_POWERPC_e500v2_v20
7170 #define CPU_POWERPC_MPC8547E_v21 CPU_POWERPC_e500v2_v21
7171 #define CPU_POWERPC_MPC8548 CPU_POWERPC_MPC8548_v21
7172 #define CPU_POWERPC_MPC8548_v10 CPU_POWERPC_e500v2_v10
7173 #define CPU_POWERPC_MPC8548_v11 CPU_POWERPC_e500v2_v11
7174 #define CPU_POWERPC_MPC8548_v20 CPU_POWERPC_e500v2_v20
7175 #define CPU_POWERPC_MPC8548_v21 CPU_POWERPC_e500v2_v21
7176 #define CPU_POWERPC_MPC8548E CPU_POWERPC_MPC8548E_v21
7177 #define CPU_POWERPC_MPC8548E_v10 CPU_POWERPC_e500v2_v10
7178 #define CPU_POWERPC_MPC8548E_v11 CPU_POWERPC_e500v2_v11
7179 #define CPU_POWERPC_MPC8548E_v20 CPU_POWERPC_e500v2_v20
7180 #define CPU_POWERPC_MPC8548E_v21 CPU_POWERPC_e500v2_v21
7181 #define CPU_POWERPC_MPC8555 CPU_POWERPC_MPC8555_v11
7182 #define CPU_POWERPC_MPC8555_v10 CPU_POWERPC_e500v2_v10
7183 #define CPU_POWERPC_MPC8555_v11 CPU_POWERPC_e500v2_v11
7184 #define CPU_POWERPC_MPC8555E CPU_POWERPC_MPC8555E_v11
7185 #define CPU_POWERPC_MPC8555E_v10 CPU_POWERPC_e500v2_v10
7186 #define CPU_POWERPC_MPC8555E_v11 CPU_POWERPC_e500v2_v11
7187 #define CPU_POWERPC_MPC8560 CPU_POWERPC_MPC8560_v21
7188 #define CPU_POWERPC_MPC8560_v10 CPU_POWERPC_e500v2_v10
7189 #define CPU_POWERPC_MPC8560_v20 CPU_POWERPC_e500v2_v20
7190 #define CPU_POWERPC_MPC8560_v21 CPU_POWERPC_e500v2_v21
7191 #define CPU_POWERPC_MPC8567 CPU_POWERPC_e500v2_v22
7192 #define CPU_POWERPC_MPC8567E CPU_POWERPC_e500v2_v22
7193 #define CPU_POWERPC_MPC8568 CPU_POWERPC_e500v2_v22
7194 #define CPU_POWERPC_MPC8568E CPU_POWERPC_e500v2_v22
7195 #define CPU_POWERPC_MPC8572 CPU_POWERPC_e500v2_v30
7196 #define CPU_POWERPC_MPC8572E CPU_POWERPC_e500v2_v30
7199 CPU_POWERPC_e600
= 0x80040010,
7200 /* MPC86xx microcontrollers */
7201 #define CPU_POWERPC_MPC8610 CPU_POWERPC_e600
7202 #define CPU_POWERPC_MPC8641 CPU_POWERPC_e600
7203 #define CPU_POWERPC_MPC8641D CPU_POWERPC_e600
7204 /* PowerPC 6xx cores */
7205 #define CPU_POWERPC_601 CPU_POWERPC_601_v2
7206 CPU_POWERPC_601_v0
= 0x00010001,
7207 CPU_POWERPC_601_v1
= 0x00010001,
7208 #define CPU_POWERPC_601v CPU_POWERPC_601_v2
7209 CPU_POWERPC_601_v2
= 0x00010002,
7210 CPU_POWERPC_602
= 0x00050100,
7211 CPU_POWERPC_603
= 0x00030100,
7212 #define CPU_POWERPC_603E CPU_POWERPC_603E_v41
7213 CPU_POWERPC_603E_v11
= 0x00060101,
7214 CPU_POWERPC_603E_v12
= 0x00060102,
7215 CPU_POWERPC_603E_v13
= 0x00060103,
7216 CPU_POWERPC_603E_v14
= 0x00060104,
7217 CPU_POWERPC_603E_v22
= 0x00060202,
7218 CPU_POWERPC_603E_v3
= 0x00060300,
7219 CPU_POWERPC_603E_v4
= 0x00060400,
7220 CPU_POWERPC_603E_v41
= 0x00060401,
7221 CPU_POWERPC_603E7t
= 0x00071201,
7222 CPU_POWERPC_603E7v
= 0x00070100,
7223 CPU_POWERPC_603E7v1
= 0x00070101,
7224 CPU_POWERPC_603E7v2
= 0x00070201,
7225 CPU_POWERPC_603E7
= 0x00070200,
7226 CPU_POWERPC_603P
= 0x00070000,
7227 #define CPU_POWERPC_603R CPU_POWERPC_603E7t
7228 /* XXX: missing 0x00040303 (604) */
7229 CPU_POWERPC_604
= 0x00040103,
7230 #define CPU_POWERPC_604E CPU_POWERPC_604E_v24
7231 /* XXX: missing 0x00091203 */
7232 /* XXX: missing 0x00092110 */
7233 /* XXX: missing 0x00092120 */
7234 CPU_POWERPC_604E_v10
= 0x00090100,
7235 CPU_POWERPC_604E_v22
= 0x00090202,
7236 CPU_POWERPC_604E_v24
= 0x00090204,
7237 /* XXX: missing 0x000a0100 */
7238 /* XXX: missing 0x00093102 */
7239 CPU_POWERPC_604R
= 0x000a0101,
7241 CPU_POWERPC_604EV
= xxx
, /* XXX: same as 604R ? */
7243 /* PowerPC 740/750 cores (aka G3) */
7244 /* XXX: missing 0x00084202 */
7245 #define CPU_POWERPC_7x0 CPU_POWERPC_7x0_v31
7246 CPU_POWERPC_7x0_v10
= 0x00080100,
7247 CPU_POWERPC_7x0_v20
= 0x00080200,
7248 CPU_POWERPC_7x0_v21
= 0x00080201,
7249 CPU_POWERPC_7x0_v22
= 0x00080202,
7250 CPU_POWERPC_7x0_v30
= 0x00080300,
7251 CPU_POWERPC_7x0_v31
= 0x00080301,
7252 CPU_POWERPC_740E
= 0x00080100,
7253 CPU_POWERPC_750E
= 0x00080200,
7254 CPU_POWERPC_7x0P
= 0x10080000,
7255 /* XXX: missing 0x00087010 (CL ?) */
7256 #define CPU_POWERPC_750CL CPU_POWERPC_750CL_v20
7257 CPU_POWERPC_750CL_v10
= 0x00087200,
7258 CPU_POWERPC_750CL_v20
= 0x00087210, /* aka rev E */
7259 #define CPU_POWERPC_750CX CPU_POWERPC_750CX_v22
7260 CPU_POWERPC_750CX_v10
= 0x00082100,
7261 CPU_POWERPC_750CX_v20
= 0x00082200,
7262 CPU_POWERPC_750CX_v21
= 0x00082201,
7263 CPU_POWERPC_750CX_v22
= 0x00082202,
7264 #define CPU_POWERPC_750CXE CPU_POWERPC_750CXE_v31b
7265 CPU_POWERPC_750CXE_v21
= 0x00082211,
7266 CPU_POWERPC_750CXE_v22
= 0x00082212,
7267 CPU_POWERPC_750CXE_v23
= 0x00082213,
7268 CPU_POWERPC_750CXE_v24
= 0x00082214,
7269 CPU_POWERPC_750CXE_v24b
= 0x00083214,
7270 CPU_POWERPC_750CXE_v30
= 0x00082310,
7271 CPU_POWERPC_750CXE_v31
= 0x00082311,
7272 CPU_POWERPC_750CXE_v31b
= 0x00083311,
7273 CPU_POWERPC_750CXR
= 0x00083410,
7274 CPU_POWERPC_750FL
= 0x70000203,
7275 #define CPU_POWERPC_750FX CPU_POWERPC_750FX_v23
7276 CPU_POWERPC_750FX_v10
= 0x70000100,
7277 CPU_POWERPC_750FX_v20
= 0x70000200,
7278 CPU_POWERPC_750FX_v21
= 0x70000201,
7279 CPU_POWERPC_750FX_v22
= 0x70000202,
7280 CPU_POWERPC_750FX_v23
= 0x70000203,
7281 CPU_POWERPC_750GL
= 0x70020102,
7282 #define CPU_POWERPC_750GX CPU_POWERPC_750GX_v12
7283 CPU_POWERPC_750GX_v10
= 0x70020100,
7284 CPU_POWERPC_750GX_v11
= 0x70020101,
7285 CPU_POWERPC_750GX_v12
= 0x70020102,
7286 #define CPU_POWERPC_750L CPU_POWERPC_750L_v32 /* Aka LoneStar */
7287 CPU_POWERPC_750L_v20
= 0x00088200,
7288 CPU_POWERPC_750L_v21
= 0x00088201,
7289 CPU_POWERPC_750L_v22
= 0x00088202,
7290 CPU_POWERPC_750L_v30
= 0x00088300,
7291 CPU_POWERPC_750L_v32
= 0x00088302,
7292 /* PowerPC 745/755 cores */
7293 #define CPU_POWERPC_7x5 CPU_POWERPC_7x5_v28
7294 CPU_POWERPC_7x5_v10
= 0x00083100,
7295 CPU_POWERPC_7x5_v11
= 0x00083101,
7296 CPU_POWERPC_7x5_v20
= 0x00083200,
7297 CPU_POWERPC_7x5_v21
= 0x00083201,
7298 CPU_POWERPC_7x5_v22
= 0x00083202, /* aka D */
7299 CPU_POWERPC_7x5_v23
= 0x00083203, /* aka E */
7300 CPU_POWERPC_7x5_v24
= 0x00083204,
7301 CPU_POWERPC_7x5_v25
= 0x00083205,
7302 CPU_POWERPC_7x5_v26
= 0x00083206,
7303 CPU_POWERPC_7x5_v27
= 0x00083207,
7304 CPU_POWERPC_7x5_v28
= 0x00083208,
7306 CPU_POWERPC_7x5P
= xxx
,
7308 /* PowerPC 74xx cores (aka G4) */
7309 /* XXX: missing 0x000C1101 */
7310 #define CPU_POWERPC_7400 CPU_POWERPC_7400_v29
7311 CPU_POWERPC_7400_v10
= 0x000C0100,
7312 CPU_POWERPC_7400_v11
= 0x000C0101,
7313 CPU_POWERPC_7400_v20
= 0x000C0200,
7314 CPU_POWERPC_7400_v21
= 0x000C0201,
7315 CPU_POWERPC_7400_v22
= 0x000C0202,
7316 CPU_POWERPC_7400_v26
= 0x000C0206,
7317 CPU_POWERPC_7400_v27
= 0x000C0207,
7318 CPU_POWERPC_7400_v28
= 0x000C0208,
7319 CPU_POWERPC_7400_v29
= 0x000C0209,
7320 #define CPU_POWERPC_7410 CPU_POWERPC_7410_v14
7321 CPU_POWERPC_7410_v10
= 0x800C1100,
7322 CPU_POWERPC_7410_v11
= 0x800C1101,
7323 CPU_POWERPC_7410_v12
= 0x800C1102, /* aka C */
7324 CPU_POWERPC_7410_v13
= 0x800C1103, /* aka D */
7325 CPU_POWERPC_7410_v14
= 0x800C1104, /* aka E */
7326 #define CPU_POWERPC_7448 CPU_POWERPC_7448_v21
7327 CPU_POWERPC_7448_v10
= 0x80040100,
7328 CPU_POWERPC_7448_v11
= 0x80040101,
7329 CPU_POWERPC_7448_v20
= 0x80040200,
7330 CPU_POWERPC_7448_v21
= 0x80040201,
7331 #define CPU_POWERPC_7450 CPU_POWERPC_7450_v21
7332 CPU_POWERPC_7450_v10
= 0x80000100,
7333 CPU_POWERPC_7450_v11
= 0x80000101,
7334 CPU_POWERPC_7450_v12
= 0x80000102,
7335 CPU_POWERPC_7450_v20
= 0x80000200, /* aka A, B, C, D: 2.04 */
7336 CPU_POWERPC_7450_v21
= 0x80000201, /* aka E */
7337 #define CPU_POWERPC_74x1 CPU_POWERPC_74x1_v23
7338 CPU_POWERPC_74x1_v23
= 0x80000203, /* aka G: 2.3 */
7339 /* XXX: this entry might be a bug in some documentation */
7340 CPU_POWERPC_74x1_v210
= 0x80000210, /* aka G: 2.3 ? */
7341 #define CPU_POWERPC_74x5 CPU_POWERPC_74x5_v32
7342 CPU_POWERPC_74x5_v10
= 0x80010100,
7343 /* XXX: missing 0x80010200 */
7344 CPU_POWERPC_74x5_v21
= 0x80010201, /* aka C: 2.1 */
7345 CPU_POWERPC_74x5_v32
= 0x80010302,
7346 CPU_POWERPC_74x5_v33
= 0x80010303, /* aka F: 3.3 */
7347 CPU_POWERPC_74x5_v34
= 0x80010304, /* aka G: 3.4 */
7348 #define CPU_POWERPC_74x7 CPU_POWERPC_74x7_v12
7349 CPU_POWERPC_74x7_v10
= 0x80020100, /* aka A: 1.0 */
7350 CPU_POWERPC_74x7_v11
= 0x80020101, /* aka B: 1.1 */
7351 CPU_POWERPC_74x7_v12
= 0x80020102, /* aka C: 1.2 */
7352 #define CPU_POWERPC_74x7A CPU_POWERPC_74x7A_v12
7353 CPU_POWERPC_74x7A_v10
= 0x80030100, /* aka A: 1.0 */
7354 CPU_POWERPC_74x7A_v11
= 0x80030101, /* aka B: 1.1 */
7355 CPU_POWERPC_74x7A_v12
= 0x80030102, /* aka C: 1.2 */
7356 /* 64 bits PowerPC */
7357 #if defined(TARGET_PPC64)
7358 CPU_POWERPC_620
= 0x00140000,
7359 CPU_POWERPC_630
= 0x00400000,
7360 CPU_POWERPC_631
= 0x00410104,
7361 CPU_POWERPC_POWER4
= 0x00350000,
7362 CPU_POWERPC_POWER4P
= 0x00380000,
7363 /* XXX: missing 0x003A0201 */
7364 CPU_POWERPC_POWER5
= 0x003A0203,
7365 #define CPU_POWERPC_POWER5GR CPU_POWERPC_POWER5
7366 CPU_POWERPC_POWER5P
= 0x003B0000,
7367 #define CPU_POWERPC_POWER5GS CPU_POWERPC_POWER5P
7368 CPU_POWERPC_POWER6
= 0x003E0000,
7369 CPU_POWERPC_POWER6_5
= 0x0F000001, /* POWER6 in POWER5 mode */
7370 CPU_POWERPC_POWER6A
= 0x0F000002,
7371 #define CPU_POWERPC_POWER7 CPU_POWERPC_POWER7_v20
7372 CPU_POWERPC_POWER7_v20
= 0x003F0200,
7373 CPU_POWERPC_POWER7_v21
= 0x003F0201,
7374 CPU_POWERPC_POWER7_v23
= 0x003F0203,
7375 CPU_POWERPC_970
= 0x00390202,
7376 #define CPU_POWERPC_970FX CPU_POWERPC_970FX_v31
7377 CPU_POWERPC_970FX_v10
= 0x00391100,
7378 CPU_POWERPC_970FX_v20
= 0x003C0200,
7379 CPU_POWERPC_970FX_v21
= 0x003C0201,
7380 CPU_POWERPC_970FX_v30
= 0x003C0300,
7381 CPU_POWERPC_970FX_v31
= 0x003C0301,
7382 CPU_POWERPC_970GX
= 0x00450000,
7383 #define CPU_POWERPC_970MP CPU_POWERPC_970MP_v11
7384 CPU_POWERPC_970MP_v10
= 0x00440100,
7385 CPU_POWERPC_970MP_v11
= 0x00440101,
7386 #define CPU_POWERPC_CELL CPU_POWERPC_CELL_v32
7387 CPU_POWERPC_CELL_v10
= 0x00700100,
7388 CPU_POWERPC_CELL_v20
= 0x00700400,
7389 CPU_POWERPC_CELL_v30
= 0x00700500,
7390 CPU_POWERPC_CELL_v31
= 0x00700501,
7391 #define CPU_POWERPC_CELL_v32 CPU_POWERPC_CELL_v31
7392 CPU_POWERPC_RS64
= 0x00330000,
7393 CPU_POWERPC_RS64II
= 0x00340000,
7394 CPU_POWERPC_RS64III
= 0x00360000,
7395 CPU_POWERPC_RS64IV
= 0x00370000,
7396 #endif /* defined(TARGET_PPC64) */
7397 /* Original POWER */
7398 /* XXX: should be POWER (RIOS), RSC3308, RSC4608,
7399 * POWER2 (RIOS2) & RSC2 (P2SC) here
7402 CPU_POWER
= xxx
, /* 0x20000 ? 0x30000 for RSC ? */
7405 CPU_POWER2
= xxx
, /* 0x40000 ? */
7408 CPU_POWERPC_PA6T
= 0x00900000,
7411 /* System version register (used on MPC 8xxx) */
7413 POWERPC_SVR_NONE
= 0x00000000,
7414 #define POWERPC_SVR_52xx POWERPC_SVR_5200
7415 #define POWERPC_SVR_5200 POWERPC_SVR_5200_v12
7416 POWERPC_SVR_5200_v10
= 0x80110010,
7417 POWERPC_SVR_5200_v11
= 0x80110011,
7418 POWERPC_SVR_5200_v12
= 0x80110012,
7419 #define POWERPC_SVR_5200B POWERPC_SVR_5200B_v21
7420 POWERPC_SVR_5200B_v20
= 0x80110020,
7421 POWERPC_SVR_5200B_v21
= 0x80110021,
7422 #define POWERPC_SVR_55xx POWERPC_SVR_5567
7424 POWERPC_SVR_5533
= xxx
,
7427 POWERPC_SVR_5534
= xxx
,
7430 POWERPC_SVR_5553
= xxx
,
7433 POWERPC_SVR_5554
= xxx
,
7436 POWERPC_SVR_5561
= xxx
,
7439 POWERPC_SVR_5565
= xxx
,
7442 POWERPC_SVR_5566
= xxx
,
7445 POWERPC_SVR_5567
= xxx
,
7448 POWERPC_SVR_8313
= xxx
,
7451 POWERPC_SVR_8313E
= xxx
,
7454 POWERPC_SVR_8314
= xxx
,
7457 POWERPC_SVR_8314E
= xxx
,
7460 POWERPC_SVR_8315
= xxx
,
7463 POWERPC_SVR_8315E
= xxx
,
7466 POWERPC_SVR_8321
= xxx
,
7469 POWERPC_SVR_8321E
= xxx
,
7472 POWERPC_SVR_8323
= xxx
,
7475 POWERPC_SVR_8323E
= xxx
,
7477 POWERPC_SVR_8343
= 0x80570010,
7478 POWERPC_SVR_8343A
= 0x80570030,
7479 POWERPC_SVR_8343E
= 0x80560010,
7480 POWERPC_SVR_8343EA
= 0x80560030,
7481 #define POWERPC_SVR_8347 POWERPC_SVR_8347T
7482 POWERPC_SVR_8347P
= 0x80550010, /* PBGA package */
7483 POWERPC_SVR_8347T
= 0x80530010, /* TBGA package */
7484 #define POWERPC_SVR_8347A POWERPC_SVR_8347AT
7485 POWERPC_SVR_8347AP
= 0x80550030, /* PBGA package */
7486 POWERPC_SVR_8347AT
= 0x80530030, /* TBGA package */
7487 #define POWERPC_SVR_8347E POWERPC_SVR_8347ET
7488 POWERPC_SVR_8347EP
= 0x80540010, /* PBGA package */
7489 POWERPC_SVR_8347ET
= 0x80520010, /* TBGA package */
7490 #define POWERPC_SVR_8347EA POWERPC_SVR_8347EAT
7491 POWERPC_SVR_8347EAP
= 0x80540030, /* PBGA package */
7492 POWERPC_SVR_8347EAT
= 0x80520030, /* TBGA package */
7493 POWERPC_SVR_8349
= 0x80510010,
7494 POWERPC_SVR_8349A
= 0x80510030,
7495 POWERPC_SVR_8349E
= 0x80500010,
7496 POWERPC_SVR_8349EA
= 0x80500030,
7498 POWERPC_SVR_8358E
= xxx
,
7501 POWERPC_SVR_8360E
= xxx
,
7503 #define POWERPC_SVR_E500 0x40000000
7504 POWERPC_SVR_8377
= 0x80C70010 | POWERPC_SVR_E500
,
7505 POWERPC_SVR_8377E
= 0x80C60010 | POWERPC_SVR_E500
,
7506 POWERPC_SVR_8378
= 0x80C50010 | POWERPC_SVR_E500
,
7507 POWERPC_SVR_8378E
= 0x80C40010 | POWERPC_SVR_E500
,
7508 POWERPC_SVR_8379
= 0x80C30010 | POWERPC_SVR_E500
,
7509 POWERPC_SVR_8379E
= 0x80C00010 | POWERPC_SVR_E500
,
7510 #define POWERPC_SVR_8533 POWERPC_SVR_8533_v11
7511 POWERPC_SVR_8533_v10
= 0x80340010 | POWERPC_SVR_E500
,
7512 POWERPC_SVR_8533_v11
= 0x80340011 | POWERPC_SVR_E500
,
7513 #define POWERPC_SVR_8533E POWERPC_SVR_8533E_v11
7514 POWERPC_SVR_8533E_v10
= 0x803C0010 | POWERPC_SVR_E500
,
7515 POWERPC_SVR_8533E_v11
= 0x803C0011 | POWERPC_SVR_E500
,
7516 #define POWERPC_SVR_8540 POWERPC_SVR_8540_v21
7517 POWERPC_SVR_8540_v10
= 0x80300010 | POWERPC_SVR_E500
,
7518 POWERPC_SVR_8540_v20
= 0x80300020 | POWERPC_SVR_E500
,
7519 POWERPC_SVR_8540_v21
= 0x80300021 | POWERPC_SVR_E500
,
7520 #define POWERPC_SVR_8541 POWERPC_SVR_8541_v11
7521 POWERPC_SVR_8541_v10
= 0x80720010 | POWERPC_SVR_E500
,
7522 POWERPC_SVR_8541_v11
= 0x80720011 | POWERPC_SVR_E500
,
7523 #define POWERPC_SVR_8541E POWERPC_SVR_8541E_v11
7524 POWERPC_SVR_8541E_v10
= 0x807A0010 | POWERPC_SVR_E500
,
7525 POWERPC_SVR_8541E_v11
= 0x807A0011 | POWERPC_SVR_E500
,
7526 #define POWERPC_SVR_8543 POWERPC_SVR_8543_v21
7527 POWERPC_SVR_8543_v10
= 0x80320010 | POWERPC_SVR_E500
,
7528 POWERPC_SVR_8543_v11
= 0x80320011 | POWERPC_SVR_E500
,
7529 POWERPC_SVR_8543_v20
= 0x80320020 | POWERPC_SVR_E500
,
7530 POWERPC_SVR_8543_v21
= 0x80320021 | POWERPC_SVR_E500
,
7531 #define POWERPC_SVR_8543E POWERPC_SVR_8543E_v21
7532 POWERPC_SVR_8543E_v10
= 0x803A0010 | POWERPC_SVR_E500
,
7533 POWERPC_SVR_8543E_v11
= 0x803A0011 | POWERPC_SVR_E500
,
7534 POWERPC_SVR_8543E_v20
= 0x803A0020 | POWERPC_SVR_E500
,
7535 POWERPC_SVR_8543E_v21
= 0x803A0021 | POWERPC_SVR_E500
,
7536 #define POWERPC_SVR_8544 POWERPC_SVR_8544_v11
7537 POWERPC_SVR_8544_v10
= 0x80340110 | POWERPC_SVR_E500
,
7538 POWERPC_SVR_8544_v11
= 0x80340111 | POWERPC_SVR_E500
,
7539 #define POWERPC_SVR_8544E POWERPC_SVR_8544E_v11
7540 POWERPC_SVR_8544E_v10
= 0x803C0110 | POWERPC_SVR_E500
,
7541 POWERPC_SVR_8544E_v11
= 0x803C0111 | POWERPC_SVR_E500
,
7542 #define POWERPC_SVR_8545 POWERPC_SVR_8545_v21
7543 POWERPC_SVR_8545_v20
= 0x80310220 | POWERPC_SVR_E500
,
7544 POWERPC_SVR_8545_v21
= 0x80310221 | POWERPC_SVR_E500
,
7545 #define POWERPC_SVR_8545E POWERPC_SVR_8545E_v21
7546 POWERPC_SVR_8545E_v20
= 0x80390220 | POWERPC_SVR_E500
,
7547 POWERPC_SVR_8545E_v21
= 0x80390221 | POWERPC_SVR_E500
,
7548 #define POWERPC_SVR_8547E POWERPC_SVR_8547E_v21
7549 POWERPC_SVR_8547E_v20
= 0x80390120 | POWERPC_SVR_E500
,
7550 POWERPC_SVR_8547E_v21
= 0x80390121 | POWERPC_SVR_E500
,
7551 #define POWERPC_SVR_8548 POWERPC_SVR_8548_v21
7552 POWERPC_SVR_8548_v10
= 0x80310010 | POWERPC_SVR_E500
,
7553 POWERPC_SVR_8548_v11
= 0x80310011 | POWERPC_SVR_E500
,
7554 POWERPC_SVR_8548_v20
= 0x80310020 | POWERPC_SVR_E500
,
7555 POWERPC_SVR_8548_v21
= 0x80310021 | POWERPC_SVR_E500
,
7556 #define POWERPC_SVR_8548E POWERPC_SVR_8548E_v21
7557 POWERPC_SVR_8548E_v10
= 0x80390010 | POWERPC_SVR_E500
,
7558 POWERPC_SVR_8548E_v11
= 0x80390011 | POWERPC_SVR_E500
,
7559 POWERPC_SVR_8548E_v20
= 0x80390020 | POWERPC_SVR_E500
,
7560 POWERPC_SVR_8548E_v21
= 0x80390021 | POWERPC_SVR_E500
,
7561 #define POWERPC_SVR_8555 POWERPC_SVR_8555_v11
7562 POWERPC_SVR_8555_v10
= 0x80710010 | POWERPC_SVR_E500
,
7563 POWERPC_SVR_8555_v11
= 0x80710011 | POWERPC_SVR_E500
,
7564 #define POWERPC_SVR_8555E POWERPC_SVR_8555_v11
7565 POWERPC_SVR_8555E_v10
= 0x80790010 | POWERPC_SVR_E500
,
7566 POWERPC_SVR_8555E_v11
= 0x80790011 | POWERPC_SVR_E500
,
7567 #define POWERPC_SVR_8560 POWERPC_SVR_8560_v21
7568 POWERPC_SVR_8560_v10
= 0x80700010 | POWERPC_SVR_E500
,
7569 POWERPC_SVR_8560_v20
= 0x80700020 | POWERPC_SVR_E500
,
7570 POWERPC_SVR_8560_v21
= 0x80700021 | POWERPC_SVR_E500
,
7571 POWERPC_SVR_8567
= 0x80750111 | POWERPC_SVR_E500
,
7572 POWERPC_SVR_8567E
= 0x807D0111 | POWERPC_SVR_E500
,
7573 POWERPC_SVR_8568
= 0x80750011 | POWERPC_SVR_E500
,
7574 POWERPC_SVR_8568E
= 0x807D0011 | POWERPC_SVR_E500
,
7575 POWERPC_SVR_8572
= 0x80E00010 | POWERPC_SVR_E500
,
7576 POWERPC_SVR_8572E
= 0x80E80010 | POWERPC_SVR_E500
,
7578 POWERPC_SVR_8610
= xxx
,
7580 POWERPC_SVR_8641
= 0x80900021,
7581 POWERPC_SVR_8641D
= 0x80900121,
7584 /*****************************************************************************/
7585 /* PowerPC CPU definitions */
7586 #define POWERPC_DEF_SVR(_name, _pvr, _svr, _type) \
7591 .insns_flags = glue(POWERPC_INSNS_,_type), \
7592 .insns_flags2 = glue(POWERPC_INSNS2_,_type), \
7593 .msr_mask = glue(POWERPC_MSRM_,_type), \
7594 .mmu_model = glue(POWERPC_MMU_,_type), \
7595 .excp_model = glue(POWERPC_EXCP_,_type), \
7596 .bus_model = glue(POWERPC_INPUT_,_type), \
7597 .bfd_mach = glue(POWERPC_BFDM_,_type), \
7598 .flags = glue(POWERPC_FLAG_,_type), \
7599 .init_proc = &glue(init_proc_,_type), \
7600 .check_pow = &glue(check_pow_,_type), \
7602 #define POWERPC_DEF(_name, _pvr, _type) \
7603 POWERPC_DEF_SVR(_name, _pvr, POWERPC_SVR_NONE, _type)
7605 static const ppc_def_t ppc_defs
[] = {
7606 /* Embedded PowerPC */
7607 /* PowerPC 401 family */
7608 /* Generic PowerPC 401 */
7609 POWERPC_DEF("401", CPU_POWERPC_401
, 401),
7610 /* PowerPC 401 cores */
7612 POWERPC_DEF("401A1", CPU_POWERPC_401A1
, 401),
7614 POWERPC_DEF("401B2", CPU_POWERPC_401B2
, 401x2
),
7617 POWERPC_DEF("401B3", CPU_POWERPC_401B3
, 401x3
),
7620 POWERPC_DEF("401C2", CPU_POWERPC_401C2
, 401x2
),
7622 POWERPC_DEF("401D2", CPU_POWERPC_401D2
, 401x2
),
7624 POWERPC_DEF("401E2", CPU_POWERPC_401E2
, 401x2
),
7626 POWERPC_DEF("401F2", CPU_POWERPC_401F2
, 401x2
),
7628 /* XXX: to be checked */
7629 POWERPC_DEF("401G2", CPU_POWERPC_401G2
, 401x2
),
7630 /* PowerPC 401 microcontrolers */
7633 POWERPC_DEF("401GF", CPU_POWERPC_401GF
, 401),
7635 /* IOP480 (401 microcontroler) */
7636 POWERPC_DEF("IOP480", CPU_POWERPC_IOP480
, IOP480
),
7637 /* IBM Processor for Network Resources */
7638 POWERPC_DEF("Cobra", CPU_POWERPC_COBRA
, 401),
7640 POWERPC_DEF("Xipchip", CPU_POWERPC_XIPCHIP
, 401),
7642 /* PowerPC 403 family */
7643 /* Generic PowerPC 403 */
7644 POWERPC_DEF("403", CPU_POWERPC_403
, 403),
7645 /* PowerPC 403 microcontrolers */
7646 /* PowerPC 403 GA */
7647 POWERPC_DEF("403GA", CPU_POWERPC_403GA
, 403),
7648 /* PowerPC 403 GB */
7649 POWERPC_DEF("403GB", CPU_POWERPC_403GB
, 403),
7650 /* PowerPC 403 GC */
7651 POWERPC_DEF("403GC", CPU_POWERPC_403GC
, 403),
7652 /* PowerPC 403 GCX */
7653 POWERPC_DEF("403GCX", CPU_POWERPC_403GCX
, 403GCX
),
7655 /* PowerPC 403 GP */
7656 POWERPC_DEF("403GP", CPU_POWERPC_403GP
, 403),
7658 /* PowerPC 405 family */
7659 /* Generic PowerPC 405 */
7660 POWERPC_DEF("405", CPU_POWERPC_405
, 405),
7661 /* PowerPC 405 cores */
7663 /* PowerPC 405 A3 */
7664 POWERPC_DEF("405A3", CPU_POWERPC_405A3
, 405),
7667 /* PowerPC 405 A4 */
7668 POWERPC_DEF("405A4", CPU_POWERPC_405A4
, 405),
7671 /* PowerPC 405 B3 */
7672 POWERPC_DEF("405B3", CPU_POWERPC_405B3
, 405),
7675 /* PowerPC 405 B4 */
7676 POWERPC_DEF("405B4", CPU_POWERPC_405B4
, 405),
7679 /* PowerPC 405 C3 */
7680 POWERPC_DEF("405C3", CPU_POWERPC_405C3
, 405),
7683 /* PowerPC 405 C4 */
7684 POWERPC_DEF("405C4", CPU_POWERPC_405C4
, 405),
7686 /* PowerPC 405 D2 */
7687 POWERPC_DEF("405D2", CPU_POWERPC_405D2
, 405),
7689 /* PowerPC 405 D3 */
7690 POWERPC_DEF("405D3", CPU_POWERPC_405D3
, 405),
7692 /* PowerPC 405 D4 */
7693 POWERPC_DEF("405D4", CPU_POWERPC_405D4
, 405),
7695 /* PowerPC 405 D5 */
7696 POWERPC_DEF("405D5", CPU_POWERPC_405D5
, 405),
7699 /* PowerPC 405 E4 */
7700 POWERPC_DEF("405E4", CPU_POWERPC_405E4
, 405),
7703 /* PowerPC 405 F4 */
7704 POWERPC_DEF("405F4", CPU_POWERPC_405F4
, 405),
7707 /* PowerPC 405 F5 */
7708 POWERPC_DEF("405F5", CPU_POWERPC_405F5
, 405),
7711 /* PowerPC 405 F6 */
7712 POWERPC_DEF("405F6", CPU_POWERPC_405F6
, 405),
7714 /* PowerPC 405 microcontrolers */
7715 /* PowerPC 405 CR */
7716 POWERPC_DEF("405CR", CPU_POWERPC_405CR
, 405),
7717 /* PowerPC 405 CRa */
7718 POWERPC_DEF("405CRa", CPU_POWERPC_405CRa
, 405),
7719 /* PowerPC 405 CRb */
7720 POWERPC_DEF("405CRb", CPU_POWERPC_405CRb
, 405),
7721 /* PowerPC 405 CRc */
7722 POWERPC_DEF("405CRc", CPU_POWERPC_405CRc
, 405),
7723 /* PowerPC 405 EP */
7724 POWERPC_DEF("405EP", CPU_POWERPC_405EP
, 405),
7726 /* PowerPC 405 EXr */
7727 POWERPC_DEF("405EXr", CPU_POWERPC_405EXr
, 405),
7729 /* PowerPC 405 EZ */
7730 POWERPC_DEF("405EZ", CPU_POWERPC_405EZ
, 405),
7732 /* PowerPC 405 FX */
7733 POWERPC_DEF("405FX", CPU_POWERPC_405FX
, 405),
7735 /* PowerPC 405 GP */
7736 POWERPC_DEF("405GP", CPU_POWERPC_405GP
, 405),
7737 /* PowerPC 405 GPa */
7738 POWERPC_DEF("405GPa", CPU_POWERPC_405GPa
, 405),
7739 /* PowerPC 405 GPb */
7740 POWERPC_DEF("405GPb", CPU_POWERPC_405GPb
, 405),
7741 /* PowerPC 405 GPc */
7742 POWERPC_DEF("405GPc", CPU_POWERPC_405GPc
, 405),
7743 /* PowerPC 405 GPd */
7744 POWERPC_DEF("405GPd", CPU_POWERPC_405GPd
, 405),
7745 /* PowerPC 405 GPe */
7746 POWERPC_DEF("405GPe", CPU_POWERPC_405GPe
, 405),
7747 /* PowerPC 405 GPR */
7748 POWERPC_DEF("405GPR", CPU_POWERPC_405GPR
, 405),
7751 POWERPC_DEF("405H", CPU_POWERPC_405H
, 405),
7755 POWERPC_DEF("405L", CPU_POWERPC_405L
, 405),
7757 /* PowerPC 405 LP */
7758 POWERPC_DEF("405LP", CPU_POWERPC_405LP
, 405),
7760 /* PowerPC 405 PM */
7761 POWERPC_DEF("405PM", CPU_POWERPC_405PM
, 405),
7764 /* PowerPC 405 PS */
7765 POWERPC_DEF("405PS", CPU_POWERPC_405PS
, 405),
7769 POWERPC_DEF("405S", CPU_POWERPC_405S
, 405),
7772 POWERPC_DEF("Npe405H", CPU_POWERPC_NPE405H
, 405),
7774 POWERPC_DEF("Npe405H2", CPU_POWERPC_NPE405H2
, 405),
7776 POWERPC_DEF("Npe405L", CPU_POWERPC_NPE405L
, 405),
7778 POWERPC_DEF("Npe4GS3", CPU_POWERPC_NPE4GS3
, 405),
7780 POWERPC_DEF("Npcxx1", CPU_POWERPC_NPCxx1
, 405),
7783 POWERPC_DEF("Npr161", CPU_POWERPC_NPR161
, 405),
7786 /* PowerPC LC77700 (Sanyo) */
7787 POWERPC_DEF("LC77700", CPU_POWERPC_LC77700
, 405),
7789 /* PowerPC 401/403/405 based set-top-box microcontrolers */
7792 POWERPC_DEF("STB01000", CPU_POWERPC_STB01000
, 401x2
),
7796 POWERPC_DEF("STB01010", CPU_POWERPC_STB01010
, 401x2
),
7800 POWERPC_DEF("STB0210", CPU_POWERPC_STB0210
, 401x3
),
7803 POWERPC_DEF("STB03", CPU_POWERPC_STB03
, 405),
7806 POWERPC_DEF("STB043", CPU_POWERPC_STB043
, 405),
7810 POWERPC_DEF("STB045", CPU_POWERPC_STB045
, 405),
7813 POWERPC_DEF("STB04", CPU_POWERPC_STB04
, 405),
7815 POWERPC_DEF("STB25", CPU_POWERPC_STB25
, 405),
7818 POWERPC_DEF("STB130", CPU_POWERPC_STB130
, 405),
7820 /* Xilinx PowerPC 405 cores */
7821 POWERPC_DEF("x2vp4", CPU_POWERPC_X2VP4
, 405),
7822 POWERPC_DEF("x2vp7", CPU_POWERPC_X2VP7
, 405),
7823 POWERPC_DEF("x2vp20", CPU_POWERPC_X2VP20
, 405),
7824 POWERPC_DEF("x2vp50", CPU_POWERPC_X2VP50
, 405),
7826 /* Zarlink ZL10310 */
7827 POWERPC_DEF("zl10310", CPU_POWERPC_ZL10310
, 405),
7830 /* Zarlink ZL10311 */
7831 POWERPC_DEF("zl10311", CPU_POWERPC_ZL10311
, 405),
7834 /* Zarlink ZL10320 */
7835 POWERPC_DEF("zl10320", CPU_POWERPC_ZL10320
, 405),
7838 /* Zarlink ZL10321 */
7839 POWERPC_DEF("zl10321", CPU_POWERPC_ZL10321
, 405),
7841 /* PowerPC 440 family */
7842 #if defined(TODO_USER_ONLY)
7843 /* Generic PowerPC 440 */
7844 POWERPC_DEF("440", CPU_POWERPC_440
, 440GP
),
7846 /* PowerPC 440 cores */
7848 /* PowerPC 440 A4 */
7849 POWERPC_DEF("440A4", CPU_POWERPC_440A4
, 440x4
),
7851 /* PowerPC 440 Xilinx 5 */
7852 POWERPC_DEF("440-Xilinx", CPU_POWERPC_440_XILINX
, 440x5
),
7854 /* PowerPC 440 A5 */
7855 POWERPC_DEF("440A5", CPU_POWERPC_440A5
, 440x5
),
7858 /* PowerPC 440 B4 */
7859 POWERPC_DEF("440B4", CPU_POWERPC_440B4
, 440x4
),
7862 /* PowerPC 440 G4 */
7863 POWERPC_DEF("440G4", CPU_POWERPC_440G4
, 440x4
),
7866 /* PowerPC 440 F5 */
7867 POWERPC_DEF("440F5", CPU_POWERPC_440F5
, 440x5
),
7870 /* PowerPC 440 G5 */
7871 POWERPC_DEF("440G5", CPU_POWERPC_440G5
, 440x5
),
7875 POWERPC_DEF("440H4", CPU_POWERPC_440H4
, 440x4
),
7879 POWERPC_DEF("440H6", CPU_POWERPC_440H6
, 440Gx5
),
7881 /* PowerPC 440 microcontrolers */
7882 /* PowerPC 440 EP */
7883 POWERPC_DEF("440EP", CPU_POWERPC_440EP
, 440EP
),
7884 /* PowerPC 440 EPa */
7885 POWERPC_DEF("440EPa", CPU_POWERPC_440EPa
, 440EP
),
7886 /* PowerPC 440 EPb */
7887 POWERPC_DEF("440EPb", CPU_POWERPC_440EPb
, 440EP
),
7888 /* PowerPC 440 EPX */
7889 POWERPC_DEF("440EPX", CPU_POWERPC_440EPX
, 440EP
),
7890 #if defined(TODO_USER_ONLY)
7891 /* PowerPC 440 GP */
7892 POWERPC_DEF("440GP", CPU_POWERPC_440GP
, 440GP
),
7894 #if defined(TODO_USER_ONLY)
7895 /* PowerPC 440 GPb */
7896 POWERPC_DEF("440GPb", CPU_POWERPC_440GPb
, 440GP
),
7898 #if defined(TODO_USER_ONLY)
7899 /* PowerPC 440 GPc */
7900 POWERPC_DEF("440GPc", CPU_POWERPC_440GPc
, 440GP
),
7902 #if defined(TODO_USER_ONLY)
7903 /* PowerPC 440 GR */
7904 POWERPC_DEF("440GR", CPU_POWERPC_440GR
, 440x5
),
7906 #if defined(TODO_USER_ONLY)
7907 /* PowerPC 440 GRa */
7908 POWERPC_DEF("440GRa", CPU_POWERPC_440GRa
, 440x5
),
7910 #if defined(TODO_USER_ONLY)
7911 /* PowerPC 440 GRX */
7912 POWERPC_DEF("440GRX", CPU_POWERPC_440GRX
, 440x5
),
7914 #if defined(TODO_USER_ONLY)
7915 /* PowerPC 440 GX */
7916 POWERPC_DEF("440GX", CPU_POWERPC_440GX
, 440EP
),
7918 #if defined(TODO_USER_ONLY)
7919 /* PowerPC 440 GXa */
7920 POWERPC_DEF("440GXa", CPU_POWERPC_440GXa
, 440EP
),
7922 #if defined(TODO_USER_ONLY)
7923 /* PowerPC 440 GXb */
7924 POWERPC_DEF("440GXb", CPU_POWERPC_440GXb
, 440EP
),
7926 #if defined(TODO_USER_ONLY)
7927 /* PowerPC 440 GXc */
7928 POWERPC_DEF("440GXc", CPU_POWERPC_440GXc
, 440EP
),
7930 #if defined(TODO_USER_ONLY)
7931 /* PowerPC 440 GXf */
7932 POWERPC_DEF("440GXf", CPU_POWERPC_440GXf
, 440EP
),
7936 POWERPC_DEF("440S", CPU_POWERPC_440S
, 440),
7938 #if defined(TODO_USER_ONLY)
7939 /* PowerPC 440 SP */
7940 POWERPC_DEF("440SP", CPU_POWERPC_440SP
, 440EP
),
7942 #if defined(TODO_USER_ONLY)
7943 /* PowerPC 440 SP2 */
7944 POWERPC_DEF("440SP2", CPU_POWERPC_440SP2
, 440EP
),
7946 #if defined(TODO_USER_ONLY)
7947 /* PowerPC 440 SPE */
7948 POWERPC_DEF("440SPE", CPU_POWERPC_440SPE
, 440EP
),
7950 /* PowerPC 460 family */
7952 /* Generic PowerPC 464 */
7953 POWERPC_DEF("464", CPU_POWERPC_464
, 460),
7955 /* PowerPC 464 microcontrolers */
7957 /* PowerPC 464H90 */
7958 POWERPC_DEF("464H90", CPU_POWERPC_464H90
, 460),
7961 /* PowerPC 464H90F */
7962 POWERPC_DEF("464H90F", CPU_POWERPC_464H90F
, 460F
),
7964 /* Freescale embedded PowerPC cores */
7965 /* MPC5xx family (aka RCPU) */
7966 #if defined(TODO_USER_ONLY)
7967 /* Generic MPC5xx core */
7968 POWERPC_DEF("MPC5xx", CPU_POWERPC_MPC5xx
, MPC5xx
),
7970 #if defined(TODO_USER_ONLY)
7971 /* Codename for MPC5xx core */
7972 POWERPC_DEF("RCPU", CPU_POWERPC_MPC5xx
, MPC5xx
),
7974 /* MPC5xx microcontrollers */
7975 #if defined(TODO_USER_ONLY)
7977 POWERPC_DEF("MGT560", CPU_POWERPC_MGT560
, MPC5xx
),
7979 #if defined(TODO_USER_ONLY)
7981 POWERPC_DEF("MPC509", CPU_POWERPC_MPC509
, MPC5xx
),
7983 #if defined(TODO_USER_ONLY)
7985 POWERPC_DEF("MPC533", CPU_POWERPC_MPC533
, MPC5xx
),
7987 #if defined(TODO_USER_ONLY)
7989 POWERPC_DEF("MPC534", CPU_POWERPC_MPC534
, MPC5xx
),
7991 #if defined(TODO_USER_ONLY)
7993 POWERPC_DEF("MPC555", CPU_POWERPC_MPC555
, MPC5xx
),
7995 #if defined(TODO_USER_ONLY)
7997 POWERPC_DEF("MPC556", CPU_POWERPC_MPC556
, MPC5xx
),
7999 #if defined(TODO_USER_ONLY)
8001 POWERPC_DEF("MPC560", CPU_POWERPC_MPC560
, MPC5xx
),
8003 #if defined(TODO_USER_ONLY)
8005 POWERPC_DEF("MPC561", CPU_POWERPC_MPC561
, MPC5xx
),
8007 #if defined(TODO_USER_ONLY)
8009 POWERPC_DEF("MPC562", CPU_POWERPC_MPC562
, MPC5xx
),
8011 #if defined(TODO_USER_ONLY)
8013 POWERPC_DEF("MPC563", CPU_POWERPC_MPC563
, MPC5xx
),
8015 #if defined(TODO_USER_ONLY)
8017 POWERPC_DEF("MPC564", CPU_POWERPC_MPC564
, MPC5xx
),
8019 #if defined(TODO_USER_ONLY)
8021 POWERPC_DEF("MPC565", CPU_POWERPC_MPC565
, MPC5xx
),
8023 #if defined(TODO_USER_ONLY)
8025 POWERPC_DEF("MPC566", CPU_POWERPC_MPC566
, MPC5xx
),
8027 /* MPC8xx family (aka PowerQUICC) */
8028 #if defined(TODO_USER_ONLY)
8029 /* Generic MPC8xx core */
8030 POWERPC_DEF("MPC8xx", CPU_POWERPC_MPC8xx
, MPC8xx
),
8032 #if defined(TODO_USER_ONLY)
8033 /* Codename for MPC8xx core */
8034 POWERPC_DEF("PowerQUICC", CPU_POWERPC_MPC8xx
, MPC8xx
),
8036 /* MPC8xx microcontrollers */
8037 #if defined(TODO_USER_ONLY)
8039 POWERPC_DEF("MGT823", CPU_POWERPC_MGT823
, MPC8xx
),
8041 #if defined(TODO_USER_ONLY)
8043 POWERPC_DEF("MPC821", CPU_POWERPC_MPC821
, MPC8xx
),
8045 #if defined(TODO_USER_ONLY)
8047 POWERPC_DEF("MPC823", CPU_POWERPC_MPC823
, MPC8xx
),
8049 #if defined(TODO_USER_ONLY)
8051 POWERPC_DEF("MPC850", CPU_POWERPC_MPC850
, MPC8xx
),
8053 #if defined(TODO_USER_ONLY)
8055 POWERPC_DEF("MPC852T", CPU_POWERPC_MPC852T
, MPC8xx
),
8057 #if defined(TODO_USER_ONLY)
8059 POWERPC_DEF("MPC855T", CPU_POWERPC_MPC855T
, MPC8xx
),
8061 #if defined(TODO_USER_ONLY)
8063 POWERPC_DEF("MPC857", CPU_POWERPC_MPC857
, MPC8xx
),
8065 #if defined(TODO_USER_ONLY)
8067 POWERPC_DEF("MPC859", CPU_POWERPC_MPC859
, MPC8xx
),
8069 #if defined(TODO_USER_ONLY)
8071 POWERPC_DEF("MPC860", CPU_POWERPC_MPC860
, MPC8xx
),
8073 #if defined(TODO_USER_ONLY)
8075 POWERPC_DEF("MPC862", CPU_POWERPC_MPC862
, MPC8xx
),
8077 #if defined(TODO_USER_ONLY)
8079 POWERPC_DEF("MPC866", CPU_POWERPC_MPC866
, MPC8xx
),
8081 #if defined(TODO_USER_ONLY)
8083 POWERPC_DEF("MPC870", CPU_POWERPC_MPC870
, MPC8xx
),
8085 #if defined(TODO_USER_ONLY)
8087 POWERPC_DEF("MPC875", CPU_POWERPC_MPC875
, MPC8xx
),
8089 #if defined(TODO_USER_ONLY)
8091 POWERPC_DEF("MPC880", CPU_POWERPC_MPC880
, MPC8xx
),
8093 #if defined(TODO_USER_ONLY)
8095 POWERPC_DEF("MPC885", CPU_POWERPC_MPC885
, MPC8xx
),
8097 /* MPC82xx family (aka PowerQUICC-II) */
8098 /* Generic MPC52xx core */
8099 POWERPC_DEF_SVR("MPC52xx",
8100 CPU_POWERPC_MPC52xx
, POWERPC_SVR_52xx
, G2LE
),
8101 /* Generic MPC82xx core */
8102 POWERPC_DEF("MPC82xx", CPU_POWERPC_MPC82xx
, G2
),
8103 /* Codename for MPC82xx */
8104 POWERPC_DEF("PowerQUICC-II", CPU_POWERPC_MPC82xx
, G2
),
8105 /* PowerPC G2 core */
8106 POWERPC_DEF("G2", CPU_POWERPC_G2
, G2
),
8107 /* PowerPC G2 H4 core */
8108 POWERPC_DEF("G2H4", CPU_POWERPC_G2H4
, G2
),
8109 /* PowerPC G2 GP core */
8110 POWERPC_DEF("G2GP", CPU_POWERPC_G2gp
, G2
),
8111 /* PowerPC G2 LS core */
8112 POWERPC_DEF("G2LS", CPU_POWERPC_G2ls
, G2
),
8113 /* PowerPC G2 HiP3 core */
8114 POWERPC_DEF("G2HiP3", CPU_POWERPC_G2_HIP3
, G2
),
8115 /* PowerPC G2 HiP4 core */
8116 POWERPC_DEF("G2HiP4", CPU_POWERPC_G2_HIP4
, G2
),
8117 /* PowerPC MPC603 core */
8118 POWERPC_DEF("MPC603", CPU_POWERPC_MPC603
, 603E
),
8119 /* PowerPC G2le core (same as G2 plus little-endian mode support) */
8120 POWERPC_DEF("G2le", CPU_POWERPC_G2LE
, G2LE
),
8121 /* PowerPC G2LE GP core */
8122 POWERPC_DEF("G2leGP", CPU_POWERPC_G2LEgp
, G2LE
),
8123 /* PowerPC G2LE LS core */
8124 POWERPC_DEF("G2leLS", CPU_POWERPC_G2LEls
, G2LE
),
8125 /* PowerPC G2LE GP1 core */
8126 POWERPC_DEF("G2leGP1", CPU_POWERPC_G2LEgp1
, G2LE
),
8127 /* PowerPC G2LE GP3 core */
8128 POWERPC_DEF("G2leGP3", CPU_POWERPC_G2LEgp1
, G2LE
),
8129 /* PowerPC MPC603 microcontrollers */
8131 POWERPC_DEF("MPC8240", CPU_POWERPC_MPC8240
, 603E
),
8132 /* PowerPC G2 microcontrollers */
8135 POWERPC_DEF_SVR("MPC5121",
8136 CPU_POWERPC_MPC5121
, POWERPC_SVR_5121
, G2LE
),
8139 POWERPC_DEF_SVR("MPC5200",
8140 CPU_POWERPC_MPC5200
, POWERPC_SVR_5200
, G2LE
),
8142 POWERPC_DEF_SVR("MPC5200_v10",
8143 CPU_POWERPC_MPC5200_v10
, POWERPC_SVR_5200_v10
, G2LE
),
8145 POWERPC_DEF_SVR("MPC5200_v11",
8146 CPU_POWERPC_MPC5200_v11
, POWERPC_SVR_5200_v11
, G2LE
),
8148 POWERPC_DEF_SVR("MPC5200_v12",
8149 CPU_POWERPC_MPC5200_v12
, POWERPC_SVR_5200_v12
, G2LE
),
8151 POWERPC_DEF_SVR("MPC5200B",
8152 CPU_POWERPC_MPC5200B
, POWERPC_SVR_5200B
, G2LE
),
8154 POWERPC_DEF_SVR("MPC5200B_v20",
8155 CPU_POWERPC_MPC5200B_v20
, POWERPC_SVR_5200B_v20
, G2LE
),
8157 POWERPC_DEF_SVR("MPC5200B_v21",
8158 CPU_POWERPC_MPC5200B_v21
, POWERPC_SVR_5200B_v21
, G2LE
),
8160 POWERPC_DEF("MPC8241", CPU_POWERPC_MPC8241
, G2
),
8162 POWERPC_DEF("MPC8245", CPU_POWERPC_MPC8245
, G2
),
8164 POWERPC_DEF("MPC8247", CPU_POWERPC_MPC8247
, G2LE
),
8166 POWERPC_DEF("MPC8248", CPU_POWERPC_MPC8248
, G2LE
),
8168 POWERPC_DEF("MPC8250", CPU_POWERPC_MPC8250
, G2
),
8170 POWERPC_DEF("MPC8250_HiP3", CPU_POWERPC_MPC8250_HiP3
, G2
),
8172 POWERPC_DEF("MPC8250_HiP4", CPU_POWERPC_MPC8250_HiP4
, G2
),
8174 POWERPC_DEF("MPC8255", CPU_POWERPC_MPC8255
, G2
),
8176 POWERPC_DEF("MPC8255_HiP3", CPU_POWERPC_MPC8255_HiP3
, G2
),
8178 POWERPC_DEF("MPC8255_HiP4", CPU_POWERPC_MPC8255_HiP4
, G2
),
8180 POWERPC_DEF("MPC8260", CPU_POWERPC_MPC8260
, G2
),
8182 POWERPC_DEF("MPC8260_HiP3", CPU_POWERPC_MPC8260_HiP3
, G2
),
8184 POWERPC_DEF("MPC8260_HiP4", CPU_POWERPC_MPC8260_HiP4
, G2
),
8186 POWERPC_DEF("MPC8264", CPU_POWERPC_MPC8264
, G2
),
8188 POWERPC_DEF("MPC8264_HiP3", CPU_POWERPC_MPC8264_HiP3
, G2
),
8190 POWERPC_DEF("MPC8264_HiP4", CPU_POWERPC_MPC8264_HiP4
, G2
),
8192 POWERPC_DEF("MPC8265", CPU_POWERPC_MPC8265
, G2
),
8194 POWERPC_DEF("MPC8265_HiP3", CPU_POWERPC_MPC8265_HiP3
, G2
),
8196 POWERPC_DEF("MPC8265_HiP4", CPU_POWERPC_MPC8265_HiP4
, G2
),
8198 POWERPC_DEF("MPC8266", CPU_POWERPC_MPC8266
, G2
),
8200 POWERPC_DEF("MPC8266_HiP3", CPU_POWERPC_MPC8266_HiP3
, G2
),
8202 POWERPC_DEF("MPC8266_HiP4", CPU_POWERPC_MPC8266_HiP4
, G2
),
8204 POWERPC_DEF("MPC8270", CPU_POWERPC_MPC8270
, G2LE
),
8206 POWERPC_DEF("MPC8271", CPU_POWERPC_MPC8271
, G2LE
),
8208 POWERPC_DEF("MPC8272", CPU_POWERPC_MPC8272
, G2LE
),
8210 POWERPC_DEF("MPC8275", CPU_POWERPC_MPC8275
, G2LE
),
8212 POWERPC_DEF("MPC8280", CPU_POWERPC_MPC8280
, G2LE
),
8214 /* Generic PowerPC e200 core */
8215 POWERPC_DEF("e200", CPU_POWERPC_e200
, e200
),
8216 /* Generic MPC55xx core */
8218 POWERPC_DEF_SVR("MPC55xx",
8219 CPU_POWERPC_MPC55xx
, POWERPC_SVR_55xx
, e200
),
8222 /* PowerPC e200z0 core */
8223 POWERPC_DEF("e200z0", CPU_POWERPC_e200z0
, e200
),
8226 /* PowerPC e200z1 core */
8227 POWERPC_DEF("e200z1", CPU_POWERPC_e200z1
, e200
),
8230 /* PowerPC e200z3 core */
8231 POWERPC_DEF("e200z3", CPU_POWERPC_e200z3
, e200
),
8233 /* PowerPC e200z5 core */
8234 POWERPC_DEF("e200z5", CPU_POWERPC_e200z5
, e200
),
8235 /* PowerPC e200z6 core */
8236 POWERPC_DEF("e200z6", CPU_POWERPC_e200z6
, e200
),
8237 /* PowerPC e200 microcontrollers */
8240 POWERPC_DEF_SVR("MPC5514E",
8241 CPU_POWERPC_MPC5514E
, POWERPC_SVR_5514E
, e200
),
8245 POWERPC_DEF_SVR("MPC5514E_v0",
8246 CPU_POWERPC_MPC5514E_v0
, POWERPC_SVR_5514E_v0
, e200
),
8250 POWERPC_DEF_SVR("MPC5514E_v1",
8251 CPU_POWERPC_MPC5514E_v1
, POWERPC_SVR_5514E_v1
, e200
),
8255 POWERPC_DEF_SVR("MPC5514G",
8256 CPU_POWERPC_MPC5514G
, POWERPC_SVR_5514G
, e200
),
8260 POWERPC_DEF_SVR("MPC5514G_v0",
8261 CPU_POWERPC_MPC5514G_v0
, POWERPC_SVR_5514G_v0
, e200
),
8265 POWERPC_DEF_SVR("MPC5514G_v1",
8266 CPU_POWERPC_MPC5514G_v1
, POWERPC_SVR_5514G_v1
, e200
),
8270 POWERPC_DEF_SVR("MPC5515S",
8271 CPU_POWERPC_MPC5515S
, POWERPC_SVR_5515S
, e200
),
8275 POWERPC_DEF_SVR("MPC5516E",
8276 CPU_POWERPC_MPC5516E
, POWERPC_SVR_5516E
, e200
),
8280 POWERPC_DEF_SVR("MPC5516E_v0",
8281 CPU_POWERPC_MPC5516E_v0
, POWERPC_SVR_5516E_v0
, e200
),
8285 POWERPC_DEF_SVR("MPC5516E_v1",
8286 CPU_POWERPC_MPC5516E_v1
, POWERPC_SVR_5516E_v1
, e200
),
8290 POWERPC_DEF_SVR("MPC5516G",
8291 CPU_POWERPC_MPC5516G
, POWERPC_SVR_5516G
, e200
),
8295 POWERPC_DEF_SVR("MPC5516G_v0",
8296 CPU_POWERPC_MPC5516G_v0
, POWERPC_SVR_5516G_v0
, e200
),
8300 POWERPC_DEF_SVR("MPC5516G_v1",
8301 CPU_POWERPC_MPC5516G_v1
, POWERPC_SVR_5516G_v1
, e200
),
8305 POWERPC_DEF_SVR("MPC5516S",
8306 CPU_POWERPC_MPC5516S
, POWERPC_SVR_5516S
, e200
),
8310 POWERPC_DEF_SVR("MPC5533",
8311 CPU_POWERPC_MPC5533
, POWERPC_SVR_5533
, e200
),
8315 POWERPC_DEF_SVR("MPC5534",
8316 CPU_POWERPC_MPC5534
, POWERPC_SVR_5534
, e200
),
8320 POWERPC_DEF_SVR("MPC5553",
8321 CPU_POWERPC_MPC5553
, POWERPC_SVR_5553
, e200
),
8325 POWERPC_DEF_SVR("MPC5554",
8326 CPU_POWERPC_MPC5554
, POWERPC_SVR_5554
, e200
),
8330 POWERPC_DEF_SVR("MPC5561",
8331 CPU_POWERPC_MPC5561
, POWERPC_SVR_5561
, e200
),
8335 POWERPC_DEF_SVR("MPC5565",
8336 CPU_POWERPC_MPC5565
, POWERPC_SVR_5565
, e200
),
8340 POWERPC_DEF_SVR("MPC5566",
8341 CPU_POWERPC_MPC5566
, POWERPC_SVR_5566
, e200
),
8345 POWERPC_DEF_SVR("MPC5567",
8346 CPU_POWERPC_MPC5567
, POWERPC_SVR_5567
, e200
),
8349 /* Generic PowerPC e300 core */
8350 POWERPC_DEF("e300", CPU_POWERPC_e300
, e300
),
8351 /* PowerPC e300c1 core */
8352 POWERPC_DEF("e300c1", CPU_POWERPC_e300c1
, e300
),
8353 /* PowerPC e300c2 core */
8354 POWERPC_DEF("e300c2", CPU_POWERPC_e300c2
, e300
),
8355 /* PowerPC e300c3 core */
8356 POWERPC_DEF("e300c3", CPU_POWERPC_e300c3
, e300
),
8357 /* PowerPC e300c4 core */
8358 POWERPC_DEF("e300c4", CPU_POWERPC_e300c4
, e300
),
8359 /* PowerPC e300 microcontrollers */
8362 POWERPC_DEF_SVR("MPC8313",
8363 CPU_POWERPC_MPC831x
, POWERPC_SVR_8313
, e300
),
8367 POWERPC_DEF_SVR("MPC8313E",
8368 CPU_POWERPC_MPC831x
, POWERPC_SVR_8313E
, e300
),
8372 POWERPC_DEF_SVR("MPC8314",
8373 CPU_POWERPC_MPC831x
, POWERPC_SVR_8314
, e300
),
8377 POWERPC_DEF_SVR("MPC8314E",
8378 CPU_POWERPC_MPC831x
, POWERPC_SVR_8314E
, e300
),
8382 POWERPC_DEF_SVR("MPC8315",
8383 CPU_POWERPC_MPC831x
, POWERPC_SVR_8315
, e300
),
8387 POWERPC_DEF_SVR("MPC8315E",
8388 CPU_POWERPC_MPC831x
, POWERPC_SVR_8315E
, e300
),
8392 POWERPC_DEF_SVR("MPC8321",
8393 CPU_POWERPC_MPC832x
, POWERPC_SVR_8321
, e300
),
8397 POWERPC_DEF_SVR("MPC8321E",
8398 CPU_POWERPC_MPC832x
, POWERPC_SVR_8321E
, e300
),
8402 POWERPC_DEF_SVR("MPC8323",
8403 CPU_POWERPC_MPC832x
, POWERPC_SVR_8323
, e300
),
8407 POWERPC_DEF_SVR("MPC8323E",
8408 CPU_POWERPC_MPC832x
, POWERPC_SVR_8323E
, e300
),
8411 POWERPC_DEF_SVR("MPC8343",
8412 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343
, e300
),
8414 POWERPC_DEF_SVR("MPC8343A",
8415 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343A
, e300
),
8417 POWERPC_DEF_SVR("MPC8343E",
8418 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343E
, e300
),
8420 POWERPC_DEF_SVR("MPC8343EA",
8421 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343EA
, e300
),
8423 POWERPC_DEF_SVR("MPC8347",
8424 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347
, e300
),
8426 POWERPC_DEF_SVR("MPC8347T",
8427 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347T
, e300
),
8429 POWERPC_DEF_SVR("MPC8347P",
8430 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347P
, e300
),
8432 POWERPC_DEF_SVR("MPC8347A",
8433 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347A
, e300
),
8435 POWERPC_DEF_SVR("MPC8347AT",
8436 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347AT
, e300
),
8438 POWERPC_DEF_SVR("MPC8347AP",
8439 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347AP
, e300
),
8441 POWERPC_DEF_SVR("MPC8347E",
8442 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347E
, e300
),
8444 POWERPC_DEF_SVR("MPC8347ET",
8445 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347ET
, e300
),
8447 POWERPC_DEF_SVR("MPC8347EP",
8448 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EP
, e300
),
8450 POWERPC_DEF_SVR("MPC8347EA",
8451 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EA
, e300
),
8453 POWERPC_DEF_SVR("MPC8347EAT",
8454 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EAT
, e300
),
8456 POWERPC_DEF_SVR("MPC8347EAP",
8457 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EAP
, e300
),
8459 POWERPC_DEF_SVR("MPC8349",
8460 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349
, e300
),
8462 POWERPC_DEF_SVR("MPC8349A",
8463 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349A
, e300
),
8465 POWERPC_DEF_SVR("MPC8349E",
8466 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349E
, e300
),
8468 POWERPC_DEF_SVR("MPC8349EA",
8469 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349EA
, e300
),
8472 POWERPC_DEF_SVR("MPC8358E",
8473 CPU_POWERPC_MPC835x
, POWERPC_SVR_8358E
, e300
),
8477 POWERPC_DEF_SVR("MPC8360E",
8478 CPU_POWERPC_MPC836x
, POWERPC_SVR_8360E
, e300
),
8481 POWERPC_DEF_SVR("MPC8377",
8482 CPU_POWERPC_MPC837x
, POWERPC_SVR_8377
, e300
),
8484 POWERPC_DEF_SVR("MPC8377E",
8485 CPU_POWERPC_MPC837x
, POWERPC_SVR_8377E
, e300
),
8487 POWERPC_DEF_SVR("MPC8378",
8488 CPU_POWERPC_MPC837x
, POWERPC_SVR_8378
, e300
),
8490 POWERPC_DEF_SVR("MPC8378E",
8491 CPU_POWERPC_MPC837x
, POWERPC_SVR_8378E
, e300
),
8493 POWERPC_DEF_SVR("MPC8379",
8494 CPU_POWERPC_MPC837x
, POWERPC_SVR_8379
, e300
),
8496 POWERPC_DEF_SVR("MPC8379E",
8497 CPU_POWERPC_MPC837x
, POWERPC_SVR_8379E
, e300
),
8499 /* PowerPC e500 core */
8500 POWERPC_DEF("e500", CPU_POWERPC_e500v2_v22
, e500v2
),
8501 /* PowerPC e500v1 core */
8502 POWERPC_DEF("e500v1", CPU_POWERPC_e500v1
, e500v1
),
8503 /* PowerPC e500 v1.0 core */
8504 POWERPC_DEF("e500_v10", CPU_POWERPC_e500v1_v10
, e500v1
),
8505 /* PowerPC e500 v2.0 core */
8506 POWERPC_DEF("e500_v20", CPU_POWERPC_e500v1_v20
, e500v1
),
8507 /* PowerPC e500v2 core */
8508 POWERPC_DEF("e500v2", CPU_POWERPC_e500v2
, e500v2
),
8509 /* PowerPC e500v2 v1.0 core */
8510 POWERPC_DEF("e500v2_v10", CPU_POWERPC_e500v2_v10
, e500v2
),
8511 /* PowerPC e500v2 v2.0 core */
8512 POWERPC_DEF("e500v2_v20", CPU_POWERPC_e500v2_v20
, e500v2
),
8513 /* PowerPC e500v2 v2.1 core */
8514 POWERPC_DEF("e500v2_v21", CPU_POWERPC_e500v2_v21
, e500v2
),
8515 /* PowerPC e500v2 v2.2 core */
8516 POWERPC_DEF("e500v2_v22", CPU_POWERPC_e500v2_v22
, e500v2
),
8517 /* PowerPC e500v2 v3.0 core */
8518 POWERPC_DEF("e500v2_v30", CPU_POWERPC_e500v2_v30
, e500v2
),
8519 POWERPC_DEF("e500mc", CPU_POWERPC_e500mc
, e500mc
),
8520 /* PowerPC e500 microcontrollers */
8522 POWERPC_DEF_SVR("MPC8533",
8523 CPU_POWERPC_MPC8533
, POWERPC_SVR_8533
, e500v2
),
8525 POWERPC_DEF_SVR("MPC8533_v10",
8526 CPU_POWERPC_MPC8533_v10
, POWERPC_SVR_8533_v10
, e500v2
),
8528 POWERPC_DEF_SVR("MPC8533_v11",
8529 CPU_POWERPC_MPC8533_v11
, POWERPC_SVR_8533_v11
, e500v2
),
8531 POWERPC_DEF_SVR("MPC8533E",
8532 CPU_POWERPC_MPC8533E
, POWERPC_SVR_8533E
, e500v2
),
8534 POWERPC_DEF_SVR("MPC8533E_v10",
8535 CPU_POWERPC_MPC8533E_v10
, POWERPC_SVR_8533E_v10
, e500v2
),
8536 POWERPC_DEF_SVR("MPC8533E_v11",
8537 CPU_POWERPC_MPC8533E_v11
, POWERPC_SVR_8533E_v11
, e500v2
),
8539 POWERPC_DEF_SVR("MPC8540",
8540 CPU_POWERPC_MPC8540
, POWERPC_SVR_8540
, e500v1
),
8542 POWERPC_DEF_SVR("MPC8540_v10",
8543 CPU_POWERPC_MPC8540_v10
, POWERPC_SVR_8540_v10
, e500v1
),
8545 POWERPC_DEF_SVR("MPC8540_v20",
8546 CPU_POWERPC_MPC8540_v20
, POWERPC_SVR_8540_v20
, e500v1
),
8548 POWERPC_DEF_SVR("MPC8540_v21",
8549 CPU_POWERPC_MPC8540_v21
, POWERPC_SVR_8540_v21
, e500v1
),
8551 POWERPC_DEF_SVR("MPC8541",
8552 CPU_POWERPC_MPC8541
, POWERPC_SVR_8541
, e500v1
),
8554 POWERPC_DEF_SVR("MPC8541_v10",
8555 CPU_POWERPC_MPC8541_v10
, POWERPC_SVR_8541_v10
, e500v1
),
8557 POWERPC_DEF_SVR("MPC8541_v11",
8558 CPU_POWERPC_MPC8541_v11
, POWERPC_SVR_8541_v11
, e500v1
),
8560 POWERPC_DEF_SVR("MPC8541E",
8561 CPU_POWERPC_MPC8541E
, POWERPC_SVR_8541E
, e500v1
),
8563 POWERPC_DEF_SVR("MPC8541E_v10",
8564 CPU_POWERPC_MPC8541E_v10
, POWERPC_SVR_8541E_v10
, e500v1
),
8566 POWERPC_DEF_SVR("MPC8541E_v11",
8567 CPU_POWERPC_MPC8541E_v11
, POWERPC_SVR_8541E_v11
, e500v1
),
8569 POWERPC_DEF_SVR("MPC8543",
8570 CPU_POWERPC_MPC8543
, POWERPC_SVR_8543
, e500v2
),
8572 POWERPC_DEF_SVR("MPC8543_v10",
8573 CPU_POWERPC_MPC8543_v10
, POWERPC_SVR_8543_v10
, e500v2
),
8575 POWERPC_DEF_SVR("MPC8543_v11",
8576 CPU_POWERPC_MPC8543_v11
, POWERPC_SVR_8543_v11
, e500v2
),
8578 POWERPC_DEF_SVR("MPC8543_v20",
8579 CPU_POWERPC_MPC8543_v20
, POWERPC_SVR_8543_v20
, e500v2
),
8581 POWERPC_DEF_SVR("MPC8543_v21",
8582 CPU_POWERPC_MPC8543_v21
, POWERPC_SVR_8543_v21
, e500v2
),
8584 POWERPC_DEF_SVR("MPC8543E",
8585 CPU_POWERPC_MPC8543E
, POWERPC_SVR_8543E
, e500v2
),
8587 POWERPC_DEF_SVR("MPC8543E_v10",
8588 CPU_POWERPC_MPC8543E_v10
, POWERPC_SVR_8543E_v10
, e500v2
),
8590 POWERPC_DEF_SVR("MPC8543E_v11",
8591 CPU_POWERPC_MPC8543E_v11
, POWERPC_SVR_8543E_v11
, e500v2
),
8593 POWERPC_DEF_SVR("MPC8543E_v20",
8594 CPU_POWERPC_MPC8543E_v20
, POWERPC_SVR_8543E_v20
, e500v2
),
8596 POWERPC_DEF_SVR("MPC8543E_v21",
8597 CPU_POWERPC_MPC8543E_v21
, POWERPC_SVR_8543E_v21
, e500v2
),
8599 POWERPC_DEF_SVR("MPC8544",
8600 CPU_POWERPC_MPC8544
, POWERPC_SVR_8544
, e500v2
),
8602 POWERPC_DEF_SVR("MPC8544_v10",
8603 CPU_POWERPC_MPC8544_v10
, POWERPC_SVR_8544_v10
, e500v2
),
8605 POWERPC_DEF_SVR("MPC8544_v11",
8606 CPU_POWERPC_MPC8544_v11
, POWERPC_SVR_8544_v11
, e500v2
),
8608 POWERPC_DEF_SVR("MPC8544E",
8609 CPU_POWERPC_MPC8544E
, POWERPC_SVR_8544E
, e500v2
),
8611 POWERPC_DEF_SVR("MPC8544E_v10",
8612 CPU_POWERPC_MPC8544E_v10
, POWERPC_SVR_8544E_v10
, e500v2
),
8614 POWERPC_DEF_SVR("MPC8544E_v11",
8615 CPU_POWERPC_MPC8544E_v11
, POWERPC_SVR_8544E_v11
, e500v2
),
8617 POWERPC_DEF_SVR("MPC8545",
8618 CPU_POWERPC_MPC8545
, POWERPC_SVR_8545
, e500v2
),
8620 POWERPC_DEF_SVR("MPC8545_v20",
8621 CPU_POWERPC_MPC8545_v20
, POWERPC_SVR_8545_v20
, e500v2
),
8623 POWERPC_DEF_SVR("MPC8545_v21",
8624 CPU_POWERPC_MPC8545_v21
, POWERPC_SVR_8545_v21
, e500v2
),
8626 POWERPC_DEF_SVR("MPC8545E",
8627 CPU_POWERPC_MPC8545E
, POWERPC_SVR_8545E
, e500v2
),
8629 POWERPC_DEF_SVR("MPC8545E_v20",
8630 CPU_POWERPC_MPC8545E_v20
, POWERPC_SVR_8545E_v20
, e500v2
),
8632 POWERPC_DEF_SVR("MPC8545E_v21",
8633 CPU_POWERPC_MPC8545E_v21
, POWERPC_SVR_8545E_v21
, e500v2
),
8635 POWERPC_DEF_SVR("MPC8547E",
8636 CPU_POWERPC_MPC8547E
, POWERPC_SVR_8547E
, e500v2
),
8638 POWERPC_DEF_SVR("MPC8547E_v20",
8639 CPU_POWERPC_MPC8547E_v20
, POWERPC_SVR_8547E_v20
, e500v2
),
8641 POWERPC_DEF_SVR("MPC8547E_v21",
8642 CPU_POWERPC_MPC8547E_v21
, POWERPC_SVR_8547E_v21
, e500v2
),
8644 POWERPC_DEF_SVR("MPC8548",
8645 CPU_POWERPC_MPC8548
, POWERPC_SVR_8548
, e500v2
),
8647 POWERPC_DEF_SVR("MPC8548_v10",
8648 CPU_POWERPC_MPC8548_v10
, POWERPC_SVR_8548_v10
, e500v2
),
8650 POWERPC_DEF_SVR("MPC8548_v11",
8651 CPU_POWERPC_MPC8548_v11
, POWERPC_SVR_8548_v11
, e500v2
),
8653 POWERPC_DEF_SVR("MPC8548_v20",
8654 CPU_POWERPC_MPC8548_v20
, POWERPC_SVR_8548_v20
, e500v2
),
8656 POWERPC_DEF_SVR("MPC8548_v21",
8657 CPU_POWERPC_MPC8548_v21
, POWERPC_SVR_8548_v21
, e500v2
),
8659 POWERPC_DEF_SVR("MPC8548E",
8660 CPU_POWERPC_MPC8548E
, POWERPC_SVR_8548E
, e500v2
),
8662 POWERPC_DEF_SVR("MPC8548E_v10",
8663 CPU_POWERPC_MPC8548E_v10
, POWERPC_SVR_8548E_v10
, e500v2
),
8665 POWERPC_DEF_SVR("MPC8548E_v11",
8666 CPU_POWERPC_MPC8548E_v11
, POWERPC_SVR_8548E_v11
, e500v2
),
8668 POWERPC_DEF_SVR("MPC8548E_v20",
8669 CPU_POWERPC_MPC8548E_v20
, POWERPC_SVR_8548E_v20
, e500v2
),
8671 POWERPC_DEF_SVR("MPC8548E_v21",
8672 CPU_POWERPC_MPC8548E_v21
, POWERPC_SVR_8548E_v21
, e500v2
),
8674 POWERPC_DEF_SVR("MPC8555",
8675 CPU_POWERPC_MPC8555
, POWERPC_SVR_8555
, e500v2
),
8677 POWERPC_DEF_SVR("MPC8555_v10",
8678 CPU_POWERPC_MPC8555_v10
, POWERPC_SVR_8555_v10
, e500v2
),
8680 POWERPC_DEF_SVR("MPC8555_v11",
8681 CPU_POWERPC_MPC8555_v11
, POWERPC_SVR_8555_v11
, e500v2
),
8683 POWERPC_DEF_SVR("MPC8555E",
8684 CPU_POWERPC_MPC8555E
, POWERPC_SVR_8555E
, e500v2
),
8686 POWERPC_DEF_SVR("MPC8555E_v10",
8687 CPU_POWERPC_MPC8555E_v10
, POWERPC_SVR_8555E_v10
, e500v2
),
8689 POWERPC_DEF_SVR("MPC8555E_v11",
8690 CPU_POWERPC_MPC8555E_v11
, POWERPC_SVR_8555E_v11
, e500v2
),
8692 POWERPC_DEF_SVR("MPC8560",
8693 CPU_POWERPC_MPC8560
, POWERPC_SVR_8560
, e500v2
),
8695 POWERPC_DEF_SVR("MPC8560_v10",
8696 CPU_POWERPC_MPC8560_v10
, POWERPC_SVR_8560_v10
, e500v2
),
8698 POWERPC_DEF_SVR("MPC8560_v20",
8699 CPU_POWERPC_MPC8560_v20
, POWERPC_SVR_8560_v20
, e500v2
),
8701 POWERPC_DEF_SVR("MPC8560_v21",
8702 CPU_POWERPC_MPC8560_v21
, POWERPC_SVR_8560_v21
, e500v2
),
8704 POWERPC_DEF_SVR("MPC8567",
8705 CPU_POWERPC_MPC8567
, POWERPC_SVR_8567
, e500v2
),
8707 POWERPC_DEF_SVR("MPC8567E",
8708 CPU_POWERPC_MPC8567E
, POWERPC_SVR_8567E
, e500v2
),
8710 POWERPC_DEF_SVR("MPC8568",
8711 CPU_POWERPC_MPC8568
, POWERPC_SVR_8568
, e500v2
),
8713 POWERPC_DEF_SVR("MPC8568E",
8714 CPU_POWERPC_MPC8568E
, POWERPC_SVR_8568E
, e500v2
),
8716 POWERPC_DEF_SVR("MPC8572",
8717 CPU_POWERPC_MPC8572
, POWERPC_SVR_8572
, e500v2
),
8719 POWERPC_DEF_SVR("MPC8572E",
8720 CPU_POWERPC_MPC8572E
, POWERPC_SVR_8572E
, e500v2
),
8722 /* PowerPC e600 core */
8723 POWERPC_DEF("e600", CPU_POWERPC_e600
, 7400),
8724 /* PowerPC e600 microcontrollers */
8727 POWERPC_DEF_SVR("MPC8610",
8728 CPU_POWERPC_MPC8610
, POWERPC_SVR_8610
, 7400),
8731 POWERPC_DEF_SVR("MPC8641",
8732 CPU_POWERPC_MPC8641
, POWERPC_SVR_8641
, 7400),
8734 POWERPC_DEF_SVR("MPC8641D",
8735 CPU_POWERPC_MPC8641D
, POWERPC_SVR_8641D
, 7400),
8736 /* 32 bits "classic" PowerPC */
8737 /* PowerPC 6xx family */
8739 POWERPC_DEF("601", CPU_POWERPC_601
, 601v
),
8741 POWERPC_DEF("601_v0", CPU_POWERPC_601_v0
, 601),
8743 POWERPC_DEF("601_v1", CPU_POWERPC_601_v1
, 601),
8745 POWERPC_DEF("601v", CPU_POWERPC_601v
, 601v
),
8747 POWERPC_DEF("601_v2", CPU_POWERPC_601_v2
, 601v
),
8749 POWERPC_DEF("602", CPU_POWERPC_602
, 602),
8751 POWERPC_DEF("603", CPU_POWERPC_603
, 603),
8752 /* Code name for PowerPC 603 */
8753 POWERPC_DEF("Vanilla", CPU_POWERPC_603
, 603),
8754 /* PowerPC 603e (aka PID6) */
8755 POWERPC_DEF("603e", CPU_POWERPC_603E
, 603E
),
8756 /* Code name for PowerPC 603e */
8757 POWERPC_DEF("Stretch", CPU_POWERPC_603E
, 603E
),
8758 /* PowerPC 603e v1.1 */
8759 POWERPC_DEF("603e_v1.1", CPU_POWERPC_603E_v11
, 603E
),
8760 /* PowerPC 603e v1.2 */
8761 POWERPC_DEF("603e_v1.2", CPU_POWERPC_603E_v12
, 603E
),
8762 /* PowerPC 603e v1.3 */
8763 POWERPC_DEF("603e_v1.3", CPU_POWERPC_603E_v13
, 603E
),
8764 /* PowerPC 603e v1.4 */
8765 POWERPC_DEF("603e_v1.4", CPU_POWERPC_603E_v14
, 603E
),
8766 /* PowerPC 603e v2.2 */
8767 POWERPC_DEF("603e_v2.2", CPU_POWERPC_603E_v22
, 603E
),
8768 /* PowerPC 603e v3 */
8769 POWERPC_DEF("603e_v3", CPU_POWERPC_603E_v3
, 603E
),
8770 /* PowerPC 603e v4 */
8771 POWERPC_DEF("603e_v4", CPU_POWERPC_603E_v4
, 603E
),
8772 /* PowerPC 603e v4.1 */
8773 POWERPC_DEF("603e_v4.1", CPU_POWERPC_603E_v41
, 603E
),
8774 /* PowerPC 603e (aka PID7) */
8775 POWERPC_DEF("603e7", CPU_POWERPC_603E7
, 603E
),
8776 /* PowerPC 603e7t */
8777 POWERPC_DEF("603e7t", CPU_POWERPC_603E7t
, 603E
),
8778 /* PowerPC 603e7v */
8779 POWERPC_DEF("603e7v", CPU_POWERPC_603E7v
, 603E
),
8780 /* Code name for PowerPC 603ev */
8781 POWERPC_DEF("Vaillant", CPU_POWERPC_603E7v
, 603E
),
8782 /* PowerPC 603e7v1 */
8783 POWERPC_DEF("603e7v1", CPU_POWERPC_603E7v1
, 603E
),
8784 /* PowerPC 603e7v2 */
8785 POWERPC_DEF("603e7v2", CPU_POWERPC_603E7v2
, 603E
),
8786 /* PowerPC 603p (aka PID7v) */
8787 POWERPC_DEF("603p", CPU_POWERPC_603P
, 603E
),
8788 /* PowerPC 603r (aka PID7t) */
8789 POWERPC_DEF("603r", CPU_POWERPC_603R
, 603E
),
8790 /* Code name for PowerPC 603r */
8791 POWERPC_DEF("Goldeneye", CPU_POWERPC_603R
, 603E
),
8793 POWERPC_DEF("604", CPU_POWERPC_604
, 604),
8794 /* PowerPC 604e (aka PID9) */
8795 POWERPC_DEF("604e", CPU_POWERPC_604E
, 604E
),
8796 /* Code name for PowerPC 604e */
8797 POWERPC_DEF("Sirocco", CPU_POWERPC_604E
, 604E
),
8798 /* PowerPC 604e v1.0 */
8799 POWERPC_DEF("604e_v1.0", CPU_POWERPC_604E_v10
, 604E
),
8800 /* PowerPC 604e v2.2 */
8801 POWERPC_DEF("604e_v2.2", CPU_POWERPC_604E_v22
, 604E
),
8802 /* PowerPC 604e v2.4 */
8803 POWERPC_DEF("604e_v2.4", CPU_POWERPC_604E_v24
, 604E
),
8804 /* PowerPC 604r (aka PIDA) */
8805 POWERPC_DEF("604r", CPU_POWERPC_604R
, 604E
),
8806 /* Code name for PowerPC 604r */
8807 POWERPC_DEF("Mach5", CPU_POWERPC_604R
, 604E
),
8810 POWERPC_DEF("604ev", CPU_POWERPC_604EV
, 604E
),
8812 /* PowerPC 7xx family */
8813 /* Generic PowerPC 740 (G3) */
8814 POWERPC_DEF("740", CPU_POWERPC_7x0
, 740),
8815 /* Code name for PowerPC 740 */
8816 POWERPC_DEF("Arthur", CPU_POWERPC_7x0
, 740),
8817 /* Generic PowerPC 750 (G3) */
8818 POWERPC_DEF("750", CPU_POWERPC_7x0
, 750),
8819 /* Code name for PowerPC 750 */
8820 POWERPC_DEF("Typhoon", CPU_POWERPC_7x0
, 750),
8821 /* PowerPC 740/750 is also known as G3 */
8822 POWERPC_DEF("G3", CPU_POWERPC_7x0
, 750),
8823 /* PowerPC 740 v1.0 (G3) */
8824 POWERPC_DEF("740_v1.0", CPU_POWERPC_7x0_v10
, 740),
8825 /* PowerPC 750 v1.0 (G3) */
8826 POWERPC_DEF("750_v1.0", CPU_POWERPC_7x0_v10
, 750),
8827 /* PowerPC 740 v2.0 (G3) */
8828 POWERPC_DEF("740_v2.0", CPU_POWERPC_7x0_v20
, 740),
8829 /* PowerPC 750 v2.0 (G3) */
8830 POWERPC_DEF("750_v2.0", CPU_POWERPC_7x0_v20
, 750),
8831 /* PowerPC 740 v2.1 (G3) */
8832 POWERPC_DEF("740_v2.1", CPU_POWERPC_7x0_v21
, 740),
8833 /* PowerPC 750 v2.1 (G3) */
8834 POWERPC_DEF("750_v2.1", CPU_POWERPC_7x0_v21
, 750),
8835 /* PowerPC 740 v2.2 (G3) */
8836 POWERPC_DEF("740_v2.2", CPU_POWERPC_7x0_v22
, 740),
8837 /* PowerPC 750 v2.2 (G3) */
8838 POWERPC_DEF("750_v2.2", CPU_POWERPC_7x0_v22
, 750),
8839 /* PowerPC 740 v3.0 (G3) */
8840 POWERPC_DEF("740_v3.0", CPU_POWERPC_7x0_v30
, 740),
8841 /* PowerPC 750 v3.0 (G3) */
8842 POWERPC_DEF("750_v3.0", CPU_POWERPC_7x0_v30
, 750),
8843 /* PowerPC 740 v3.1 (G3) */
8844 POWERPC_DEF("740_v3.1", CPU_POWERPC_7x0_v31
, 740),
8845 /* PowerPC 750 v3.1 (G3) */
8846 POWERPC_DEF("750_v3.1", CPU_POWERPC_7x0_v31
, 750),
8847 /* PowerPC 740E (G3) */
8848 POWERPC_DEF("740e", CPU_POWERPC_740E
, 740),
8849 /* PowerPC 750E (G3) */
8850 POWERPC_DEF("750e", CPU_POWERPC_750E
, 750),
8851 /* PowerPC 740P (G3) */
8852 POWERPC_DEF("740p", CPU_POWERPC_7x0P
, 740),
8853 /* PowerPC 750P (G3) */
8854 POWERPC_DEF("750p", CPU_POWERPC_7x0P
, 750),
8855 /* Code name for PowerPC 740P/750P (G3) */
8856 POWERPC_DEF("Conan/Doyle", CPU_POWERPC_7x0P
, 750),
8857 /* PowerPC 750CL (G3 embedded) */
8858 POWERPC_DEF("750cl", CPU_POWERPC_750CL
, 750cl
),
8859 /* PowerPC 750CL v1.0 */
8860 POWERPC_DEF("750cl_v1.0", CPU_POWERPC_750CL_v10
, 750cl
),
8861 /* PowerPC 750CL v2.0 */
8862 POWERPC_DEF("750cl_v2.0", CPU_POWERPC_750CL_v20
, 750cl
),
8863 /* PowerPC 750CX (G3 embedded) */
8864 POWERPC_DEF("750cx", CPU_POWERPC_750CX
, 750cx
),
8865 /* PowerPC 750CX v1.0 (G3 embedded) */
8866 POWERPC_DEF("750cx_v1.0", CPU_POWERPC_750CX_v10
, 750cx
),
8867 /* PowerPC 750CX v2.1 (G3 embedded) */
8868 POWERPC_DEF("750cx_v2.0", CPU_POWERPC_750CX_v20
, 750cx
),
8869 /* PowerPC 750CX v2.1 (G3 embedded) */
8870 POWERPC_DEF("750cx_v2.1", CPU_POWERPC_750CX_v21
, 750cx
),
8871 /* PowerPC 750CX v2.2 (G3 embedded) */
8872 POWERPC_DEF("750cx_v2.2", CPU_POWERPC_750CX_v22
, 750cx
),
8873 /* PowerPC 750CXe (G3 embedded) */
8874 POWERPC_DEF("750cxe", CPU_POWERPC_750CXE
, 750cx
),
8875 /* PowerPC 750CXe v2.1 (G3 embedded) */
8876 POWERPC_DEF("750cxe_v2.1", CPU_POWERPC_750CXE_v21
, 750cx
),
8877 /* PowerPC 750CXe v2.2 (G3 embedded) */
8878 POWERPC_DEF("750cxe_v2.2", CPU_POWERPC_750CXE_v22
, 750cx
),
8879 /* PowerPC 750CXe v2.3 (G3 embedded) */
8880 POWERPC_DEF("750cxe_v2.3", CPU_POWERPC_750CXE_v23
, 750cx
),
8881 /* PowerPC 750CXe v2.4 (G3 embedded) */
8882 POWERPC_DEF("750cxe_v2.4", CPU_POWERPC_750CXE_v24
, 750cx
),
8883 /* PowerPC 750CXe v2.4b (G3 embedded) */
8884 POWERPC_DEF("750cxe_v2.4b", CPU_POWERPC_750CXE_v24b
, 750cx
),
8885 /* PowerPC 750CXe v3.0 (G3 embedded) */
8886 POWERPC_DEF("750cxe_v3.0", CPU_POWERPC_750CXE_v30
, 750cx
),
8887 /* PowerPC 750CXe v3.1 (G3 embedded) */
8888 POWERPC_DEF("750cxe_v3.1", CPU_POWERPC_750CXE_v31
, 750cx
),
8889 /* PowerPC 750CXe v3.1b (G3 embedded) */
8890 POWERPC_DEF("750cxe_v3.1b", CPU_POWERPC_750CXE_v31b
, 750cx
),
8891 /* PowerPC 750CXr (G3 embedded) */
8892 POWERPC_DEF("750cxr", CPU_POWERPC_750CXR
, 750cx
),
8893 /* PowerPC 750FL (G3 embedded) */
8894 POWERPC_DEF("750fl", CPU_POWERPC_750FL
, 750fx
),
8895 /* PowerPC 750FX (G3 embedded) */
8896 POWERPC_DEF("750fx", CPU_POWERPC_750FX
, 750fx
),
8897 /* PowerPC 750FX v1.0 (G3 embedded) */
8898 POWERPC_DEF("750fx_v1.0", CPU_POWERPC_750FX_v10
, 750fx
),
8899 /* PowerPC 750FX v2.0 (G3 embedded) */
8900 POWERPC_DEF("750fx_v2.0", CPU_POWERPC_750FX_v20
, 750fx
),
8901 /* PowerPC 750FX v2.1 (G3 embedded) */
8902 POWERPC_DEF("750fx_v2.1", CPU_POWERPC_750FX_v21
, 750fx
),
8903 /* PowerPC 750FX v2.2 (G3 embedded) */
8904 POWERPC_DEF("750fx_v2.2", CPU_POWERPC_750FX_v22
, 750fx
),
8905 /* PowerPC 750FX v2.3 (G3 embedded) */
8906 POWERPC_DEF("750fx_v2.3", CPU_POWERPC_750FX_v23
, 750fx
),
8907 /* PowerPC 750GL (G3 embedded) */
8908 POWERPC_DEF("750gl", CPU_POWERPC_750GL
, 750gx
),
8909 /* PowerPC 750GX (G3 embedded) */
8910 POWERPC_DEF("750gx", CPU_POWERPC_750GX
, 750gx
),
8911 /* PowerPC 750GX v1.0 (G3 embedded) */
8912 POWERPC_DEF("750gx_v1.0", CPU_POWERPC_750GX_v10
, 750gx
),
8913 /* PowerPC 750GX v1.1 (G3 embedded) */
8914 POWERPC_DEF("750gx_v1.1", CPU_POWERPC_750GX_v11
, 750gx
),
8915 /* PowerPC 750GX v1.2 (G3 embedded) */
8916 POWERPC_DEF("750gx_v1.2", CPU_POWERPC_750GX_v12
, 750gx
),
8917 /* PowerPC 750L (G3 embedded) */
8918 POWERPC_DEF("750l", CPU_POWERPC_750L
, 750),
8919 /* Code name for PowerPC 750L (G3 embedded) */
8920 POWERPC_DEF("LoneStar", CPU_POWERPC_750L
, 750),
8921 /* PowerPC 750L v2.0 (G3 embedded) */
8922 POWERPC_DEF("750l_v2.0", CPU_POWERPC_750L_v20
, 750),
8923 /* PowerPC 750L v2.1 (G3 embedded) */
8924 POWERPC_DEF("750l_v2.1", CPU_POWERPC_750L_v21
, 750),
8925 /* PowerPC 750L v2.2 (G3 embedded) */
8926 POWERPC_DEF("750l_v2.2", CPU_POWERPC_750L_v22
, 750),
8927 /* PowerPC 750L v3.0 (G3 embedded) */
8928 POWERPC_DEF("750l_v3.0", CPU_POWERPC_750L_v30
, 750),
8929 /* PowerPC 750L v3.2 (G3 embedded) */
8930 POWERPC_DEF("750l_v3.2", CPU_POWERPC_750L_v32
, 750),
8931 /* Generic PowerPC 745 */
8932 POWERPC_DEF("745", CPU_POWERPC_7x5
, 745),
8933 /* Generic PowerPC 755 */
8934 POWERPC_DEF("755", CPU_POWERPC_7x5
, 755),
8935 /* Code name for PowerPC 745/755 */
8936 POWERPC_DEF("Goldfinger", CPU_POWERPC_7x5
, 755),
8937 /* PowerPC 745 v1.0 */
8938 POWERPC_DEF("745_v1.0", CPU_POWERPC_7x5_v10
, 745),
8939 /* PowerPC 755 v1.0 */
8940 POWERPC_DEF("755_v1.0", CPU_POWERPC_7x5_v10
, 755),
8941 /* PowerPC 745 v1.1 */
8942 POWERPC_DEF("745_v1.1", CPU_POWERPC_7x5_v11
, 745),
8943 /* PowerPC 755 v1.1 */
8944 POWERPC_DEF("755_v1.1", CPU_POWERPC_7x5_v11
, 755),
8945 /* PowerPC 745 v2.0 */
8946 POWERPC_DEF("745_v2.0", CPU_POWERPC_7x5_v20
, 745),
8947 /* PowerPC 755 v2.0 */
8948 POWERPC_DEF("755_v2.0", CPU_POWERPC_7x5_v20
, 755),
8949 /* PowerPC 745 v2.1 */
8950 POWERPC_DEF("745_v2.1", CPU_POWERPC_7x5_v21
, 745),
8951 /* PowerPC 755 v2.1 */
8952 POWERPC_DEF("755_v2.1", CPU_POWERPC_7x5_v21
, 755),
8953 /* PowerPC 745 v2.2 */
8954 POWERPC_DEF("745_v2.2", CPU_POWERPC_7x5_v22
, 745),
8955 /* PowerPC 755 v2.2 */
8956 POWERPC_DEF("755_v2.2", CPU_POWERPC_7x5_v22
, 755),
8957 /* PowerPC 745 v2.3 */
8958 POWERPC_DEF("745_v2.3", CPU_POWERPC_7x5_v23
, 745),
8959 /* PowerPC 755 v2.3 */
8960 POWERPC_DEF("755_v2.3", CPU_POWERPC_7x5_v23
, 755),
8961 /* PowerPC 745 v2.4 */
8962 POWERPC_DEF("745_v2.4", CPU_POWERPC_7x5_v24
, 745),
8963 /* PowerPC 755 v2.4 */
8964 POWERPC_DEF("755_v2.4", CPU_POWERPC_7x5_v24
, 755),
8965 /* PowerPC 745 v2.5 */
8966 POWERPC_DEF("745_v2.5", CPU_POWERPC_7x5_v25
, 745),
8967 /* PowerPC 755 v2.5 */
8968 POWERPC_DEF("755_v2.5", CPU_POWERPC_7x5_v25
, 755),
8969 /* PowerPC 745 v2.6 */
8970 POWERPC_DEF("745_v2.6", CPU_POWERPC_7x5_v26
, 745),
8971 /* PowerPC 755 v2.6 */
8972 POWERPC_DEF("755_v2.6", CPU_POWERPC_7x5_v26
, 755),
8973 /* PowerPC 745 v2.7 */
8974 POWERPC_DEF("745_v2.7", CPU_POWERPC_7x5_v27
, 745),
8975 /* PowerPC 755 v2.7 */
8976 POWERPC_DEF("755_v2.7", CPU_POWERPC_7x5_v27
, 755),
8977 /* PowerPC 745 v2.8 */
8978 POWERPC_DEF("745_v2.8", CPU_POWERPC_7x5_v28
, 745),
8979 /* PowerPC 755 v2.8 */
8980 POWERPC_DEF("755_v2.8", CPU_POWERPC_7x5_v28
, 755),
8982 /* PowerPC 745P (G3) */
8983 POWERPC_DEF("745p", CPU_POWERPC_7x5P
, 745),
8984 /* PowerPC 755P (G3) */
8985 POWERPC_DEF("755p", CPU_POWERPC_7x5P
, 755),
8987 /* PowerPC 74xx family */
8988 /* PowerPC 7400 (G4) */
8989 POWERPC_DEF("7400", CPU_POWERPC_7400
, 7400),
8990 /* Code name for PowerPC 7400 */
8991 POWERPC_DEF("Max", CPU_POWERPC_7400
, 7400),
8992 /* PowerPC 74xx is also well known as G4 */
8993 POWERPC_DEF("G4", CPU_POWERPC_7400
, 7400),
8994 /* PowerPC 7400 v1.0 (G4) */
8995 POWERPC_DEF("7400_v1.0", CPU_POWERPC_7400_v10
, 7400),
8996 /* PowerPC 7400 v1.1 (G4) */
8997 POWERPC_DEF("7400_v1.1", CPU_POWERPC_7400_v11
, 7400),
8998 /* PowerPC 7400 v2.0 (G4) */
8999 POWERPC_DEF("7400_v2.0", CPU_POWERPC_7400_v20
, 7400),
9000 /* PowerPC 7400 v2.1 (G4) */
9001 POWERPC_DEF("7400_v2.1", CPU_POWERPC_7400_v21
, 7400),
9002 /* PowerPC 7400 v2.2 (G4) */
9003 POWERPC_DEF("7400_v2.2", CPU_POWERPC_7400_v22
, 7400),
9004 /* PowerPC 7400 v2.6 (G4) */
9005 POWERPC_DEF("7400_v2.6", CPU_POWERPC_7400_v26
, 7400),
9006 /* PowerPC 7400 v2.7 (G4) */
9007 POWERPC_DEF("7400_v2.7", CPU_POWERPC_7400_v27
, 7400),
9008 /* PowerPC 7400 v2.8 (G4) */
9009 POWERPC_DEF("7400_v2.8", CPU_POWERPC_7400_v28
, 7400),
9010 /* PowerPC 7400 v2.9 (G4) */
9011 POWERPC_DEF("7400_v2.9", CPU_POWERPC_7400_v29
, 7400),
9012 /* PowerPC 7410 (G4) */
9013 POWERPC_DEF("7410", CPU_POWERPC_7410
, 7410),
9014 /* Code name for PowerPC 7410 */
9015 POWERPC_DEF("Nitro", CPU_POWERPC_7410
, 7410),
9016 /* PowerPC 7410 v1.0 (G4) */
9017 POWERPC_DEF("7410_v1.0", CPU_POWERPC_7410_v10
, 7410),
9018 /* PowerPC 7410 v1.1 (G4) */
9019 POWERPC_DEF("7410_v1.1", CPU_POWERPC_7410_v11
, 7410),
9020 /* PowerPC 7410 v1.2 (G4) */
9021 POWERPC_DEF("7410_v1.2", CPU_POWERPC_7410_v12
, 7410),
9022 /* PowerPC 7410 v1.3 (G4) */
9023 POWERPC_DEF("7410_v1.3", CPU_POWERPC_7410_v13
, 7410),
9024 /* PowerPC 7410 v1.4 (G4) */
9025 POWERPC_DEF("7410_v1.4", CPU_POWERPC_7410_v14
, 7410),
9026 /* PowerPC 7448 (G4) */
9027 POWERPC_DEF("7448", CPU_POWERPC_7448
, 7400),
9028 /* PowerPC 7448 v1.0 (G4) */
9029 POWERPC_DEF("7448_v1.0", CPU_POWERPC_7448_v10
, 7400),
9030 /* PowerPC 7448 v1.1 (G4) */
9031 POWERPC_DEF("7448_v1.1", CPU_POWERPC_7448_v11
, 7400),
9032 /* PowerPC 7448 v2.0 (G4) */
9033 POWERPC_DEF("7448_v2.0", CPU_POWERPC_7448_v20
, 7400),
9034 /* PowerPC 7448 v2.1 (G4) */
9035 POWERPC_DEF("7448_v2.1", CPU_POWERPC_7448_v21
, 7400),
9036 /* PowerPC 7450 (G4) */
9037 POWERPC_DEF("7450", CPU_POWERPC_7450
, 7450),
9038 /* Code name for PowerPC 7450 */
9039 POWERPC_DEF("Vger", CPU_POWERPC_7450
, 7450),
9040 /* PowerPC 7450 v1.0 (G4) */
9041 POWERPC_DEF("7450_v1.0", CPU_POWERPC_7450_v10
, 7450),
9042 /* PowerPC 7450 v1.1 (G4) */
9043 POWERPC_DEF("7450_v1.1", CPU_POWERPC_7450_v11
, 7450),
9044 /* PowerPC 7450 v1.2 (G4) */
9045 POWERPC_DEF("7450_v1.2", CPU_POWERPC_7450_v12
, 7450),
9046 /* PowerPC 7450 v2.0 (G4) */
9047 POWERPC_DEF("7450_v2.0", CPU_POWERPC_7450_v20
, 7450),
9048 /* PowerPC 7450 v2.1 (G4) */
9049 POWERPC_DEF("7450_v2.1", CPU_POWERPC_7450_v21
, 7450),
9050 /* PowerPC 7441 (G4) */
9051 POWERPC_DEF("7441", CPU_POWERPC_74x1
, 7440),
9052 /* PowerPC 7451 (G4) */
9053 POWERPC_DEF("7451", CPU_POWERPC_74x1
, 7450),
9054 /* PowerPC 7441 v2.1 (G4) */
9055 POWERPC_DEF("7441_v2.1", CPU_POWERPC_7450_v21
, 7440),
9056 /* PowerPC 7441 v2.3 (G4) */
9057 POWERPC_DEF("7441_v2.3", CPU_POWERPC_74x1_v23
, 7440),
9058 /* PowerPC 7451 v2.3 (G4) */
9059 POWERPC_DEF("7451_v2.3", CPU_POWERPC_74x1_v23
, 7450),
9060 /* PowerPC 7441 v2.10 (G4) */
9061 POWERPC_DEF("7441_v2.10", CPU_POWERPC_74x1_v210
, 7440),
9062 /* PowerPC 7451 v2.10 (G4) */
9063 POWERPC_DEF("7451_v2.10", CPU_POWERPC_74x1_v210
, 7450),
9064 /* PowerPC 7445 (G4) */
9065 POWERPC_DEF("7445", CPU_POWERPC_74x5
, 7445),
9066 /* PowerPC 7455 (G4) */
9067 POWERPC_DEF("7455", CPU_POWERPC_74x5
, 7455),
9068 /* Code name for PowerPC 7445/7455 */
9069 POWERPC_DEF("Apollo6", CPU_POWERPC_74x5
, 7455),
9070 /* PowerPC 7445 v1.0 (G4) */
9071 POWERPC_DEF("7445_v1.0", CPU_POWERPC_74x5_v10
, 7445),
9072 /* PowerPC 7455 v1.0 (G4) */
9073 POWERPC_DEF("7455_v1.0", CPU_POWERPC_74x5_v10
, 7455),
9074 /* PowerPC 7445 v2.1 (G4) */
9075 POWERPC_DEF("7445_v2.1", CPU_POWERPC_74x5_v21
, 7445),
9076 /* PowerPC 7455 v2.1 (G4) */
9077 POWERPC_DEF("7455_v2.1", CPU_POWERPC_74x5_v21
, 7455),
9078 /* PowerPC 7445 v3.2 (G4) */
9079 POWERPC_DEF("7445_v3.2", CPU_POWERPC_74x5_v32
, 7445),
9080 /* PowerPC 7455 v3.2 (G4) */
9081 POWERPC_DEF("7455_v3.2", CPU_POWERPC_74x5_v32
, 7455),
9082 /* PowerPC 7445 v3.3 (G4) */
9083 POWERPC_DEF("7445_v3.3", CPU_POWERPC_74x5_v33
, 7445),
9084 /* PowerPC 7455 v3.3 (G4) */
9085 POWERPC_DEF("7455_v3.3", CPU_POWERPC_74x5_v33
, 7455),
9086 /* PowerPC 7445 v3.4 (G4) */
9087 POWERPC_DEF("7445_v3.4", CPU_POWERPC_74x5_v34
, 7445),
9088 /* PowerPC 7455 v3.4 (G4) */
9089 POWERPC_DEF("7455_v3.4", CPU_POWERPC_74x5_v34
, 7455),
9090 /* PowerPC 7447 (G4) */
9091 POWERPC_DEF("7447", CPU_POWERPC_74x7
, 7445),
9092 /* PowerPC 7457 (G4) */
9093 POWERPC_DEF("7457", CPU_POWERPC_74x7
, 7455),
9094 /* Code name for PowerPC 7447/7457 */
9095 POWERPC_DEF("Apollo7", CPU_POWERPC_74x7
, 7455),
9096 /* PowerPC 7447 v1.0 (G4) */
9097 POWERPC_DEF("7447_v1.0", CPU_POWERPC_74x7_v10
, 7445),
9098 /* PowerPC 7457 v1.0 (G4) */
9099 POWERPC_DEF("7457_v1.0", CPU_POWERPC_74x7_v10
, 7455),
9100 /* PowerPC 7447 v1.1 (G4) */
9101 POWERPC_DEF("7447_v1.1", CPU_POWERPC_74x7_v11
, 7445),
9102 /* PowerPC 7457 v1.1 (G4) */
9103 POWERPC_DEF("7457_v1.1", CPU_POWERPC_74x7_v11
, 7455),
9104 /* PowerPC 7457 v1.2 (G4) */
9105 POWERPC_DEF("7457_v1.2", CPU_POWERPC_74x7_v12
, 7455),
9106 /* PowerPC 7447A (G4) */
9107 POWERPC_DEF("7447A", CPU_POWERPC_74x7A
, 7445),
9108 /* PowerPC 7457A (G4) */
9109 POWERPC_DEF("7457A", CPU_POWERPC_74x7A
, 7455),
9110 /* PowerPC 7447A v1.0 (G4) */
9111 POWERPC_DEF("7447A_v1.0", CPU_POWERPC_74x7A_v10
, 7445),
9112 /* PowerPC 7457A v1.0 (G4) */
9113 POWERPC_DEF("7457A_v1.0", CPU_POWERPC_74x7A_v10
, 7455),
9114 /* Code name for PowerPC 7447A/7457A */
9115 POWERPC_DEF("Apollo7PM", CPU_POWERPC_74x7A_v10
, 7455),
9116 /* PowerPC 7447A v1.1 (G4) */
9117 POWERPC_DEF("7447A_v1.1", CPU_POWERPC_74x7A_v11
, 7445),
9118 /* PowerPC 7457A v1.1 (G4) */
9119 POWERPC_DEF("7457A_v1.1", CPU_POWERPC_74x7A_v11
, 7455),
9120 /* PowerPC 7447A v1.2 (G4) */
9121 POWERPC_DEF("7447A_v1.2", CPU_POWERPC_74x7A_v12
, 7445),
9122 /* PowerPC 7457A v1.2 (G4) */
9123 POWERPC_DEF("7457A_v1.2", CPU_POWERPC_74x7A_v12
, 7455),
9124 /* 64 bits PowerPC */
9125 #if defined (TARGET_PPC64)
9127 POWERPC_DEF("620", CPU_POWERPC_620
, 620),
9128 /* Code name for PowerPC 620 */
9129 POWERPC_DEF("Trident", CPU_POWERPC_620
, 620),
9131 /* PowerPC 630 (POWER3) */
9132 POWERPC_DEF("630", CPU_POWERPC_630
, 630),
9133 POWERPC_DEF("POWER3", CPU_POWERPC_630
, 630),
9134 /* Code names for POWER3 */
9135 POWERPC_DEF("Boxer", CPU_POWERPC_630
, 630),
9136 POWERPC_DEF("Dino", CPU_POWERPC_630
, 630),
9139 /* PowerPC 631 (Power 3+) */
9140 POWERPC_DEF("631", CPU_POWERPC_631
, 631),
9141 POWERPC_DEF("POWER3+", CPU_POWERPC_631
, 631),
9145 POWERPC_DEF("POWER4", CPU_POWERPC_POWER4
, POWER4
),
9149 POWERPC_DEF("POWER4+", CPU_POWERPC_POWER4P
, POWER4P
),
9153 POWERPC_DEF("POWER5", CPU_POWERPC_POWER5
, POWER5
),
9155 POWERPC_DEF("POWER5gr", CPU_POWERPC_POWER5GR
, POWER5
),
9159 POWERPC_DEF("POWER5+", CPU_POWERPC_POWER5P
, POWER5P
),
9161 POWERPC_DEF("POWER5gs", CPU_POWERPC_POWER5GS
, POWER5P
),
9165 POWERPC_DEF("POWER6", CPU_POWERPC_POWER6
, POWER6
),
9166 /* POWER6 running in POWER5 mode */
9167 POWERPC_DEF("POWER6_5", CPU_POWERPC_POWER6_5
, POWER5
),
9169 POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A
, POWER6
),
9172 POWERPC_DEF("POWER7", CPU_POWERPC_POWER7
, POWER7
),
9173 POWERPC_DEF("POWER7_v2.0", CPU_POWERPC_POWER7_v20
, POWER7
),
9174 POWERPC_DEF("POWER7_v2.1", CPU_POWERPC_POWER7_v21
, POWER7
),
9175 POWERPC_DEF("POWER7_v2.3", CPU_POWERPC_POWER7_v23
, POWER7
),
9177 POWERPC_DEF("970", CPU_POWERPC_970
, 970),
9178 /* PowerPC 970FX (G5) */
9179 POWERPC_DEF("970fx", CPU_POWERPC_970FX
, 970FX
),
9180 /* PowerPC 970FX v1.0 (G5) */
9181 POWERPC_DEF("970fx_v1.0", CPU_POWERPC_970FX_v10
, 970FX
),
9182 /* PowerPC 970FX v2.0 (G5) */
9183 POWERPC_DEF("970fx_v2.0", CPU_POWERPC_970FX_v20
, 970FX
),
9184 /* PowerPC 970FX v2.1 (G5) */
9185 POWERPC_DEF("970fx_v2.1", CPU_POWERPC_970FX_v21
, 970FX
),
9186 /* PowerPC 970FX v3.0 (G5) */
9187 POWERPC_DEF("970fx_v3.0", CPU_POWERPC_970FX_v30
, 970FX
),
9188 /* PowerPC 970FX v3.1 (G5) */
9189 POWERPC_DEF("970fx_v3.1", CPU_POWERPC_970FX_v31
, 970FX
),
9190 /* PowerPC 970GX (G5) */
9191 POWERPC_DEF("970gx", CPU_POWERPC_970GX
, 970GX
),
9193 POWERPC_DEF("970mp", CPU_POWERPC_970MP
, 970MP
),
9194 /* PowerPC 970MP v1.0 */
9195 POWERPC_DEF("970mp_v1.0", CPU_POWERPC_970MP_v10
, 970MP
),
9196 /* PowerPC 970MP v1.1 */
9197 POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11
, 970MP
),
9200 POWERPC_DEF("Cell", CPU_POWERPC_CELL
, 970),
9203 /* PowerPC Cell v1.0 */
9204 POWERPC_DEF("Cell_v1.0", CPU_POWERPC_CELL_v10
, 970),
9207 /* PowerPC Cell v2.0 */
9208 POWERPC_DEF("Cell_v2.0", CPU_POWERPC_CELL_v20
, 970),
9211 /* PowerPC Cell v3.0 */
9212 POWERPC_DEF("Cell_v3.0", CPU_POWERPC_CELL_v30
, 970),
9215 /* PowerPC Cell v3.1 */
9216 POWERPC_DEF("Cell_v3.1", CPU_POWERPC_CELL_v31
, 970),
9219 /* PowerPC Cell v3.2 */
9220 POWERPC_DEF("Cell_v3.2", CPU_POWERPC_CELL_v32
, 970),
9223 /* RS64 (Apache/A35) */
9224 /* This one seems to support the whole POWER2 instruction set
9225 * and the PowerPC 64 one.
9227 /* What about A10 & A30 ? */
9228 POWERPC_DEF("RS64", CPU_POWERPC_RS64
, RS64
),
9229 POWERPC_DEF("Apache", CPU_POWERPC_RS64
, RS64
),
9230 POWERPC_DEF("A35", CPU_POWERPC_RS64
, RS64
),
9233 /* RS64-II (NorthStar/A50) */
9234 POWERPC_DEF("RS64-II", CPU_POWERPC_RS64II
, RS64
),
9235 POWERPC_DEF("NorthStar", CPU_POWERPC_RS64II
, RS64
),
9236 POWERPC_DEF("A50", CPU_POWERPC_RS64II
, RS64
),
9239 /* RS64-III (Pulsar) */
9240 POWERPC_DEF("RS64-III", CPU_POWERPC_RS64III
, RS64
),
9241 POWERPC_DEF("Pulsar", CPU_POWERPC_RS64III
, RS64
),
9244 /* RS64-IV (IceStar/IStar/SStar) */
9245 POWERPC_DEF("RS64-IV", CPU_POWERPC_RS64IV
, RS64
),
9246 POWERPC_DEF("IceStar", CPU_POWERPC_RS64IV
, RS64
),
9247 POWERPC_DEF("IStar", CPU_POWERPC_RS64IV
, RS64
),
9248 POWERPC_DEF("SStar", CPU_POWERPC_RS64IV
, RS64
),
9250 #endif /* defined (TARGET_PPC64) */
9253 /* Original POWER */
9254 POWERPC_DEF("POWER", CPU_POWERPC_POWER
, POWER
),
9255 POWERPC_DEF("RIOS", CPU_POWERPC_POWER
, POWER
),
9256 POWERPC_DEF("RSC", CPU_POWERPC_POWER
, POWER
),
9257 POWERPC_DEF("RSC3308", CPU_POWERPC_POWER
, POWER
),
9258 POWERPC_DEF("RSC4608", CPU_POWERPC_POWER
, POWER
),
9262 POWERPC_DEF("POWER2", CPU_POWERPC_POWER2
, POWER
),
9263 POWERPC_DEF("RSC2", CPU_POWERPC_POWER2
, POWER
),
9264 POWERPC_DEF("P2SC", CPU_POWERPC_POWER2
, POWER
),
9269 POWERPC_DEF("PA6T", CPU_POWERPC_PA6T
, PA6T
),
9271 /* Generic PowerPCs */
9272 #if defined (TARGET_PPC64)
9273 POWERPC_DEF("ppc64", CPU_POWERPC_PPC64
, PPC64
),
9275 POWERPC_DEF("ppc32", CPU_POWERPC_PPC32
, PPC32
),
9276 POWERPC_DEF("ppc", CPU_POWERPC_DEFAULT
, DEFAULT
),
9278 POWERPC_DEF("default", CPU_POWERPC_DEFAULT
, DEFAULT
),
9281 /*****************************************************************************/
9282 /* Generic CPU instantiation routine */
9283 static void init_ppc_proc (CPUPPCState
*env
, const ppc_def_t
*def
)
9285 #if !defined(CONFIG_USER_ONLY)
9288 env
->irq_inputs
= NULL
;
9289 /* Set all exception vectors to an invalid address */
9290 for (i
= 0; i
< POWERPC_EXCP_NB
; i
++)
9291 env
->excp_vectors
[i
] = (target_ulong
)(-1ULL);
9292 env
->hreset_excp_prefix
= 0x00000000;
9293 env
->ivor_mask
= 0x00000000;
9294 env
->ivpr_mask
= 0x00000000;
9295 /* Default MMU definitions */
9299 env
->tlb_type
= TLB_NONE
;
9301 /* Register SPR common to all PowerPC implementations */
9302 gen_spr_generic(env
);
9303 spr_register(env
, SPR_PVR
, "PVR",
9304 /* Linux permits userspace to read PVR */
9305 #if defined(CONFIG_LINUX_USER)
9311 &spr_read_generic
, SPR_NOACCESS
,
9313 /* Register SVR if it's defined to anything else than POWERPC_SVR_NONE */
9314 if (def
->svr
!= POWERPC_SVR_NONE
) {
9315 if (def
->svr
& POWERPC_SVR_E500
) {
9316 spr_register(env
, SPR_E500_SVR
, "SVR",
9317 SPR_NOACCESS
, SPR_NOACCESS
,
9318 &spr_read_generic
, SPR_NOACCESS
,
9319 def
->svr
& ~POWERPC_SVR_E500
);
9321 spr_register(env
, SPR_SVR
, "SVR",
9322 SPR_NOACCESS
, SPR_NOACCESS
,
9323 &spr_read_generic
, SPR_NOACCESS
,
9327 /* PowerPC implementation specific initialisations (SPRs, timers, ...) */
9328 (*def
->init_proc
)(env
);
9329 #if !defined(CONFIG_USER_ONLY)
9330 env
->excp_prefix
= env
->hreset_excp_prefix
;
9332 /* MSR bits & flags consistency checks */
9333 if (env
->msr_mask
& (1 << 25)) {
9334 switch (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
9335 case POWERPC_FLAG_SPE
:
9336 case POWERPC_FLAG_VRE
:
9339 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9340 "Should define POWERPC_FLAG_SPE or POWERPC_FLAG_VRE\n");
9343 } else if (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
9344 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9345 "Should not define POWERPC_FLAG_SPE nor POWERPC_FLAG_VRE\n");
9348 if (env
->msr_mask
& (1 << 17)) {
9349 switch (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
9350 case POWERPC_FLAG_TGPR
:
9351 case POWERPC_FLAG_CE
:
9354 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9355 "Should define POWERPC_FLAG_TGPR or POWERPC_FLAG_CE\n");
9358 } else if (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
9359 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9360 "Should not define POWERPC_FLAG_TGPR nor POWERPC_FLAG_CE\n");
9363 if (env
->msr_mask
& (1 << 10)) {
9364 switch (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
9365 POWERPC_FLAG_UBLE
)) {
9366 case POWERPC_FLAG_SE
:
9367 case POWERPC_FLAG_DWE
:
9368 case POWERPC_FLAG_UBLE
:
9371 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9372 "Should define POWERPC_FLAG_SE or POWERPC_FLAG_DWE or "
9373 "POWERPC_FLAG_UBLE\n");
9376 } else if (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
9377 POWERPC_FLAG_UBLE
)) {
9378 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9379 "Should not define POWERPC_FLAG_SE nor POWERPC_FLAG_DWE nor "
9380 "POWERPC_FLAG_UBLE\n");
9383 if (env
->msr_mask
& (1 << 9)) {
9384 switch (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
9385 case POWERPC_FLAG_BE
:
9386 case POWERPC_FLAG_DE
:
9389 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9390 "Should define POWERPC_FLAG_BE or POWERPC_FLAG_DE\n");
9393 } else if (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
9394 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9395 "Should not define POWERPC_FLAG_BE nor POWERPC_FLAG_DE\n");
9398 if (env
->msr_mask
& (1 << 2)) {
9399 switch (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
9400 case POWERPC_FLAG_PX
:
9401 case POWERPC_FLAG_PMM
:
9404 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9405 "Should define POWERPC_FLAG_PX or POWERPC_FLAG_PMM\n");
9408 } else if (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
9409 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9410 "Should not define POWERPC_FLAG_PX nor POWERPC_FLAG_PMM\n");
9413 if ((env
->flags
& (POWERPC_FLAG_RTC_CLK
| POWERPC_FLAG_BUS_CLK
)) == 0) {
9414 fprintf(stderr
, "PowerPC flags inconsistency\n"
9415 "Should define the time-base and decrementer clock source\n");
9418 /* Allocate TLBs buffer when needed */
9419 #if !defined(CONFIG_USER_ONLY)
9420 if (env
->nb_tlb
!= 0) {
9421 int nb_tlb
= env
->nb_tlb
;
9422 if (env
->id_tlbs
!= 0)
9424 switch (env
->tlb_type
) {
9426 env
->tlb
.tlb6
= g_malloc0(nb_tlb
* sizeof(ppc6xx_tlb_t
));
9429 env
->tlb
.tlbe
= g_malloc0(nb_tlb
* sizeof(ppcemb_tlb_t
));
9432 env
->tlb
.tlbm
= g_malloc0(nb_tlb
* sizeof(ppcmas_tlb_t
));
9435 /* Pre-compute some useful values */
9436 env
->tlb_per_way
= env
->nb_tlb
/ env
->nb_ways
;
9438 if (env
->irq_inputs
== NULL
) {
9439 fprintf(stderr
, "WARNING: no internal IRQ controller registered.\n"
9440 " Attempt Qemu to crash very soon !\n");
9443 if (env
->check_pow
== NULL
) {
9444 fprintf(stderr
, "WARNING: no power management check handler "
9446 " Attempt Qemu to crash very soon !\n");
9450 #if defined(PPC_DUMP_CPU)
9451 static void dump_ppc_sprs (CPUPPCState
*env
)
9454 #if !defined(CONFIG_USER_ONLY)
9460 printf("Special purpose registers:\n");
9461 for (i
= 0; i
< 32; i
++) {
9462 for (j
= 0; j
< 32; j
++) {
9464 spr
= &env
->spr_cb
[n
];
9465 uw
= spr
->uea_write
!= NULL
&& spr
->uea_write
!= SPR_NOACCESS
;
9466 ur
= spr
->uea_read
!= NULL
&& spr
->uea_read
!= SPR_NOACCESS
;
9467 #if !defined(CONFIG_USER_ONLY)
9468 sw
= spr
->oea_write
!= NULL
&& spr
->oea_write
!= SPR_NOACCESS
;
9469 sr
= spr
->oea_read
!= NULL
&& spr
->oea_read
!= SPR_NOACCESS
;
9470 if (sw
|| sr
|| uw
|| ur
) {
9471 printf("SPR: %4d (%03x) %-8s s%c%c u%c%c\n",
9472 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9473 sw
? 'w' : '-', sr
? 'r' : '-',
9474 uw
? 'w' : '-', ur
? 'r' : '-');
9478 printf("SPR: %4d (%03x) %-8s u%c%c\n",
9479 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9480 uw
? 'w' : '-', ur
? 'r' : '-');
9490 /*****************************************************************************/
9496 PPC_DIRECT
= 0, /* Opcode routine */
9497 PPC_INDIRECT
= 1, /* Indirect opcode table */
9500 static inline int is_indirect_opcode (void *handler
)
9502 return ((unsigned long)handler
& 0x03) == PPC_INDIRECT
;
9505 static inline opc_handler_t
**ind_table(void *handler
)
9507 return (opc_handler_t
**)((unsigned long)handler
& ~3);
9510 /* Instruction table creation */
9511 /* Opcodes tables creation */
9512 static void fill_new_table (opc_handler_t
**table
, int len
)
9516 for (i
= 0; i
< len
; i
++)
9517 table
[i
] = &invalid_handler
;
9520 static int create_new_table (opc_handler_t
**table
, unsigned char idx
)
9522 opc_handler_t
**tmp
;
9524 tmp
= malloc(0x20 * sizeof(opc_handler_t
));
9525 fill_new_table(tmp
, 0x20);
9526 table
[idx
] = (opc_handler_t
*)((unsigned long)tmp
| PPC_INDIRECT
);
9531 static int insert_in_table (opc_handler_t
**table
, unsigned char idx
,
9532 opc_handler_t
*handler
)
9534 if (table
[idx
] != &invalid_handler
)
9536 table
[idx
] = handler
;
9541 static int register_direct_insn (opc_handler_t
**ppc_opcodes
,
9542 unsigned char idx
, opc_handler_t
*handler
)
9544 if (insert_in_table(ppc_opcodes
, idx
, handler
) < 0) {
9545 printf("*** ERROR: opcode %02x already assigned in main "
9546 "opcode table\n", idx
);
9547 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9548 printf(" Registered handler '%s' - new handler '%s'\n",
9549 ppc_opcodes
[idx
]->oname
, handler
->oname
);
9557 static int register_ind_in_table (opc_handler_t
**table
,
9558 unsigned char idx1
, unsigned char idx2
,
9559 opc_handler_t
*handler
)
9561 if (table
[idx1
] == &invalid_handler
) {
9562 if (create_new_table(table
, idx1
) < 0) {
9563 printf("*** ERROR: unable to create indirect table "
9564 "idx=%02x\n", idx1
);
9568 if (!is_indirect_opcode(table
[idx1
])) {
9569 printf("*** ERROR: idx %02x already assigned to a direct "
9571 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9572 printf(" Registered handler '%s' - new handler '%s'\n",
9573 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9578 if (handler
!= NULL
&&
9579 insert_in_table(ind_table(table
[idx1
]), idx2
, handler
) < 0) {
9580 printf("*** ERROR: opcode %02x already assigned in "
9581 "opcode table %02x\n", idx2
, idx1
);
9582 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9583 printf(" Registered handler '%s' - new handler '%s'\n",
9584 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9592 static int register_ind_insn (opc_handler_t
**ppc_opcodes
,
9593 unsigned char idx1
, unsigned char idx2
,
9594 opc_handler_t
*handler
)
9598 ret
= register_ind_in_table(ppc_opcodes
, idx1
, idx2
, handler
);
9603 static int register_dblind_insn (opc_handler_t
**ppc_opcodes
,
9604 unsigned char idx1
, unsigned char idx2
,
9605 unsigned char idx3
, opc_handler_t
*handler
)
9607 if (register_ind_in_table(ppc_opcodes
, idx1
, idx2
, NULL
) < 0) {
9608 printf("*** ERROR: unable to join indirect table idx "
9609 "[%02x-%02x]\n", idx1
, idx2
);
9612 if (register_ind_in_table(ind_table(ppc_opcodes
[idx1
]), idx2
, idx3
,
9614 printf("*** ERROR: unable to insert opcode "
9615 "[%02x-%02x-%02x]\n", idx1
, idx2
, idx3
);
9622 static int register_insn (opc_handler_t
**ppc_opcodes
, opcode_t
*insn
)
9624 if (insn
->opc2
!= 0xFF) {
9625 if (insn
->opc3
!= 0xFF) {
9626 if (register_dblind_insn(ppc_opcodes
, insn
->opc1
, insn
->opc2
,
9627 insn
->opc3
, &insn
->handler
) < 0)
9630 if (register_ind_insn(ppc_opcodes
, insn
->opc1
,
9631 insn
->opc2
, &insn
->handler
) < 0)
9635 if (register_direct_insn(ppc_opcodes
, insn
->opc1
, &insn
->handler
) < 0)
9642 static int test_opcode_table (opc_handler_t
**table
, int len
)
9646 for (i
= 0, count
= 0; i
< len
; i
++) {
9647 /* Consistency fixup */
9648 if (table
[i
] == NULL
)
9649 table
[i
] = &invalid_handler
;
9650 if (table
[i
] != &invalid_handler
) {
9651 if (is_indirect_opcode(table
[i
])) {
9652 tmp
= test_opcode_table(ind_table(table
[i
]), 0x20);
9655 table
[i
] = &invalid_handler
;
9668 static void fix_opcode_tables (opc_handler_t
**ppc_opcodes
)
9670 if (test_opcode_table(ppc_opcodes
, 0x40) == 0)
9671 printf("*** WARNING: no opcode defined !\n");
9674 /*****************************************************************************/
9675 static int create_ppc_opcodes (CPUPPCState
*env
, const ppc_def_t
*def
)
9679 fill_new_table(env
->opcodes
, 0x40);
9680 for (opc
= opcodes
; opc
< &opcodes
[ARRAY_SIZE(opcodes
)]; opc
++) {
9681 if (((opc
->handler
.type
& def
->insns_flags
) != 0) ||
9682 ((opc
->handler
.type2
& def
->insns_flags2
) != 0)) {
9683 if (register_insn(env
->opcodes
, opc
) < 0) {
9684 printf("*** ERROR initializing PowerPC instruction "
9685 "0x%02x 0x%02x 0x%02x\n", opc
->opc1
, opc
->opc2
,
9691 fix_opcode_tables(env
->opcodes
);
9698 #if defined(PPC_DUMP_CPU)
9699 static void dump_ppc_insns (CPUPPCState
*env
)
9701 opc_handler_t
**table
, *handler
;
9703 uint8_t opc1
, opc2
, opc3
;
9705 printf("Instructions set:\n");
9706 /* opc1 is 6 bits long */
9707 for (opc1
= 0x00; opc1
< 0x40; opc1
++) {
9708 table
= env
->opcodes
;
9709 handler
= table
[opc1
];
9710 if (is_indirect_opcode(handler
)) {
9711 /* opc2 is 5 bits long */
9712 for (opc2
= 0; opc2
< 0x20; opc2
++) {
9713 table
= env
->opcodes
;
9714 handler
= env
->opcodes
[opc1
];
9715 table
= ind_table(handler
);
9716 handler
= table
[opc2
];
9717 if (is_indirect_opcode(handler
)) {
9718 table
= ind_table(handler
);
9719 /* opc3 is 5 bits long */
9720 for (opc3
= 0; opc3
< 0x20; opc3
++) {
9721 handler
= table
[opc3
];
9722 if (handler
->handler
!= &gen_invalid
) {
9723 /* Special hack to properly dump SPE insns */
9724 p
= strchr(handler
->oname
, '_');
9726 printf("INSN: %02x %02x %02x (%02d %04d) : "
9728 opc1
, opc2
, opc3
, opc1
,
9733 if ((p
- handler
->oname
) != strlen(q
) ||
9734 memcmp(handler
->oname
, q
, strlen(q
)) != 0) {
9735 /* First instruction */
9736 printf("INSN: %02x %02x %02x (%02d %04d) : "
9738 opc1
, opc2
<< 1, opc3
, opc1
,
9739 (opc3
<< 6) | (opc2
<< 1),
9740 (int)(p
- handler
->oname
),
9743 if (strcmp(p
+ 1, q
) != 0) {
9744 /* Second instruction */
9745 printf("INSN: %02x %02x %02x (%02d %04d) : "
9747 opc1
, (opc2
<< 1) | 1, opc3
, opc1
,
9748 (opc3
<< 6) | (opc2
<< 1) | 1,
9755 if (handler
->handler
!= &gen_invalid
) {
9756 printf("INSN: %02x %02x -- (%02d %04d) : %s\n",
9757 opc1
, opc2
, opc1
, opc2
, handler
->oname
);
9762 if (handler
->handler
!= &gen_invalid
) {
9763 printf("INSN: %02x -- -- (%02d ----) : %s\n",
9764 opc1
, opc1
, handler
->oname
);
9771 static int gdb_get_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9774 stfq_p(mem_buf
, env
->fpr
[n
]);
9778 stl_p(mem_buf
, env
->fpscr
);
9784 static int gdb_set_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9787 env
->fpr
[n
] = ldfq_p(mem_buf
);
9791 /* FPSCR not implemented */
9797 static int gdb_get_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9800 #ifdef HOST_WORDS_BIGENDIAN
9801 stq_p(mem_buf
, env
->avr
[n
].u64
[0]);
9802 stq_p(mem_buf
+8, env
->avr
[n
].u64
[1]);
9804 stq_p(mem_buf
, env
->avr
[n
].u64
[1]);
9805 stq_p(mem_buf
+8, env
->avr
[n
].u64
[0]);
9810 stl_p(mem_buf
, env
->vscr
);
9814 stl_p(mem_buf
, (uint32_t)env
->spr
[SPR_VRSAVE
]);
9820 static int gdb_set_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9823 #ifdef HOST_WORDS_BIGENDIAN
9824 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
);
9825 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
+8);
9827 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
);
9828 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
+8);
9833 env
->vscr
= ldl_p(mem_buf
);
9837 env
->spr
[SPR_VRSAVE
] = (target_ulong
)ldl_p(mem_buf
);
9843 static int gdb_get_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9846 #if defined(TARGET_PPC64)
9847 stl_p(mem_buf
, env
->gpr
[n
] >> 32);
9849 stl_p(mem_buf
, env
->gprh
[n
]);
9854 stq_p(mem_buf
, env
->spe_acc
);
9858 stl_p(mem_buf
, env
->spe_fscr
);
9864 static int gdb_set_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9867 #if defined(TARGET_PPC64)
9868 target_ulong lo
= (uint32_t)env
->gpr
[n
];
9869 target_ulong hi
= (target_ulong
)ldl_p(mem_buf
) << 32;
9870 env
->gpr
[n
] = lo
| hi
;
9872 env
->gprh
[n
] = ldl_p(mem_buf
);
9877 env
->spe_acc
= ldq_p(mem_buf
);
9881 env
->spe_fscr
= ldl_p(mem_buf
);
9887 int cpu_ppc_register_internal (CPUPPCState
*env
, const ppc_def_t
*def
)
9889 env
->msr_mask
= def
->msr_mask
;
9890 env
->mmu_model
= def
->mmu_model
;
9891 env
->excp_model
= def
->excp_model
;
9892 env
->bus_model
= def
->bus_model
;
9893 env
->insns_flags
= def
->insns_flags
;
9894 env
->insns_flags2
= def
->insns_flags2
;
9895 if (!kvm_enabled()) {
9896 /* TCG doesn't (yet) emulate some groups of instructions that
9897 * are implemented on some otherwise supported CPUs (e.g. VSX
9898 * and decimal floating point instructions on POWER7). We
9899 * remove unsupported instruction groups from the cpu state's
9900 * instruction masks and hope the guest can cope. For at
9901 * least the pseries machine, the unavailability of these
9902 * instructions can be advertise to the guest via the device
9905 * FIXME: we should have a similar masking for CPU features
9906 * not accessible under KVM, but so far, there aren't any of
9908 env
->insns_flags
&= PPC_TCG_INSNS
;
9909 env
->insns_flags2
&= PPC_TCG_INSNS2
;
9911 env
->flags
= def
->flags
;
9912 env
->bfd_mach
= def
->bfd_mach
;
9913 env
->check_pow
= def
->check_pow
;
9914 if (create_ppc_opcodes(env
, def
) < 0)
9916 init_ppc_proc(env
, def
);
9918 if (def
->insns_flags
& PPC_FLOAT
) {
9919 gdb_register_coprocessor(env
, gdb_get_float_reg
, gdb_set_float_reg
,
9920 33, "power-fpu.xml", 0);
9922 if (def
->insns_flags
& PPC_ALTIVEC
) {
9923 gdb_register_coprocessor(env
, gdb_get_avr_reg
, gdb_set_avr_reg
,
9924 34, "power-altivec.xml", 0);
9926 if (def
->insns_flags
& PPC_SPE
) {
9927 gdb_register_coprocessor(env
, gdb_get_spe_reg
, gdb_set_spe_reg
,
9928 34, "power-spe.xml", 0);
9931 #if defined(PPC_DUMP_CPU)
9933 const char *mmu_model
, *excp_model
, *bus_model
;
9934 switch (env
->mmu_model
) {
9935 case POWERPC_MMU_32B
:
9936 mmu_model
= "PowerPC 32";
9938 case POWERPC_MMU_SOFT_6xx
:
9939 mmu_model
= "PowerPC 6xx/7xx with software driven TLBs";
9941 case POWERPC_MMU_SOFT_74xx
:
9942 mmu_model
= "PowerPC 74xx with software driven TLBs";
9944 case POWERPC_MMU_SOFT_4xx
:
9945 mmu_model
= "PowerPC 4xx with software driven TLBs";
9947 case POWERPC_MMU_SOFT_4xx_Z
:
9948 mmu_model
= "PowerPC 4xx with software driven TLBs "
9949 "and zones protections";
9951 case POWERPC_MMU_REAL
:
9952 mmu_model
= "PowerPC real mode only";
9954 case POWERPC_MMU_MPC8xx
:
9955 mmu_model
= "PowerPC MPC8xx";
9957 case POWERPC_MMU_BOOKE
:
9958 mmu_model
= "PowerPC BookE";
9960 case POWERPC_MMU_BOOKE206
:
9961 mmu_model
= "PowerPC BookE 2.06";
9963 case POWERPC_MMU_601
:
9964 mmu_model
= "PowerPC 601";
9966 #if defined (TARGET_PPC64)
9967 case POWERPC_MMU_64B
:
9968 mmu_model
= "PowerPC 64";
9970 case POWERPC_MMU_620
:
9971 mmu_model
= "PowerPC 620";
9975 mmu_model
= "Unknown or invalid";
9978 switch (env
->excp_model
) {
9979 case POWERPC_EXCP_STD
:
9980 excp_model
= "PowerPC";
9982 case POWERPC_EXCP_40x
:
9983 excp_model
= "PowerPC 40x";
9985 case POWERPC_EXCP_601
:
9986 excp_model
= "PowerPC 601";
9988 case POWERPC_EXCP_602
:
9989 excp_model
= "PowerPC 602";
9991 case POWERPC_EXCP_603
:
9992 excp_model
= "PowerPC 603";
9994 case POWERPC_EXCP_603E
:
9995 excp_model
= "PowerPC 603e";
9997 case POWERPC_EXCP_604
:
9998 excp_model
= "PowerPC 604";
10000 case POWERPC_EXCP_7x0
:
10001 excp_model
= "PowerPC 740/750";
10003 case POWERPC_EXCP_7x5
:
10004 excp_model
= "PowerPC 745/755";
10006 case POWERPC_EXCP_74xx
:
10007 excp_model
= "PowerPC 74xx";
10009 case POWERPC_EXCP_BOOKE
:
10010 excp_model
= "PowerPC BookE";
10012 #if defined (TARGET_PPC64)
10013 case POWERPC_EXCP_970
:
10014 excp_model
= "PowerPC 970";
10018 excp_model
= "Unknown or invalid";
10021 switch (env
->bus_model
) {
10022 case PPC_FLAGS_INPUT_6xx
:
10023 bus_model
= "PowerPC 6xx";
10025 case PPC_FLAGS_INPUT_BookE
:
10026 bus_model
= "PowerPC BookE";
10028 case PPC_FLAGS_INPUT_405
:
10029 bus_model
= "PowerPC 405";
10031 case PPC_FLAGS_INPUT_401
:
10032 bus_model
= "PowerPC 401/403";
10034 case PPC_FLAGS_INPUT_RCPU
:
10035 bus_model
= "RCPU / MPC8xx";
10037 #if defined (TARGET_PPC64)
10038 case PPC_FLAGS_INPUT_970
:
10039 bus_model
= "PowerPC 970";
10043 bus_model
= "Unknown or invalid";
10046 printf("PowerPC %-12s : PVR %08x MSR %016" PRIx64
"\n"
10047 " MMU model : %s\n",
10048 def
->name
, def
->pvr
, def
->msr_mask
, mmu_model
);
10049 #if !defined(CONFIG_USER_ONLY)
10050 if (env
->tlb
!= NULL
) {
10051 printf(" %d %s TLB in %d ways\n",
10052 env
->nb_tlb
, env
->id_tlbs
? "splitted" : "merged",
10056 printf(" Exceptions model : %s\n"
10057 " Bus model : %s\n",
10058 excp_model
, bus_model
);
10059 printf(" MSR features :\n");
10060 if (env
->flags
& POWERPC_FLAG_SPE
)
10061 printf(" signal processing engine enable"
10063 else if (env
->flags
& POWERPC_FLAG_VRE
)
10064 printf(" vector processor enable\n");
10065 if (env
->flags
& POWERPC_FLAG_TGPR
)
10066 printf(" temporary GPRs\n");
10067 else if (env
->flags
& POWERPC_FLAG_CE
)
10068 printf(" critical input enable\n");
10069 if (env
->flags
& POWERPC_FLAG_SE
)
10070 printf(" single-step trace mode\n");
10071 else if (env
->flags
& POWERPC_FLAG_DWE
)
10072 printf(" debug wait enable\n");
10073 else if (env
->flags
& POWERPC_FLAG_UBLE
)
10074 printf(" user BTB lock enable\n");
10075 if (env
->flags
& POWERPC_FLAG_BE
)
10076 printf(" branch-step trace mode\n");
10077 else if (env
->flags
& POWERPC_FLAG_DE
)
10078 printf(" debug interrupt enable\n");
10079 if (env
->flags
& POWERPC_FLAG_PX
)
10080 printf(" inclusive protection\n");
10081 else if (env
->flags
& POWERPC_FLAG_PMM
)
10082 printf(" performance monitor mark\n");
10083 if (env
->flags
== POWERPC_FLAG_NONE
)
10085 printf(" Time-base/decrementer clock source: %s\n",
10086 env
->flags
& POWERPC_FLAG_RTC_CLK
? "RTC clock" : "bus clock");
10088 dump_ppc_insns(env
);
10089 dump_ppc_sprs(env
);
10096 static bool ppc_cpu_usable(const ppc_def_t
*def
)
10098 #if defined(TARGET_PPCEMB)
10099 /* When using the ppcemb target, we only support 440 style cores */
10100 if (def
->mmu_model
!= POWERPC_MMU_BOOKE
) {
10108 const ppc_def_t
*ppc_find_by_pvr(uint32_t pvr
)
10112 for (i
= 0; i
< ARRAY_SIZE(ppc_defs
); i
++) {
10113 if (!ppc_cpu_usable(&ppc_defs
[i
])) {
10117 /* If we have an exact match, we're done */
10118 if (pvr
== ppc_defs
[i
].pvr
) {
10119 return &ppc_defs
[i
];
10128 const ppc_def_t
*cpu_ppc_find_by_name (const char *name
)
10130 const ppc_def_t
*ret
;
10134 if (kvm_enabled() && (strcasecmp(name
, "host") == 0)) {
10135 return kvmppc_host_cpu_def();
10138 /* Check if the given name is a PVR */
10139 len
= strlen(name
);
10140 if (len
== 10 && name
[0] == '0' && name
[1] == 'x') {
10143 } else if (len
== 8) {
10146 for (i
= 0; i
< 8; i
++) {
10147 if (!qemu_isxdigit(*p
++))
10151 return ppc_find_by_pvr(strtoul(name
, NULL
, 16));
10154 max
= ARRAY_SIZE(ppc_defs
);
10155 for (i
= 0; i
< max
; i
++) {
10156 if (!ppc_cpu_usable(&ppc_defs
[i
])) {
10160 if (strcasecmp(name
, ppc_defs
[i
].name
) == 0) {
10161 ret
= &ppc_defs
[i
];
10169 void ppc_cpu_list (FILE *f
, fprintf_function cpu_fprintf
)
10173 max
= ARRAY_SIZE(ppc_defs
);
10174 for (i
= 0; i
< max
; i
++) {
10175 if (!ppc_cpu_usable(&ppc_defs
[i
])) {
10179 (*cpu_fprintf
)(f
, "PowerPC %-16s PVR %08x\n",
10180 ppc_defs
[i
].name
, ppc_defs
[i
].pvr
);