2 * PowerPC CPU initialization for qemu.
4 * Copyright (c) 2003-2007 Jocelyn Mayer
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 /* A lot of PowerPC definition have been included here.
21 * Most of them are not usable for now but have been kept
22 * inside "#if defined(TODO) ... #endif" statements to make tests easier.
28 //#define PPC_DUMP_CPU
29 //#define PPC_DEBUG_SPR
30 //#define PPC_DUMP_SPR_ACCESSES
31 #if defined(CONFIG_USER_ONLY)
32 #define TODO_USER_ONLY 1
40 uint64_t insns_flags2
;
42 powerpc_mmu_t mmu_model
;
43 powerpc_excp_t excp_model
;
44 powerpc_input_t bus_model
;
47 void (*init_proc
)(CPUPPCState
*env
);
48 int (*check_pow
)(CPUPPCState
*env
);
51 /* For user-mode emulation, we don't emulate any IRQ controller */
52 #if defined(CONFIG_USER_ONLY)
53 #define PPC_IRQ_INIT_FN(name) \
54 static inline void glue(glue(ppc, name),_irq_init) (CPUPPCState *env) \
58 #define PPC_IRQ_INIT_FN(name) \
59 void glue(glue(ppc, name),_irq_init) (CPUPPCState *env);
65 PPC_IRQ_INIT_FN(POWER7
);
66 PPC_IRQ_INIT_FN(e500
);
69 * do nothing but store/retrieve spr value
71 static void spr_read_generic (void *opaque
, int gprn
, int sprn
)
73 gen_load_spr(cpu_gpr
[gprn
], sprn
);
74 #ifdef PPC_DUMP_SPR_ACCESSES
76 TCGv_i32 t0
= tcg_const_i32(sprn
);
77 gen_helper_load_dump_spr(t0
);
78 tcg_temp_free_i32(t0
);
83 static void spr_write_generic (void *opaque
, int sprn
, int gprn
)
85 gen_store_spr(sprn
, cpu_gpr
[gprn
]);
86 #ifdef PPC_DUMP_SPR_ACCESSES
88 TCGv_i32 t0
= tcg_const_i32(sprn
);
89 gen_helper_store_dump_spr(t0
);
90 tcg_temp_free_i32(t0
);
95 #if !defined(CONFIG_USER_ONLY)
96 static void spr_write_clear (void *opaque
, int sprn
, int gprn
)
98 TCGv t0
= tcg_temp_new();
99 TCGv t1
= tcg_temp_new();
100 gen_load_spr(t0
, sprn
);
101 tcg_gen_neg_tl(t1
, cpu_gpr
[gprn
]);
102 tcg_gen_and_tl(t0
, t0
, t1
);
103 gen_store_spr(sprn
, t0
);
109 /* SPR common to all PowerPC */
111 static void spr_read_xer (void *opaque
, int gprn
, int sprn
)
113 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_xer
);
116 static void spr_write_xer (void *opaque
, int sprn
, int gprn
)
118 tcg_gen_mov_tl(cpu_xer
, cpu_gpr
[gprn
]);
122 static void spr_read_lr (void *opaque
, int gprn
, int sprn
)
124 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_lr
);
127 static void spr_write_lr (void *opaque
, int sprn
, int gprn
)
129 tcg_gen_mov_tl(cpu_lr
, cpu_gpr
[gprn
]);
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
;
530 if (sprn
>= SPR_BOOKE_IVOR0
&& sprn
<= SPR_BOOKE_IVOR15
) {
531 TCGv t0
= tcg_temp_new();
532 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivor_mask
));
533 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
534 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_vectors
[sprn
- SPR_BOOKE_IVOR0
]));
535 gen_store_spr(sprn
, t0
);
537 } else if (sprn
>= SPR_BOOKE_IVOR32
&& sprn
<= SPR_BOOKE_IVOR37
) {
538 TCGv t0
= tcg_temp_new();
539 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivor_mask
));
540 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
541 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_vectors
[sprn
- SPR_BOOKE_IVOR32
+ 32]));
542 gen_store_spr(sprn
, t0
);
545 printf("Trying to write an unknown exception vector %d %03x\n",
547 gen_inval_exception(ctx
, POWERPC_EXCP_PRIV_REG
);
552 static inline void vscr_init (CPUPPCState
*env
, uint32_t val
)
555 /* Altivec always uses round-to-nearest */
556 set_float_rounding_mode(float_round_nearest_even
, &env
->vec_status
);
557 set_flush_to_zero(vscr_nj
, &env
->vec_status
);
560 #if defined(CONFIG_USER_ONLY)
561 #define spr_register(env, num, name, uea_read, uea_write, \
562 oea_read, oea_write, initial_value) \
564 _spr_register(env, num, name, uea_read, uea_write, initial_value); \
566 static inline void _spr_register (CPUPPCState
*env
, int num
,
568 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
569 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
570 target_ulong initial_value
)
572 static inline void spr_register (CPUPPCState
*env
, int num
,
574 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
575 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
576 void (*oea_read
)(void *opaque
, int gprn
, int sprn
),
577 void (*oea_write
)(void *opaque
, int sprn
, int gprn
),
578 target_ulong initial_value
)
583 spr
= &env
->spr_cb
[num
];
584 if (spr
->name
!= NULL
||env
-> spr
[num
] != 0x00000000 ||
585 #if !defined(CONFIG_USER_ONLY)
586 spr
->oea_read
!= NULL
|| spr
->oea_write
!= NULL
||
588 spr
->uea_read
!= NULL
|| spr
->uea_write
!= NULL
) {
589 printf("Error: Trying to register SPR %d (%03x) twice !\n", num
, num
);
592 #if defined(PPC_DEBUG_SPR)
593 printf("*** register spr %d (%03x) %s val " TARGET_FMT_lx
"\n", num
, num
,
594 name
, initial_value
);
597 spr
->uea_read
= uea_read
;
598 spr
->uea_write
= uea_write
;
599 #if !defined(CONFIG_USER_ONLY)
600 spr
->oea_read
= oea_read
;
601 spr
->oea_write
= oea_write
;
603 env
->spr
[num
] = initial_value
;
606 /* Generic PowerPC SPRs */
607 static void gen_spr_generic (CPUPPCState
*env
)
609 /* Integer processing */
610 spr_register(env
, SPR_XER
, "XER",
611 &spr_read_xer
, &spr_write_xer
,
612 &spr_read_xer
, &spr_write_xer
,
615 spr_register(env
, SPR_LR
, "LR",
616 &spr_read_lr
, &spr_write_lr
,
617 &spr_read_lr
, &spr_write_lr
,
619 spr_register(env
, SPR_CTR
, "CTR",
620 &spr_read_ctr
, &spr_write_ctr
,
621 &spr_read_ctr
, &spr_write_ctr
,
623 /* Interrupt processing */
624 spr_register(env
, SPR_SRR0
, "SRR0",
625 SPR_NOACCESS
, SPR_NOACCESS
,
626 &spr_read_generic
, &spr_write_generic
,
628 spr_register(env
, SPR_SRR1
, "SRR1",
629 SPR_NOACCESS
, SPR_NOACCESS
,
630 &spr_read_generic
, &spr_write_generic
,
632 /* Processor control */
633 spr_register(env
, SPR_SPRG0
, "SPRG0",
634 SPR_NOACCESS
, SPR_NOACCESS
,
635 &spr_read_generic
, &spr_write_generic
,
637 spr_register(env
, SPR_SPRG1
, "SPRG1",
638 SPR_NOACCESS
, SPR_NOACCESS
,
639 &spr_read_generic
, &spr_write_generic
,
641 spr_register(env
, SPR_SPRG2
, "SPRG2",
642 SPR_NOACCESS
, SPR_NOACCESS
,
643 &spr_read_generic
, &spr_write_generic
,
645 spr_register(env
, SPR_SPRG3
, "SPRG3",
646 SPR_NOACCESS
, SPR_NOACCESS
,
647 &spr_read_generic
, &spr_write_generic
,
651 /* SPR common to all non-embedded PowerPC, including 601 */
652 static void gen_spr_ne_601 (CPUPPCState
*env
)
654 /* Exception processing */
655 spr_register(env
, SPR_DSISR
, "DSISR",
656 SPR_NOACCESS
, SPR_NOACCESS
,
657 &spr_read_generic
, &spr_write_generic
,
659 spr_register(env
, SPR_DAR
, "DAR",
660 SPR_NOACCESS
, SPR_NOACCESS
,
661 &spr_read_generic
, &spr_write_generic
,
664 spr_register(env
, SPR_DECR
, "DECR",
665 SPR_NOACCESS
, SPR_NOACCESS
,
666 &spr_read_decr
, &spr_write_decr
,
668 /* Memory management */
669 spr_register(env
, SPR_SDR1
, "SDR1",
670 SPR_NOACCESS
, SPR_NOACCESS
,
671 &spr_read_generic
, &spr_write_sdr1
,
676 static void gen_low_BATs (CPUPPCState
*env
)
678 #if !defined(CONFIG_USER_ONLY)
679 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
680 SPR_NOACCESS
, SPR_NOACCESS
,
681 &spr_read_ibat
, &spr_write_ibatu
,
683 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
684 SPR_NOACCESS
, SPR_NOACCESS
,
685 &spr_read_ibat
, &spr_write_ibatl
,
687 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
688 SPR_NOACCESS
, SPR_NOACCESS
,
689 &spr_read_ibat
, &spr_write_ibatu
,
691 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
692 SPR_NOACCESS
, SPR_NOACCESS
,
693 &spr_read_ibat
, &spr_write_ibatl
,
695 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
696 SPR_NOACCESS
, SPR_NOACCESS
,
697 &spr_read_ibat
, &spr_write_ibatu
,
699 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
700 SPR_NOACCESS
, SPR_NOACCESS
,
701 &spr_read_ibat
, &spr_write_ibatl
,
703 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
704 SPR_NOACCESS
, SPR_NOACCESS
,
705 &spr_read_ibat
, &spr_write_ibatu
,
707 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
708 SPR_NOACCESS
, SPR_NOACCESS
,
709 &spr_read_ibat
, &spr_write_ibatl
,
711 spr_register(env
, SPR_DBAT0U
, "DBAT0U",
712 SPR_NOACCESS
, SPR_NOACCESS
,
713 &spr_read_dbat
, &spr_write_dbatu
,
715 spr_register(env
, SPR_DBAT0L
, "DBAT0L",
716 SPR_NOACCESS
, SPR_NOACCESS
,
717 &spr_read_dbat
, &spr_write_dbatl
,
719 spr_register(env
, SPR_DBAT1U
, "DBAT1U",
720 SPR_NOACCESS
, SPR_NOACCESS
,
721 &spr_read_dbat
, &spr_write_dbatu
,
723 spr_register(env
, SPR_DBAT1L
, "DBAT1L",
724 SPR_NOACCESS
, SPR_NOACCESS
,
725 &spr_read_dbat
, &spr_write_dbatl
,
727 spr_register(env
, SPR_DBAT2U
, "DBAT2U",
728 SPR_NOACCESS
, SPR_NOACCESS
,
729 &spr_read_dbat
, &spr_write_dbatu
,
731 spr_register(env
, SPR_DBAT2L
, "DBAT2L",
732 SPR_NOACCESS
, SPR_NOACCESS
,
733 &spr_read_dbat
, &spr_write_dbatl
,
735 spr_register(env
, SPR_DBAT3U
, "DBAT3U",
736 SPR_NOACCESS
, SPR_NOACCESS
,
737 &spr_read_dbat
, &spr_write_dbatu
,
739 spr_register(env
, SPR_DBAT3L
, "DBAT3L",
740 SPR_NOACCESS
, SPR_NOACCESS
,
741 &spr_read_dbat
, &spr_write_dbatl
,
748 static void gen_high_BATs (CPUPPCState
*env
)
750 #if !defined(CONFIG_USER_ONLY)
751 spr_register(env
, SPR_IBAT4U
, "IBAT4U",
752 SPR_NOACCESS
, SPR_NOACCESS
,
753 &spr_read_ibat_h
, &spr_write_ibatu_h
,
755 spr_register(env
, SPR_IBAT4L
, "IBAT4L",
756 SPR_NOACCESS
, SPR_NOACCESS
,
757 &spr_read_ibat_h
, &spr_write_ibatl_h
,
759 spr_register(env
, SPR_IBAT5U
, "IBAT5U",
760 SPR_NOACCESS
, SPR_NOACCESS
,
761 &spr_read_ibat_h
, &spr_write_ibatu_h
,
763 spr_register(env
, SPR_IBAT5L
, "IBAT5L",
764 SPR_NOACCESS
, SPR_NOACCESS
,
765 &spr_read_ibat_h
, &spr_write_ibatl_h
,
767 spr_register(env
, SPR_IBAT6U
, "IBAT6U",
768 SPR_NOACCESS
, SPR_NOACCESS
,
769 &spr_read_ibat_h
, &spr_write_ibatu_h
,
771 spr_register(env
, SPR_IBAT6L
, "IBAT6L",
772 SPR_NOACCESS
, SPR_NOACCESS
,
773 &spr_read_ibat_h
, &spr_write_ibatl_h
,
775 spr_register(env
, SPR_IBAT7U
, "IBAT7U",
776 SPR_NOACCESS
, SPR_NOACCESS
,
777 &spr_read_ibat_h
, &spr_write_ibatu_h
,
779 spr_register(env
, SPR_IBAT7L
, "IBAT7L",
780 SPR_NOACCESS
, SPR_NOACCESS
,
781 &spr_read_ibat_h
, &spr_write_ibatl_h
,
783 spr_register(env
, SPR_DBAT4U
, "DBAT4U",
784 SPR_NOACCESS
, SPR_NOACCESS
,
785 &spr_read_dbat_h
, &spr_write_dbatu_h
,
787 spr_register(env
, SPR_DBAT4L
, "DBAT4L",
788 SPR_NOACCESS
, SPR_NOACCESS
,
789 &spr_read_dbat_h
, &spr_write_dbatl_h
,
791 spr_register(env
, SPR_DBAT5U
, "DBAT5U",
792 SPR_NOACCESS
, SPR_NOACCESS
,
793 &spr_read_dbat_h
, &spr_write_dbatu_h
,
795 spr_register(env
, SPR_DBAT5L
, "DBAT5L",
796 SPR_NOACCESS
, SPR_NOACCESS
,
797 &spr_read_dbat_h
, &spr_write_dbatl_h
,
799 spr_register(env
, SPR_DBAT6U
, "DBAT6U",
800 SPR_NOACCESS
, SPR_NOACCESS
,
801 &spr_read_dbat_h
, &spr_write_dbatu_h
,
803 spr_register(env
, SPR_DBAT6L
, "DBAT6L",
804 SPR_NOACCESS
, SPR_NOACCESS
,
805 &spr_read_dbat_h
, &spr_write_dbatl_h
,
807 spr_register(env
, SPR_DBAT7U
, "DBAT7U",
808 SPR_NOACCESS
, SPR_NOACCESS
,
809 &spr_read_dbat_h
, &spr_write_dbatu_h
,
811 spr_register(env
, SPR_DBAT7L
, "DBAT7L",
812 SPR_NOACCESS
, SPR_NOACCESS
,
813 &spr_read_dbat_h
, &spr_write_dbatl_h
,
819 /* Generic PowerPC time base */
820 static void gen_tbl (CPUPPCState
*env
)
822 spr_register(env
, SPR_VTBL
, "TBL",
823 &spr_read_tbl
, SPR_NOACCESS
,
824 &spr_read_tbl
, SPR_NOACCESS
,
826 spr_register(env
, SPR_TBL
, "TBL",
827 &spr_read_tbl
, SPR_NOACCESS
,
828 &spr_read_tbl
, &spr_write_tbl
,
830 spr_register(env
, SPR_VTBU
, "TBU",
831 &spr_read_tbu
, SPR_NOACCESS
,
832 &spr_read_tbu
, SPR_NOACCESS
,
834 spr_register(env
, SPR_TBU
, "TBU",
835 &spr_read_tbu
, SPR_NOACCESS
,
836 &spr_read_tbu
, &spr_write_tbu
,
840 /* Softare table search registers */
841 static void gen_6xx_7xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
843 #if !defined(CONFIG_USER_ONLY)
844 env
->nb_tlb
= nb_tlbs
;
845 env
->nb_ways
= nb_ways
;
847 env
->tlb_type
= TLB_6XX
;
848 spr_register(env
, SPR_DMISS
, "DMISS",
849 SPR_NOACCESS
, SPR_NOACCESS
,
850 &spr_read_generic
, SPR_NOACCESS
,
852 spr_register(env
, SPR_DCMP
, "DCMP",
853 SPR_NOACCESS
, SPR_NOACCESS
,
854 &spr_read_generic
, SPR_NOACCESS
,
856 spr_register(env
, SPR_HASH1
, "HASH1",
857 SPR_NOACCESS
, SPR_NOACCESS
,
858 &spr_read_generic
, SPR_NOACCESS
,
860 spr_register(env
, SPR_HASH2
, "HASH2",
861 SPR_NOACCESS
, SPR_NOACCESS
,
862 &spr_read_generic
, SPR_NOACCESS
,
864 spr_register(env
, SPR_IMISS
, "IMISS",
865 SPR_NOACCESS
, SPR_NOACCESS
,
866 &spr_read_generic
, SPR_NOACCESS
,
868 spr_register(env
, SPR_ICMP
, "ICMP",
869 SPR_NOACCESS
, SPR_NOACCESS
,
870 &spr_read_generic
, SPR_NOACCESS
,
872 spr_register(env
, SPR_RPA
, "RPA",
873 SPR_NOACCESS
, SPR_NOACCESS
,
874 &spr_read_generic
, &spr_write_generic
,
879 /* SPR common to MPC755 and G2 */
880 static void gen_spr_G2_755 (CPUPPCState
*env
)
883 spr_register(env
, SPR_SPRG4
, "SPRG4",
884 SPR_NOACCESS
, SPR_NOACCESS
,
885 &spr_read_generic
, &spr_write_generic
,
887 spr_register(env
, SPR_SPRG5
, "SPRG5",
888 SPR_NOACCESS
, SPR_NOACCESS
,
889 &spr_read_generic
, &spr_write_generic
,
891 spr_register(env
, SPR_SPRG6
, "SPRG6",
892 SPR_NOACCESS
, SPR_NOACCESS
,
893 &spr_read_generic
, &spr_write_generic
,
895 spr_register(env
, SPR_SPRG7
, "SPRG7",
896 SPR_NOACCESS
, SPR_NOACCESS
,
897 &spr_read_generic
, &spr_write_generic
,
901 /* SPR common to all 7xx PowerPC implementations */
902 static void gen_spr_7xx (CPUPPCState
*env
)
905 /* XXX : not implemented */
906 spr_register(env
, SPR_DABR
, "DABR",
907 SPR_NOACCESS
, SPR_NOACCESS
,
908 &spr_read_generic
, &spr_write_generic
,
910 /* XXX : not implemented */
911 spr_register(env
, SPR_IABR
, "IABR",
912 SPR_NOACCESS
, SPR_NOACCESS
,
913 &spr_read_generic
, &spr_write_generic
,
915 /* Cache management */
916 /* XXX : not implemented */
917 spr_register(env
, SPR_ICTC
, "ICTC",
918 SPR_NOACCESS
, SPR_NOACCESS
,
919 &spr_read_generic
, &spr_write_generic
,
921 /* Performance monitors */
922 /* XXX : not implemented */
923 spr_register(env
, SPR_MMCR0
, "MMCR0",
924 SPR_NOACCESS
, SPR_NOACCESS
,
925 &spr_read_generic
, &spr_write_generic
,
927 /* XXX : not implemented */
928 spr_register(env
, SPR_MMCR1
, "MMCR1",
929 SPR_NOACCESS
, SPR_NOACCESS
,
930 &spr_read_generic
, &spr_write_generic
,
932 /* XXX : not implemented */
933 spr_register(env
, SPR_PMC1
, "PMC1",
934 SPR_NOACCESS
, SPR_NOACCESS
,
935 &spr_read_generic
, &spr_write_generic
,
937 /* XXX : not implemented */
938 spr_register(env
, SPR_PMC2
, "PMC2",
939 SPR_NOACCESS
, SPR_NOACCESS
,
940 &spr_read_generic
, &spr_write_generic
,
942 /* XXX : not implemented */
943 spr_register(env
, SPR_PMC3
, "PMC3",
944 SPR_NOACCESS
, SPR_NOACCESS
,
945 &spr_read_generic
, &spr_write_generic
,
947 /* XXX : not implemented */
948 spr_register(env
, SPR_PMC4
, "PMC4",
949 SPR_NOACCESS
, SPR_NOACCESS
,
950 &spr_read_generic
, &spr_write_generic
,
952 /* XXX : not implemented */
953 spr_register(env
, SPR_SIAR
, "SIAR",
954 SPR_NOACCESS
, SPR_NOACCESS
,
955 &spr_read_generic
, SPR_NOACCESS
,
957 /* XXX : not implemented */
958 spr_register(env
, SPR_UMMCR0
, "UMMCR0",
959 &spr_read_ureg
, SPR_NOACCESS
,
960 &spr_read_ureg
, SPR_NOACCESS
,
962 /* XXX : not implemented */
963 spr_register(env
, SPR_UMMCR1
, "UMMCR1",
964 &spr_read_ureg
, SPR_NOACCESS
,
965 &spr_read_ureg
, SPR_NOACCESS
,
967 /* XXX : not implemented */
968 spr_register(env
, SPR_UPMC1
, "UPMC1",
969 &spr_read_ureg
, SPR_NOACCESS
,
970 &spr_read_ureg
, SPR_NOACCESS
,
972 /* XXX : not implemented */
973 spr_register(env
, SPR_UPMC2
, "UPMC2",
974 &spr_read_ureg
, SPR_NOACCESS
,
975 &spr_read_ureg
, SPR_NOACCESS
,
977 /* XXX : not implemented */
978 spr_register(env
, SPR_UPMC3
, "UPMC3",
979 &spr_read_ureg
, SPR_NOACCESS
,
980 &spr_read_ureg
, SPR_NOACCESS
,
982 /* XXX : not implemented */
983 spr_register(env
, SPR_UPMC4
, "UPMC4",
984 &spr_read_ureg
, SPR_NOACCESS
,
985 &spr_read_ureg
, SPR_NOACCESS
,
987 /* XXX : not implemented */
988 spr_register(env
, SPR_USIAR
, "USIAR",
989 &spr_read_ureg
, SPR_NOACCESS
,
990 &spr_read_ureg
, SPR_NOACCESS
,
992 /* External access control */
993 /* XXX : not implemented */
994 spr_register(env
, SPR_EAR
, "EAR",
995 SPR_NOACCESS
, SPR_NOACCESS
,
996 &spr_read_generic
, &spr_write_generic
,
1000 static void gen_spr_thrm (CPUPPCState
*env
)
1002 /* Thermal management */
1003 /* XXX : not implemented */
1004 spr_register(env
, SPR_THRM1
, "THRM1",
1005 SPR_NOACCESS
, SPR_NOACCESS
,
1006 &spr_read_generic
, &spr_write_generic
,
1008 /* XXX : not implemented */
1009 spr_register(env
, SPR_THRM2
, "THRM2",
1010 SPR_NOACCESS
, SPR_NOACCESS
,
1011 &spr_read_generic
, &spr_write_generic
,
1013 /* XXX : not implemented */
1014 spr_register(env
, SPR_THRM3
, "THRM3",
1015 SPR_NOACCESS
, SPR_NOACCESS
,
1016 &spr_read_generic
, &spr_write_generic
,
1020 /* SPR specific to PowerPC 604 implementation */
1021 static void gen_spr_604 (CPUPPCState
*env
)
1023 /* Processor identification */
1024 spr_register(env
, SPR_PIR
, "PIR",
1025 SPR_NOACCESS
, SPR_NOACCESS
,
1026 &spr_read_generic
, &spr_write_pir
,
1029 /* XXX : not implemented */
1030 spr_register(env
, SPR_IABR
, "IABR",
1031 SPR_NOACCESS
, SPR_NOACCESS
,
1032 &spr_read_generic
, &spr_write_generic
,
1034 /* XXX : not implemented */
1035 spr_register(env
, SPR_DABR
, "DABR",
1036 SPR_NOACCESS
, SPR_NOACCESS
,
1037 &spr_read_generic
, &spr_write_generic
,
1039 /* Performance counters */
1040 /* XXX : not implemented */
1041 spr_register(env
, SPR_MMCR0
, "MMCR0",
1042 SPR_NOACCESS
, SPR_NOACCESS
,
1043 &spr_read_generic
, &spr_write_generic
,
1045 /* XXX : not implemented */
1046 spr_register(env
, SPR_PMC1
, "PMC1",
1047 SPR_NOACCESS
, SPR_NOACCESS
,
1048 &spr_read_generic
, &spr_write_generic
,
1050 /* XXX : not implemented */
1051 spr_register(env
, SPR_PMC2
, "PMC2",
1052 SPR_NOACCESS
, SPR_NOACCESS
,
1053 &spr_read_generic
, &spr_write_generic
,
1055 /* XXX : not implemented */
1056 spr_register(env
, SPR_SIAR
, "SIAR",
1057 SPR_NOACCESS
, SPR_NOACCESS
,
1058 &spr_read_generic
, SPR_NOACCESS
,
1060 /* XXX : not implemented */
1061 spr_register(env
, SPR_SDA
, "SDA",
1062 SPR_NOACCESS
, SPR_NOACCESS
,
1063 &spr_read_generic
, SPR_NOACCESS
,
1065 /* External access control */
1066 /* XXX : not implemented */
1067 spr_register(env
, SPR_EAR
, "EAR",
1068 SPR_NOACCESS
, SPR_NOACCESS
,
1069 &spr_read_generic
, &spr_write_generic
,
1073 /* SPR specific to PowerPC 603 implementation */
1074 static void gen_spr_603 (CPUPPCState
*env
)
1076 /* External access control */
1077 /* XXX : not implemented */
1078 spr_register(env
, SPR_EAR
, "EAR",
1079 SPR_NOACCESS
, SPR_NOACCESS
,
1080 &spr_read_generic
, &spr_write_generic
,
1084 /* SPR specific to PowerPC G2 implementation */
1085 static void gen_spr_G2 (CPUPPCState
*env
)
1087 /* Memory base address */
1089 /* XXX : not implemented */
1090 spr_register(env
, SPR_MBAR
, "MBAR",
1091 SPR_NOACCESS
, SPR_NOACCESS
,
1092 &spr_read_generic
, &spr_write_generic
,
1094 /* Exception processing */
1095 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1096 SPR_NOACCESS
, SPR_NOACCESS
,
1097 &spr_read_generic
, &spr_write_generic
,
1099 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1100 SPR_NOACCESS
, SPR_NOACCESS
,
1101 &spr_read_generic
, &spr_write_generic
,
1104 /* XXX : not implemented */
1105 spr_register(env
, SPR_DABR
, "DABR",
1106 SPR_NOACCESS
, SPR_NOACCESS
,
1107 &spr_read_generic
, &spr_write_generic
,
1109 /* XXX : not implemented */
1110 spr_register(env
, SPR_DABR2
, "DABR2",
1111 SPR_NOACCESS
, SPR_NOACCESS
,
1112 &spr_read_generic
, &spr_write_generic
,
1114 /* XXX : not implemented */
1115 spr_register(env
, SPR_IABR
, "IABR",
1116 SPR_NOACCESS
, SPR_NOACCESS
,
1117 &spr_read_generic
, &spr_write_generic
,
1119 /* XXX : not implemented */
1120 spr_register(env
, SPR_IABR2
, "IABR2",
1121 SPR_NOACCESS
, SPR_NOACCESS
,
1122 &spr_read_generic
, &spr_write_generic
,
1124 /* XXX : not implemented */
1125 spr_register(env
, SPR_IBCR
, "IBCR",
1126 SPR_NOACCESS
, SPR_NOACCESS
,
1127 &spr_read_generic
, &spr_write_generic
,
1129 /* XXX : not implemented */
1130 spr_register(env
, SPR_DBCR
, "DBCR",
1131 SPR_NOACCESS
, SPR_NOACCESS
,
1132 &spr_read_generic
, &spr_write_generic
,
1136 /* SPR specific to PowerPC 602 implementation */
1137 static void gen_spr_602 (CPUPPCState
*env
)
1140 /* XXX : not implemented */
1141 spr_register(env
, SPR_SER
, "SER",
1142 SPR_NOACCESS
, SPR_NOACCESS
,
1143 &spr_read_generic
, &spr_write_generic
,
1145 /* XXX : not implemented */
1146 spr_register(env
, SPR_SEBR
, "SEBR",
1147 SPR_NOACCESS
, SPR_NOACCESS
,
1148 &spr_read_generic
, &spr_write_generic
,
1150 /* XXX : not implemented */
1151 spr_register(env
, SPR_ESASRR
, "ESASRR",
1152 SPR_NOACCESS
, SPR_NOACCESS
,
1153 &spr_read_generic
, &spr_write_generic
,
1155 /* Floating point status */
1156 /* XXX : not implemented */
1157 spr_register(env
, SPR_SP
, "SP",
1158 SPR_NOACCESS
, SPR_NOACCESS
,
1159 &spr_read_generic
, &spr_write_generic
,
1161 /* XXX : not implemented */
1162 spr_register(env
, SPR_LT
, "LT",
1163 SPR_NOACCESS
, SPR_NOACCESS
,
1164 &spr_read_generic
, &spr_write_generic
,
1166 /* Watchdog timer */
1167 /* XXX : not implemented */
1168 spr_register(env
, SPR_TCR
, "TCR",
1169 SPR_NOACCESS
, SPR_NOACCESS
,
1170 &spr_read_generic
, &spr_write_generic
,
1172 /* Interrupt base */
1173 spr_register(env
, SPR_IBR
, "IBR",
1174 SPR_NOACCESS
, SPR_NOACCESS
,
1175 &spr_read_generic
, &spr_write_generic
,
1177 /* XXX : not implemented */
1178 spr_register(env
, SPR_IABR
, "IABR",
1179 SPR_NOACCESS
, SPR_NOACCESS
,
1180 &spr_read_generic
, &spr_write_generic
,
1184 /* SPR specific to PowerPC 601 implementation */
1185 static void gen_spr_601 (CPUPPCState
*env
)
1187 /* Multiplication/division register */
1189 spr_register(env
, SPR_MQ
, "MQ",
1190 &spr_read_generic
, &spr_write_generic
,
1191 &spr_read_generic
, &spr_write_generic
,
1194 spr_register(env
, SPR_601_RTCU
, "RTCU",
1195 SPR_NOACCESS
, SPR_NOACCESS
,
1196 SPR_NOACCESS
, &spr_write_601_rtcu
,
1198 spr_register(env
, SPR_601_VRTCU
, "RTCU",
1199 &spr_read_601_rtcu
, SPR_NOACCESS
,
1200 &spr_read_601_rtcu
, SPR_NOACCESS
,
1202 spr_register(env
, SPR_601_RTCL
, "RTCL",
1203 SPR_NOACCESS
, SPR_NOACCESS
,
1204 SPR_NOACCESS
, &spr_write_601_rtcl
,
1206 spr_register(env
, SPR_601_VRTCL
, "RTCL",
1207 &spr_read_601_rtcl
, SPR_NOACCESS
,
1208 &spr_read_601_rtcl
, SPR_NOACCESS
,
1212 spr_register(env
, SPR_601_UDECR
, "UDECR",
1213 &spr_read_decr
, SPR_NOACCESS
,
1214 &spr_read_decr
, SPR_NOACCESS
,
1217 /* External access control */
1218 /* XXX : not implemented */
1219 spr_register(env
, SPR_EAR
, "EAR",
1220 SPR_NOACCESS
, SPR_NOACCESS
,
1221 &spr_read_generic
, &spr_write_generic
,
1223 /* Memory management */
1224 #if !defined(CONFIG_USER_ONLY)
1225 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
1226 SPR_NOACCESS
, SPR_NOACCESS
,
1227 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1229 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
1230 SPR_NOACCESS
, SPR_NOACCESS
,
1231 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1233 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
1234 SPR_NOACCESS
, SPR_NOACCESS
,
1235 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1237 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
1238 SPR_NOACCESS
, SPR_NOACCESS
,
1239 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1241 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
1242 SPR_NOACCESS
, SPR_NOACCESS
,
1243 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1245 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
1246 SPR_NOACCESS
, SPR_NOACCESS
,
1247 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1249 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
1250 SPR_NOACCESS
, SPR_NOACCESS
,
1251 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1253 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
1254 SPR_NOACCESS
, SPR_NOACCESS
,
1255 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1261 static void gen_spr_74xx (CPUPPCState
*env
)
1263 /* Processor identification */
1264 spr_register(env
, SPR_PIR
, "PIR",
1265 SPR_NOACCESS
, SPR_NOACCESS
,
1266 &spr_read_generic
, &spr_write_pir
,
1268 /* XXX : not implemented */
1269 spr_register(env
, SPR_MMCR2
, "MMCR2",
1270 SPR_NOACCESS
, SPR_NOACCESS
,
1271 &spr_read_generic
, &spr_write_generic
,
1273 /* XXX : not implemented */
1274 spr_register(env
, SPR_UMMCR2
, "UMMCR2",
1275 &spr_read_ureg
, SPR_NOACCESS
,
1276 &spr_read_ureg
, SPR_NOACCESS
,
1278 /* XXX: not implemented */
1279 spr_register(env
, SPR_BAMR
, "BAMR",
1280 SPR_NOACCESS
, SPR_NOACCESS
,
1281 &spr_read_generic
, &spr_write_generic
,
1283 /* XXX : not implemented */
1284 spr_register(env
, SPR_MSSCR0
, "MSSCR0",
1285 SPR_NOACCESS
, SPR_NOACCESS
,
1286 &spr_read_generic
, &spr_write_generic
,
1288 /* Hardware implementation registers */
1289 /* XXX : not implemented */
1290 spr_register(env
, SPR_HID0
, "HID0",
1291 SPR_NOACCESS
, SPR_NOACCESS
,
1292 &spr_read_generic
, &spr_write_generic
,
1294 /* XXX : not implemented */
1295 spr_register(env
, SPR_HID1
, "HID1",
1296 SPR_NOACCESS
, SPR_NOACCESS
,
1297 &spr_read_generic
, &spr_write_generic
,
1300 spr_register(env
, SPR_VRSAVE
, "VRSAVE",
1301 &spr_read_generic
, &spr_write_generic
,
1302 &spr_read_generic
, &spr_write_generic
,
1304 /* XXX : not implemented */
1305 spr_register(env
, SPR_L2CR
, "L2CR",
1306 SPR_NOACCESS
, SPR_NOACCESS
,
1307 &spr_read_generic
, &spr_write_generic
,
1309 /* Not strictly an SPR */
1310 vscr_init(env
, 0x00010000);
1313 static void gen_l3_ctrl (CPUPPCState
*env
)
1316 /* XXX : not implemented */
1317 spr_register(env
, SPR_L3CR
, "L3CR",
1318 SPR_NOACCESS
, SPR_NOACCESS
,
1319 &spr_read_generic
, &spr_write_generic
,
1322 /* XXX : not implemented */
1323 spr_register(env
, SPR_L3ITCR0
, "L3ITCR0",
1324 SPR_NOACCESS
, SPR_NOACCESS
,
1325 &spr_read_generic
, &spr_write_generic
,
1328 /* XXX : not implemented */
1329 spr_register(env
, SPR_L3PM
, "L3PM",
1330 SPR_NOACCESS
, SPR_NOACCESS
,
1331 &spr_read_generic
, &spr_write_generic
,
1335 static void gen_74xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
1337 #if !defined(CONFIG_USER_ONLY)
1338 env
->nb_tlb
= nb_tlbs
;
1339 env
->nb_ways
= nb_ways
;
1341 env
->tlb_type
= TLB_6XX
;
1342 /* XXX : not implemented */
1343 spr_register(env
, SPR_PTEHI
, "PTEHI",
1344 SPR_NOACCESS
, SPR_NOACCESS
,
1345 &spr_read_generic
, &spr_write_generic
,
1347 /* XXX : not implemented */
1348 spr_register(env
, SPR_PTELO
, "PTELO",
1349 SPR_NOACCESS
, SPR_NOACCESS
,
1350 &spr_read_generic
, &spr_write_generic
,
1352 /* XXX : not implemented */
1353 spr_register(env
, SPR_TLBMISS
, "TLBMISS",
1354 SPR_NOACCESS
, SPR_NOACCESS
,
1355 &spr_read_generic
, &spr_write_generic
,
1360 #if !defined(CONFIG_USER_ONLY)
1361 static void spr_write_e500_l1csr0 (void *opaque
, int sprn
, int gprn
)
1363 TCGv t0
= tcg_temp_new();
1365 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], ~256);
1366 gen_store_spr(sprn
, t0
);
1370 static void spr_write_booke206_mmucsr0 (void *opaque
, int sprn
, int gprn
)
1372 TCGv_i32 t0
= tcg_const_i32(sprn
);
1373 gen_helper_booke206_tlbflush(t0
);
1374 tcg_temp_free_i32(t0
);
1377 static void spr_write_booke_pid (void *opaque
, int sprn
, int gprn
)
1379 TCGv_i32 t0
= tcg_const_i32(sprn
);
1380 gen_helper_booke_setpid(t0
, cpu_gpr
[gprn
]);
1381 tcg_temp_free_i32(t0
);
1385 static void gen_spr_usprgh (CPUPPCState
*env
)
1387 spr_register(env
, SPR_USPRG4
, "USPRG4",
1388 &spr_read_ureg
, SPR_NOACCESS
,
1389 &spr_read_ureg
, SPR_NOACCESS
,
1391 spr_register(env
, SPR_USPRG5
, "USPRG5",
1392 &spr_read_ureg
, SPR_NOACCESS
,
1393 &spr_read_ureg
, SPR_NOACCESS
,
1395 spr_register(env
, SPR_USPRG6
, "USPRG6",
1396 &spr_read_ureg
, SPR_NOACCESS
,
1397 &spr_read_ureg
, SPR_NOACCESS
,
1399 spr_register(env
, SPR_USPRG7
, "USPRG7",
1400 &spr_read_ureg
, SPR_NOACCESS
,
1401 &spr_read_ureg
, SPR_NOACCESS
,
1405 /* PowerPC BookE SPR */
1406 static void gen_spr_BookE (CPUPPCState
*env
, uint64_t ivor_mask
)
1408 const char *ivor_names
[64] = {
1409 "IVOR0", "IVOR1", "IVOR2", "IVOR3",
1410 "IVOR4", "IVOR5", "IVOR6", "IVOR7",
1411 "IVOR8", "IVOR9", "IVOR10", "IVOR11",
1412 "IVOR12", "IVOR13", "IVOR14", "IVOR15",
1413 "IVOR16", "IVOR17", "IVOR18", "IVOR19",
1414 "IVOR20", "IVOR21", "IVOR22", "IVOR23",
1415 "IVOR24", "IVOR25", "IVOR26", "IVOR27",
1416 "IVOR28", "IVOR29", "IVOR30", "IVOR31",
1417 "IVOR32", "IVOR33", "IVOR34", "IVOR35",
1418 "IVOR36", "IVOR37", "IVOR38", "IVOR39",
1419 "IVOR40", "IVOR41", "IVOR42", "IVOR43",
1420 "IVOR44", "IVOR45", "IVOR46", "IVOR47",
1421 "IVOR48", "IVOR49", "IVOR50", "IVOR51",
1422 "IVOR52", "IVOR53", "IVOR54", "IVOR55",
1423 "IVOR56", "IVOR57", "IVOR58", "IVOR59",
1424 "IVOR60", "IVOR61", "IVOR62", "IVOR63",
1426 #define SPR_BOOKE_IVORxx (-1)
1427 int ivor_sprn
[64] = {
1428 SPR_BOOKE_IVOR0
, SPR_BOOKE_IVOR1
, SPR_BOOKE_IVOR2
, SPR_BOOKE_IVOR3
,
1429 SPR_BOOKE_IVOR4
, SPR_BOOKE_IVOR5
, SPR_BOOKE_IVOR6
, SPR_BOOKE_IVOR7
,
1430 SPR_BOOKE_IVOR8
, SPR_BOOKE_IVOR9
, SPR_BOOKE_IVOR10
, SPR_BOOKE_IVOR11
,
1431 SPR_BOOKE_IVOR12
, SPR_BOOKE_IVOR13
, SPR_BOOKE_IVOR14
, SPR_BOOKE_IVOR15
,
1432 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
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_IVOR32
, SPR_BOOKE_IVOR33
, SPR_BOOKE_IVOR34
, SPR_BOOKE_IVOR35
,
1437 SPR_BOOKE_IVOR36
, SPR_BOOKE_IVOR37
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1438 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1439 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, 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
,
1447 /* Interrupt processing */
1448 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1449 SPR_NOACCESS
, SPR_NOACCESS
,
1450 &spr_read_generic
, &spr_write_generic
,
1452 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1453 SPR_NOACCESS
, SPR_NOACCESS
,
1454 &spr_read_generic
, &spr_write_generic
,
1457 /* XXX : not implemented */
1458 spr_register(env
, SPR_BOOKE_IAC1
, "IAC1",
1459 SPR_NOACCESS
, SPR_NOACCESS
,
1460 &spr_read_generic
, &spr_write_generic
,
1462 /* XXX : not implemented */
1463 spr_register(env
, SPR_BOOKE_IAC2
, "IAC2",
1464 SPR_NOACCESS
, SPR_NOACCESS
,
1465 &spr_read_generic
, &spr_write_generic
,
1467 /* XXX : not implemented */
1468 spr_register(env
, SPR_BOOKE_DAC1
, "DAC1",
1469 SPR_NOACCESS
, SPR_NOACCESS
,
1470 &spr_read_generic
, &spr_write_generic
,
1472 /* XXX : not implemented */
1473 spr_register(env
, SPR_BOOKE_DAC2
, "DAC2",
1474 SPR_NOACCESS
, SPR_NOACCESS
,
1475 &spr_read_generic
, &spr_write_generic
,
1477 /* XXX : not implemented */
1478 spr_register(env
, SPR_BOOKE_DBCR0
, "DBCR0",
1479 SPR_NOACCESS
, SPR_NOACCESS
,
1480 &spr_read_generic
, &spr_write_generic
,
1482 /* XXX : not implemented */
1483 spr_register(env
, SPR_BOOKE_DBCR1
, "DBCR1",
1484 SPR_NOACCESS
, SPR_NOACCESS
,
1485 &spr_read_generic
, &spr_write_generic
,
1487 /* XXX : not implemented */
1488 spr_register(env
, SPR_BOOKE_DBCR2
, "DBCR2",
1489 SPR_NOACCESS
, SPR_NOACCESS
,
1490 &spr_read_generic
, &spr_write_generic
,
1492 /* XXX : not implemented */
1493 spr_register(env
, SPR_BOOKE_DBSR
, "DBSR",
1494 SPR_NOACCESS
, SPR_NOACCESS
,
1495 &spr_read_generic
, &spr_write_clear
,
1497 spr_register(env
, SPR_BOOKE_DEAR
, "DEAR",
1498 SPR_NOACCESS
, SPR_NOACCESS
,
1499 &spr_read_generic
, &spr_write_generic
,
1501 spr_register(env
, SPR_BOOKE_ESR
, "ESR",
1502 SPR_NOACCESS
, SPR_NOACCESS
,
1503 &spr_read_generic
, &spr_write_generic
,
1505 spr_register(env
, SPR_BOOKE_IVPR
, "IVPR",
1506 SPR_NOACCESS
, SPR_NOACCESS
,
1507 &spr_read_generic
, &spr_write_excp_prefix
,
1509 /* Exception vectors */
1510 for (i
= 0; i
< 64; i
++) {
1511 if (ivor_mask
& (1ULL << i
)) {
1512 if (ivor_sprn
[i
] == SPR_BOOKE_IVORxx
) {
1513 fprintf(stderr
, "ERROR: IVOR %d SPR is not defined\n", i
);
1516 spr_register(env
, ivor_sprn
[i
], ivor_names
[i
],
1517 SPR_NOACCESS
, SPR_NOACCESS
,
1518 &spr_read_generic
, &spr_write_excp_vector
,
1522 spr_register(env
, SPR_BOOKE_PID
, "PID",
1523 SPR_NOACCESS
, SPR_NOACCESS
,
1524 &spr_read_generic
, &spr_write_booke_pid
,
1526 spr_register(env
, SPR_BOOKE_TCR
, "TCR",
1527 SPR_NOACCESS
, SPR_NOACCESS
,
1528 &spr_read_generic
, &spr_write_booke_tcr
,
1530 spr_register(env
, SPR_BOOKE_TSR
, "TSR",
1531 SPR_NOACCESS
, SPR_NOACCESS
,
1532 &spr_read_generic
, &spr_write_booke_tsr
,
1535 spr_register(env
, SPR_DECR
, "DECR",
1536 SPR_NOACCESS
, SPR_NOACCESS
,
1537 &spr_read_decr
, &spr_write_decr
,
1539 spr_register(env
, SPR_BOOKE_DECAR
, "DECAR",
1540 SPR_NOACCESS
, SPR_NOACCESS
,
1541 SPR_NOACCESS
, &spr_write_generic
,
1544 spr_register(env
, SPR_USPRG0
, "USPRG0",
1545 &spr_read_generic
, &spr_write_generic
,
1546 &spr_read_generic
, &spr_write_generic
,
1548 spr_register(env
, SPR_SPRG4
, "SPRG4",
1549 SPR_NOACCESS
, SPR_NOACCESS
,
1550 &spr_read_generic
, &spr_write_generic
,
1552 spr_register(env
, SPR_SPRG5
, "SPRG5",
1553 SPR_NOACCESS
, SPR_NOACCESS
,
1554 &spr_read_generic
, &spr_write_generic
,
1556 spr_register(env
, SPR_SPRG6
, "SPRG6",
1557 SPR_NOACCESS
, SPR_NOACCESS
,
1558 &spr_read_generic
, &spr_write_generic
,
1560 spr_register(env
, SPR_SPRG7
, "SPRG7",
1561 SPR_NOACCESS
, SPR_NOACCESS
,
1562 &spr_read_generic
, &spr_write_generic
,
1566 static inline uint32_t gen_tlbncfg(uint32_t assoc
, uint32_t minsize
,
1567 uint32_t maxsize
, uint32_t flags
,
1570 return (assoc
<< TLBnCFG_ASSOC_SHIFT
) |
1571 (minsize
<< TLBnCFG_MINSIZE_SHIFT
) |
1572 (maxsize
<< TLBnCFG_MAXSIZE_SHIFT
) |
1576 /* BookE 2.06 storage control registers */
1577 static void gen_spr_BookE206(CPUPPCState
*env
, uint32_t mas_mask
,
1580 #if !defined(CONFIG_USER_ONLY)
1581 const char *mas_names
[8] = {
1582 "MAS0", "MAS1", "MAS2", "MAS3", "MAS4", "MAS5", "MAS6", "MAS7",
1585 SPR_BOOKE_MAS0
, SPR_BOOKE_MAS1
, SPR_BOOKE_MAS2
, SPR_BOOKE_MAS3
,
1586 SPR_BOOKE_MAS4
, SPR_BOOKE_MAS5
, SPR_BOOKE_MAS6
, SPR_BOOKE_MAS7
,
1590 /* TLB assist registers */
1591 /* XXX : not implemented */
1592 for (i
= 0; i
< 8; i
++) {
1593 if (mas_mask
& (1 << i
)) {
1594 spr_register(env
, mas_sprn
[i
], mas_names
[i
],
1595 SPR_NOACCESS
, SPR_NOACCESS
,
1596 &spr_read_generic
, &spr_write_generic
,
1600 if (env
->nb_pids
> 1) {
1601 /* XXX : not implemented */
1602 spr_register(env
, SPR_BOOKE_PID1
, "PID1",
1603 SPR_NOACCESS
, SPR_NOACCESS
,
1604 &spr_read_generic
, &spr_write_booke_pid
,
1607 if (env
->nb_pids
> 2) {
1608 /* XXX : not implemented */
1609 spr_register(env
, SPR_BOOKE_PID2
, "PID2",
1610 SPR_NOACCESS
, SPR_NOACCESS
,
1611 &spr_read_generic
, &spr_write_booke_pid
,
1614 /* XXX : not implemented */
1615 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
1616 SPR_NOACCESS
, SPR_NOACCESS
,
1617 &spr_read_generic
, SPR_NOACCESS
,
1618 0x00000000); /* TOFIX */
1619 switch (env
->nb_ways
) {
1621 spr_register(env
, SPR_BOOKE_TLB3CFG
, "TLB3CFG",
1622 SPR_NOACCESS
, SPR_NOACCESS
,
1623 &spr_read_generic
, SPR_NOACCESS
,
1627 spr_register(env
, SPR_BOOKE_TLB2CFG
, "TLB2CFG",
1628 SPR_NOACCESS
, SPR_NOACCESS
,
1629 &spr_read_generic
, SPR_NOACCESS
,
1633 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
1634 SPR_NOACCESS
, SPR_NOACCESS
,
1635 &spr_read_generic
, SPR_NOACCESS
,
1639 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
1640 SPR_NOACCESS
, SPR_NOACCESS
,
1641 &spr_read_generic
, SPR_NOACCESS
,
1650 gen_spr_usprgh(env
);
1653 /* SPR specific to PowerPC 440 implementation */
1654 static void gen_spr_440 (CPUPPCState
*env
)
1657 /* XXX : not implemented */
1658 spr_register(env
, SPR_440_DNV0
, "DNV0",
1659 SPR_NOACCESS
, SPR_NOACCESS
,
1660 &spr_read_generic
, &spr_write_generic
,
1662 /* XXX : not implemented */
1663 spr_register(env
, SPR_440_DNV1
, "DNV1",
1664 SPR_NOACCESS
, SPR_NOACCESS
,
1665 &spr_read_generic
, &spr_write_generic
,
1667 /* XXX : not implemented */
1668 spr_register(env
, SPR_440_DNV2
, "DNV2",
1669 SPR_NOACCESS
, SPR_NOACCESS
,
1670 &spr_read_generic
, &spr_write_generic
,
1672 /* XXX : not implemented */
1673 spr_register(env
, SPR_440_DNV3
, "DNV3",
1674 SPR_NOACCESS
, SPR_NOACCESS
,
1675 &spr_read_generic
, &spr_write_generic
,
1677 /* XXX : not implemented */
1678 spr_register(env
, SPR_440_DTV0
, "DTV0",
1679 SPR_NOACCESS
, SPR_NOACCESS
,
1680 &spr_read_generic
, &spr_write_generic
,
1682 /* XXX : not implemented */
1683 spr_register(env
, SPR_440_DTV1
, "DTV1",
1684 SPR_NOACCESS
, SPR_NOACCESS
,
1685 &spr_read_generic
, &spr_write_generic
,
1687 /* XXX : not implemented */
1688 spr_register(env
, SPR_440_DTV2
, "DTV2",
1689 SPR_NOACCESS
, SPR_NOACCESS
,
1690 &spr_read_generic
, &spr_write_generic
,
1692 /* XXX : not implemented */
1693 spr_register(env
, SPR_440_DTV3
, "DTV3",
1694 SPR_NOACCESS
, SPR_NOACCESS
,
1695 &spr_read_generic
, &spr_write_generic
,
1697 /* XXX : not implemented */
1698 spr_register(env
, SPR_440_DVLIM
, "DVLIM",
1699 SPR_NOACCESS
, SPR_NOACCESS
,
1700 &spr_read_generic
, &spr_write_generic
,
1702 /* XXX : not implemented */
1703 spr_register(env
, SPR_440_INV0
, "INV0",
1704 SPR_NOACCESS
, SPR_NOACCESS
,
1705 &spr_read_generic
, &spr_write_generic
,
1707 /* XXX : not implemented */
1708 spr_register(env
, SPR_440_INV1
, "INV1",
1709 SPR_NOACCESS
, SPR_NOACCESS
,
1710 &spr_read_generic
, &spr_write_generic
,
1712 /* XXX : not implemented */
1713 spr_register(env
, SPR_440_INV2
, "INV2",
1714 SPR_NOACCESS
, SPR_NOACCESS
,
1715 &spr_read_generic
, &spr_write_generic
,
1717 /* XXX : not implemented */
1718 spr_register(env
, SPR_440_INV3
, "INV3",
1719 SPR_NOACCESS
, SPR_NOACCESS
,
1720 &spr_read_generic
, &spr_write_generic
,
1722 /* XXX : not implemented */
1723 spr_register(env
, SPR_440_ITV0
, "ITV0",
1724 SPR_NOACCESS
, SPR_NOACCESS
,
1725 &spr_read_generic
, &spr_write_generic
,
1727 /* XXX : not implemented */
1728 spr_register(env
, SPR_440_ITV1
, "ITV1",
1729 SPR_NOACCESS
, SPR_NOACCESS
,
1730 &spr_read_generic
, &spr_write_generic
,
1732 /* XXX : not implemented */
1733 spr_register(env
, SPR_440_ITV2
, "ITV2",
1734 SPR_NOACCESS
, SPR_NOACCESS
,
1735 &spr_read_generic
, &spr_write_generic
,
1737 /* XXX : not implemented */
1738 spr_register(env
, SPR_440_ITV3
, "ITV3",
1739 SPR_NOACCESS
, SPR_NOACCESS
,
1740 &spr_read_generic
, &spr_write_generic
,
1742 /* XXX : not implemented */
1743 spr_register(env
, SPR_440_IVLIM
, "IVLIM",
1744 SPR_NOACCESS
, SPR_NOACCESS
,
1745 &spr_read_generic
, &spr_write_generic
,
1748 /* XXX : not implemented */
1749 spr_register(env
, SPR_BOOKE_DCDBTRH
, "DCDBTRH",
1750 SPR_NOACCESS
, SPR_NOACCESS
,
1751 &spr_read_generic
, SPR_NOACCESS
,
1753 /* XXX : not implemented */
1754 spr_register(env
, SPR_BOOKE_DCDBTRL
, "DCDBTRL",
1755 SPR_NOACCESS
, SPR_NOACCESS
,
1756 &spr_read_generic
, SPR_NOACCESS
,
1758 /* XXX : not implemented */
1759 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1760 SPR_NOACCESS
, SPR_NOACCESS
,
1761 &spr_read_generic
, SPR_NOACCESS
,
1763 /* XXX : not implemented */
1764 spr_register(env
, SPR_BOOKE_ICDBTRH
, "ICDBTRH",
1765 SPR_NOACCESS
, SPR_NOACCESS
,
1766 &spr_read_generic
, SPR_NOACCESS
,
1768 /* XXX : not implemented */
1769 spr_register(env
, SPR_BOOKE_ICDBTRL
, "ICDBTRL",
1770 SPR_NOACCESS
, SPR_NOACCESS
,
1771 &spr_read_generic
, SPR_NOACCESS
,
1773 /* XXX : not implemented */
1774 spr_register(env
, SPR_440_DBDR
, "DBDR",
1775 SPR_NOACCESS
, SPR_NOACCESS
,
1776 &spr_read_generic
, &spr_write_generic
,
1778 /* Processor control */
1779 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1780 SPR_NOACCESS
, SPR_NOACCESS
,
1781 &spr_read_generic
, &spr_write_generic
,
1783 spr_register(env
, SPR_440_RSTCFG
, "RSTCFG",
1784 SPR_NOACCESS
, SPR_NOACCESS
,
1785 &spr_read_generic
, SPR_NOACCESS
,
1787 /* Storage control */
1788 spr_register(env
, SPR_440_MMUCR
, "MMUCR",
1789 SPR_NOACCESS
, SPR_NOACCESS
,
1790 &spr_read_generic
, &spr_write_generic
,
1794 /* SPR shared between PowerPC 40x implementations */
1795 static void gen_spr_40x (CPUPPCState
*env
)
1798 /* not emulated, as Qemu do not emulate caches */
1799 spr_register(env
, SPR_40x_DCCR
, "DCCR",
1800 SPR_NOACCESS
, SPR_NOACCESS
,
1801 &spr_read_generic
, &spr_write_generic
,
1803 /* not emulated, as Qemu do not emulate caches */
1804 spr_register(env
, SPR_40x_ICCR
, "ICCR",
1805 SPR_NOACCESS
, SPR_NOACCESS
,
1806 &spr_read_generic
, &spr_write_generic
,
1808 /* not emulated, as Qemu do not emulate caches */
1809 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1810 SPR_NOACCESS
, SPR_NOACCESS
,
1811 &spr_read_generic
, SPR_NOACCESS
,
1814 spr_register(env
, SPR_40x_DEAR
, "DEAR",
1815 SPR_NOACCESS
, SPR_NOACCESS
,
1816 &spr_read_generic
, &spr_write_generic
,
1818 spr_register(env
, SPR_40x_ESR
, "ESR",
1819 SPR_NOACCESS
, SPR_NOACCESS
,
1820 &spr_read_generic
, &spr_write_generic
,
1822 spr_register(env
, SPR_40x_EVPR
, "EVPR",
1823 SPR_NOACCESS
, SPR_NOACCESS
,
1824 &spr_read_generic
, &spr_write_excp_prefix
,
1826 spr_register(env
, SPR_40x_SRR2
, "SRR2",
1827 &spr_read_generic
, &spr_write_generic
,
1828 &spr_read_generic
, &spr_write_generic
,
1830 spr_register(env
, SPR_40x_SRR3
, "SRR3",
1831 &spr_read_generic
, &spr_write_generic
,
1832 &spr_read_generic
, &spr_write_generic
,
1835 spr_register(env
, SPR_40x_PIT
, "PIT",
1836 SPR_NOACCESS
, SPR_NOACCESS
,
1837 &spr_read_40x_pit
, &spr_write_40x_pit
,
1839 spr_register(env
, SPR_40x_TCR
, "TCR",
1840 SPR_NOACCESS
, SPR_NOACCESS
,
1841 &spr_read_generic
, &spr_write_booke_tcr
,
1843 spr_register(env
, SPR_40x_TSR
, "TSR",
1844 SPR_NOACCESS
, SPR_NOACCESS
,
1845 &spr_read_generic
, &spr_write_booke_tsr
,
1849 /* SPR specific to PowerPC 405 implementation */
1850 static void gen_spr_405 (CPUPPCState
*env
)
1853 spr_register(env
, SPR_40x_PID
, "PID",
1854 SPR_NOACCESS
, SPR_NOACCESS
,
1855 &spr_read_generic
, &spr_write_generic
,
1857 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1858 SPR_NOACCESS
, SPR_NOACCESS
,
1859 &spr_read_generic
, &spr_write_generic
,
1861 /* Debug interface */
1862 /* XXX : not implemented */
1863 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
1864 SPR_NOACCESS
, SPR_NOACCESS
,
1865 &spr_read_generic
, &spr_write_40x_dbcr0
,
1867 /* XXX : not implemented */
1868 spr_register(env
, SPR_405_DBCR1
, "DBCR1",
1869 SPR_NOACCESS
, SPR_NOACCESS
,
1870 &spr_read_generic
, &spr_write_generic
,
1872 /* XXX : not implemented */
1873 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1874 SPR_NOACCESS
, SPR_NOACCESS
,
1875 &spr_read_generic
, &spr_write_clear
,
1876 /* Last reset was system reset */
1878 /* XXX : not implemented */
1879 spr_register(env
, SPR_40x_DAC1
, "DAC1",
1880 SPR_NOACCESS
, SPR_NOACCESS
,
1881 &spr_read_generic
, &spr_write_generic
,
1883 spr_register(env
, SPR_40x_DAC2
, "DAC2",
1884 SPR_NOACCESS
, SPR_NOACCESS
,
1885 &spr_read_generic
, &spr_write_generic
,
1887 /* XXX : not implemented */
1888 spr_register(env
, SPR_405_DVC1
, "DVC1",
1889 SPR_NOACCESS
, SPR_NOACCESS
,
1890 &spr_read_generic
, &spr_write_generic
,
1892 /* XXX : not implemented */
1893 spr_register(env
, SPR_405_DVC2
, "DVC2",
1894 SPR_NOACCESS
, SPR_NOACCESS
,
1895 &spr_read_generic
, &spr_write_generic
,
1897 /* XXX : not implemented */
1898 spr_register(env
, SPR_40x_IAC1
, "IAC1",
1899 SPR_NOACCESS
, SPR_NOACCESS
,
1900 &spr_read_generic
, &spr_write_generic
,
1902 spr_register(env
, SPR_40x_IAC2
, "IAC2",
1903 SPR_NOACCESS
, SPR_NOACCESS
,
1904 &spr_read_generic
, &spr_write_generic
,
1906 /* XXX : not implemented */
1907 spr_register(env
, SPR_405_IAC3
, "IAC3",
1908 SPR_NOACCESS
, SPR_NOACCESS
,
1909 &spr_read_generic
, &spr_write_generic
,
1911 /* XXX : not implemented */
1912 spr_register(env
, SPR_405_IAC4
, "IAC4",
1913 SPR_NOACCESS
, SPR_NOACCESS
,
1914 &spr_read_generic
, &spr_write_generic
,
1916 /* Storage control */
1917 /* XXX: TODO: not implemented */
1918 spr_register(env
, SPR_405_SLER
, "SLER",
1919 SPR_NOACCESS
, SPR_NOACCESS
,
1920 &spr_read_generic
, &spr_write_40x_sler
,
1922 spr_register(env
, SPR_40x_ZPR
, "ZPR",
1923 SPR_NOACCESS
, SPR_NOACCESS
,
1924 &spr_read_generic
, &spr_write_generic
,
1926 /* XXX : not implemented */
1927 spr_register(env
, SPR_405_SU0R
, "SU0R",
1928 SPR_NOACCESS
, SPR_NOACCESS
,
1929 &spr_read_generic
, &spr_write_generic
,
1932 spr_register(env
, SPR_USPRG0
, "USPRG0",
1933 &spr_read_ureg
, SPR_NOACCESS
,
1934 &spr_read_ureg
, SPR_NOACCESS
,
1936 spr_register(env
, SPR_SPRG4
, "SPRG4",
1937 SPR_NOACCESS
, SPR_NOACCESS
,
1938 &spr_read_generic
, &spr_write_generic
,
1940 spr_register(env
, SPR_SPRG5
, "SPRG5",
1941 SPR_NOACCESS
, SPR_NOACCESS
,
1942 spr_read_generic
, &spr_write_generic
,
1944 spr_register(env
, SPR_SPRG6
, "SPRG6",
1945 SPR_NOACCESS
, SPR_NOACCESS
,
1946 spr_read_generic
, &spr_write_generic
,
1948 spr_register(env
, SPR_SPRG7
, "SPRG7",
1949 SPR_NOACCESS
, SPR_NOACCESS
,
1950 spr_read_generic
, &spr_write_generic
,
1952 gen_spr_usprgh(env
);
1955 /* SPR shared between PowerPC 401 & 403 implementations */
1956 static void gen_spr_401_403 (CPUPPCState
*env
)
1959 spr_register(env
, SPR_403_VTBL
, "TBL",
1960 &spr_read_tbl
, SPR_NOACCESS
,
1961 &spr_read_tbl
, SPR_NOACCESS
,
1963 spr_register(env
, SPR_403_TBL
, "TBL",
1964 SPR_NOACCESS
, SPR_NOACCESS
,
1965 SPR_NOACCESS
, &spr_write_tbl
,
1967 spr_register(env
, SPR_403_VTBU
, "TBU",
1968 &spr_read_tbu
, SPR_NOACCESS
,
1969 &spr_read_tbu
, SPR_NOACCESS
,
1971 spr_register(env
, SPR_403_TBU
, "TBU",
1972 SPR_NOACCESS
, SPR_NOACCESS
,
1973 SPR_NOACCESS
, &spr_write_tbu
,
1976 /* not emulated, as Qemu do not emulate caches */
1977 spr_register(env
, SPR_403_CDBCR
, "CDBCR",
1978 SPR_NOACCESS
, SPR_NOACCESS
,
1979 &spr_read_generic
, &spr_write_generic
,
1983 /* SPR specific to PowerPC 401 implementation */
1984 static void gen_spr_401 (CPUPPCState
*env
)
1986 /* Debug interface */
1987 /* XXX : not implemented */
1988 spr_register(env
, SPR_40x_DBCR0
, "DBCR",
1989 SPR_NOACCESS
, SPR_NOACCESS
,
1990 &spr_read_generic
, &spr_write_40x_dbcr0
,
1992 /* XXX : not implemented */
1993 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1994 SPR_NOACCESS
, SPR_NOACCESS
,
1995 &spr_read_generic
, &spr_write_clear
,
1996 /* Last reset was system reset */
1998 /* XXX : not implemented */
1999 spr_register(env
, SPR_40x_DAC1
, "DAC",
2000 SPR_NOACCESS
, SPR_NOACCESS
,
2001 &spr_read_generic
, &spr_write_generic
,
2003 /* XXX : not implemented */
2004 spr_register(env
, SPR_40x_IAC1
, "IAC",
2005 SPR_NOACCESS
, SPR_NOACCESS
,
2006 &spr_read_generic
, &spr_write_generic
,
2008 /* Storage control */
2009 /* XXX: TODO: not implemented */
2010 spr_register(env
, SPR_405_SLER
, "SLER",
2011 SPR_NOACCESS
, SPR_NOACCESS
,
2012 &spr_read_generic
, &spr_write_40x_sler
,
2014 /* not emulated, as Qemu never does speculative access */
2015 spr_register(env
, SPR_40x_SGR
, "SGR",
2016 SPR_NOACCESS
, SPR_NOACCESS
,
2017 &spr_read_generic
, &spr_write_generic
,
2019 /* not emulated, as Qemu do not emulate caches */
2020 spr_register(env
, SPR_40x_DCWR
, "DCWR",
2021 SPR_NOACCESS
, SPR_NOACCESS
,
2022 &spr_read_generic
, &spr_write_generic
,
2026 static void gen_spr_401x2 (CPUPPCState
*env
)
2029 spr_register(env
, SPR_40x_PID
, "PID",
2030 SPR_NOACCESS
, SPR_NOACCESS
,
2031 &spr_read_generic
, &spr_write_generic
,
2033 spr_register(env
, SPR_40x_ZPR
, "ZPR",
2034 SPR_NOACCESS
, SPR_NOACCESS
,
2035 &spr_read_generic
, &spr_write_generic
,
2039 /* SPR specific to PowerPC 403 implementation */
2040 static void gen_spr_403 (CPUPPCState
*env
)
2042 /* Debug interface */
2043 /* XXX : not implemented */
2044 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
2045 SPR_NOACCESS
, SPR_NOACCESS
,
2046 &spr_read_generic
, &spr_write_40x_dbcr0
,
2048 /* XXX : not implemented */
2049 spr_register(env
, SPR_40x_DBSR
, "DBSR",
2050 SPR_NOACCESS
, SPR_NOACCESS
,
2051 &spr_read_generic
, &spr_write_clear
,
2052 /* Last reset was system reset */
2054 /* XXX : not implemented */
2055 spr_register(env
, SPR_40x_DAC1
, "DAC1",
2056 SPR_NOACCESS
, SPR_NOACCESS
,
2057 &spr_read_generic
, &spr_write_generic
,
2059 /* XXX : not implemented */
2060 spr_register(env
, SPR_40x_DAC2
, "DAC2",
2061 SPR_NOACCESS
, SPR_NOACCESS
,
2062 &spr_read_generic
, &spr_write_generic
,
2064 /* XXX : not implemented */
2065 spr_register(env
, SPR_40x_IAC1
, "IAC1",
2066 SPR_NOACCESS
, SPR_NOACCESS
,
2067 &spr_read_generic
, &spr_write_generic
,
2069 /* XXX : not implemented */
2070 spr_register(env
, SPR_40x_IAC2
, "IAC2",
2071 SPR_NOACCESS
, SPR_NOACCESS
,
2072 &spr_read_generic
, &spr_write_generic
,
2076 static void gen_spr_403_real (CPUPPCState
*env
)
2078 spr_register(env
, SPR_403_PBL1
, "PBL1",
2079 SPR_NOACCESS
, SPR_NOACCESS
,
2080 &spr_read_403_pbr
, &spr_write_403_pbr
,
2082 spr_register(env
, SPR_403_PBU1
, "PBU1",
2083 SPR_NOACCESS
, SPR_NOACCESS
,
2084 &spr_read_403_pbr
, &spr_write_403_pbr
,
2086 spr_register(env
, SPR_403_PBL2
, "PBL2",
2087 SPR_NOACCESS
, SPR_NOACCESS
,
2088 &spr_read_403_pbr
, &spr_write_403_pbr
,
2090 spr_register(env
, SPR_403_PBU2
, "PBU2",
2091 SPR_NOACCESS
, SPR_NOACCESS
,
2092 &spr_read_403_pbr
, &spr_write_403_pbr
,
2096 static void gen_spr_403_mmu (CPUPPCState
*env
)
2099 spr_register(env
, SPR_40x_PID
, "PID",
2100 SPR_NOACCESS
, SPR_NOACCESS
,
2101 &spr_read_generic
, &spr_write_generic
,
2103 spr_register(env
, SPR_40x_ZPR
, "ZPR",
2104 SPR_NOACCESS
, SPR_NOACCESS
,
2105 &spr_read_generic
, &spr_write_generic
,
2109 /* SPR specific to PowerPC compression coprocessor extension */
2110 static void gen_spr_compress (CPUPPCState
*env
)
2112 /* XXX : not implemented */
2113 spr_register(env
, SPR_401_SKR
, "SKR",
2114 SPR_NOACCESS
, SPR_NOACCESS
,
2115 &spr_read_generic
, &spr_write_generic
,
2119 #if defined (TARGET_PPC64)
2120 /* SPR specific to PowerPC 620 */
2121 static void gen_spr_620 (CPUPPCState
*env
)
2123 /* Processor identification */
2124 spr_register(env
, SPR_PIR
, "PIR",
2125 SPR_NOACCESS
, SPR_NOACCESS
,
2126 &spr_read_generic
, &spr_write_pir
,
2128 spr_register(env
, SPR_ASR
, "ASR",
2129 SPR_NOACCESS
, SPR_NOACCESS
,
2130 &spr_read_asr
, &spr_write_asr
,
2133 /* XXX : not implemented */
2134 spr_register(env
, SPR_IABR
, "IABR",
2135 SPR_NOACCESS
, SPR_NOACCESS
,
2136 &spr_read_generic
, &spr_write_generic
,
2138 /* XXX : not implemented */
2139 spr_register(env
, SPR_DABR
, "DABR",
2140 SPR_NOACCESS
, SPR_NOACCESS
,
2141 &spr_read_generic
, &spr_write_generic
,
2143 /* XXX : not implemented */
2144 spr_register(env
, SPR_SIAR
, "SIAR",
2145 SPR_NOACCESS
, SPR_NOACCESS
,
2146 &spr_read_generic
, SPR_NOACCESS
,
2148 /* XXX : not implemented */
2149 spr_register(env
, SPR_SDA
, "SDA",
2150 SPR_NOACCESS
, SPR_NOACCESS
,
2151 &spr_read_generic
, SPR_NOACCESS
,
2153 /* XXX : not implemented */
2154 spr_register(env
, SPR_620_PMC1R
, "PMC1",
2155 SPR_NOACCESS
, SPR_NOACCESS
,
2156 &spr_read_generic
, SPR_NOACCESS
,
2158 spr_register(env
, SPR_620_PMC1W
, "PMC1",
2159 SPR_NOACCESS
, SPR_NOACCESS
,
2160 SPR_NOACCESS
, &spr_write_generic
,
2162 /* XXX : not implemented */
2163 spr_register(env
, SPR_620_PMC2R
, "PMC2",
2164 SPR_NOACCESS
, SPR_NOACCESS
,
2165 &spr_read_generic
, SPR_NOACCESS
,
2167 spr_register(env
, SPR_620_PMC2W
, "PMC2",
2168 SPR_NOACCESS
, SPR_NOACCESS
,
2169 SPR_NOACCESS
, &spr_write_generic
,
2171 /* XXX : not implemented */
2172 spr_register(env
, SPR_620_MMCR0R
, "MMCR0",
2173 SPR_NOACCESS
, SPR_NOACCESS
,
2174 &spr_read_generic
, SPR_NOACCESS
,
2176 spr_register(env
, SPR_620_MMCR0W
, "MMCR0",
2177 SPR_NOACCESS
, SPR_NOACCESS
,
2178 SPR_NOACCESS
, &spr_write_generic
,
2180 /* External access control */
2181 /* XXX : not implemented */
2182 spr_register(env
, SPR_EAR
, "EAR",
2183 SPR_NOACCESS
, SPR_NOACCESS
,
2184 &spr_read_generic
, &spr_write_generic
,
2186 #if 0 // XXX: check this
2187 /* XXX : not implemented */
2188 spr_register(env
, SPR_620_PMR0
, "PMR0",
2189 SPR_NOACCESS
, SPR_NOACCESS
,
2190 &spr_read_generic
, &spr_write_generic
,
2192 /* XXX : not implemented */
2193 spr_register(env
, SPR_620_PMR1
, "PMR1",
2194 SPR_NOACCESS
, SPR_NOACCESS
,
2195 &spr_read_generic
, &spr_write_generic
,
2197 /* XXX : not implemented */
2198 spr_register(env
, SPR_620_PMR2
, "PMR2",
2199 SPR_NOACCESS
, SPR_NOACCESS
,
2200 &spr_read_generic
, &spr_write_generic
,
2202 /* XXX : not implemented */
2203 spr_register(env
, SPR_620_PMR3
, "PMR3",
2204 SPR_NOACCESS
, SPR_NOACCESS
,
2205 &spr_read_generic
, &spr_write_generic
,
2207 /* XXX : not implemented */
2208 spr_register(env
, SPR_620_PMR4
, "PMR4",
2209 SPR_NOACCESS
, SPR_NOACCESS
,
2210 &spr_read_generic
, &spr_write_generic
,
2212 /* XXX : not implemented */
2213 spr_register(env
, SPR_620_PMR5
, "PMR5",
2214 SPR_NOACCESS
, SPR_NOACCESS
,
2215 &spr_read_generic
, &spr_write_generic
,
2217 /* XXX : not implemented */
2218 spr_register(env
, SPR_620_PMR6
, "PMR6",
2219 SPR_NOACCESS
, SPR_NOACCESS
,
2220 &spr_read_generic
, &spr_write_generic
,
2222 /* XXX : not implemented */
2223 spr_register(env
, SPR_620_PMR7
, "PMR7",
2224 SPR_NOACCESS
, SPR_NOACCESS
,
2225 &spr_read_generic
, &spr_write_generic
,
2227 /* XXX : not implemented */
2228 spr_register(env
, SPR_620_PMR8
, "PMR8",
2229 SPR_NOACCESS
, SPR_NOACCESS
,
2230 &spr_read_generic
, &spr_write_generic
,
2232 /* XXX : not implemented */
2233 spr_register(env
, SPR_620_PMR9
, "PMR9",
2234 SPR_NOACCESS
, SPR_NOACCESS
,
2235 &spr_read_generic
, &spr_write_generic
,
2237 /* XXX : not implemented */
2238 spr_register(env
, SPR_620_PMRA
, "PMR10",
2239 SPR_NOACCESS
, SPR_NOACCESS
,
2240 &spr_read_generic
, &spr_write_generic
,
2242 /* XXX : not implemented */
2243 spr_register(env
, SPR_620_PMRB
, "PMR11",
2244 SPR_NOACCESS
, SPR_NOACCESS
,
2245 &spr_read_generic
, &spr_write_generic
,
2247 /* XXX : not implemented */
2248 spr_register(env
, SPR_620_PMRC
, "PMR12",
2249 SPR_NOACCESS
, SPR_NOACCESS
,
2250 &spr_read_generic
, &spr_write_generic
,
2252 /* XXX : not implemented */
2253 spr_register(env
, SPR_620_PMRD
, "PMR13",
2254 SPR_NOACCESS
, SPR_NOACCESS
,
2255 &spr_read_generic
, &spr_write_generic
,
2257 /* XXX : not implemented */
2258 spr_register(env
, SPR_620_PMRE
, "PMR14",
2259 SPR_NOACCESS
, SPR_NOACCESS
,
2260 &spr_read_generic
, &spr_write_generic
,
2262 /* XXX : not implemented */
2263 spr_register(env
, SPR_620_PMRF
, "PMR15",
2264 SPR_NOACCESS
, SPR_NOACCESS
,
2265 &spr_read_generic
, &spr_write_generic
,
2268 /* XXX : not implemented */
2269 spr_register(env
, SPR_620_BUSCSR
, "BUSCSR",
2270 SPR_NOACCESS
, SPR_NOACCESS
,
2271 &spr_read_generic
, &spr_write_generic
,
2273 /* XXX : not implemented */
2274 spr_register(env
, SPR_620_L2CR
, "L2CR",
2275 SPR_NOACCESS
, SPR_NOACCESS
,
2276 &spr_read_generic
, &spr_write_generic
,
2278 /* XXX : not implemented */
2279 spr_register(env
, SPR_620_L2SR
, "L2SR",
2280 SPR_NOACCESS
, SPR_NOACCESS
,
2281 &spr_read_generic
, &spr_write_generic
,
2284 #endif /* defined (TARGET_PPC64) */
2286 static void gen_spr_5xx_8xx (CPUPPCState
*env
)
2288 /* Exception processing */
2289 spr_register(env
, SPR_DSISR
, "DSISR",
2290 SPR_NOACCESS
, SPR_NOACCESS
,
2291 &spr_read_generic
, &spr_write_generic
,
2293 spr_register(env
, SPR_DAR
, "DAR",
2294 SPR_NOACCESS
, SPR_NOACCESS
,
2295 &spr_read_generic
, &spr_write_generic
,
2298 spr_register(env
, SPR_DECR
, "DECR",
2299 SPR_NOACCESS
, SPR_NOACCESS
,
2300 &spr_read_decr
, &spr_write_decr
,
2302 /* XXX : not implemented */
2303 spr_register(env
, SPR_MPC_EIE
, "EIE",
2304 SPR_NOACCESS
, SPR_NOACCESS
,
2305 &spr_read_generic
, &spr_write_generic
,
2307 /* XXX : not implemented */
2308 spr_register(env
, SPR_MPC_EID
, "EID",
2309 SPR_NOACCESS
, SPR_NOACCESS
,
2310 &spr_read_generic
, &spr_write_generic
,
2312 /* XXX : not implemented */
2313 spr_register(env
, SPR_MPC_NRI
, "NRI",
2314 SPR_NOACCESS
, SPR_NOACCESS
,
2315 &spr_read_generic
, &spr_write_generic
,
2317 /* XXX : not implemented */
2318 spr_register(env
, SPR_MPC_CMPA
, "CMPA",
2319 SPR_NOACCESS
, SPR_NOACCESS
,
2320 &spr_read_generic
, &spr_write_generic
,
2322 /* XXX : not implemented */
2323 spr_register(env
, SPR_MPC_CMPB
, "CMPB",
2324 SPR_NOACCESS
, SPR_NOACCESS
,
2325 &spr_read_generic
, &spr_write_generic
,
2327 /* XXX : not implemented */
2328 spr_register(env
, SPR_MPC_CMPC
, "CMPC",
2329 SPR_NOACCESS
, SPR_NOACCESS
,
2330 &spr_read_generic
, &spr_write_generic
,
2332 /* XXX : not implemented */
2333 spr_register(env
, SPR_MPC_CMPD
, "CMPD",
2334 SPR_NOACCESS
, SPR_NOACCESS
,
2335 &spr_read_generic
, &spr_write_generic
,
2337 /* XXX : not implemented */
2338 spr_register(env
, SPR_MPC_ECR
, "ECR",
2339 SPR_NOACCESS
, SPR_NOACCESS
,
2340 &spr_read_generic
, &spr_write_generic
,
2342 /* XXX : not implemented */
2343 spr_register(env
, SPR_MPC_DER
, "DER",
2344 SPR_NOACCESS
, SPR_NOACCESS
,
2345 &spr_read_generic
, &spr_write_generic
,
2347 /* XXX : not implemented */
2348 spr_register(env
, SPR_MPC_COUNTA
, "COUNTA",
2349 SPR_NOACCESS
, SPR_NOACCESS
,
2350 &spr_read_generic
, &spr_write_generic
,
2352 /* XXX : not implemented */
2353 spr_register(env
, SPR_MPC_COUNTB
, "COUNTB",
2354 SPR_NOACCESS
, SPR_NOACCESS
,
2355 &spr_read_generic
, &spr_write_generic
,
2357 /* XXX : not implemented */
2358 spr_register(env
, SPR_MPC_CMPE
, "CMPE",
2359 SPR_NOACCESS
, SPR_NOACCESS
,
2360 &spr_read_generic
, &spr_write_generic
,
2362 /* XXX : not implemented */
2363 spr_register(env
, SPR_MPC_CMPF
, "CMPF",
2364 SPR_NOACCESS
, SPR_NOACCESS
,
2365 &spr_read_generic
, &spr_write_generic
,
2367 /* XXX : not implemented */
2368 spr_register(env
, SPR_MPC_CMPG
, "CMPG",
2369 SPR_NOACCESS
, SPR_NOACCESS
,
2370 &spr_read_generic
, &spr_write_generic
,
2372 /* XXX : not implemented */
2373 spr_register(env
, SPR_MPC_CMPH
, "CMPH",
2374 SPR_NOACCESS
, SPR_NOACCESS
,
2375 &spr_read_generic
, &spr_write_generic
,
2377 /* XXX : not implemented */
2378 spr_register(env
, SPR_MPC_LCTRL1
, "LCTRL1",
2379 SPR_NOACCESS
, SPR_NOACCESS
,
2380 &spr_read_generic
, &spr_write_generic
,
2382 /* XXX : not implemented */
2383 spr_register(env
, SPR_MPC_LCTRL2
, "LCTRL2",
2384 SPR_NOACCESS
, SPR_NOACCESS
,
2385 &spr_read_generic
, &spr_write_generic
,
2387 /* XXX : not implemented */
2388 spr_register(env
, SPR_MPC_BAR
, "BAR",
2389 SPR_NOACCESS
, SPR_NOACCESS
,
2390 &spr_read_generic
, &spr_write_generic
,
2392 /* XXX : not implemented */
2393 spr_register(env
, SPR_MPC_DPDR
, "DPDR",
2394 SPR_NOACCESS
, SPR_NOACCESS
,
2395 &spr_read_generic
, &spr_write_generic
,
2397 /* XXX : not implemented */
2398 spr_register(env
, SPR_MPC_IMMR
, "IMMR",
2399 SPR_NOACCESS
, SPR_NOACCESS
,
2400 &spr_read_generic
, &spr_write_generic
,
2404 static void gen_spr_5xx (CPUPPCState
*env
)
2406 /* XXX : not implemented */
2407 spr_register(env
, SPR_RCPU_MI_GRA
, "MI_GRA",
2408 SPR_NOACCESS
, SPR_NOACCESS
,
2409 &spr_read_generic
, &spr_write_generic
,
2411 /* XXX : not implemented */
2412 spr_register(env
, SPR_RCPU_L2U_GRA
, "L2U_GRA",
2413 SPR_NOACCESS
, SPR_NOACCESS
,
2414 &spr_read_generic
, &spr_write_generic
,
2416 /* XXX : not implemented */
2417 spr_register(env
, SPR_RPCU_BBCMCR
, "L2U_BBCMCR",
2418 SPR_NOACCESS
, SPR_NOACCESS
,
2419 &spr_read_generic
, &spr_write_generic
,
2421 /* XXX : not implemented */
2422 spr_register(env
, SPR_RCPU_L2U_MCR
, "L2U_MCR",
2423 SPR_NOACCESS
, SPR_NOACCESS
,
2424 &spr_read_generic
, &spr_write_generic
,
2426 /* XXX : not implemented */
2427 spr_register(env
, SPR_RCPU_MI_RBA0
, "MI_RBA0",
2428 SPR_NOACCESS
, SPR_NOACCESS
,
2429 &spr_read_generic
, &spr_write_generic
,
2431 /* XXX : not implemented */
2432 spr_register(env
, SPR_RCPU_MI_RBA1
, "MI_RBA1",
2433 SPR_NOACCESS
, SPR_NOACCESS
,
2434 &spr_read_generic
, &spr_write_generic
,
2436 /* XXX : not implemented */
2437 spr_register(env
, SPR_RCPU_MI_RBA2
, "MI_RBA2",
2438 SPR_NOACCESS
, SPR_NOACCESS
,
2439 &spr_read_generic
, &spr_write_generic
,
2441 /* XXX : not implemented */
2442 spr_register(env
, SPR_RCPU_MI_RBA3
, "MI_RBA3",
2443 SPR_NOACCESS
, SPR_NOACCESS
,
2444 &spr_read_generic
, &spr_write_generic
,
2446 /* XXX : not implemented */
2447 spr_register(env
, SPR_RCPU_L2U_RBA0
, "L2U_RBA0",
2448 SPR_NOACCESS
, SPR_NOACCESS
,
2449 &spr_read_generic
, &spr_write_generic
,
2451 /* XXX : not implemented */
2452 spr_register(env
, SPR_RCPU_L2U_RBA1
, "L2U_RBA1",
2453 SPR_NOACCESS
, SPR_NOACCESS
,
2454 &spr_read_generic
, &spr_write_generic
,
2456 /* XXX : not implemented */
2457 spr_register(env
, SPR_RCPU_L2U_RBA2
, "L2U_RBA2",
2458 SPR_NOACCESS
, SPR_NOACCESS
,
2459 &spr_read_generic
, &spr_write_generic
,
2461 /* XXX : not implemented */
2462 spr_register(env
, SPR_RCPU_L2U_RBA3
, "L2U_RBA3",
2463 SPR_NOACCESS
, SPR_NOACCESS
,
2464 &spr_read_generic
, &spr_write_generic
,
2466 /* XXX : not implemented */
2467 spr_register(env
, SPR_RCPU_MI_RA0
, "MI_RA0",
2468 SPR_NOACCESS
, SPR_NOACCESS
,
2469 &spr_read_generic
, &spr_write_generic
,
2471 /* XXX : not implemented */
2472 spr_register(env
, SPR_RCPU_MI_RA1
, "MI_RA1",
2473 SPR_NOACCESS
, SPR_NOACCESS
,
2474 &spr_read_generic
, &spr_write_generic
,
2476 /* XXX : not implemented */
2477 spr_register(env
, SPR_RCPU_MI_RA2
, "MI_RA2",
2478 SPR_NOACCESS
, SPR_NOACCESS
,
2479 &spr_read_generic
, &spr_write_generic
,
2481 /* XXX : not implemented */
2482 spr_register(env
, SPR_RCPU_MI_RA3
, "MI_RA3",
2483 SPR_NOACCESS
, SPR_NOACCESS
,
2484 &spr_read_generic
, &spr_write_generic
,
2486 /* XXX : not implemented */
2487 spr_register(env
, SPR_RCPU_L2U_RA0
, "L2U_RA0",
2488 SPR_NOACCESS
, SPR_NOACCESS
,
2489 &spr_read_generic
, &spr_write_generic
,
2491 /* XXX : not implemented */
2492 spr_register(env
, SPR_RCPU_L2U_RA1
, "L2U_RA1",
2493 SPR_NOACCESS
, SPR_NOACCESS
,
2494 &spr_read_generic
, &spr_write_generic
,
2496 /* XXX : not implemented */
2497 spr_register(env
, SPR_RCPU_L2U_RA2
, "L2U_RA2",
2498 SPR_NOACCESS
, SPR_NOACCESS
,
2499 &spr_read_generic
, &spr_write_generic
,
2501 /* XXX : not implemented */
2502 spr_register(env
, SPR_RCPU_L2U_RA3
, "L2U_RA3",
2503 SPR_NOACCESS
, SPR_NOACCESS
,
2504 &spr_read_generic
, &spr_write_generic
,
2506 /* XXX : not implemented */
2507 spr_register(env
, SPR_RCPU_FPECR
, "FPECR",
2508 SPR_NOACCESS
, SPR_NOACCESS
,
2509 &spr_read_generic
, &spr_write_generic
,
2513 static void gen_spr_8xx (CPUPPCState
*env
)
2515 /* XXX : not implemented */
2516 spr_register(env
, SPR_MPC_IC_CST
, "IC_CST",
2517 SPR_NOACCESS
, SPR_NOACCESS
,
2518 &spr_read_generic
, &spr_write_generic
,
2520 /* XXX : not implemented */
2521 spr_register(env
, SPR_MPC_IC_ADR
, "IC_ADR",
2522 SPR_NOACCESS
, SPR_NOACCESS
,
2523 &spr_read_generic
, &spr_write_generic
,
2525 /* XXX : not implemented */
2526 spr_register(env
, SPR_MPC_IC_DAT
, "IC_DAT",
2527 SPR_NOACCESS
, SPR_NOACCESS
,
2528 &spr_read_generic
, &spr_write_generic
,
2530 /* XXX : not implemented */
2531 spr_register(env
, SPR_MPC_DC_CST
, "DC_CST",
2532 SPR_NOACCESS
, SPR_NOACCESS
,
2533 &spr_read_generic
, &spr_write_generic
,
2535 /* XXX : not implemented */
2536 spr_register(env
, SPR_MPC_DC_ADR
, "DC_ADR",
2537 SPR_NOACCESS
, SPR_NOACCESS
,
2538 &spr_read_generic
, &spr_write_generic
,
2540 /* XXX : not implemented */
2541 spr_register(env
, SPR_MPC_DC_DAT
, "DC_DAT",
2542 SPR_NOACCESS
, SPR_NOACCESS
,
2543 &spr_read_generic
, &spr_write_generic
,
2545 /* XXX : not implemented */
2546 spr_register(env
, SPR_MPC_MI_CTR
, "MI_CTR",
2547 SPR_NOACCESS
, SPR_NOACCESS
,
2548 &spr_read_generic
, &spr_write_generic
,
2550 /* XXX : not implemented */
2551 spr_register(env
, SPR_MPC_MI_AP
, "MI_AP",
2552 SPR_NOACCESS
, SPR_NOACCESS
,
2553 &spr_read_generic
, &spr_write_generic
,
2555 /* XXX : not implemented */
2556 spr_register(env
, SPR_MPC_MI_EPN
, "MI_EPN",
2557 SPR_NOACCESS
, SPR_NOACCESS
,
2558 &spr_read_generic
, &spr_write_generic
,
2560 /* XXX : not implemented */
2561 spr_register(env
, SPR_MPC_MI_TWC
, "MI_TWC",
2562 SPR_NOACCESS
, SPR_NOACCESS
,
2563 &spr_read_generic
, &spr_write_generic
,
2565 /* XXX : not implemented */
2566 spr_register(env
, SPR_MPC_MI_RPN
, "MI_RPN",
2567 SPR_NOACCESS
, SPR_NOACCESS
,
2568 &spr_read_generic
, &spr_write_generic
,
2570 /* XXX : not implemented */
2571 spr_register(env
, SPR_MPC_MI_DBCAM
, "MI_DBCAM",
2572 SPR_NOACCESS
, SPR_NOACCESS
,
2573 &spr_read_generic
, &spr_write_generic
,
2575 /* XXX : not implemented */
2576 spr_register(env
, SPR_MPC_MI_DBRAM0
, "MI_DBRAM0",
2577 SPR_NOACCESS
, SPR_NOACCESS
,
2578 &spr_read_generic
, &spr_write_generic
,
2580 /* XXX : not implemented */
2581 spr_register(env
, SPR_MPC_MI_DBRAM1
, "MI_DBRAM1",
2582 SPR_NOACCESS
, SPR_NOACCESS
,
2583 &spr_read_generic
, &spr_write_generic
,
2585 /* XXX : not implemented */
2586 spr_register(env
, SPR_MPC_MD_CTR
, "MD_CTR",
2587 SPR_NOACCESS
, SPR_NOACCESS
,
2588 &spr_read_generic
, &spr_write_generic
,
2590 /* XXX : not implemented */
2591 spr_register(env
, SPR_MPC_MD_CASID
, "MD_CASID",
2592 SPR_NOACCESS
, SPR_NOACCESS
,
2593 &spr_read_generic
, &spr_write_generic
,
2595 /* XXX : not implemented */
2596 spr_register(env
, SPR_MPC_MD_AP
, "MD_AP",
2597 SPR_NOACCESS
, SPR_NOACCESS
,
2598 &spr_read_generic
, &spr_write_generic
,
2600 /* XXX : not implemented */
2601 spr_register(env
, SPR_MPC_MD_EPN
, "MD_EPN",
2602 SPR_NOACCESS
, SPR_NOACCESS
,
2603 &spr_read_generic
, &spr_write_generic
,
2605 /* XXX : not implemented */
2606 spr_register(env
, SPR_MPC_MD_TWB
, "MD_TWB",
2607 SPR_NOACCESS
, SPR_NOACCESS
,
2608 &spr_read_generic
, &spr_write_generic
,
2610 /* XXX : not implemented */
2611 spr_register(env
, SPR_MPC_MD_TWC
, "MD_TWC",
2612 SPR_NOACCESS
, SPR_NOACCESS
,
2613 &spr_read_generic
, &spr_write_generic
,
2615 /* XXX : not implemented */
2616 spr_register(env
, SPR_MPC_MD_RPN
, "MD_RPN",
2617 SPR_NOACCESS
, SPR_NOACCESS
,
2618 &spr_read_generic
, &spr_write_generic
,
2620 /* XXX : not implemented */
2621 spr_register(env
, SPR_MPC_MD_TW
, "MD_TW",
2622 SPR_NOACCESS
, SPR_NOACCESS
,
2623 &spr_read_generic
, &spr_write_generic
,
2625 /* XXX : not implemented */
2626 spr_register(env
, SPR_MPC_MD_DBCAM
, "MD_DBCAM",
2627 SPR_NOACCESS
, SPR_NOACCESS
,
2628 &spr_read_generic
, &spr_write_generic
,
2630 /* XXX : not implemented */
2631 spr_register(env
, SPR_MPC_MD_DBRAM0
, "MD_DBRAM0",
2632 SPR_NOACCESS
, SPR_NOACCESS
,
2633 &spr_read_generic
, &spr_write_generic
,
2635 /* XXX : not implemented */
2636 spr_register(env
, SPR_MPC_MD_DBRAM1
, "MD_DBRAM1",
2637 SPR_NOACCESS
, SPR_NOACCESS
,
2638 &spr_read_generic
, &spr_write_generic
,
2644 * AMR => SPR 29 (Power 2.04)
2645 * CTRL => SPR 136 (Power 2.04)
2646 * CTRL => SPR 152 (Power 2.04)
2647 * SCOMC => SPR 276 (64 bits ?)
2648 * SCOMD => SPR 277 (64 bits ?)
2649 * TBU40 => SPR 286 (Power 2.04 hypv)
2650 * HSPRG0 => SPR 304 (Power 2.04 hypv)
2651 * HSPRG1 => SPR 305 (Power 2.04 hypv)
2652 * HDSISR => SPR 306 (Power 2.04 hypv)
2653 * HDAR => SPR 307 (Power 2.04 hypv)
2654 * PURR => SPR 309 (Power 2.04 hypv)
2655 * HDEC => SPR 310 (Power 2.04 hypv)
2656 * HIOR => SPR 311 (hypv)
2657 * RMOR => SPR 312 (970)
2658 * HRMOR => SPR 313 (Power 2.04 hypv)
2659 * HSRR0 => SPR 314 (Power 2.04 hypv)
2660 * HSRR1 => SPR 315 (Power 2.04 hypv)
2661 * LPCR => SPR 316 (970)
2662 * LPIDR => SPR 317 (970)
2663 * EPR => SPR 702 (Power 2.04 emb)
2664 * perf => 768-783 (Power 2.04)
2665 * perf => 784-799 (Power 2.04)
2666 * PPR => SPR 896 (Power 2.04)
2667 * EPLC => SPR 947 (Power 2.04 emb)
2668 * EPSC => SPR 948 (Power 2.04 emb)
2669 * DABRX => 1015 (Power 2.04 hypv)
2670 * FPECR => SPR 1022 (?)
2671 * ... and more (thermal management, performance counters, ...)
2674 /*****************************************************************************/
2675 /* Exception vectors models */
2676 static void init_excp_4xx_real (CPUPPCState
*env
)
2678 #if !defined(CONFIG_USER_ONLY)
2679 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2680 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2681 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2682 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2683 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2684 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2685 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2686 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2687 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2688 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2689 env
->hreset_excp_prefix
= 0x00000000UL
;
2690 env
->ivor_mask
= 0x0000FFF0UL
;
2691 env
->ivpr_mask
= 0xFFFF0000UL
;
2692 /* Hardware reset vector */
2693 env
->hreset_vector
= 0xFFFFFFFCUL
;
2697 static void init_excp_4xx_softmmu (CPUPPCState
*env
)
2699 #if !defined(CONFIG_USER_ONLY)
2700 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2701 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2702 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2703 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2704 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2705 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2706 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2707 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2708 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2709 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2710 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2711 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001100;
2712 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001200;
2713 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2714 env
->hreset_excp_prefix
= 0x00000000UL
;
2715 env
->ivor_mask
= 0x0000FFF0UL
;
2716 env
->ivpr_mask
= 0xFFFF0000UL
;
2717 /* Hardware reset vector */
2718 env
->hreset_vector
= 0xFFFFFFFCUL
;
2722 static void init_excp_MPC5xx (CPUPPCState
*env
)
2724 #if !defined(CONFIG_USER_ONLY)
2725 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2726 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2727 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2728 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2729 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2730 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2731 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2732 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2733 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2734 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2735 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2736 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2737 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2738 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2739 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2740 env
->hreset_excp_prefix
= 0x00000000UL
;
2741 env
->ivor_mask
= 0x0000FFF0UL
;
2742 env
->ivpr_mask
= 0xFFFF0000UL
;
2743 /* Hardware reset vector */
2744 env
->hreset_vector
= 0xFFFFFFFCUL
;
2748 static void init_excp_MPC8xx (CPUPPCState
*env
)
2750 #if !defined(CONFIG_USER_ONLY)
2751 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2752 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2753 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2754 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2755 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2756 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2757 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2758 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2759 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2760 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2761 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2762 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2763 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2764 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001100;
2765 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001200;
2766 env
->excp_vectors
[POWERPC_EXCP_ITLBE
] = 0x00001300;
2767 env
->excp_vectors
[POWERPC_EXCP_DTLBE
] = 0x00001400;
2768 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2769 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2770 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2771 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2772 env
->hreset_excp_prefix
= 0x00000000UL
;
2773 env
->ivor_mask
= 0x0000FFF0UL
;
2774 env
->ivpr_mask
= 0xFFFF0000UL
;
2775 /* Hardware reset vector */
2776 env
->hreset_vector
= 0xFFFFFFFCUL
;
2780 static void init_excp_G2 (CPUPPCState
*env
)
2782 #if !defined(CONFIG_USER_ONLY)
2783 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2784 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2785 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2786 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2787 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2788 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2789 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2790 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2791 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2792 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000A00;
2793 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2794 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2795 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2796 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2797 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2798 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2799 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2800 env
->hreset_excp_prefix
= 0x00000000UL
;
2801 /* Hardware reset vector */
2802 env
->hreset_vector
= 0xFFFFFFFCUL
;
2806 static void init_excp_e200 (CPUPPCState
*env
)
2808 #if !defined(CONFIG_USER_ONLY)
2809 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000FFC;
2810 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2811 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2812 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2813 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2814 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2815 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2816 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2817 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2818 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2819 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2820 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2821 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2822 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2823 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2824 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2825 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2826 env
->excp_vectors
[POWERPC_EXCP_SPEU
] = 0x00000000;
2827 env
->excp_vectors
[POWERPC_EXCP_EFPDI
] = 0x00000000;
2828 env
->excp_vectors
[POWERPC_EXCP_EFPRI
] = 0x00000000;
2829 env
->hreset_excp_prefix
= 0x00000000UL
;
2830 env
->ivor_mask
= 0x0000FFF7UL
;
2831 env
->ivpr_mask
= 0xFFFF0000UL
;
2832 /* Hardware reset vector */
2833 env
->hreset_vector
= 0xFFFFFFFCUL
;
2837 static void init_excp_BookE (CPUPPCState
*env
)
2839 #if !defined(CONFIG_USER_ONLY)
2840 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2841 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2842 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2843 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2844 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2845 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2846 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2847 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2848 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2849 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2850 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2851 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2852 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2853 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2854 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2855 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2856 env
->hreset_excp_prefix
= 0x00000000UL
;
2857 env
->ivor_mask
= 0x0000FFE0UL
;
2858 env
->ivpr_mask
= 0xFFFF0000UL
;
2859 /* Hardware reset vector */
2860 env
->hreset_vector
= 0xFFFFFFFCUL
;
2864 static void init_excp_601 (CPUPPCState
*env
)
2866 #if !defined(CONFIG_USER_ONLY)
2867 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2868 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2869 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2870 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2871 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2872 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2873 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2874 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2875 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2876 env
->excp_vectors
[POWERPC_EXCP_IO
] = 0x00000A00;
2877 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2878 env
->excp_vectors
[POWERPC_EXCP_RUNM
] = 0x00002000;
2879 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2880 /* Hardware reset vector */
2881 env
->hreset_vector
= 0x00000100UL
;
2885 static void init_excp_602 (CPUPPCState
*env
)
2887 #if !defined(CONFIG_USER_ONLY)
2888 /* XXX: exception prefix has a special behavior on 602 */
2889 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2890 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2891 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2892 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2893 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2894 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2895 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2896 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2897 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2898 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2899 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2900 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2901 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2902 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2903 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2904 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2905 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001500;
2906 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001600;
2907 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2908 /* Hardware reset vector */
2909 env
->hreset_vector
= 0xFFFFFFFCUL
;
2913 static void init_excp_603 (CPUPPCState
*env
)
2915 #if !defined(CONFIG_USER_ONLY)
2916 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2917 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2918 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2919 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2920 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2921 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2922 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2923 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2924 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2925 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2926 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2927 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2928 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2929 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2930 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2931 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2932 env
->hreset_excp_prefix
= 0x00000000UL
;
2933 /* Hardware reset vector */
2934 env
->hreset_vector
= 0xFFFFFFFCUL
;
2938 static void init_excp_604 (CPUPPCState
*env
)
2940 #if !defined(CONFIG_USER_ONLY)
2941 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2942 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2943 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2944 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2945 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2946 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2947 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2948 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2949 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2950 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2951 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2952 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2953 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2954 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2955 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2956 /* Hardware reset vector */
2957 env
->hreset_vector
= 0x00000100UL
;
2961 #if defined(TARGET_PPC64)
2962 static void init_excp_620 (CPUPPCState
*env
)
2964 #if !defined(CONFIG_USER_ONLY)
2965 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2966 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2967 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2968 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2969 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2970 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2971 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2972 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2973 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2974 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2975 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2976 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2977 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2978 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2979 env
->hreset_excp_prefix
= 0xFFF00000UL
;
2980 /* Hardware reset vector */
2981 env
->hreset_vector
= 0x0000000000000100ULL
;
2984 #endif /* defined(TARGET_PPC64) */
2986 static void init_excp_7x0 (CPUPPCState
*env
)
2988 #if !defined(CONFIG_USER_ONLY)
2989 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2990 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2991 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2992 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2993 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2994 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2995 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2996 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2997 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2998 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2999 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3000 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3001 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3002 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3003 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3004 env
->hreset_excp_prefix
= 0x00000000UL
;
3005 /* Hardware reset vector */
3006 env
->hreset_vector
= 0xFFFFFFFCUL
;
3010 static void init_excp_750cl (CPUPPCState
*env
)
3012 #if !defined(CONFIG_USER_ONLY)
3013 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3014 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3015 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3016 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3017 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3018 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3019 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3020 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3021 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3022 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3023 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3024 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3025 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3026 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3027 env
->hreset_excp_prefix
= 0x00000000UL
;
3028 /* Hardware reset vector */
3029 env
->hreset_vector
= 0xFFFFFFFCUL
;
3033 static void init_excp_750cx (CPUPPCState
*env
)
3035 #if !defined(CONFIG_USER_ONLY)
3036 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3037 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3038 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3039 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3040 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3041 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3042 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3043 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3044 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3045 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3046 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3047 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3048 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3049 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3050 env
->hreset_excp_prefix
= 0x00000000UL
;
3051 /* Hardware reset vector */
3052 env
->hreset_vector
= 0xFFFFFFFCUL
;
3056 /* XXX: Check if this is correct */
3057 static void init_excp_7x5 (CPUPPCState
*env
)
3059 #if !defined(CONFIG_USER_ONLY)
3060 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3061 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3062 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3063 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3064 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3065 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3066 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3067 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3068 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3069 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3070 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3071 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3072 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
3073 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
3074 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
3075 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3076 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3077 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3078 env
->hreset_excp_prefix
= 0x00000000UL
;
3079 /* Hardware reset vector */
3080 env
->hreset_vector
= 0xFFFFFFFCUL
;
3084 static void init_excp_7400 (CPUPPCState
*env
)
3086 #if !defined(CONFIG_USER_ONLY)
3087 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3088 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3089 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3090 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3091 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3092 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3093 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3094 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3095 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3096 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3097 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3098 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3099 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3100 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3101 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3102 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3103 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3104 env
->hreset_excp_prefix
= 0x00000000UL
;
3105 /* Hardware reset vector */
3106 env
->hreset_vector
= 0xFFFFFFFCUL
;
3110 static void init_excp_7450 (CPUPPCState
*env
)
3112 #if !defined(CONFIG_USER_ONLY)
3113 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3114 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3115 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3116 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3117 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3118 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3119 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3120 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3121 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3122 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3123 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3124 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3125 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3126 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
3127 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
3128 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
3129 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3130 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3131 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3132 env
->hreset_excp_prefix
= 0x00000000UL
;
3133 /* Hardware reset vector */
3134 env
->hreset_vector
= 0xFFFFFFFCUL
;
3138 #if defined (TARGET_PPC64)
3139 static void init_excp_970 (CPUPPCState
*env
)
3141 #if !defined(CONFIG_USER_ONLY)
3142 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3143 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3144 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3145 env
->excp_vectors
[POWERPC_EXCP_DSEG
] = 0x00000380;
3146 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3147 env
->excp_vectors
[POWERPC_EXCP_ISEG
] = 0x00000480;
3148 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3149 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3150 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3151 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3152 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3153 env
->excp_vectors
[POWERPC_EXCP_HDECR
] = 0x00000980;
3154 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3155 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3156 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3157 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3158 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3159 env
->excp_vectors
[POWERPC_EXCP_MAINT
] = 0x00001600;
3160 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001700;
3161 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001800;
3162 env
->hreset_excp_prefix
= 0x00000000FFF00000ULL
;
3163 /* Hardware reset vector */
3164 env
->hreset_vector
= 0x0000000000000100ULL
;
3168 static void init_excp_POWER7 (CPUPPCState
*env
)
3170 #if !defined(CONFIG_USER_ONLY)
3171 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3172 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3173 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3174 env
->excp_vectors
[POWERPC_EXCP_DSEG
] = 0x00000380;
3175 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3176 env
->excp_vectors
[POWERPC_EXCP_ISEG
] = 0x00000480;
3177 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3178 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3179 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3180 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3181 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3182 env
->excp_vectors
[POWERPC_EXCP_HDECR
] = 0x00000980;
3183 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3184 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3185 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3186 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3187 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3188 env
->excp_vectors
[POWERPC_EXCP_MAINT
] = 0x00001600;
3189 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001700;
3190 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001800;
3191 env
->hreset_excp_prefix
= 0;
3192 /* Hardware reset vector */
3193 env
->hreset_vector
= 0x0000000000000100ULL
;
3198 /*****************************************************************************/
3199 /* Power management enable checks */
3200 static int check_pow_none (CPUPPCState
*env
)
3205 static int check_pow_nocheck (CPUPPCState
*env
)
3210 static int check_pow_hid0 (CPUPPCState
*env
)
3212 if (env
->spr
[SPR_HID0
] & 0x00E00000)
3218 static int check_pow_hid0_74xx (CPUPPCState
*env
)
3220 if (env
->spr
[SPR_HID0
] & 0x00600000)
3226 /*****************************************************************************/
3227 /* PowerPC implementations definitions */
3230 #define POWERPC_INSNS_401 (PPC_INSNS_BASE | PPC_STRING | \
3231 PPC_WRTEE | PPC_DCR | \
3232 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3234 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3235 PPC_4xx_COMMON | PPC_40x_EXCP)
3236 #define POWERPC_INSNS2_401 (PPC_NONE)
3237 #define POWERPC_MSRM_401 (0x00000000000FD201ULL)
3238 #define POWERPC_MMU_401 (POWERPC_MMU_REAL)
3239 #define POWERPC_EXCP_401 (POWERPC_EXCP_40x)
3240 #define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401)
3241 #define POWERPC_BFDM_401 (bfd_mach_ppc_403)
3242 #define POWERPC_FLAG_401 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3243 POWERPC_FLAG_BUS_CLK)
3244 #define check_pow_401 check_pow_nocheck
3246 static void init_proc_401 (CPUPPCState
*env
)
3249 gen_spr_401_403(env
);
3251 init_excp_4xx_real(env
);
3252 env
->dcache_line_size
= 32;
3253 env
->icache_line_size
= 32;
3254 /* Allocate hardware IRQ controller */
3255 ppc40x_irq_init(env
);
3259 #define POWERPC_INSNS_401x2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3260 PPC_DCR | PPC_WRTEE | \
3261 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3262 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3263 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3264 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3265 PPC_4xx_COMMON | PPC_40x_EXCP)
3266 #define POWERPC_INSNS2_401x2 (PPC_NONE)
3267 #define POWERPC_MSRM_401x2 (0x00000000001FD231ULL)
3268 #define POWERPC_MMU_401x2 (POWERPC_MMU_SOFT_4xx_Z)
3269 #define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x)
3270 #define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401)
3271 #define POWERPC_BFDM_401x2 (bfd_mach_ppc_403)
3272 #define POWERPC_FLAG_401x2 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3273 POWERPC_FLAG_BUS_CLK)
3274 #define check_pow_401x2 check_pow_nocheck
3276 static void init_proc_401x2 (CPUPPCState
*env
)
3279 gen_spr_401_403(env
);
3281 gen_spr_compress(env
);
3282 /* Memory management */
3283 #if !defined(CONFIG_USER_ONLY)
3287 env
->tlb_type
= TLB_EMB
;
3289 init_excp_4xx_softmmu(env
);
3290 env
->dcache_line_size
= 32;
3291 env
->icache_line_size
= 32;
3292 /* Allocate hardware IRQ controller */
3293 ppc40x_irq_init(env
);
3297 #define POWERPC_INSNS_401x3 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3298 PPC_DCR | PPC_WRTEE | \
3299 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3300 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3301 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3302 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3303 PPC_4xx_COMMON | PPC_40x_EXCP)
3304 #define POWERPC_INSNS2_401x3 (PPC_NONE)
3305 #define POWERPC_MSRM_401x3 (0x00000000001FD631ULL)
3306 #define POWERPC_MMU_401x3 (POWERPC_MMU_SOFT_4xx_Z)
3307 #define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x)
3308 #define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401)
3309 #define POWERPC_BFDM_401x3 (bfd_mach_ppc_403)
3310 #define POWERPC_FLAG_401x3 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3311 POWERPC_FLAG_BUS_CLK)
3312 #define check_pow_401x3 check_pow_nocheck
3314 __attribute__ (( unused
))
3315 static void init_proc_401x3 (CPUPPCState
*env
)
3318 gen_spr_401_403(env
);
3321 gen_spr_compress(env
);
3322 init_excp_4xx_softmmu(env
);
3323 env
->dcache_line_size
= 32;
3324 env
->icache_line_size
= 32;
3325 /* Allocate hardware IRQ controller */
3326 ppc40x_irq_init(env
);
3330 #define POWERPC_INSNS_IOP480 (PPC_INSNS_BASE | PPC_STRING | \
3331 PPC_DCR | PPC_WRTEE | \
3332 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3333 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3334 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3335 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3336 PPC_4xx_COMMON | PPC_40x_EXCP)
3337 #define POWERPC_INSNS2_IOP480 (PPC_NONE)
3338 #define POWERPC_MSRM_IOP480 (0x00000000001FD231ULL)
3339 #define POWERPC_MMU_IOP480 (POWERPC_MMU_SOFT_4xx_Z)
3340 #define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x)
3341 #define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401)
3342 #define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403)
3343 #define POWERPC_FLAG_IOP480 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3344 POWERPC_FLAG_BUS_CLK)
3345 #define check_pow_IOP480 check_pow_nocheck
3347 static void init_proc_IOP480 (CPUPPCState
*env
)
3350 gen_spr_401_403(env
);
3352 gen_spr_compress(env
);
3353 /* Memory management */
3354 #if !defined(CONFIG_USER_ONLY)
3358 env
->tlb_type
= TLB_EMB
;
3360 init_excp_4xx_softmmu(env
);
3361 env
->dcache_line_size
= 32;
3362 env
->icache_line_size
= 32;
3363 /* Allocate hardware IRQ controller */
3364 ppc40x_irq_init(env
);
3368 #define POWERPC_INSNS_403 (PPC_INSNS_BASE | PPC_STRING | \
3369 PPC_DCR | PPC_WRTEE | \
3370 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3372 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3373 PPC_4xx_COMMON | PPC_40x_EXCP)
3374 #define POWERPC_INSNS2_403 (PPC_NONE)
3375 #define POWERPC_MSRM_403 (0x000000000007D00DULL)
3376 #define POWERPC_MMU_403 (POWERPC_MMU_REAL)
3377 #define POWERPC_EXCP_403 (POWERPC_EXCP_40x)
3378 #define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401)
3379 #define POWERPC_BFDM_403 (bfd_mach_ppc_403)
3380 #define POWERPC_FLAG_403 (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3381 POWERPC_FLAG_BUS_CLK)
3382 #define check_pow_403 check_pow_nocheck
3384 static void init_proc_403 (CPUPPCState
*env
)
3387 gen_spr_401_403(env
);
3389 gen_spr_403_real(env
);
3390 init_excp_4xx_real(env
);
3391 env
->dcache_line_size
= 32;
3392 env
->icache_line_size
= 32;
3393 /* Allocate hardware IRQ controller */
3394 ppc40x_irq_init(env
);
3397 /* PowerPC 403 GCX */
3398 #define POWERPC_INSNS_403GCX (PPC_INSNS_BASE | PPC_STRING | \
3399 PPC_DCR | PPC_WRTEE | \
3400 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3402 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3403 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3404 PPC_4xx_COMMON | PPC_40x_EXCP)
3405 #define POWERPC_INSNS2_403GCX (PPC_NONE)
3406 #define POWERPC_MSRM_403GCX (0x000000000007D00DULL)
3407 #define POWERPC_MMU_403GCX (POWERPC_MMU_SOFT_4xx_Z)
3408 #define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x)
3409 #define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401)
3410 #define POWERPC_BFDM_403GCX (bfd_mach_ppc_403)
3411 #define POWERPC_FLAG_403GCX (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3412 POWERPC_FLAG_BUS_CLK)
3413 #define check_pow_403GCX check_pow_nocheck
3415 static void init_proc_403GCX (CPUPPCState
*env
)
3418 gen_spr_401_403(env
);
3420 gen_spr_403_real(env
);
3421 gen_spr_403_mmu(env
);
3422 /* Bus access control */
3423 /* not emulated, as Qemu never does speculative access */
3424 spr_register(env
, SPR_40x_SGR
, "SGR",
3425 SPR_NOACCESS
, SPR_NOACCESS
,
3426 &spr_read_generic
, &spr_write_generic
,
3428 /* not emulated, as Qemu do not emulate caches */
3429 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3430 SPR_NOACCESS
, SPR_NOACCESS
,
3431 &spr_read_generic
, &spr_write_generic
,
3433 /* Memory management */
3434 #if !defined(CONFIG_USER_ONLY)
3438 env
->tlb_type
= TLB_EMB
;
3440 init_excp_4xx_softmmu(env
);
3441 env
->dcache_line_size
= 32;
3442 env
->icache_line_size
= 32;
3443 /* Allocate hardware IRQ controller */
3444 ppc40x_irq_init(env
);
3448 #define POWERPC_INSNS_405 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3449 PPC_DCR | PPC_WRTEE | \
3450 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3451 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3452 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3453 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3454 PPC_4xx_COMMON | PPC_405_MAC | PPC_40x_EXCP)
3455 #define POWERPC_INSNS2_405 (PPC_NONE)
3456 #define POWERPC_MSRM_405 (0x000000000006E630ULL)
3457 #define POWERPC_MMU_405 (POWERPC_MMU_SOFT_4xx)
3458 #define POWERPC_EXCP_405 (POWERPC_EXCP_40x)
3459 #define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405)
3460 #define POWERPC_BFDM_405 (bfd_mach_ppc_403)
3461 #define POWERPC_FLAG_405 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3462 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3463 #define check_pow_405 check_pow_nocheck
3465 static void init_proc_405 (CPUPPCState
*env
)
3471 /* Bus access control */
3472 /* not emulated, as Qemu never does speculative access */
3473 spr_register(env
, SPR_40x_SGR
, "SGR",
3474 SPR_NOACCESS
, SPR_NOACCESS
,
3475 &spr_read_generic
, &spr_write_generic
,
3477 /* not emulated, as Qemu do not emulate caches */
3478 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3479 SPR_NOACCESS
, SPR_NOACCESS
,
3480 &spr_read_generic
, &spr_write_generic
,
3482 /* Memory management */
3483 #if !defined(CONFIG_USER_ONLY)
3487 env
->tlb_type
= TLB_EMB
;
3489 init_excp_4xx_softmmu(env
);
3490 env
->dcache_line_size
= 32;
3491 env
->icache_line_size
= 32;
3492 /* Allocate hardware IRQ controller */
3493 ppc40x_irq_init(env
);
3496 /* PowerPC 440 EP */
3497 #define POWERPC_INSNS_440EP (PPC_INSNS_BASE | PPC_STRING | \
3498 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3499 PPC_CACHE | PPC_CACHE_ICBI | \
3500 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3501 PPC_MEM_TLBSYNC | PPC_MFTB | \
3502 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3504 #define POWERPC_INSNS2_440EP (PPC_NONE)
3505 #define POWERPC_MSRM_440EP (0x000000000006D630ULL)
3506 #define POWERPC_MMU_440EP (POWERPC_MMU_BOOKE)
3507 #define POWERPC_EXCP_440EP (POWERPC_EXCP_BOOKE)
3508 #define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE)
3509 #define POWERPC_BFDM_440EP (bfd_mach_ppc_403)
3510 #define POWERPC_FLAG_440EP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3511 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3512 #define check_pow_440EP check_pow_nocheck
3514 __attribute__ (( unused
))
3515 static void init_proc_440EP (CPUPPCState
*env
)
3519 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3521 gen_spr_usprgh(env
);
3522 /* Processor identification */
3523 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3524 SPR_NOACCESS
, SPR_NOACCESS
,
3525 &spr_read_generic
, &spr_write_pir
,
3527 /* XXX : not implemented */
3528 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3529 SPR_NOACCESS
, SPR_NOACCESS
,
3530 &spr_read_generic
, &spr_write_generic
,
3532 /* XXX : not implemented */
3533 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3534 SPR_NOACCESS
, SPR_NOACCESS
,
3535 &spr_read_generic
, &spr_write_generic
,
3537 /* XXX : not implemented */
3538 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3539 SPR_NOACCESS
, SPR_NOACCESS
,
3540 &spr_read_generic
, &spr_write_generic
,
3542 /* XXX : not implemented */
3543 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3544 SPR_NOACCESS
, SPR_NOACCESS
,
3545 &spr_read_generic
, &spr_write_generic
,
3547 /* XXX : not implemented */
3548 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3549 SPR_NOACCESS
, SPR_NOACCESS
,
3550 &spr_read_generic
, &spr_write_generic
,
3552 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3553 SPR_NOACCESS
, SPR_NOACCESS
,
3554 &spr_read_generic
, &spr_write_generic
,
3556 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3557 SPR_NOACCESS
, SPR_NOACCESS
,
3558 &spr_read_generic
, &spr_write_generic
,
3560 /* XXX : not implemented */
3561 spr_register(env
, SPR_440_CCR1
, "CCR1",
3562 SPR_NOACCESS
, SPR_NOACCESS
,
3563 &spr_read_generic
, &spr_write_generic
,
3565 /* Memory management */
3566 #if !defined(CONFIG_USER_ONLY)
3570 env
->tlb_type
= TLB_EMB
;
3572 init_excp_BookE(env
);
3573 env
->dcache_line_size
= 32;
3574 env
->icache_line_size
= 32;
3575 /* XXX: TODO: allocate internal IRQ controller */
3578 /* PowerPC 440 GP */
3579 #define POWERPC_INSNS_440GP (PPC_INSNS_BASE | PPC_STRING | \
3580 PPC_DCR | PPC_DCRX | PPC_WRTEE | PPC_MFAPIDI | \
3581 PPC_CACHE | PPC_CACHE_ICBI | \
3582 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3583 PPC_MEM_TLBSYNC | PPC_TLBIVA | PPC_MFTB | \
3584 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3586 #define POWERPC_INSNS2_440GP (PPC_NONE)
3587 #define POWERPC_MSRM_440GP (0x000000000006FF30ULL)
3588 #define POWERPC_MMU_440GP (POWERPC_MMU_BOOKE)
3589 #define POWERPC_EXCP_440GP (POWERPC_EXCP_BOOKE)
3590 #define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE)
3591 #define POWERPC_BFDM_440GP (bfd_mach_ppc_403)
3592 #define POWERPC_FLAG_440GP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3593 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3594 #define check_pow_440GP check_pow_nocheck
3596 __attribute__ (( unused
))
3597 static void init_proc_440GP (CPUPPCState
*env
)
3601 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3603 gen_spr_usprgh(env
);
3604 /* Processor identification */
3605 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3606 SPR_NOACCESS
, SPR_NOACCESS
,
3607 &spr_read_generic
, &spr_write_pir
,
3609 /* XXX : not implemented */
3610 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3611 SPR_NOACCESS
, SPR_NOACCESS
,
3612 &spr_read_generic
, &spr_write_generic
,
3614 /* XXX : not implemented */
3615 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3616 SPR_NOACCESS
, SPR_NOACCESS
,
3617 &spr_read_generic
, &spr_write_generic
,
3619 /* XXX : not implemented */
3620 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3621 SPR_NOACCESS
, SPR_NOACCESS
,
3622 &spr_read_generic
, &spr_write_generic
,
3624 /* XXX : not implemented */
3625 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3626 SPR_NOACCESS
, SPR_NOACCESS
,
3627 &spr_read_generic
, &spr_write_generic
,
3629 /* Memory management */
3630 #if !defined(CONFIG_USER_ONLY)
3634 env
->tlb_type
= TLB_EMB
;
3636 init_excp_BookE(env
);
3637 env
->dcache_line_size
= 32;
3638 env
->icache_line_size
= 32;
3639 /* XXX: TODO: allocate internal IRQ controller */
3643 #define POWERPC_INSNS_440x4 (PPC_INSNS_BASE | PPC_STRING | \
3644 PPC_DCR | PPC_WRTEE | \
3645 PPC_CACHE | PPC_CACHE_ICBI | \
3646 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3647 PPC_MEM_TLBSYNC | PPC_MFTB | \
3648 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3650 #define POWERPC_INSNS2_440x4 (PPC_NONE)
3651 #define POWERPC_MSRM_440x4 (0x000000000006FF30ULL)
3652 #define POWERPC_MMU_440x4 (POWERPC_MMU_BOOKE)
3653 #define POWERPC_EXCP_440x4 (POWERPC_EXCP_BOOKE)
3654 #define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE)
3655 #define POWERPC_BFDM_440x4 (bfd_mach_ppc_403)
3656 #define POWERPC_FLAG_440x4 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3657 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3658 #define check_pow_440x4 check_pow_nocheck
3660 __attribute__ (( unused
))
3661 static void init_proc_440x4 (CPUPPCState
*env
)
3665 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3667 gen_spr_usprgh(env
);
3668 /* Processor identification */
3669 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3670 SPR_NOACCESS
, SPR_NOACCESS
,
3671 &spr_read_generic
, &spr_write_pir
,
3673 /* XXX : not implemented */
3674 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3675 SPR_NOACCESS
, SPR_NOACCESS
,
3676 &spr_read_generic
, &spr_write_generic
,
3678 /* XXX : not implemented */
3679 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3680 SPR_NOACCESS
, SPR_NOACCESS
,
3681 &spr_read_generic
, &spr_write_generic
,
3683 /* XXX : not implemented */
3684 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3685 SPR_NOACCESS
, SPR_NOACCESS
,
3686 &spr_read_generic
, &spr_write_generic
,
3688 /* XXX : not implemented */
3689 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3690 SPR_NOACCESS
, SPR_NOACCESS
,
3691 &spr_read_generic
, &spr_write_generic
,
3693 /* Memory management */
3694 #if !defined(CONFIG_USER_ONLY)
3698 env
->tlb_type
= TLB_EMB
;
3700 init_excp_BookE(env
);
3701 env
->dcache_line_size
= 32;
3702 env
->icache_line_size
= 32;
3703 /* XXX: TODO: allocate internal IRQ controller */
3707 #define POWERPC_INSNS_440x5 (PPC_INSNS_BASE | PPC_STRING | \
3708 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3709 PPC_CACHE | PPC_CACHE_ICBI | \
3710 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3711 PPC_MEM_TLBSYNC | PPC_MFTB | \
3712 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3714 #define POWERPC_INSNS2_440x5 (PPC_NONE)
3715 #define POWERPC_MSRM_440x5 (0x000000000006FF30ULL)
3716 #define POWERPC_MMU_440x5 (POWERPC_MMU_BOOKE)
3717 #define POWERPC_EXCP_440x5 (POWERPC_EXCP_BOOKE)
3718 #define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE)
3719 #define POWERPC_BFDM_440x5 (bfd_mach_ppc_403)
3720 #define POWERPC_FLAG_440x5 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3721 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3722 #define check_pow_440x5 check_pow_nocheck
3724 static void init_proc_440x5 (CPUPPCState
*env
)
3728 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3730 gen_spr_usprgh(env
);
3731 /* Processor identification */
3732 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3733 SPR_NOACCESS
, SPR_NOACCESS
,
3734 &spr_read_generic
, &spr_write_pir
,
3736 /* XXX : not implemented */
3737 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3738 SPR_NOACCESS
, SPR_NOACCESS
,
3739 &spr_read_generic
, &spr_write_generic
,
3741 /* XXX : not implemented */
3742 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3743 SPR_NOACCESS
, SPR_NOACCESS
,
3744 &spr_read_generic
, &spr_write_generic
,
3746 /* XXX : not implemented */
3747 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3748 SPR_NOACCESS
, SPR_NOACCESS
,
3749 &spr_read_generic
, &spr_write_generic
,
3751 /* XXX : not implemented */
3752 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3753 SPR_NOACCESS
, SPR_NOACCESS
,
3754 &spr_read_generic
, &spr_write_generic
,
3756 /* XXX : not implemented */
3757 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3758 SPR_NOACCESS
, SPR_NOACCESS
,
3759 &spr_read_generic
, &spr_write_generic
,
3761 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3762 SPR_NOACCESS
, SPR_NOACCESS
,
3763 &spr_read_generic
, &spr_write_generic
,
3765 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3766 SPR_NOACCESS
, SPR_NOACCESS
,
3767 &spr_read_generic
, &spr_write_generic
,
3769 /* XXX : not implemented */
3770 spr_register(env
, SPR_440_CCR1
, "CCR1",
3771 SPR_NOACCESS
, SPR_NOACCESS
,
3772 &spr_read_generic
, &spr_write_generic
,
3774 /* Memory management */
3775 #if !defined(CONFIG_USER_ONLY)
3779 env
->tlb_type
= TLB_EMB
;
3781 init_excp_BookE(env
);
3782 env
->dcache_line_size
= 32;
3783 env
->icache_line_size
= 32;
3784 ppc40x_irq_init(env
);
3787 /* PowerPC 460 (guessed) */
3788 #define POWERPC_INSNS_460 (PPC_INSNS_BASE | PPC_STRING | \
3789 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3790 PPC_WRTEE | PPC_MFAPIDI | PPC_MFTB | \
3791 PPC_CACHE | PPC_CACHE_ICBI | \
3792 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3793 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3794 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3796 #define POWERPC_INSNS2_460 (PPC_NONE)
3797 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3798 #define POWERPC_MMU_460 (POWERPC_MMU_BOOKE)
3799 #define POWERPC_EXCP_460 (POWERPC_EXCP_BOOKE)
3800 #define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE)
3801 #define POWERPC_BFDM_460 (bfd_mach_ppc_403)
3802 #define POWERPC_FLAG_460 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3803 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3804 #define check_pow_460 check_pow_nocheck
3806 __attribute__ (( unused
))
3807 static void init_proc_460 (CPUPPCState
*env
)
3811 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3813 gen_spr_usprgh(env
);
3814 /* Processor identification */
3815 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3816 SPR_NOACCESS
, SPR_NOACCESS
,
3817 &spr_read_generic
, &spr_write_pir
,
3819 /* XXX : not implemented */
3820 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3821 SPR_NOACCESS
, SPR_NOACCESS
,
3822 &spr_read_generic
, &spr_write_generic
,
3824 /* XXX : not implemented */
3825 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3826 SPR_NOACCESS
, SPR_NOACCESS
,
3827 &spr_read_generic
, &spr_write_generic
,
3829 /* XXX : not implemented */
3830 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3831 SPR_NOACCESS
, SPR_NOACCESS
,
3832 &spr_read_generic
, &spr_write_generic
,
3834 /* XXX : not implemented */
3835 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3836 SPR_NOACCESS
, SPR_NOACCESS
,
3837 &spr_read_generic
, &spr_write_generic
,
3839 /* XXX : not implemented */
3840 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3841 SPR_NOACCESS
, SPR_NOACCESS
,
3842 &spr_read_generic
, &spr_write_generic
,
3844 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3845 SPR_NOACCESS
, SPR_NOACCESS
,
3846 &spr_read_generic
, &spr_write_generic
,
3848 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3849 SPR_NOACCESS
, SPR_NOACCESS
,
3850 &spr_read_generic
, &spr_write_generic
,
3852 /* XXX : not implemented */
3853 spr_register(env
, SPR_440_CCR1
, "CCR1",
3854 SPR_NOACCESS
, SPR_NOACCESS
,
3855 &spr_read_generic
, &spr_write_generic
,
3857 /* XXX : not implemented */
3858 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3859 &spr_read_generic
, &spr_write_generic
,
3860 &spr_read_generic
, &spr_write_generic
,
3862 /* Memory management */
3863 #if !defined(CONFIG_USER_ONLY)
3867 env
->tlb_type
= TLB_EMB
;
3869 init_excp_BookE(env
);
3870 env
->dcache_line_size
= 32;
3871 env
->icache_line_size
= 32;
3872 /* XXX: TODO: allocate internal IRQ controller */
3875 /* PowerPC 460F (guessed) */
3876 #define POWERPC_INSNS_460F (PPC_INSNS_BASE | PPC_STRING | \
3877 PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
3878 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
3879 PPC_FLOAT_STFIWX | PPC_MFTB | \
3880 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3881 PPC_WRTEE | PPC_MFAPIDI | \
3882 PPC_CACHE | PPC_CACHE_ICBI | \
3883 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3884 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3885 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3887 #define POWERPC_INSNS2_460F (PPC_NONE)
3888 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3889 #define POWERPC_MMU_460F (POWERPC_MMU_BOOKE)
3890 #define POWERPC_EXCP_460F (POWERPC_EXCP_BOOKE)
3891 #define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE)
3892 #define POWERPC_BFDM_460F (bfd_mach_ppc_403)
3893 #define POWERPC_FLAG_460F (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3894 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3895 #define check_pow_460F check_pow_nocheck
3897 __attribute__ (( unused
))
3898 static void init_proc_460F (CPUPPCState
*env
)
3902 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3904 gen_spr_usprgh(env
);
3905 /* Processor identification */
3906 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3907 SPR_NOACCESS
, SPR_NOACCESS
,
3908 &spr_read_generic
, &spr_write_pir
,
3910 /* XXX : not implemented */
3911 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3912 SPR_NOACCESS
, SPR_NOACCESS
,
3913 &spr_read_generic
, &spr_write_generic
,
3915 /* XXX : not implemented */
3916 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3917 SPR_NOACCESS
, SPR_NOACCESS
,
3918 &spr_read_generic
, &spr_write_generic
,
3920 /* XXX : not implemented */
3921 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3922 SPR_NOACCESS
, SPR_NOACCESS
,
3923 &spr_read_generic
, &spr_write_generic
,
3925 /* XXX : not implemented */
3926 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3927 SPR_NOACCESS
, SPR_NOACCESS
,
3928 &spr_read_generic
, &spr_write_generic
,
3930 /* XXX : not implemented */
3931 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3932 SPR_NOACCESS
, SPR_NOACCESS
,
3933 &spr_read_generic
, &spr_write_generic
,
3935 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3936 SPR_NOACCESS
, SPR_NOACCESS
,
3937 &spr_read_generic
, &spr_write_generic
,
3939 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3940 SPR_NOACCESS
, SPR_NOACCESS
,
3941 &spr_read_generic
, &spr_write_generic
,
3943 /* XXX : not implemented */
3944 spr_register(env
, SPR_440_CCR1
, "CCR1",
3945 SPR_NOACCESS
, SPR_NOACCESS
,
3946 &spr_read_generic
, &spr_write_generic
,
3948 /* XXX : not implemented */
3949 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3950 &spr_read_generic
, &spr_write_generic
,
3951 &spr_read_generic
, &spr_write_generic
,
3953 /* Memory management */
3954 #if !defined(CONFIG_USER_ONLY)
3958 env
->tlb_type
= TLB_EMB
;
3960 init_excp_BookE(env
);
3961 env
->dcache_line_size
= 32;
3962 env
->icache_line_size
= 32;
3963 /* XXX: TODO: allocate internal IRQ controller */
3966 /* Freescale 5xx cores (aka RCPU) */
3967 #define POWERPC_INSNS_MPC5xx (PPC_INSNS_BASE | PPC_STRING | \
3968 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
3969 PPC_CACHE_ICBI | PPC_FLOAT | PPC_FLOAT_STFIWX | \
3971 #define POWERPC_INSNS2_MPC5xx (PPC_NONE)
3972 #define POWERPC_MSRM_MPC5xx (0x000000000001FF43ULL)
3973 #define POWERPC_MMU_MPC5xx (POWERPC_MMU_REAL)
3974 #define POWERPC_EXCP_MPC5xx (POWERPC_EXCP_603)
3975 #define POWERPC_INPUT_MPC5xx (PPC_FLAGS_INPUT_RCPU)
3976 #define POWERPC_BFDM_MPC5xx (bfd_mach_ppc_505)
3977 #define POWERPC_FLAG_MPC5xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
3978 POWERPC_FLAG_BUS_CLK)
3979 #define check_pow_MPC5xx check_pow_none
3981 __attribute__ (( unused
))
3982 static void init_proc_MPC5xx (CPUPPCState
*env
)
3986 gen_spr_5xx_8xx(env
);
3988 init_excp_MPC5xx(env
);
3989 env
->dcache_line_size
= 32;
3990 env
->icache_line_size
= 32;
3991 /* XXX: TODO: allocate internal IRQ controller */
3994 /* Freescale 8xx cores (aka PowerQUICC) */
3995 #define POWERPC_INSNS_MPC8xx (PPC_INSNS_BASE | PPC_STRING | \
3996 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
3997 PPC_CACHE_ICBI | PPC_MFTB)
3998 #define POWERPC_INSNS2_MPC8xx (PPC_NONE)
3999 #define POWERPC_MSRM_MPC8xx (0x000000000001F673ULL)
4000 #define POWERPC_MMU_MPC8xx (POWERPC_MMU_MPC8xx)
4001 #define POWERPC_EXCP_MPC8xx (POWERPC_EXCP_603)
4002 #define POWERPC_INPUT_MPC8xx (PPC_FLAGS_INPUT_RCPU)
4003 #define POWERPC_BFDM_MPC8xx (bfd_mach_ppc_860)
4004 #define POWERPC_FLAG_MPC8xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4005 POWERPC_FLAG_BUS_CLK)
4006 #define check_pow_MPC8xx check_pow_none
4008 __attribute__ (( unused
))
4009 static void init_proc_MPC8xx (CPUPPCState
*env
)
4013 gen_spr_5xx_8xx(env
);
4015 init_excp_MPC8xx(env
);
4016 env
->dcache_line_size
= 32;
4017 env
->icache_line_size
= 32;
4018 /* XXX: TODO: allocate internal IRQ controller */
4021 /* Freescale 82xx cores (aka PowerQUICC-II) */
4023 #define POWERPC_INSNS_G2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4024 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4025 PPC_FLOAT_STFIWX | \
4026 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4027 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4028 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4029 PPC_SEGMENT | PPC_EXTERN)
4030 #define POWERPC_INSNS2_G2 (PPC_NONE)
4031 #define POWERPC_MSRM_G2 (0x000000000006FFF2ULL)
4032 #define POWERPC_MMU_G2 (POWERPC_MMU_SOFT_6xx)
4033 //#define POWERPC_EXCP_G2 (POWERPC_EXCP_G2)
4034 #define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx)
4035 #define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e)
4036 #define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4037 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4038 #define check_pow_G2 check_pow_hid0
4040 static void init_proc_G2 (CPUPPCState
*env
)
4042 gen_spr_ne_601(env
);
4043 gen_spr_G2_755(env
);
4047 /* External access control */
4048 /* XXX : not implemented */
4049 spr_register(env
, SPR_EAR
, "EAR",
4050 SPR_NOACCESS
, SPR_NOACCESS
,
4051 &spr_read_generic
, &spr_write_generic
,
4053 /* Hardware implementation register */
4054 /* XXX : not implemented */
4055 spr_register(env
, SPR_HID0
, "HID0",
4056 SPR_NOACCESS
, SPR_NOACCESS
,
4057 &spr_read_generic
, &spr_write_generic
,
4059 /* XXX : not implemented */
4060 spr_register(env
, SPR_HID1
, "HID1",
4061 SPR_NOACCESS
, SPR_NOACCESS
,
4062 &spr_read_generic
, &spr_write_generic
,
4064 /* XXX : not implemented */
4065 spr_register(env
, SPR_HID2
, "HID2",
4066 SPR_NOACCESS
, SPR_NOACCESS
,
4067 &spr_read_generic
, &spr_write_generic
,
4069 /* Memory management */
4072 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4074 env
->dcache_line_size
= 32;
4075 env
->icache_line_size
= 32;
4076 /* Allocate hardware IRQ controller */
4077 ppc6xx_irq_init(env
);
4081 #define POWERPC_INSNS_G2LE (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4082 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4083 PPC_FLOAT_STFIWX | \
4084 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4085 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4086 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4087 PPC_SEGMENT | PPC_EXTERN)
4088 #define POWERPC_INSNS2_G2LE (PPC_NONE)
4089 #define POWERPC_MSRM_G2LE (0x000000000007FFF3ULL)
4090 #define POWERPC_MMU_G2LE (POWERPC_MMU_SOFT_6xx)
4091 #define POWERPC_EXCP_G2LE (POWERPC_EXCP_G2)
4092 #define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx)
4093 #define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e)
4094 #define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4095 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4096 #define check_pow_G2LE check_pow_hid0
4098 static void init_proc_G2LE (CPUPPCState
*env
)
4100 gen_spr_ne_601(env
);
4101 gen_spr_G2_755(env
);
4105 /* External access control */
4106 /* XXX : not implemented */
4107 spr_register(env
, SPR_EAR
, "EAR",
4108 SPR_NOACCESS
, SPR_NOACCESS
,
4109 &spr_read_generic
, &spr_write_generic
,
4111 /* Hardware implementation register */
4112 /* XXX : not implemented */
4113 spr_register(env
, SPR_HID0
, "HID0",
4114 SPR_NOACCESS
, SPR_NOACCESS
,
4115 &spr_read_generic
, &spr_write_generic
,
4117 /* XXX : not implemented */
4118 spr_register(env
, SPR_HID1
, "HID1",
4119 SPR_NOACCESS
, SPR_NOACCESS
,
4120 &spr_read_generic
, &spr_write_generic
,
4122 /* XXX : not implemented */
4123 spr_register(env
, SPR_HID2
, "HID2",
4124 SPR_NOACCESS
, SPR_NOACCESS
,
4125 &spr_read_generic
, &spr_write_generic
,
4127 /* Memory management */
4130 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4132 env
->dcache_line_size
= 32;
4133 env
->icache_line_size
= 32;
4134 /* Allocate hardware IRQ controller */
4135 ppc6xx_irq_init(env
);
4139 /* XXX: unimplemented instructions:
4146 * all SPE multiply-accumulate instructions
4148 #define POWERPC_INSNS_e200 (PPC_INSNS_BASE | PPC_ISEL | \
4149 PPC_SPE | PPC_SPE_SINGLE | \
4150 PPC_WRTEE | PPC_RFDI | \
4151 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4152 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4153 PPC_MEM_TLBSYNC | PPC_TLBIVAX | \
4155 #define POWERPC_INSNS2_e200 (PPC_NONE)
4156 #define POWERPC_MSRM_e200 (0x000000000606FF30ULL)
4157 #define POWERPC_MMU_e200 (POWERPC_MMU_BOOKE206)
4158 #define POWERPC_EXCP_e200 (POWERPC_EXCP_BOOKE)
4159 #define POWERPC_INPUT_e200 (PPC_FLAGS_INPUT_BookE)
4160 #define POWERPC_BFDM_e200 (bfd_mach_ppc_860)
4161 #define POWERPC_FLAG_e200 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4162 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4163 POWERPC_FLAG_BUS_CLK)
4164 #define check_pow_e200 check_pow_hid0
4166 __attribute__ (( unused
))
4167 static void init_proc_e200 (CPUPPCState
*env
)
4171 gen_spr_BookE(env
, 0x000000070000FFFFULL
);
4172 /* XXX : not implemented */
4173 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4174 &spr_read_spefscr
, &spr_write_spefscr
,
4175 &spr_read_spefscr
, &spr_write_spefscr
,
4177 /* Memory management */
4178 gen_spr_BookE206(env
, 0x0000005D, NULL
);
4179 /* XXX : not implemented */
4180 spr_register(env
, SPR_HID0
, "HID0",
4181 SPR_NOACCESS
, SPR_NOACCESS
,
4182 &spr_read_generic
, &spr_write_generic
,
4184 /* XXX : not implemented */
4185 spr_register(env
, SPR_HID1
, "HID1",
4186 SPR_NOACCESS
, SPR_NOACCESS
,
4187 &spr_read_generic
, &spr_write_generic
,
4189 /* XXX : not implemented */
4190 spr_register(env
, SPR_Exxx_ALTCTXCR
, "ALTCTXCR",
4191 SPR_NOACCESS
, SPR_NOACCESS
,
4192 &spr_read_generic
, &spr_write_generic
,
4194 /* XXX : not implemented */
4195 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4196 SPR_NOACCESS
, SPR_NOACCESS
,
4197 &spr_read_generic
, &spr_write_generic
,
4199 /* XXX : not implemented */
4200 spr_register(env
, SPR_Exxx_CTXCR
, "CTXCR",
4201 SPR_NOACCESS
, SPR_NOACCESS
,
4202 &spr_read_generic
, &spr_write_generic
,
4204 /* XXX : not implemented */
4205 spr_register(env
, SPR_Exxx_DBCNT
, "DBCNT",
4206 SPR_NOACCESS
, SPR_NOACCESS
,
4207 &spr_read_generic
, &spr_write_generic
,
4209 /* XXX : not implemented */
4210 spr_register(env
, SPR_Exxx_DBCR3
, "DBCR3",
4211 SPR_NOACCESS
, SPR_NOACCESS
,
4212 &spr_read_generic
, &spr_write_generic
,
4214 /* XXX : not implemented */
4215 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4216 SPR_NOACCESS
, SPR_NOACCESS
,
4217 &spr_read_generic
, &spr_write_generic
,
4219 /* XXX : not implemented */
4220 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4221 SPR_NOACCESS
, SPR_NOACCESS
,
4222 &spr_read_generic
, &spr_write_generic
,
4224 /* XXX : not implemented */
4225 spr_register(env
, SPR_Exxx_L1FINV0
, "L1FINV0",
4226 SPR_NOACCESS
, SPR_NOACCESS
,
4227 &spr_read_generic
, &spr_write_generic
,
4229 /* XXX : not implemented */
4230 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
4231 SPR_NOACCESS
, SPR_NOACCESS
,
4232 &spr_read_generic
, &spr_write_generic
,
4234 /* XXX : not implemented */
4235 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
4236 SPR_NOACCESS
, SPR_NOACCESS
,
4237 &spr_read_generic
, &spr_write_generic
,
4239 /* XXX : not implemented */
4240 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
4241 SPR_NOACCESS
, SPR_NOACCESS
,
4242 &spr_read_generic
, &spr_write_generic
,
4244 /* XXX : not implemented */
4245 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
4246 SPR_NOACCESS
, SPR_NOACCESS
,
4247 &spr_read_generic
, &spr_write_generic
,
4249 /* XXX : not implemented */
4250 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
4251 SPR_NOACCESS
, SPR_NOACCESS
,
4252 &spr_read_generic
, &spr_write_generic
,
4253 0x00000000); /* TOFIX */
4254 spr_register(env
, SPR_BOOKE_DSRR0
, "DSRR0",
4255 SPR_NOACCESS
, SPR_NOACCESS
,
4256 &spr_read_generic
, &spr_write_generic
,
4258 spr_register(env
, SPR_BOOKE_DSRR1
, "DSRR1",
4259 SPR_NOACCESS
, SPR_NOACCESS
,
4260 &spr_read_generic
, &spr_write_generic
,
4262 #if !defined(CONFIG_USER_ONLY)
4266 env
->tlb_type
= TLB_EMB
;
4268 init_excp_e200(env
);
4269 env
->dcache_line_size
= 32;
4270 env
->icache_line_size
= 32;
4271 /* XXX: TODO: allocate internal IRQ controller */
4275 #define POWERPC_INSNS_e300 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4276 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4277 PPC_FLOAT_STFIWX | \
4278 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4279 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4280 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4281 PPC_SEGMENT | PPC_EXTERN)
4282 #define POWERPC_INSNS2_e300 (PPC_NONE)
4283 #define POWERPC_MSRM_e300 (0x000000000007FFF3ULL)
4284 #define POWERPC_MMU_e300 (POWERPC_MMU_SOFT_6xx)
4285 #define POWERPC_EXCP_e300 (POWERPC_EXCP_603)
4286 #define POWERPC_INPUT_e300 (PPC_FLAGS_INPUT_6xx)
4287 #define POWERPC_BFDM_e300 (bfd_mach_ppc_603)
4288 #define POWERPC_FLAG_e300 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4289 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4290 #define check_pow_e300 check_pow_hid0
4292 __attribute__ (( unused
))
4293 static void init_proc_e300 (CPUPPCState
*env
)
4295 gen_spr_ne_601(env
);
4299 /* hardware implementation registers */
4300 /* XXX : not implemented */
4301 spr_register(env
, SPR_HID0
, "HID0",
4302 SPR_NOACCESS
, SPR_NOACCESS
,
4303 &spr_read_generic
, &spr_write_generic
,
4305 /* XXX : not implemented */
4306 spr_register(env
, SPR_HID1
, "HID1",
4307 SPR_NOACCESS
, SPR_NOACCESS
,
4308 &spr_read_generic
, &spr_write_generic
,
4310 /* XXX : not implemented */
4311 spr_register(env
, SPR_HID2
, "HID2",
4312 SPR_NOACCESS
, SPR_NOACCESS
,
4313 &spr_read_generic
, &spr_write_generic
,
4315 /* Memory management */
4318 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4320 env
->dcache_line_size
= 32;
4321 env
->icache_line_size
= 32;
4322 /* Allocate hardware IRQ controller */
4323 ppc6xx_irq_init(env
);
4327 #define POWERPC_INSNS_e500v1 (PPC_INSNS_BASE | PPC_ISEL | \
4328 PPC_SPE | PPC_SPE_SINGLE | \
4329 PPC_WRTEE | PPC_RFDI | \
4330 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4331 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4332 PPC_MEM_TLBSYNC | PPC_TLBIVAX)
4333 #define POWERPC_INSNS2_e500v1 (PPC2_BOOKE206)
4334 #define POWERPC_MSRM_e500v1 (0x000000000606FF30ULL)
4335 #define POWERPC_MMU_e500v1 (POWERPC_MMU_BOOKE206)
4336 #define POWERPC_EXCP_e500v1 (POWERPC_EXCP_BOOKE)
4337 #define POWERPC_INPUT_e500v1 (PPC_FLAGS_INPUT_BookE)
4338 #define POWERPC_BFDM_e500v1 (bfd_mach_ppc_860)
4339 #define POWERPC_FLAG_e500v1 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4340 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4341 POWERPC_FLAG_BUS_CLK)
4342 #define check_pow_e500v1 check_pow_hid0
4343 #define init_proc_e500v1 init_proc_e500v1
4346 #define POWERPC_INSNS_e500v2 (PPC_INSNS_BASE | PPC_ISEL | \
4347 PPC_SPE | PPC_SPE_SINGLE | PPC_SPE_DOUBLE | \
4348 PPC_WRTEE | PPC_RFDI | \
4349 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4350 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4351 PPC_MEM_TLBSYNC | PPC_TLBIVAX)
4352 #define POWERPC_INSNS2_e500v2 (PPC2_BOOKE206)
4353 #define POWERPC_MSRM_e500v2 (0x000000000606FF30ULL)
4354 #define POWERPC_MMU_e500v2 (POWERPC_MMU_BOOKE206)
4355 #define POWERPC_EXCP_e500v2 (POWERPC_EXCP_BOOKE)
4356 #define POWERPC_INPUT_e500v2 (PPC_FLAGS_INPUT_BookE)
4357 #define POWERPC_BFDM_e500v2 (bfd_mach_ppc_860)
4358 #define POWERPC_FLAG_e500v2 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4359 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4360 POWERPC_FLAG_BUS_CLK)
4361 #define check_pow_e500v2 check_pow_hid0
4362 #define init_proc_e500v2 init_proc_e500v2
4364 static void init_proc_e500 (CPUPPCState
*env
, int version
)
4366 uint32_t tlbncfg
[2];
4367 #if !defined(CONFIG_USER_ONLY)
4374 * XXX The e500 doesn't implement IVOR7 and IVOR9, but doesn't
4375 * complain when accessing them.
4376 * gen_spr_BookE(env, 0x0000000F0000FD7FULL);
4378 gen_spr_BookE(env
, 0x0000000F0000FFFFULL
);
4379 /* Processor identification */
4380 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
4381 SPR_NOACCESS
, SPR_NOACCESS
,
4382 &spr_read_generic
, &spr_write_pir
,
4384 /* XXX : not implemented */
4385 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4386 &spr_read_spefscr
, &spr_write_spefscr
,
4387 &spr_read_spefscr
, &spr_write_spefscr
,
4389 /* Memory management */
4390 #if !defined(CONFIG_USER_ONLY)
4397 tlbncfg
[0] = gen_tlbncfg(2, 1, 1, 0, 256);
4398 tlbncfg
[1] = gen_tlbncfg(16, 1, 9, TLBnCFG_AVAIL
| TLBnCFG_IPROT
, 16);
4402 tlbncfg
[0] = gen_tlbncfg(4, 1, 1, 0, 512);
4403 tlbncfg
[1] = gen_tlbncfg(16, 1, 12, TLBnCFG_AVAIL
| TLBnCFG_IPROT
, 16);
4406 cpu_abort(env
, "Unknown CPU: " TARGET_FMT_lx
"\n", env
->spr
[SPR_PVR
]);
4409 gen_spr_BookE206(env
, 0x000000DF, tlbncfg
);
4410 /* XXX : not implemented */
4411 spr_register(env
, SPR_HID0
, "HID0",
4412 SPR_NOACCESS
, SPR_NOACCESS
,
4413 &spr_read_generic
, &spr_write_generic
,
4415 /* XXX : not implemented */
4416 spr_register(env
, SPR_HID1
, "HID1",
4417 SPR_NOACCESS
, SPR_NOACCESS
,
4418 &spr_read_generic
, &spr_write_generic
,
4420 /* XXX : not implemented */
4421 spr_register(env
, SPR_Exxx_BBEAR
, "BBEAR",
4422 SPR_NOACCESS
, SPR_NOACCESS
,
4423 &spr_read_generic
, &spr_write_generic
,
4425 /* XXX : not implemented */
4426 spr_register(env
, SPR_Exxx_BBTAR
, "BBTAR",
4427 SPR_NOACCESS
, SPR_NOACCESS
,
4428 &spr_read_generic
, &spr_write_generic
,
4430 /* XXX : not implemented */
4431 spr_register(env
, SPR_Exxx_MCAR
, "MCAR",
4432 SPR_NOACCESS
, SPR_NOACCESS
,
4433 &spr_read_generic
, &spr_write_generic
,
4435 /* XXX : not implemented */
4436 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
4437 SPR_NOACCESS
, SPR_NOACCESS
,
4438 &spr_read_generic
, &spr_write_generic
,
4440 /* XXX : not implemented */
4441 spr_register(env
, SPR_Exxx_NPIDR
, "NPIDR",
4442 SPR_NOACCESS
, SPR_NOACCESS
,
4443 &spr_read_generic
, &spr_write_generic
,
4445 /* XXX : not implemented */
4446 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4447 SPR_NOACCESS
, SPR_NOACCESS
,
4448 &spr_read_generic
, &spr_write_generic
,
4450 /* XXX : not implemented */
4451 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4452 SPR_NOACCESS
, SPR_NOACCESS
,
4453 &spr_read_generic
, &spr_write_generic
,
4455 /* XXX : not implemented */
4456 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4457 SPR_NOACCESS
, SPR_NOACCESS
,
4458 &spr_read_generic
, &spr_write_e500_l1csr0
,
4460 /* XXX : not implemented */
4461 spr_register(env
, SPR_Exxx_L1CSR1
, "L1CSR1",
4462 SPR_NOACCESS
, SPR_NOACCESS
,
4463 &spr_read_generic
, &spr_write_generic
,
4465 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
4466 SPR_NOACCESS
, SPR_NOACCESS
,
4467 &spr_read_generic
, &spr_write_generic
,
4469 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
4470 SPR_NOACCESS
, SPR_NOACCESS
,
4471 &spr_read_generic
, &spr_write_generic
,
4473 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
4474 SPR_NOACCESS
, SPR_NOACCESS
,
4475 &spr_read_generic
, &spr_write_booke206_mmucsr0
,
4478 #if !defined(CONFIG_USER_ONLY)
4480 env
->tlb_type
= TLB_MAS
;
4481 for (i
= 0; i
< BOOKE206_MAX_TLBN
; i
++) {
4482 env
->nb_tlb
+= booke206_tlb_size(env
, i
);
4486 init_excp_e200(env
);
4487 env
->dcache_line_size
= 32;
4488 env
->icache_line_size
= 32;
4489 /* Allocate hardware IRQ controller */
4490 ppce500_irq_init(env
);
4493 static void init_proc_e500v1(CPUPPCState
*env
)
4495 init_proc_e500(env
, 1);
4498 static void init_proc_e500v2(CPUPPCState
*env
)
4500 init_proc_e500(env
, 2);
4503 /* Non-embedded PowerPC */
4505 /* POWER : same as 601, without mfmsr, mfsr */
4507 #define POWERPC_INSNS_POWER (XXX_TODO)
4508 /* POWER RSC (from RAD6000) */
4509 #define POWERPC_MSRM_POWER (0x00000000FEF0ULL)
4513 #define POWERPC_INSNS_601 (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4515 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4516 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4517 PPC_SEGMENT | PPC_EXTERN)
4518 #define POWERPC_INSNS2_601 (PPC_NONE)
4519 #define POWERPC_MSRM_601 (0x000000000000FD70ULL)
4520 #define POWERPC_MSRR_601 (0x0000000000001040ULL)
4521 //#define POWERPC_MMU_601 (POWERPC_MMU_601)
4522 //#define POWERPC_EXCP_601 (POWERPC_EXCP_601)
4523 #define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx)
4524 #define POWERPC_BFDM_601 (bfd_mach_ppc_601)
4525 #define POWERPC_FLAG_601 (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4526 #define check_pow_601 check_pow_none
4528 static void init_proc_601 (CPUPPCState
*env
)
4530 gen_spr_ne_601(env
);
4532 /* Hardware implementation registers */
4533 /* XXX : not implemented */
4534 spr_register(env
, SPR_HID0
, "HID0",
4535 SPR_NOACCESS
, SPR_NOACCESS
,
4536 &spr_read_generic
, &spr_write_hid0_601
,
4538 /* XXX : not implemented */
4539 spr_register(env
, SPR_HID1
, "HID1",
4540 SPR_NOACCESS
, SPR_NOACCESS
,
4541 &spr_read_generic
, &spr_write_generic
,
4543 /* XXX : not implemented */
4544 spr_register(env
, SPR_601_HID2
, "HID2",
4545 SPR_NOACCESS
, SPR_NOACCESS
,
4546 &spr_read_generic
, &spr_write_generic
,
4548 /* XXX : not implemented */
4549 spr_register(env
, SPR_601_HID5
, "HID5",
4550 SPR_NOACCESS
, SPR_NOACCESS
,
4551 &spr_read_generic
, &spr_write_generic
,
4553 /* Memory management */
4555 /* XXX: beware that dcache line size is 64
4556 * but dcbz uses 32 bytes "sectors"
4557 * XXX: this breaks clcs instruction !
4559 env
->dcache_line_size
= 32;
4560 env
->icache_line_size
= 64;
4561 /* Allocate hardware IRQ controller */
4562 ppc6xx_irq_init(env
);
4566 #define POWERPC_INSNS_601v (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4568 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4569 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4570 PPC_SEGMENT | PPC_EXTERN)
4571 #define POWERPC_INSNS2_601v (PPC_NONE)
4572 #define POWERPC_MSRM_601v (0x000000000000FD70ULL)
4573 #define POWERPC_MSRR_601v (0x0000000000001040ULL)
4574 #define POWERPC_MMU_601v (POWERPC_MMU_601)
4575 #define POWERPC_EXCP_601v (POWERPC_EXCP_601)
4576 #define POWERPC_INPUT_601v (PPC_FLAGS_INPUT_6xx)
4577 #define POWERPC_BFDM_601v (bfd_mach_ppc_601)
4578 #define POWERPC_FLAG_601v (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4579 #define check_pow_601v check_pow_none
4581 static void init_proc_601v (CPUPPCState
*env
)
4584 /* XXX : not implemented */
4585 spr_register(env
, SPR_601_HID15
, "HID15",
4586 SPR_NOACCESS
, SPR_NOACCESS
,
4587 &spr_read_generic
, &spr_write_generic
,
4592 #define POWERPC_INSNS_602 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4593 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4594 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4595 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4596 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4597 PPC_MEM_TLBIE | PPC_6xx_TLB | PPC_MEM_TLBSYNC | \
4598 PPC_SEGMENT | PPC_602_SPEC)
4599 #define POWERPC_INSNS2_602 (PPC_NONE)
4600 #define POWERPC_MSRM_602 (0x0000000000C7FF73ULL)
4601 /* XXX: 602 MMU is quite specific. Should add a special case */
4602 #define POWERPC_MMU_602 (POWERPC_MMU_SOFT_6xx)
4603 //#define POWERPC_EXCP_602 (POWERPC_EXCP_602)
4604 #define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx)
4605 #define POWERPC_BFDM_602 (bfd_mach_ppc_602)
4606 #define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4607 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4608 #define check_pow_602 check_pow_hid0
4610 static void init_proc_602 (CPUPPCState
*env
)
4612 gen_spr_ne_601(env
);
4616 /* hardware implementation registers */
4617 /* XXX : not implemented */
4618 spr_register(env
, SPR_HID0
, "HID0",
4619 SPR_NOACCESS
, SPR_NOACCESS
,
4620 &spr_read_generic
, &spr_write_generic
,
4622 /* XXX : not implemented */
4623 spr_register(env
, SPR_HID1
, "HID1",
4624 SPR_NOACCESS
, SPR_NOACCESS
,
4625 &spr_read_generic
, &spr_write_generic
,
4627 /* Memory management */
4629 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4631 env
->dcache_line_size
= 32;
4632 env
->icache_line_size
= 32;
4633 /* Allocate hardware IRQ controller */
4634 ppc6xx_irq_init(env
);
4638 #define POWERPC_INSNS_603 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4639 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4640 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4641 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4642 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4643 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4644 PPC_SEGMENT | PPC_EXTERN)
4645 #define POWERPC_INSNS2_603 (PPC_NONE)
4646 #define POWERPC_MSRM_603 (0x000000000007FF73ULL)
4647 #define POWERPC_MMU_603 (POWERPC_MMU_SOFT_6xx)
4648 //#define POWERPC_EXCP_603 (POWERPC_EXCP_603)
4649 #define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx)
4650 #define POWERPC_BFDM_603 (bfd_mach_ppc_603)
4651 #define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4652 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4653 #define check_pow_603 check_pow_hid0
4655 static void init_proc_603 (CPUPPCState
*env
)
4657 gen_spr_ne_601(env
);
4661 /* hardware implementation registers */
4662 /* XXX : not implemented */
4663 spr_register(env
, SPR_HID0
, "HID0",
4664 SPR_NOACCESS
, SPR_NOACCESS
,
4665 &spr_read_generic
, &spr_write_generic
,
4667 /* XXX : not implemented */
4668 spr_register(env
, SPR_HID1
, "HID1",
4669 SPR_NOACCESS
, SPR_NOACCESS
,
4670 &spr_read_generic
, &spr_write_generic
,
4672 /* Memory management */
4674 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4676 env
->dcache_line_size
= 32;
4677 env
->icache_line_size
= 32;
4678 /* Allocate hardware IRQ controller */
4679 ppc6xx_irq_init(env
);
4683 #define POWERPC_INSNS_603E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4684 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4685 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4686 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4687 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4688 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4689 PPC_SEGMENT | PPC_EXTERN)
4690 #define POWERPC_INSNS2_603E (PPC_NONE)
4691 #define POWERPC_MSRM_603E (0x000000000007FF73ULL)
4692 #define POWERPC_MMU_603E (POWERPC_MMU_SOFT_6xx)
4693 //#define POWERPC_EXCP_603E (POWERPC_EXCP_603E)
4694 #define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx)
4695 #define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e)
4696 #define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4697 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4698 #define check_pow_603E check_pow_hid0
4700 static void init_proc_603E (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 /* XXX : not implemented */
4718 spr_register(env
, SPR_IABR
, "IABR",
4719 SPR_NOACCESS
, SPR_NOACCESS
,
4720 &spr_read_generic
, &spr_write_generic
,
4722 /* Memory management */
4724 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4726 env
->dcache_line_size
= 32;
4727 env
->icache_line_size
= 32;
4728 /* Allocate hardware IRQ controller */
4729 ppc6xx_irq_init(env
);
4733 #define POWERPC_INSNS_604 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4734 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4735 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4736 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4737 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4738 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4739 PPC_SEGMENT | PPC_EXTERN)
4740 #define POWERPC_INSNS2_604 (PPC_NONE)
4741 #define POWERPC_MSRM_604 (0x000000000005FF77ULL)
4742 #define POWERPC_MMU_604 (POWERPC_MMU_32B)
4743 //#define POWERPC_EXCP_604 (POWERPC_EXCP_604)
4744 #define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx)
4745 #define POWERPC_BFDM_604 (bfd_mach_ppc_604)
4746 #define POWERPC_FLAG_604 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4747 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4748 #define check_pow_604 check_pow_nocheck
4750 static void init_proc_604 (CPUPPCState
*env
)
4752 gen_spr_ne_601(env
);
4756 /* Hardware implementation registers */
4757 /* XXX : not implemented */
4758 spr_register(env
, SPR_HID0
, "HID0",
4759 SPR_NOACCESS
, SPR_NOACCESS
,
4760 &spr_read_generic
, &spr_write_generic
,
4762 /* Memory management */
4765 env
->dcache_line_size
= 32;
4766 env
->icache_line_size
= 32;
4767 /* Allocate hardware IRQ controller */
4768 ppc6xx_irq_init(env
);
4772 #define POWERPC_INSNS_604E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4773 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4774 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4775 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4776 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4777 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4778 PPC_SEGMENT | PPC_EXTERN)
4779 #define POWERPC_INSNS2_604E (PPC_NONE)
4780 #define POWERPC_MSRM_604E (0x000000000005FF77ULL)
4781 #define POWERPC_MMU_604E (POWERPC_MMU_32B)
4782 #define POWERPC_EXCP_604E (POWERPC_EXCP_604)
4783 #define POWERPC_INPUT_604E (PPC_FLAGS_INPUT_6xx)
4784 #define POWERPC_BFDM_604E (bfd_mach_ppc_604)
4785 #define POWERPC_FLAG_604E (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4786 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4787 #define check_pow_604E check_pow_nocheck
4789 static void init_proc_604E (CPUPPCState
*env
)
4791 gen_spr_ne_601(env
);
4793 /* XXX : not implemented */
4794 spr_register(env
, SPR_MMCR1
, "MMCR1",
4795 SPR_NOACCESS
, SPR_NOACCESS
,
4796 &spr_read_generic
, &spr_write_generic
,
4798 /* XXX : not implemented */
4799 spr_register(env
, SPR_PMC3
, "PMC3",
4800 SPR_NOACCESS
, SPR_NOACCESS
,
4801 &spr_read_generic
, &spr_write_generic
,
4803 /* XXX : not implemented */
4804 spr_register(env
, SPR_PMC4
, "PMC4",
4805 SPR_NOACCESS
, SPR_NOACCESS
,
4806 &spr_read_generic
, &spr_write_generic
,
4810 /* Hardware implementation registers */
4811 /* XXX : not implemented */
4812 spr_register(env
, SPR_HID0
, "HID0",
4813 SPR_NOACCESS
, SPR_NOACCESS
,
4814 &spr_read_generic
, &spr_write_generic
,
4816 /* XXX : not implemented */
4817 spr_register(env
, SPR_HID1
, "HID1",
4818 SPR_NOACCESS
, SPR_NOACCESS
,
4819 &spr_read_generic
, &spr_write_generic
,
4821 /* Memory management */
4824 env
->dcache_line_size
= 32;
4825 env
->icache_line_size
= 32;
4826 /* Allocate hardware IRQ controller */
4827 ppc6xx_irq_init(env
);
4831 #define POWERPC_INSNS_740 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4832 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4833 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4834 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4835 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4836 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4837 PPC_SEGMENT | PPC_EXTERN)
4838 #define POWERPC_INSNS2_740 (PPC_NONE)
4839 #define POWERPC_MSRM_740 (0x000000000005FF77ULL)
4840 #define POWERPC_MMU_740 (POWERPC_MMU_32B)
4841 #define POWERPC_EXCP_740 (POWERPC_EXCP_7x0)
4842 #define POWERPC_INPUT_740 (PPC_FLAGS_INPUT_6xx)
4843 #define POWERPC_BFDM_740 (bfd_mach_ppc_750)
4844 #define POWERPC_FLAG_740 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4845 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4846 #define check_pow_740 check_pow_hid0
4848 static void init_proc_740 (CPUPPCState
*env
)
4850 gen_spr_ne_601(env
);
4854 /* Thermal management */
4856 /* Hardware implementation registers */
4857 /* XXX : not implemented */
4858 spr_register(env
, SPR_HID0
, "HID0",
4859 SPR_NOACCESS
, SPR_NOACCESS
,
4860 &spr_read_generic
, &spr_write_generic
,
4862 /* XXX : not implemented */
4863 spr_register(env
, SPR_HID1
, "HID1",
4864 SPR_NOACCESS
, SPR_NOACCESS
,
4865 &spr_read_generic
, &spr_write_generic
,
4867 /* Memory management */
4870 env
->dcache_line_size
= 32;
4871 env
->icache_line_size
= 32;
4872 /* Allocate hardware IRQ controller */
4873 ppc6xx_irq_init(env
);
4877 #define POWERPC_INSNS_750 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4878 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4879 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4880 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4881 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4882 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4883 PPC_SEGMENT | PPC_EXTERN)
4884 #define POWERPC_INSNS2_750 (PPC_NONE)
4885 #define POWERPC_MSRM_750 (0x000000000005FF77ULL)
4886 #define POWERPC_MMU_750 (POWERPC_MMU_32B)
4887 #define POWERPC_EXCP_750 (POWERPC_EXCP_7x0)
4888 #define POWERPC_INPUT_750 (PPC_FLAGS_INPUT_6xx)
4889 #define POWERPC_BFDM_750 (bfd_mach_ppc_750)
4890 #define POWERPC_FLAG_750 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4891 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4892 #define check_pow_750 check_pow_hid0
4894 static void init_proc_750 (CPUPPCState
*env
)
4896 gen_spr_ne_601(env
);
4898 /* XXX : not implemented */
4899 spr_register(env
, SPR_L2CR
, "L2CR",
4900 SPR_NOACCESS
, SPR_NOACCESS
,
4901 &spr_read_generic
, &spr_write_generic
,
4905 /* Thermal management */
4907 /* Hardware implementation registers */
4908 /* XXX : not implemented */
4909 spr_register(env
, SPR_HID0
, "HID0",
4910 SPR_NOACCESS
, SPR_NOACCESS
,
4911 &spr_read_generic
, &spr_write_generic
,
4913 /* XXX : not implemented */
4914 spr_register(env
, SPR_HID1
, "HID1",
4915 SPR_NOACCESS
, SPR_NOACCESS
,
4916 &spr_read_generic
, &spr_write_generic
,
4918 /* Memory management */
4920 /* XXX: high BATs are also present but are known to be bugged on
4924 env
->dcache_line_size
= 32;
4925 env
->icache_line_size
= 32;
4926 /* Allocate hardware IRQ controller */
4927 ppc6xx_irq_init(env
);
4930 /* PowerPC 750 CL */
4931 /* XXX: not implemented:
4932 * cache lock instructions:
4934 * floating point paired instructions
4969 #define POWERPC_INSNS_750cl (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4970 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4971 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4972 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4973 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4974 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4975 PPC_SEGMENT | PPC_EXTERN)
4976 #define POWERPC_INSNS2_750cl (PPC_NONE)
4977 #define POWERPC_MSRM_750cl (0x000000000005FF77ULL)
4978 #define POWERPC_MMU_750cl (POWERPC_MMU_32B)
4979 #define POWERPC_EXCP_750cl (POWERPC_EXCP_7x0)
4980 #define POWERPC_INPUT_750cl (PPC_FLAGS_INPUT_6xx)
4981 #define POWERPC_BFDM_750cl (bfd_mach_ppc_750)
4982 #define POWERPC_FLAG_750cl (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4983 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4984 #define check_pow_750cl check_pow_hid0
4986 static void init_proc_750cl (CPUPPCState
*env
)
4988 gen_spr_ne_601(env
);
4990 /* XXX : not implemented */
4991 spr_register(env
, SPR_L2CR
, "L2CR",
4992 SPR_NOACCESS
, SPR_NOACCESS
,
4993 &spr_read_generic
, &spr_write_generic
,
4997 /* Thermal management */
4998 /* Those registers are fake on 750CL */
4999 spr_register(env
, SPR_THRM1
, "THRM1",
5000 SPR_NOACCESS
, SPR_NOACCESS
,
5001 &spr_read_generic
, &spr_write_generic
,
5003 spr_register(env
, SPR_THRM2
, "THRM2",
5004 SPR_NOACCESS
, SPR_NOACCESS
,
5005 &spr_read_generic
, &spr_write_generic
,
5007 spr_register(env
, SPR_THRM3
, "THRM3",
5008 SPR_NOACCESS
, SPR_NOACCESS
,
5009 &spr_read_generic
, &spr_write_generic
,
5011 /* XXX: not implemented */
5012 spr_register(env
, SPR_750_TDCL
, "TDCL",
5013 SPR_NOACCESS
, SPR_NOACCESS
,
5014 &spr_read_generic
, &spr_write_generic
,
5016 spr_register(env
, SPR_750_TDCH
, "TDCH",
5017 SPR_NOACCESS
, SPR_NOACCESS
,
5018 &spr_read_generic
, &spr_write_generic
,
5021 /* XXX : not implemented */
5022 spr_register(env
, SPR_750_WPAR
, "WPAR",
5023 SPR_NOACCESS
, SPR_NOACCESS
,
5024 &spr_read_generic
, &spr_write_generic
,
5026 spr_register(env
, SPR_750_DMAL
, "DMAL",
5027 SPR_NOACCESS
, SPR_NOACCESS
,
5028 &spr_read_generic
, &spr_write_generic
,
5030 spr_register(env
, SPR_750_DMAU
, "DMAU",
5031 SPR_NOACCESS
, SPR_NOACCESS
,
5032 &spr_read_generic
, &spr_write_generic
,
5034 /* Hardware implementation registers */
5035 /* XXX : not implemented */
5036 spr_register(env
, SPR_HID0
, "HID0",
5037 SPR_NOACCESS
, SPR_NOACCESS
,
5038 &spr_read_generic
, &spr_write_generic
,
5040 /* XXX : not implemented */
5041 spr_register(env
, SPR_HID1
, "HID1",
5042 SPR_NOACCESS
, SPR_NOACCESS
,
5043 &spr_read_generic
, &spr_write_generic
,
5045 /* XXX : not implemented */
5046 spr_register(env
, SPR_750CL_HID2
, "HID2",
5047 SPR_NOACCESS
, SPR_NOACCESS
,
5048 &spr_read_generic
, &spr_write_generic
,
5050 /* XXX : not implemented */
5051 spr_register(env
, SPR_750CL_HID4
, "HID4",
5052 SPR_NOACCESS
, SPR_NOACCESS
,
5053 &spr_read_generic
, &spr_write_generic
,
5055 /* Quantization registers */
5056 /* XXX : not implemented */
5057 spr_register(env
, SPR_750_GQR0
, "GQR0",
5058 SPR_NOACCESS
, SPR_NOACCESS
,
5059 &spr_read_generic
, &spr_write_generic
,
5061 /* XXX : not implemented */
5062 spr_register(env
, SPR_750_GQR1
, "GQR1",
5063 SPR_NOACCESS
, SPR_NOACCESS
,
5064 &spr_read_generic
, &spr_write_generic
,
5066 /* XXX : not implemented */
5067 spr_register(env
, SPR_750_GQR2
, "GQR2",
5068 SPR_NOACCESS
, SPR_NOACCESS
,
5069 &spr_read_generic
, &spr_write_generic
,
5071 /* XXX : not implemented */
5072 spr_register(env
, SPR_750_GQR3
, "GQR3",
5073 SPR_NOACCESS
, SPR_NOACCESS
,
5074 &spr_read_generic
, &spr_write_generic
,
5076 /* XXX : not implemented */
5077 spr_register(env
, SPR_750_GQR4
, "GQR4",
5078 SPR_NOACCESS
, SPR_NOACCESS
,
5079 &spr_read_generic
, &spr_write_generic
,
5081 /* XXX : not implemented */
5082 spr_register(env
, SPR_750_GQR5
, "GQR5",
5083 SPR_NOACCESS
, SPR_NOACCESS
,
5084 &spr_read_generic
, &spr_write_generic
,
5086 /* XXX : not implemented */
5087 spr_register(env
, SPR_750_GQR6
, "GQR6",
5088 SPR_NOACCESS
, SPR_NOACCESS
,
5089 &spr_read_generic
, &spr_write_generic
,
5091 /* XXX : not implemented */
5092 spr_register(env
, SPR_750_GQR7
, "GQR7",
5093 SPR_NOACCESS
, SPR_NOACCESS
,
5094 &spr_read_generic
, &spr_write_generic
,
5096 /* Memory management */
5098 /* PowerPC 750cl has 8 DBATs and 8 IBATs */
5100 init_excp_750cl(env
);
5101 env
->dcache_line_size
= 32;
5102 env
->icache_line_size
= 32;
5103 /* Allocate hardware IRQ controller */
5104 ppc6xx_irq_init(env
);
5108 #define POWERPC_INSNS_750cx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5109 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5110 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5111 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5112 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5113 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5114 PPC_SEGMENT | PPC_EXTERN)
5115 #define POWERPC_INSNS2_750cx (PPC_NONE)
5116 #define POWERPC_MSRM_750cx (0x000000000005FF77ULL)
5117 #define POWERPC_MMU_750cx (POWERPC_MMU_32B)
5118 #define POWERPC_EXCP_750cx (POWERPC_EXCP_7x0)
5119 #define POWERPC_INPUT_750cx (PPC_FLAGS_INPUT_6xx)
5120 #define POWERPC_BFDM_750cx (bfd_mach_ppc_750)
5121 #define POWERPC_FLAG_750cx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5122 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5123 #define check_pow_750cx check_pow_hid0
5125 static void init_proc_750cx (CPUPPCState
*env
)
5127 gen_spr_ne_601(env
);
5129 /* XXX : not implemented */
5130 spr_register(env
, SPR_L2CR
, "L2CR",
5131 SPR_NOACCESS
, SPR_NOACCESS
,
5132 &spr_read_generic
, &spr_write_generic
,
5136 /* Thermal management */
5138 /* This register is not implemented but is present for compatibility */
5139 spr_register(env
, SPR_SDA
, "SDA",
5140 SPR_NOACCESS
, SPR_NOACCESS
,
5141 &spr_read_generic
, &spr_write_generic
,
5143 /* Hardware implementation registers */
5144 /* XXX : not implemented */
5145 spr_register(env
, SPR_HID0
, "HID0",
5146 SPR_NOACCESS
, SPR_NOACCESS
,
5147 &spr_read_generic
, &spr_write_generic
,
5149 /* XXX : not implemented */
5150 spr_register(env
, SPR_HID1
, "HID1",
5151 SPR_NOACCESS
, SPR_NOACCESS
,
5152 &spr_read_generic
, &spr_write_generic
,
5154 /* Memory management */
5156 /* PowerPC 750cx has 8 DBATs and 8 IBATs */
5158 init_excp_750cx(env
);
5159 env
->dcache_line_size
= 32;
5160 env
->icache_line_size
= 32;
5161 /* Allocate hardware IRQ controller */
5162 ppc6xx_irq_init(env
);
5166 #define POWERPC_INSNS_750fx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5167 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5168 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5169 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5170 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5171 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5172 PPC_SEGMENT | PPC_EXTERN)
5173 #define POWERPC_INSNS2_750fx (PPC_NONE)
5174 #define POWERPC_MSRM_750fx (0x000000000005FF77ULL)
5175 #define POWERPC_MMU_750fx (POWERPC_MMU_32B)
5176 #define POWERPC_EXCP_750fx (POWERPC_EXCP_7x0)
5177 #define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx)
5178 #define POWERPC_BFDM_750fx (bfd_mach_ppc_750)
5179 #define POWERPC_FLAG_750fx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5180 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5181 #define check_pow_750fx check_pow_hid0
5183 static void init_proc_750fx (CPUPPCState
*env
)
5185 gen_spr_ne_601(env
);
5187 /* XXX : not implemented */
5188 spr_register(env
, SPR_L2CR
, "L2CR",
5189 SPR_NOACCESS
, SPR_NOACCESS
,
5190 &spr_read_generic
, &spr_write_generic
,
5194 /* Thermal management */
5196 /* XXX : not implemented */
5197 spr_register(env
, SPR_750_THRM4
, "THRM4",
5198 SPR_NOACCESS
, SPR_NOACCESS
,
5199 &spr_read_generic
, &spr_write_generic
,
5201 /* Hardware implementation registers */
5202 /* XXX : not implemented */
5203 spr_register(env
, SPR_HID0
, "HID0",
5204 SPR_NOACCESS
, SPR_NOACCESS
,
5205 &spr_read_generic
, &spr_write_generic
,
5207 /* XXX : not implemented */
5208 spr_register(env
, SPR_HID1
, "HID1",
5209 SPR_NOACCESS
, SPR_NOACCESS
,
5210 &spr_read_generic
, &spr_write_generic
,
5212 /* XXX : not implemented */
5213 spr_register(env
, SPR_750FX_HID2
, "HID2",
5214 SPR_NOACCESS
, SPR_NOACCESS
,
5215 &spr_read_generic
, &spr_write_generic
,
5217 /* Memory management */
5219 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5222 env
->dcache_line_size
= 32;
5223 env
->icache_line_size
= 32;
5224 /* Allocate hardware IRQ controller */
5225 ppc6xx_irq_init(env
);
5229 #define POWERPC_INSNS_750gx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5230 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5231 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5232 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5233 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5234 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5235 PPC_SEGMENT | PPC_EXTERN)
5236 #define POWERPC_INSNS2_750gx (PPC_NONE)
5237 #define POWERPC_MSRM_750gx (0x000000000005FF77ULL)
5238 #define POWERPC_MMU_750gx (POWERPC_MMU_32B)
5239 #define POWERPC_EXCP_750gx (POWERPC_EXCP_7x0)
5240 #define POWERPC_INPUT_750gx (PPC_FLAGS_INPUT_6xx)
5241 #define POWERPC_BFDM_750gx (bfd_mach_ppc_750)
5242 #define POWERPC_FLAG_750gx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5243 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5244 #define check_pow_750gx check_pow_hid0
5246 static void init_proc_750gx (CPUPPCState
*env
)
5248 gen_spr_ne_601(env
);
5250 /* XXX : not implemented (XXX: different from 750fx) */
5251 spr_register(env
, SPR_L2CR
, "L2CR",
5252 SPR_NOACCESS
, SPR_NOACCESS
,
5253 &spr_read_generic
, &spr_write_generic
,
5257 /* Thermal management */
5259 /* XXX : not implemented */
5260 spr_register(env
, SPR_750_THRM4
, "THRM4",
5261 SPR_NOACCESS
, SPR_NOACCESS
,
5262 &spr_read_generic
, &spr_write_generic
,
5264 /* Hardware implementation registers */
5265 /* XXX : not implemented (XXX: different from 750fx) */
5266 spr_register(env
, SPR_HID0
, "HID0",
5267 SPR_NOACCESS
, SPR_NOACCESS
,
5268 &spr_read_generic
, &spr_write_generic
,
5270 /* XXX : not implemented */
5271 spr_register(env
, SPR_HID1
, "HID1",
5272 SPR_NOACCESS
, SPR_NOACCESS
,
5273 &spr_read_generic
, &spr_write_generic
,
5275 /* XXX : not implemented (XXX: different from 750fx) */
5276 spr_register(env
, SPR_750FX_HID2
, "HID2",
5277 SPR_NOACCESS
, SPR_NOACCESS
,
5278 &spr_read_generic
, &spr_write_generic
,
5280 /* Memory management */
5282 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5285 env
->dcache_line_size
= 32;
5286 env
->icache_line_size
= 32;
5287 /* Allocate hardware IRQ controller */
5288 ppc6xx_irq_init(env
);
5292 #define POWERPC_INSNS_745 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5293 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5294 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5295 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5296 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5297 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5298 PPC_SEGMENT | PPC_EXTERN)
5299 #define POWERPC_INSNS2_745 (PPC_NONE)
5300 #define POWERPC_MSRM_745 (0x000000000005FF77ULL)
5301 #define POWERPC_MMU_745 (POWERPC_MMU_SOFT_6xx)
5302 #define POWERPC_EXCP_745 (POWERPC_EXCP_7x5)
5303 #define POWERPC_INPUT_745 (PPC_FLAGS_INPUT_6xx)
5304 #define POWERPC_BFDM_745 (bfd_mach_ppc_750)
5305 #define POWERPC_FLAG_745 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5306 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5307 #define check_pow_745 check_pow_hid0
5309 static void init_proc_745 (CPUPPCState
*env
)
5311 gen_spr_ne_601(env
);
5313 gen_spr_G2_755(env
);
5316 /* Thermal management */
5318 /* Hardware implementation registers */
5319 /* XXX : not implemented */
5320 spr_register(env
, SPR_HID0
, "HID0",
5321 SPR_NOACCESS
, SPR_NOACCESS
,
5322 &spr_read_generic
, &spr_write_generic
,
5324 /* XXX : not implemented */
5325 spr_register(env
, SPR_HID1
, "HID1",
5326 SPR_NOACCESS
, SPR_NOACCESS
,
5327 &spr_read_generic
, &spr_write_generic
,
5329 /* XXX : not implemented */
5330 spr_register(env
, SPR_HID2
, "HID2",
5331 SPR_NOACCESS
, SPR_NOACCESS
,
5332 &spr_read_generic
, &spr_write_generic
,
5334 /* Memory management */
5337 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5339 env
->dcache_line_size
= 32;
5340 env
->icache_line_size
= 32;
5341 /* Allocate hardware IRQ controller */
5342 ppc6xx_irq_init(env
);
5346 #define POWERPC_INSNS_755 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5347 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5348 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5349 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5350 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5351 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5352 PPC_SEGMENT | PPC_EXTERN)
5353 #define POWERPC_INSNS2_755 (PPC_NONE)
5354 #define POWERPC_MSRM_755 (0x000000000005FF77ULL)
5355 #define POWERPC_MMU_755 (POWERPC_MMU_SOFT_6xx)
5356 #define POWERPC_EXCP_755 (POWERPC_EXCP_7x5)
5357 #define POWERPC_INPUT_755 (PPC_FLAGS_INPUT_6xx)
5358 #define POWERPC_BFDM_755 (bfd_mach_ppc_750)
5359 #define POWERPC_FLAG_755 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5360 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5361 #define check_pow_755 check_pow_hid0
5363 static void init_proc_755 (CPUPPCState
*env
)
5365 gen_spr_ne_601(env
);
5367 gen_spr_G2_755(env
);
5370 /* L2 cache control */
5371 /* XXX : not implemented */
5372 spr_register(env
, SPR_L2CR
, "L2CR",
5373 SPR_NOACCESS
, SPR_NOACCESS
,
5374 &spr_read_generic
, &spr_write_generic
,
5376 /* XXX : not implemented */
5377 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5378 SPR_NOACCESS
, SPR_NOACCESS
,
5379 &spr_read_generic
, &spr_write_generic
,
5381 /* Thermal management */
5383 /* Hardware implementation registers */
5384 /* XXX : not implemented */
5385 spr_register(env
, SPR_HID0
, "HID0",
5386 SPR_NOACCESS
, SPR_NOACCESS
,
5387 &spr_read_generic
, &spr_write_generic
,
5389 /* XXX : not implemented */
5390 spr_register(env
, SPR_HID1
, "HID1",
5391 SPR_NOACCESS
, SPR_NOACCESS
,
5392 &spr_read_generic
, &spr_write_generic
,
5394 /* XXX : not implemented */
5395 spr_register(env
, SPR_HID2
, "HID2",
5396 SPR_NOACCESS
, SPR_NOACCESS
,
5397 &spr_read_generic
, &spr_write_generic
,
5399 /* Memory management */
5402 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5404 env
->dcache_line_size
= 32;
5405 env
->icache_line_size
= 32;
5406 /* Allocate hardware IRQ controller */
5407 ppc6xx_irq_init(env
);
5410 /* PowerPC 7400 (aka G4) */
5411 #define POWERPC_INSNS_7400 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5412 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5413 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5414 PPC_FLOAT_STFIWX | \
5415 PPC_CACHE | PPC_CACHE_ICBI | \
5416 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5417 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5418 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5420 PPC_SEGMENT | PPC_EXTERN | \
5422 #define POWERPC_INSNS2_7400 (PPC_NONE)
5423 #define POWERPC_MSRM_7400 (0x000000000205FF77ULL)
5424 #define POWERPC_MMU_7400 (POWERPC_MMU_32B)
5425 #define POWERPC_EXCP_7400 (POWERPC_EXCP_74xx)
5426 #define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx)
5427 #define POWERPC_BFDM_7400 (bfd_mach_ppc_7400)
5428 #define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5429 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5430 POWERPC_FLAG_BUS_CLK)
5431 #define check_pow_7400 check_pow_hid0
5433 static void init_proc_7400 (CPUPPCState
*env
)
5435 gen_spr_ne_601(env
);
5439 /* 74xx specific SPR */
5441 /* XXX : not implemented */
5442 spr_register(env
, SPR_UBAMR
, "UBAMR",
5443 &spr_read_ureg
, SPR_NOACCESS
,
5444 &spr_read_ureg
, SPR_NOACCESS
,
5446 /* XXX: this seems not implemented on all revisions. */
5447 /* XXX : not implemented */
5448 spr_register(env
, SPR_MSSCR1
, "MSSCR1",
5449 SPR_NOACCESS
, SPR_NOACCESS
,
5450 &spr_read_generic
, &spr_write_generic
,
5452 /* Thermal management */
5454 /* Memory management */
5456 init_excp_7400(env
);
5457 env
->dcache_line_size
= 32;
5458 env
->icache_line_size
= 32;
5459 /* Allocate hardware IRQ controller */
5460 ppc6xx_irq_init(env
);
5463 /* PowerPC 7410 (aka G4) */
5464 #define POWERPC_INSNS_7410 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5465 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5466 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5467 PPC_FLOAT_STFIWX | \
5468 PPC_CACHE | PPC_CACHE_ICBI | \
5469 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5470 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5471 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5473 PPC_SEGMENT | PPC_EXTERN | \
5475 #define POWERPC_INSNS2_7410 (PPC_NONE)
5476 #define POWERPC_MSRM_7410 (0x000000000205FF77ULL)
5477 #define POWERPC_MMU_7410 (POWERPC_MMU_32B)
5478 #define POWERPC_EXCP_7410 (POWERPC_EXCP_74xx)
5479 #define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx)
5480 #define POWERPC_BFDM_7410 (bfd_mach_ppc_7400)
5481 #define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5482 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5483 POWERPC_FLAG_BUS_CLK)
5484 #define check_pow_7410 check_pow_hid0
5486 static void init_proc_7410 (CPUPPCState
*env
)
5488 gen_spr_ne_601(env
);
5492 /* 74xx specific SPR */
5494 /* XXX : not implemented */
5495 spr_register(env
, SPR_UBAMR
, "UBAMR",
5496 &spr_read_ureg
, SPR_NOACCESS
,
5497 &spr_read_ureg
, SPR_NOACCESS
,
5499 /* Thermal management */
5502 /* XXX : not implemented */
5503 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5504 SPR_NOACCESS
, SPR_NOACCESS
,
5505 &spr_read_generic
, &spr_write_generic
,
5508 /* XXX : not implemented */
5509 spr_register(env
, SPR_LDSTDB
, "LDSTDB",
5510 SPR_NOACCESS
, SPR_NOACCESS
,
5511 &spr_read_generic
, &spr_write_generic
,
5513 /* Memory management */
5515 init_excp_7400(env
);
5516 env
->dcache_line_size
= 32;
5517 env
->icache_line_size
= 32;
5518 /* Allocate hardware IRQ controller */
5519 ppc6xx_irq_init(env
);
5522 /* PowerPC 7440 (aka G4) */
5523 #define POWERPC_INSNS_7440 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5524 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5525 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5526 PPC_FLOAT_STFIWX | \
5527 PPC_CACHE | PPC_CACHE_ICBI | \
5528 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5529 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5530 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5531 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5532 PPC_SEGMENT | PPC_EXTERN | \
5534 #define POWERPC_INSNS2_7440 (PPC_NONE)
5535 #define POWERPC_MSRM_7440 (0x000000000205FF77ULL)
5536 #define POWERPC_MMU_7440 (POWERPC_MMU_SOFT_74xx)
5537 #define POWERPC_EXCP_7440 (POWERPC_EXCP_74xx)
5538 #define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx)
5539 #define POWERPC_BFDM_7440 (bfd_mach_ppc_7400)
5540 #define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5541 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5542 POWERPC_FLAG_BUS_CLK)
5543 #define check_pow_7440 check_pow_hid0_74xx
5545 __attribute__ (( unused
))
5546 static void init_proc_7440 (CPUPPCState
*env
)
5548 gen_spr_ne_601(env
);
5552 /* 74xx specific SPR */
5554 /* XXX : not implemented */
5555 spr_register(env
, SPR_UBAMR
, "UBAMR",
5556 &spr_read_ureg
, SPR_NOACCESS
,
5557 &spr_read_ureg
, SPR_NOACCESS
,
5560 /* XXX : not implemented */
5561 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5562 SPR_NOACCESS
, SPR_NOACCESS
,
5563 &spr_read_generic
, &spr_write_generic
,
5566 /* XXX : not implemented */
5567 spr_register(env
, SPR_ICTRL
, "ICTRL",
5568 SPR_NOACCESS
, SPR_NOACCESS
,
5569 &spr_read_generic
, &spr_write_generic
,
5572 /* XXX : not implemented */
5573 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5574 SPR_NOACCESS
, SPR_NOACCESS
,
5575 &spr_read_generic
, &spr_write_generic
,
5578 /* XXX : not implemented */
5579 spr_register(env
, SPR_PMC5
, "PMC5",
5580 SPR_NOACCESS
, SPR_NOACCESS
,
5581 &spr_read_generic
, &spr_write_generic
,
5583 /* XXX : not implemented */
5584 spr_register(env
, SPR_UPMC5
, "UPMC5",
5585 &spr_read_ureg
, SPR_NOACCESS
,
5586 &spr_read_ureg
, SPR_NOACCESS
,
5588 /* XXX : not implemented */
5589 spr_register(env
, SPR_PMC6
, "PMC6",
5590 SPR_NOACCESS
, SPR_NOACCESS
,
5591 &spr_read_generic
, &spr_write_generic
,
5593 /* XXX : not implemented */
5594 spr_register(env
, SPR_UPMC6
, "UPMC6",
5595 &spr_read_ureg
, SPR_NOACCESS
,
5596 &spr_read_ureg
, SPR_NOACCESS
,
5598 /* Memory management */
5600 gen_74xx_soft_tlb(env
, 128, 2);
5601 init_excp_7450(env
);
5602 env
->dcache_line_size
= 32;
5603 env
->icache_line_size
= 32;
5604 /* Allocate hardware IRQ controller */
5605 ppc6xx_irq_init(env
);
5608 /* PowerPC 7450 (aka G4) */
5609 #define POWERPC_INSNS_7450 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5610 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5611 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5612 PPC_FLOAT_STFIWX | \
5613 PPC_CACHE | PPC_CACHE_ICBI | \
5614 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5615 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5616 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5617 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5618 PPC_SEGMENT | PPC_EXTERN | \
5620 #define POWERPC_INSNS2_7450 (PPC_NONE)
5621 #define POWERPC_MSRM_7450 (0x000000000205FF77ULL)
5622 #define POWERPC_MMU_7450 (POWERPC_MMU_SOFT_74xx)
5623 #define POWERPC_EXCP_7450 (POWERPC_EXCP_74xx)
5624 #define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx)
5625 #define POWERPC_BFDM_7450 (bfd_mach_ppc_7400)
5626 #define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5627 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5628 POWERPC_FLAG_BUS_CLK)
5629 #define check_pow_7450 check_pow_hid0_74xx
5631 __attribute__ (( unused
))
5632 static void init_proc_7450 (CPUPPCState
*env
)
5634 gen_spr_ne_601(env
);
5638 /* 74xx specific SPR */
5640 /* Level 3 cache control */
5643 /* XXX : not implemented */
5644 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
5645 SPR_NOACCESS
, SPR_NOACCESS
,
5646 &spr_read_generic
, &spr_write_generic
,
5649 /* XXX : not implemented */
5650 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
5651 SPR_NOACCESS
, SPR_NOACCESS
,
5652 &spr_read_generic
, &spr_write_generic
,
5655 /* XXX : not implemented */
5656 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
5657 SPR_NOACCESS
, SPR_NOACCESS
,
5658 &spr_read_generic
, &spr_write_generic
,
5661 /* XXX : not implemented */
5662 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
5663 SPR_NOACCESS
, SPR_NOACCESS
,
5664 &spr_read_generic
, &spr_write_generic
,
5666 /* XXX : not implemented */
5667 spr_register(env
, SPR_UBAMR
, "UBAMR",
5668 &spr_read_ureg
, SPR_NOACCESS
,
5669 &spr_read_ureg
, SPR_NOACCESS
,
5672 /* XXX : not implemented */
5673 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5674 SPR_NOACCESS
, SPR_NOACCESS
,
5675 &spr_read_generic
, &spr_write_generic
,
5678 /* XXX : not implemented */
5679 spr_register(env
, SPR_ICTRL
, "ICTRL",
5680 SPR_NOACCESS
, SPR_NOACCESS
,
5681 &spr_read_generic
, &spr_write_generic
,
5684 /* XXX : not implemented */
5685 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5686 SPR_NOACCESS
, SPR_NOACCESS
,
5687 &spr_read_generic
, &spr_write_generic
,
5690 /* XXX : not implemented */
5691 spr_register(env
, SPR_PMC5
, "PMC5",
5692 SPR_NOACCESS
, SPR_NOACCESS
,
5693 &spr_read_generic
, &spr_write_generic
,
5695 /* XXX : not implemented */
5696 spr_register(env
, SPR_UPMC5
, "UPMC5",
5697 &spr_read_ureg
, SPR_NOACCESS
,
5698 &spr_read_ureg
, SPR_NOACCESS
,
5700 /* XXX : not implemented */
5701 spr_register(env
, SPR_PMC6
, "PMC6",
5702 SPR_NOACCESS
, SPR_NOACCESS
,
5703 &spr_read_generic
, &spr_write_generic
,
5705 /* XXX : not implemented */
5706 spr_register(env
, SPR_UPMC6
, "UPMC6",
5707 &spr_read_ureg
, SPR_NOACCESS
,
5708 &spr_read_ureg
, SPR_NOACCESS
,
5710 /* Memory management */
5712 gen_74xx_soft_tlb(env
, 128, 2);
5713 init_excp_7450(env
);
5714 env
->dcache_line_size
= 32;
5715 env
->icache_line_size
= 32;
5716 /* Allocate hardware IRQ controller */
5717 ppc6xx_irq_init(env
);
5720 /* PowerPC 7445 (aka G4) */
5721 #define POWERPC_INSNS_7445 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5722 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5723 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5724 PPC_FLOAT_STFIWX | \
5725 PPC_CACHE | PPC_CACHE_ICBI | \
5726 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5727 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5728 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5729 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5730 PPC_SEGMENT | PPC_EXTERN | \
5732 #define POWERPC_INSNS2_7445 (PPC_NONE)
5733 #define POWERPC_MSRM_7445 (0x000000000205FF77ULL)
5734 #define POWERPC_MMU_7445 (POWERPC_MMU_SOFT_74xx)
5735 #define POWERPC_EXCP_7445 (POWERPC_EXCP_74xx)
5736 #define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx)
5737 #define POWERPC_BFDM_7445 (bfd_mach_ppc_7400)
5738 #define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5739 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5740 POWERPC_FLAG_BUS_CLK)
5741 #define check_pow_7445 check_pow_hid0_74xx
5743 __attribute__ (( unused
))
5744 static void init_proc_7445 (CPUPPCState
*env
)
5746 gen_spr_ne_601(env
);
5750 /* 74xx specific SPR */
5753 /* XXX : not implemented */
5754 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5755 SPR_NOACCESS
, SPR_NOACCESS
,
5756 &spr_read_generic
, &spr_write_generic
,
5759 /* XXX : not implemented */
5760 spr_register(env
, SPR_ICTRL
, "ICTRL",
5761 SPR_NOACCESS
, SPR_NOACCESS
,
5762 &spr_read_generic
, &spr_write_generic
,
5765 /* XXX : not implemented */
5766 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5767 SPR_NOACCESS
, SPR_NOACCESS
,
5768 &spr_read_generic
, &spr_write_generic
,
5771 /* XXX : not implemented */
5772 spr_register(env
, SPR_PMC5
, "PMC5",
5773 SPR_NOACCESS
, SPR_NOACCESS
,
5774 &spr_read_generic
, &spr_write_generic
,
5776 /* XXX : not implemented */
5777 spr_register(env
, SPR_UPMC5
, "UPMC5",
5778 &spr_read_ureg
, SPR_NOACCESS
,
5779 &spr_read_ureg
, SPR_NOACCESS
,
5781 /* XXX : not implemented */
5782 spr_register(env
, SPR_PMC6
, "PMC6",
5783 SPR_NOACCESS
, SPR_NOACCESS
,
5784 &spr_read_generic
, &spr_write_generic
,
5786 /* XXX : not implemented */
5787 spr_register(env
, SPR_UPMC6
, "UPMC6",
5788 &spr_read_ureg
, SPR_NOACCESS
,
5789 &spr_read_ureg
, SPR_NOACCESS
,
5792 spr_register(env
, SPR_SPRG4
, "SPRG4",
5793 SPR_NOACCESS
, SPR_NOACCESS
,
5794 &spr_read_generic
, &spr_write_generic
,
5796 spr_register(env
, SPR_USPRG4
, "USPRG4",
5797 &spr_read_ureg
, SPR_NOACCESS
,
5798 &spr_read_ureg
, SPR_NOACCESS
,
5800 spr_register(env
, SPR_SPRG5
, "SPRG5",
5801 SPR_NOACCESS
, SPR_NOACCESS
,
5802 &spr_read_generic
, &spr_write_generic
,
5804 spr_register(env
, SPR_USPRG5
, "USPRG5",
5805 &spr_read_ureg
, SPR_NOACCESS
,
5806 &spr_read_ureg
, SPR_NOACCESS
,
5808 spr_register(env
, SPR_SPRG6
, "SPRG6",
5809 SPR_NOACCESS
, SPR_NOACCESS
,
5810 &spr_read_generic
, &spr_write_generic
,
5812 spr_register(env
, SPR_USPRG6
, "USPRG6",
5813 &spr_read_ureg
, SPR_NOACCESS
,
5814 &spr_read_ureg
, SPR_NOACCESS
,
5816 spr_register(env
, SPR_SPRG7
, "SPRG7",
5817 SPR_NOACCESS
, SPR_NOACCESS
,
5818 &spr_read_generic
, &spr_write_generic
,
5820 spr_register(env
, SPR_USPRG7
, "USPRG7",
5821 &spr_read_ureg
, SPR_NOACCESS
,
5822 &spr_read_ureg
, SPR_NOACCESS
,
5824 /* Memory management */
5827 gen_74xx_soft_tlb(env
, 128, 2);
5828 init_excp_7450(env
);
5829 env
->dcache_line_size
= 32;
5830 env
->icache_line_size
= 32;
5831 /* Allocate hardware IRQ controller */
5832 ppc6xx_irq_init(env
);
5835 /* PowerPC 7455 (aka G4) */
5836 #define POWERPC_INSNS_7455 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5837 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5838 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5839 PPC_FLOAT_STFIWX | \
5840 PPC_CACHE | PPC_CACHE_ICBI | \
5841 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5842 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5843 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5844 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5845 PPC_SEGMENT | PPC_EXTERN | \
5847 #define POWERPC_INSNS2_7455 (PPC_NONE)
5848 #define POWERPC_MSRM_7455 (0x000000000205FF77ULL)
5849 #define POWERPC_MMU_7455 (POWERPC_MMU_SOFT_74xx)
5850 #define POWERPC_EXCP_7455 (POWERPC_EXCP_74xx)
5851 #define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx)
5852 #define POWERPC_BFDM_7455 (bfd_mach_ppc_7400)
5853 #define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5854 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5855 POWERPC_FLAG_BUS_CLK)
5856 #define check_pow_7455 check_pow_hid0_74xx
5858 __attribute__ (( unused
))
5859 static void init_proc_7455 (CPUPPCState
*env
)
5861 gen_spr_ne_601(env
);
5865 /* 74xx specific SPR */
5867 /* Level 3 cache control */
5870 /* XXX : not implemented */
5871 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5872 SPR_NOACCESS
, SPR_NOACCESS
,
5873 &spr_read_generic
, &spr_write_generic
,
5876 /* XXX : not implemented */
5877 spr_register(env
, SPR_ICTRL
, "ICTRL",
5878 SPR_NOACCESS
, SPR_NOACCESS
,
5879 &spr_read_generic
, &spr_write_generic
,
5882 /* XXX : not implemented */
5883 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5884 SPR_NOACCESS
, SPR_NOACCESS
,
5885 &spr_read_generic
, &spr_write_generic
,
5888 /* XXX : not implemented */
5889 spr_register(env
, SPR_PMC5
, "PMC5",
5890 SPR_NOACCESS
, SPR_NOACCESS
,
5891 &spr_read_generic
, &spr_write_generic
,
5893 /* XXX : not implemented */
5894 spr_register(env
, SPR_UPMC5
, "UPMC5",
5895 &spr_read_ureg
, SPR_NOACCESS
,
5896 &spr_read_ureg
, SPR_NOACCESS
,
5898 /* XXX : not implemented */
5899 spr_register(env
, SPR_PMC6
, "PMC6",
5900 SPR_NOACCESS
, SPR_NOACCESS
,
5901 &spr_read_generic
, &spr_write_generic
,
5903 /* XXX : not implemented */
5904 spr_register(env
, SPR_UPMC6
, "UPMC6",
5905 &spr_read_ureg
, SPR_NOACCESS
,
5906 &spr_read_ureg
, SPR_NOACCESS
,
5909 spr_register(env
, SPR_SPRG4
, "SPRG4",
5910 SPR_NOACCESS
, SPR_NOACCESS
,
5911 &spr_read_generic
, &spr_write_generic
,
5913 spr_register(env
, SPR_USPRG4
, "USPRG4",
5914 &spr_read_ureg
, SPR_NOACCESS
,
5915 &spr_read_ureg
, SPR_NOACCESS
,
5917 spr_register(env
, SPR_SPRG5
, "SPRG5",
5918 SPR_NOACCESS
, SPR_NOACCESS
,
5919 &spr_read_generic
, &spr_write_generic
,
5921 spr_register(env
, SPR_USPRG5
, "USPRG5",
5922 &spr_read_ureg
, SPR_NOACCESS
,
5923 &spr_read_ureg
, SPR_NOACCESS
,
5925 spr_register(env
, SPR_SPRG6
, "SPRG6",
5926 SPR_NOACCESS
, SPR_NOACCESS
,
5927 &spr_read_generic
, &spr_write_generic
,
5929 spr_register(env
, SPR_USPRG6
, "USPRG6",
5930 &spr_read_ureg
, SPR_NOACCESS
,
5931 &spr_read_ureg
, SPR_NOACCESS
,
5933 spr_register(env
, SPR_SPRG7
, "SPRG7",
5934 SPR_NOACCESS
, SPR_NOACCESS
,
5935 &spr_read_generic
, &spr_write_generic
,
5937 spr_register(env
, SPR_USPRG7
, "USPRG7",
5938 &spr_read_ureg
, SPR_NOACCESS
,
5939 &spr_read_ureg
, SPR_NOACCESS
,
5941 /* Memory management */
5944 gen_74xx_soft_tlb(env
, 128, 2);
5945 init_excp_7450(env
);
5946 env
->dcache_line_size
= 32;
5947 env
->icache_line_size
= 32;
5948 /* Allocate hardware IRQ controller */
5949 ppc6xx_irq_init(env
);
5952 /* PowerPC 7457 (aka G4) */
5953 #define POWERPC_INSNS_7457 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5954 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5955 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5956 PPC_FLOAT_STFIWX | \
5957 PPC_CACHE | PPC_CACHE_ICBI | \
5958 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5959 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5960 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5961 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5962 PPC_SEGMENT | PPC_EXTERN | \
5964 #define POWERPC_INSNS2_7457 (PPC_NONE)
5965 #define POWERPC_MSRM_7457 (0x000000000205FF77ULL)
5966 #define POWERPC_MMU_7457 (POWERPC_MMU_SOFT_74xx)
5967 #define POWERPC_EXCP_7457 (POWERPC_EXCP_74xx)
5968 #define POWERPC_INPUT_7457 (PPC_FLAGS_INPUT_6xx)
5969 #define POWERPC_BFDM_7457 (bfd_mach_ppc_7400)
5970 #define POWERPC_FLAG_7457 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5971 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5972 POWERPC_FLAG_BUS_CLK)
5973 #define check_pow_7457 check_pow_hid0_74xx
5975 __attribute__ (( unused
))
5976 static void init_proc_7457 (CPUPPCState
*env
)
5978 gen_spr_ne_601(env
);
5982 /* 74xx specific SPR */
5984 /* Level 3 cache control */
5987 /* XXX : not implemented */
5988 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
5989 SPR_NOACCESS
, SPR_NOACCESS
,
5990 &spr_read_generic
, &spr_write_generic
,
5993 /* XXX : not implemented */
5994 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
5995 SPR_NOACCESS
, SPR_NOACCESS
,
5996 &spr_read_generic
, &spr_write_generic
,
5999 /* XXX : not implemented */
6000 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
6001 SPR_NOACCESS
, SPR_NOACCESS
,
6002 &spr_read_generic
, &spr_write_generic
,
6005 /* XXX : not implemented */
6006 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
6007 SPR_NOACCESS
, SPR_NOACCESS
,
6008 &spr_read_generic
, &spr_write_generic
,
6011 /* XXX : not implemented */
6012 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
6013 SPR_NOACCESS
, SPR_NOACCESS
,
6014 &spr_read_generic
, &spr_write_generic
,
6017 /* XXX : not implemented */
6018 spr_register(env
, SPR_ICTRL
, "ICTRL",
6019 SPR_NOACCESS
, SPR_NOACCESS
,
6020 &spr_read_generic
, &spr_write_generic
,
6023 /* XXX : not implemented */
6024 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
6025 SPR_NOACCESS
, SPR_NOACCESS
,
6026 &spr_read_generic
, &spr_write_generic
,
6029 /* XXX : not implemented */
6030 spr_register(env
, SPR_PMC5
, "PMC5",
6031 SPR_NOACCESS
, SPR_NOACCESS
,
6032 &spr_read_generic
, &spr_write_generic
,
6034 /* XXX : not implemented */
6035 spr_register(env
, SPR_UPMC5
, "UPMC5",
6036 &spr_read_ureg
, SPR_NOACCESS
,
6037 &spr_read_ureg
, SPR_NOACCESS
,
6039 /* XXX : not implemented */
6040 spr_register(env
, SPR_PMC6
, "PMC6",
6041 SPR_NOACCESS
, SPR_NOACCESS
,
6042 &spr_read_generic
, &spr_write_generic
,
6044 /* XXX : not implemented */
6045 spr_register(env
, SPR_UPMC6
, "UPMC6",
6046 &spr_read_ureg
, SPR_NOACCESS
,
6047 &spr_read_ureg
, SPR_NOACCESS
,
6050 spr_register(env
, SPR_SPRG4
, "SPRG4",
6051 SPR_NOACCESS
, SPR_NOACCESS
,
6052 &spr_read_generic
, &spr_write_generic
,
6054 spr_register(env
, SPR_USPRG4
, "USPRG4",
6055 &spr_read_ureg
, SPR_NOACCESS
,
6056 &spr_read_ureg
, SPR_NOACCESS
,
6058 spr_register(env
, SPR_SPRG5
, "SPRG5",
6059 SPR_NOACCESS
, SPR_NOACCESS
,
6060 &spr_read_generic
, &spr_write_generic
,
6062 spr_register(env
, SPR_USPRG5
, "USPRG5",
6063 &spr_read_ureg
, SPR_NOACCESS
,
6064 &spr_read_ureg
, SPR_NOACCESS
,
6066 spr_register(env
, SPR_SPRG6
, "SPRG6",
6067 SPR_NOACCESS
, SPR_NOACCESS
,
6068 &spr_read_generic
, &spr_write_generic
,
6070 spr_register(env
, SPR_USPRG6
, "USPRG6",
6071 &spr_read_ureg
, SPR_NOACCESS
,
6072 &spr_read_ureg
, SPR_NOACCESS
,
6074 spr_register(env
, SPR_SPRG7
, "SPRG7",
6075 SPR_NOACCESS
, SPR_NOACCESS
,
6076 &spr_read_generic
, &spr_write_generic
,
6078 spr_register(env
, SPR_USPRG7
, "USPRG7",
6079 &spr_read_ureg
, SPR_NOACCESS
,
6080 &spr_read_ureg
, SPR_NOACCESS
,
6082 /* Memory management */
6085 gen_74xx_soft_tlb(env
, 128, 2);
6086 init_excp_7450(env
);
6087 env
->dcache_line_size
= 32;
6088 env
->icache_line_size
= 32;
6089 /* Allocate hardware IRQ controller */
6090 ppc6xx_irq_init(env
);
6093 #if defined (TARGET_PPC64)
6095 #define POWERPC_INSNS_970 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6096 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6097 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6098 PPC_FLOAT_STFIWX | \
6099 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6100 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6101 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6102 PPC_64B | PPC_ALTIVEC | \
6103 PPC_SEGMENT_64B | PPC_SLBI)
6104 #define POWERPC_INSNS2_970 (PPC_NONE)
6105 #define POWERPC_MSRM_970 (0x900000000204FF36ULL)
6106 #define POWERPC_MMU_970 (POWERPC_MMU_64B)
6107 //#define POWERPC_EXCP_970 (POWERPC_EXCP_970)
6108 #define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970)
6109 #define POWERPC_BFDM_970 (bfd_mach_ppc64)
6110 #define POWERPC_FLAG_970 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6111 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6112 POWERPC_FLAG_BUS_CLK)
6114 #if defined(CONFIG_USER_ONLY)
6115 #define POWERPC970_HID5_INIT 0x00000080
6117 #define POWERPC970_HID5_INIT 0x00000000
6120 static int check_pow_970 (CPUPPCState
*env
)
6122 if (env
->spr
[SPR_HID0
] & 0x00600000)
6128 static void init_proc_970 (CPUPPCState
*env
)
6130 gen_spr_ne_601(env
);
6134 /* Hardware implementation registers */
6135 /* XXX : not implemented */
6136 spr_register(env
, SPR_HID0
, "HID0",
6137 SPR_NOACCESS
, SPR_NOACCESS
,
6138 &spr_read_generic
, &spr_write_clear
,
6140 /* XXX : not implemented */
6141 spr_register(env
, SPR_HID1
, "HID1",
6142 SPR_NOACCESS
, SPR_NOACCESS
,
6143 &spr_read_generic
, &spr_write_generic
,
6145 /* XXX : not implemented */
6146 spr_register(env
, SPR_750FX_HID2
, "HID2",
6147 SPR_NOACCESS
, SPR_NOACCESS
,
6148 &spr_read_generic
, &spr_write_generic
,
6150 /* XXX : not implemented */
6151 spr_register(env
, SPR_970_HID5
, "HID5",
6152 SPR_NOACCESS
, SPR_NOACCESS
,
6153 &spr_read_generic
, &spr_write_generic
,
6154 POWERPC970_HID5_INIT
);
6155 /* XXX : not implemented */
6156 spr_register(env
, SPR_L2CR
, "L2CR",
6157 SPR_NOACCESS
, SPR_NOACCESS
,
6158 &spr_read_generic
, &spr_write_generic
,
6160 /* Memory management */
6161 /* XXX: not correct */
6163 /* XXX : not implemented */
6164 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6165 SPR_NOACCESS
, SPR_NOACCESS
,
6166 &spr_read_generic
, SPR_NOACCESS
,
6167 0x00000000); /* TOFIX */
6168 /* XXX : not implemented */
6169 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6170 SPR_NOACCESS
, SPR_NOACCESS
,
6171 &spr_read_generic
, &spr_write_generic
,
6172 0x00000000); /* TOFIX */
6173 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6174 SPR_NOACCESS
, SPR_NOACCESS
,
6175 &spr_read_hior
, &spr_write_hior
,
6177 #if !defined(CONFIG_USER_ONLY)
6181 env
->dcache_line_size
= 128;
6182 env
->icache_line_size
= 128;
6183 /* Allocate hardware IRQ controller */
6184 ppc970_irq_init(env
);
6185 /* Can't find information on what this should be on reset. This
6186 * value is the one used by 74xx processors. */
6187 vscr_init(env
, 0x00010000);
6190 /* PowerPC 970FX (aka G5) */
6191 #define POWERPC_INSNS_970FX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6192 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6193 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6194 PPC_FLOAT_STFIWX | \
6195 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6196 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6197 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6198 PPC_64B | PPC_ALTIVEC | \
6199 PPC_SEGMENT_64B | PPC_SLBI)
6200 #define POWERPC_INSNS2_970FX (PPC_NONE)
6201 #define POWERPC_MSRM_970FX (0x800000000204FF36ULL)
6202 #define POWERPC_MMU_970FX (POWERPC_MMU_64B)
6203 #define POWERPC_EXCP_970FX (POWERPC_EXCP_970)
6204 #define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970)
6205 #define POWERPC_BFDM_970FX (bfd_mach_ppc64)
6206 #define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6207 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6208 POWERPC_FLAG_BUS_CLK)
6210 static int check_pow_970FX (CPUPPCState
*env
)
6212 if (env
->spr
[SPR_HID0
] & 0x00600000)
6218 static void init_proc_970FX (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 spr_register(env
, SPR_CTRL
, "SPR_CTRL",
6268 SPR_NOACCESS
, SPR_NOACCESS
,
6269 &spr_read_generic
, &spr_write_generic
,
6271 spr_register(env
, SPR_UCTRL
, "SPR_UCTRL",
6272 SPR_NOACCESS
, SPR_NOACCESS
,
6273 &spr_read_generic
, &spr_write_generic
,
6275 spr_register(env
, SPR_VRSAVE
, "SPR_VRSAVE",
6276 &spr_read_generic
, &spr_write_generic
,
6277 &spr_read_generic
, &spr_write_generic
,
6279 #if !defined(CONFIG_USER_ONLY)
6283 env
->dcache_line_size
= 128;
6284 env
->icache_line_size
= 128;
6285 /* Allocate hardware IRQ controller */
6286 ppc970_irq_init(env
);
6287 /* Can't find information on what this should be on reset. This
6288 * value is the one used by 74xx processors. */
6289 vscr_init(env
, 0x00010000);
6292 /* PowerPC 970 GX */
6293 #define POWERPC_INSNS_970GX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6294 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6295 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6296 PPC_FLOAT_STFIWX | \
6297 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6298 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6299 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6300 PPC_64B | PPC_ALTIVEC | \
6301 PPC_SEGMENT_64B | PPC_SLBI)
6302 #define POWERPC_INSNS2_970GX (PPC_NONE)
6303 #define POWERPC_MSRM_970GX (0x800000000204FF36ULL)
6304 #define POWERPC_MMU_970GX (POWERPC_MMU_64B)
6305 #define POWERPC_EXCP_970GX (POWERPC_EXCP_970)
6306 #define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970)
6307 #define POWERPC_BFDM_970GX (bfd_mach_ppc64)
6308 #define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6309 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6310 POWERPC_FLAG_BUS_CLK)
6312 static int check_pow_970GX (CPUPPCState
*env
)
6314 if (env
->spr
[SPR_HID0
] & 0x00600000)
6320 static void init_proc_970GX (CPUPPCState
*env
)
6322 gen_spr_ne_601(env
);
6326 /* Hardware implementation registers */
6327 /* XXX : not implemented */
6328 spr_register(env
, SPR_HID0
, "HID0",
6329 SPR_NOACCESS
, SPR_NOACCESS
,
6330 &spr_read_generic
, &spr_write_clear
,
6332 /* XXX : not implemented */
6333 spr_register(env
, SPR_HID1
, "HID1",
6334 SPR_NOACCESS
, SPR_NOACCESS
,
6335 &spr_read_generic
, &spr_write_generic
,
6337 /* XXX : not implemented */
6338 spr_register(env
, SPR_750FX_HID2
, "HID2",
6339 SPR_NOACCESS
, SPR_NOACCESS
,
6340 &spr_read_generic
, &spr_write_generic
,
6342 /* XXX : not implemented */
6343 spr_register(env
, SPR_970_HID5
, "HID5",
6344 SPR_NOACCESS
, SPR_NOACCESS
,
6345 &spr_read_generic
, &spr_write_generic
,
6346 POWERPC970_HID5_INIT
);
6347 /* XXX : not implemented */
6348 spr_register(env
, SPR_L2CR
, "L2CR",
6349 SPR_NOACCESS
, SPR_NOACCESS
,
6350 &spr_read_generic
, &spr_write_generic
,
6352 /* Memory management */
6353 /* XXX: not correct */
6355 /* XXX : not implemented */
6356 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6357 SPR_NOACCESS
, SPR_NOACCESS
,
6358 &spr_read_generic
, SPR_NOACCESS
,
6359 0x00000000); /* TOFIX */
6360 /* XXX : not implemented */
6361 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6362 SPR_NOACCESS
, SPR_NOACCESS
,
6363 &spr_read_generic
, &spr_write_generic
,
6364 0x00000000); /* TOFIX */
6365 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6366 SPR_NOACCESS
, SPR_NOACCESS
,
6367 &spr_read_hior
, &spr_write_hior
,
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 MP */
6383 #define POWERPC_INSNS_970MP (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_970MP (PPC_NONE)
6393 #define POWERPC_MSRM_970MP (0x900000000204FF36ULL)
6394 #define POWERPC_MMU_970MP (POWERPC_MMU_64B)
6395 #define POWERPC_EXCP_970MP (POWERPC_EXCP_970)
6396 #define POWERPC_INPUT_970MP (PPC_FLAGS_INPUT_970)
6397 #define POWERPC_BFDM_970MP (bfd_mach_ppc64)
6398 #define POWERPC_FLAG_970MP (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6399 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6400 POWERPC_FLAG_BUS_CLK)
6402 static int check_pow_970MP (CPUPPCState
*env
)
6404 if (env
->spr
[SPR_HID0
] & 0x01C00000)
6410 static void init_proc_970MP (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 #if defined(TARGET_PPC64)
6474 #define POWERPC_INSNS_POWER7 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6475 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6476 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6477 PPC_FLOAT_STFIWX | \
6478 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6479 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6480 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6481 PPC_64B | PPC_ALTIVEC | \
6482 PPC_SEGMENT_64B | PPC_SLBI | \
6483 PPC_POPCNTB | PPC_POPCNTWD)
6484 #define POWERPC_INSNS2_POWER7 (PPC_NONE)
6485 #define POWERPC_MSRM_POWER7 (0x800000000204FF36ULL)
6486 #define POWERPC_MMU_POWER7 (POWERPC_MMU_2_06)
6487 #define POWERPC_EXCP_POWER7 (POWERPC_EXCP_POWER7)
6488 #define POWERPC_INPUT_POWER7 (PPC_FLAGS_INPUT_POWER7)
6489 #define POWERPC_BFDM_POWER7 (bfd_mach_ppc64)
6490 #define POWERPC_FLAG_POWER7 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6491 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6492 POWERPC_FLAG_BUS_CLK)
6493 #define check_pow_POWER7 check_pow_nocheck
6495 static void init_proc_POWER7 (CPUPPCState
*env
)
6497 gen_spr_ne_601(env
);
6501 #if !defined(CONFIG_USER_ONLY)
6502 /* PURR & SPURR: Hack - treat these as aliases for the TB for now */
6503 spr_register(env
, SPR_PURR
, "PURR",
6504 &spr_read_purr
, SPR_NOACCESS
,
6505 &spr_read_purr
, SPR_NOACCESS
,
6507 spr_register(env
, SPR_SPURR
, "SPURR",
6508 &spr_read_purr
, SPR_NOACCESS
,
6509 &spr_read_purr
, SPR_NOACCESS
,
6511 #endif /* !CONFIG_USER_ONLY */
6512 /* Memory management */
6513 /* XXX : not implemented */
6514 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6515 SPR_NOACCESS
, SPR_NOACCESS
,
6516 &spr_read_generic
, SPR_NOACCESS
,
6517 0x00000000); /* TOFIX */
6518 /* XXX : not implemented */
6519 spr_register(env
, SPR_CTRL
, "SPR_CTRLT",
6520 SPR_NOACCESS
, SPR_NOACCESS
,
6521 &spr_read_generic
, &spr_write_generic
,
6523 spr_register(env
, SPR_UCTRL
, "SPR_CTRLF",
6524 SPR_NOACCESS
, SPR_NOACCESS
,
6525 &spr_read_generic
, &spr_write_generic
,
6527 spr_register(env
, SPR_VRSAVE
, "SPR_VRSAVE",
6528 &spr_read_generic
, &spr_write_generic
,
6529 &spr_read_generic
, &spr_write_generic
,
6531 #if !defined(CONFIG_USER_ONLY)
6534 init_excp_POWER7(env
);
6535 env
->dcache_line_size
= 128;
6536 env
->icache_line_size
= 128;
6537 /* Allocate hardware IRQ controller */
6538 ppcPOWER7_irq_init(env
);
6539 /* Can't find information on what this should be on reset. This
6540 * value is the one used by 74xx processors. */
6541 vscr_init(env
, 0x00010000);
6543 #endif /* TARGET_PPC64 */
6546 #define POWERPC_INSNS_620 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6547 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6548 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6549 PPC_FLOAT_STFIWX | \
6550 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
6551 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6552 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6553 PPC_SEGMENT | PPC_EXTERN | \
6555 #define POWERPC_INSNS2_620 (PPC_NONE)
6556 #define POWERPC_MSRM_620 (0x800000000005FF77ULL)
6557 //#define POWERPC_MMU_620 (POWERPC_MMU_620)
6558 #define POWERPC_EXCP_620 (POWERPC_EXCP_970)
6559 #define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_6xx)
6560 #define POWERPC_BFDM_620 (bfd_mach_ppc64)
6561 #define POWERPC_FLAG_620 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
6562 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
6563 #define check_pow_620 check_pow_nocheck /* Check this */
6565 __attribute__ (( unused
))
6566 static void init_proc_620 (CPUPPCState
*env
)
6568 gen_spr_ne_601(env
);
6572 /* Hardware implementation registers */
6573 /* XXX : not implemented */
6574 spr_register(env
, SPR_HID0
, "HID0",
6575 SPR_NOACCESS
, SPR_NOACCESS
,
6576 &spr_read_generic
, &spr_write_generic
,
6578 /* Memory management */
6581 env
->dcache_line_size
= 64;
6582 env
->icache_line_size
= 64;
6583 /* Allocate hardware IRQ controller */
6584 ppc6xx_irq_init(env
);
6586 #endif /* defined (TARGET_PPC64) */
6588 /* Default 32 bits PowerPC target will be 604 */
6589 #define CPU_POWERPC_PPC32 CPU_POWERPC_604
6590 #define POWERPC_INSNS_PPC32 POWERPC_INSNS_604
6591 #define POWERPC_INSNS2_PPC32 POWERPC_INSNS2_604
6592 #define POWERPC_MSRM_PPC32 POWERPC_MSRM_604
6593 #define POWERPC_MMU_PPC32 POWERPC_MMU_604
6594 #define POWERPC_EXCP_PPC32 POWERPC_EXCP_604
6595 #define POWERPC_INPUT_PPC32 POWERPC_INPUT_604
6596 #define POWERPC_BFDM_PPC32 POWERPC_BFDM_604
6597 #define POWERPC_FLAG_PPC32 POWERPC_FLAG_604
6598 #define check_pow_PPC32 check_pow_604
6599 #define init_proc_PPC32 init_proc_604
6601 /* Default 64 bits PowerPC target will be 970 FX */
6602 #define CPU_POWERPC_PPC64 CPU_POWERPC_970FX
6603 #define POWERPC_INSNS_PPC64 POWERPC_INSNS_970FX
6604 #define POWERPC_INSNS2_PPC64 POWERPC_INSNS2_970FX
6605 #define POWERPC_MSRM_PPC64 POWERPC_MSRM_970FX
6606 #define POWERPC_MMU_PPC64 POWERPC_MMU_970FX
6607 #define POWERPC_EXCP_PPC64 POWERPC_EXCP_970FX
6608 #define POWERPC_INPUT_PPC64 POWERPC_INPUT_970FX
6609 #define POWERPC_BFDM_PPC64 POWERPC_BFDM_970FX
6610 #define POWERPC_FLAG_PPC64 POWERPC_FLAG_970FX
6611 #define check_pow_PPC64 check_pow_970FX
6612 #define init_proc_PPC64 init_proc_970FX
6614 /* Default PowerPC target will be PowerPC 32 */
6615 #if defined (TARGET_PPC64) && 0 // XXX: TODO
6616 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC64
6617 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC64
6618 #define POWERPC_INSNS2_DEFAULT POWERPC_INSNS_PPC64
6619 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC64
6620 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC64
6621 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC64
6622 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC64
6623 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC64
6624 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC64
6625 #define check_pow_DEFAULT check_pow_PPC64
6626 #define init_proc_DEFAULT init_proc_PPC64
6628 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC32
6629 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC32
6630 #define POWERPC_INSNS2_DEFAULT POWERPC_INSNS_PPC32
6631 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC32
6632 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC32
6633 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC32
6634 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC32
6635 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC32
6636 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC32
6637 #define check_pow_DEFAULT check_pow_PPC32
6638 #define init_proc_DEFAULT init_proc_PPC32
6641 /*****************************************************************************/
6642 /* PVR definitions for most known PowerPC */
6644 /* PowerPC 401 family */
6645 /* Generic PowerPC 401 */
6646 #define CPU_POWERPC_401 CPU_POWERPC_401G2
6647 /* PowerPC 401 cores */
6648 CPU_POWERPC_401A1
= 0x00210000,
6649 CPU_POWERPC_401B2
= 0x00220000,
6651 CPU_POWERPC_401B3
= xxx
,
6653 CPU_POWERPC_401C2
= 0x00230000,
6654 CPU_POWERPC_401D2
= 0x00240000,
6655 CPU_POWERPC_401E2
= 0x00250000,
6656 CPU_POWERPC_401F2
= 0x00260000,
6657 CPU_POWERPC_401G2
= 0x00270000,
6658 /* PowerPC 401 microcontrolers */
6660 CPU_POWERPC_401GF
= xxx
,
6662 #define CPU_POWERPC_IOP480 CPU_POWERPC_401B2
6663 /* IBM Processor for Network Resources */
6664 CPU_POWERPC_COBRA
= 0x10100000, /* XXX: 405 ? */
6666 CPU_POWERPC_XIPCHIP
= xxx
,
6668 /* PowerPC 403 family */
6669 /* Generic PowerPC 403 */
6670 #define CPU_POWERPC_403 CPU_POWERPC_403GC
6671 /* PowerPC 403 microcontrollers */
6672 CPU_POWERPC_403GA
= 0x00200011,
6673 CPU_POWERPC_403GB
= 0x00200100,
6674 CPU_POWERPC_403GC
= 0x00200200,
6675 CPU_POWERPC_403GCX
= 0x00201400,
6677 CPU_POWERPC_403GP
= xxx
,
6679 /* PowerPC 405 family */
6680 /* Generic PowerPC 405 */
6681 #define CPU_POWERPC_405 CPU_POWERPC_405D4
6682 /* PowerPC 405 cores */
6684 CPU_POWERPC_405A3
= xxx
,
6687 CPU_POWERPC_405A4
= xxx
,
6690 CPU_POWERPC_405B3
= xxx
,
6693 CPU_POWERPC_405B4
= xxx
,
6696 CPU_POWERPC_405C3
= xxx
,
6699 CPU_POWERPC_405C4
= xxx
,
6701 CPU_POWERPC_405D2
= 0x20010000,
6703 CPU_POWERPC_405D3
= xxx
,
6705 CPU_POWERPC_405D4
= 0x41810000,
6707 CPU_POWERPC_405D5
= xxx
,
6710 CPU_POWERPC_405E4
= xxx
,
6713 CPU_POWERPC_405F4
= xxx
,
6716 CPU_POWERPC_405F5
= xxx
,
6719 CPU_POWERPC_405F6
= xxx
,
6721 /* PowerPC 405 microcontrolers */
6722 /* XXX: missing 0x200108a0 */
6723 #define CPU_POWERPC_405CR CPU_POWERPC_405CRc
6724 CPU_POWERPC_405CRa
= 0x40110041,
6725 CPU_POWERPC_405CRb
= 0x401100C5,
6726 CPU_POWERPC_405CRc
= 0x40110145,
6727 CPU_POWERPC_405EP
= 0x51210950,
6729 CPU_POWERPC_405EXr
= xxx
,
6731 CPU_POWERPC_405EZ
= 0x41511460, /* 0x51210950 ? */
6733 CPU_POWERPC_405FX
= xxx
,
6735 #define CPU_POWERPC_405GP CPU_POWERPC_405GPd
6736 CPU_POWERPC_405GPa
= 0x40110000,
6737 CPU_POWERPC_405GPb
= 0x40110040,
6738 CPU_POWERPC_405GPc
= 0x40110082,
6739 CPU_POWERPC_405GPd
= 0x401100C4,
6740 #define CPU_POWERPC_405GPe CPU_POWERPC_405CRc
6741 CPU_POWERPC_405GPR
= 0x50910951,
6743 CPU_POWERPC_405H
= xxx
,
6746 CPU_POWERPC_405L
= xxx
,
6748 CPU_POWERPC_405LP
= 0x41F10000,
6750 CPU_POWERPC_405PM
= xxx
,
6753 CPU_POWERPC_405PS
= xxx
,
6756 CPU_POWERPC_405S
= xxx
,
6758 /* IBM network processors */
6759 CPU_POWERPC_NPE405H
= 0x414100C0,
6760 CPU_POWERPC_NPE405H2
= 0x41410140,
6761 CPU_POWERPC_NPE405L
= 0x416100C0,
6762 CPU_POWERPC_NPE4GS3
= 0x40B10000,
6764 CPU_POWERPC_NPCxx1
= xxx
,
6767 CPU_POWERPC_NPR161
= xxx
,
6770 CPU_POWERPC_LC77700
= xxx
,
6772 /* IBM STBxxx (PowerPC 401/403/405 core based microcontrollers) */
6774 CPU_POWERPC_STB01000
= xxx
,
6777 CPU_POWERPC_STB01010
= xxx
,
6780 CPU_POWERPC_STB0210
= xxx
, /* 401B3 */
6782 CPU_POWERPC_STB03
= 0x40310000, /* 0x40130000 ? */
6784 CPU_POWERPC_STB043
= xxx
,
6787 CPU_POWERPC_STB045
= xxx
,
6789 CPU_POWERPC_STB04
= 0x41810000,
6790 CPU_POWERPC_STB25
= 0x51510950,
6792 CPU_POWERPC_STB130
= xxx
,
6795 CPU_POWERPC_X2VP4
= 0x20010820,
6796 #define CPU_POWERPC_X2VP7 CPU_POWERPC_X2VP4
6797 CPU_POWERPC_X2VP20
= 0x20010860,
6798 #define CPU_POWERPC_X2VP50 CPU_POWERPC_X2VP20
6800 CPU_POWERPC_ZL10310
= xxx
,
6803 CPU_POWERPC_ZL10311
= xxx
,
6806 CPU_POWERPC_ZL10320
= xxx
,
6809 CPU_POWERPC_ZL10321
= xxx
,
6811 /* PowerPC 440 family */
6812 /* Generic PowerPC 440 */
6813 #define CPU_POWERPC_440 CPU_POWERPC_440GXf
6814 /* PowerPC 440 cores */
6816 CPU_POWERPC_440A4
= xxx
,
6818 CPU_POWERPC_440_XILINX
= 0x7ff21910,
6820 CPU_POWERPC_440A5
= xxx
,
6823 CPU_POWERPC_440B4
= xxx
,
6826 CPU_POWERPC_440F5
= xxx
,
6829 CPU_POWERPC_440G5
= xxx
,
6832 CPU_POWERPC_440H4
= xxx
,
6835 CPU_POWERPC_440H6
= xxx
,
6837 /* PowerPC 440 microcontrolers */
6838 #define CPU_POWERPC_440EP CPU_POWERPC_440EPb
6839 CPU_POWERPC_440EPa
= 0x42221850,
6840 CPU_POWERPC_440EPb
= 0x422218D3,
6841 #define CPU_POWERPC_440GP CPU_POWERPC_440GPc
6842 CPU_POWERPC_440GPb
= 0x40120440,
6843 CPU_POWERPC_440GPc
= 0x40120481,
6844 #define CPU_POWERPC_440GR CPU_POWERPC_440GRa
6845 #define CPU_POWERPC_440GRa CPU_POWERPC_440EPb
6846 CPU_POWERPC_440GRX
= 0x200008D0,
6847 #define CPU_POWERPC_440EPX CPU_POWERPC_440GRX
6848 #define CPU_POWERPC_440GX CPU_POWERPC_440GXf
6849 CPU_POWERPC_440GXa
= 0x51B21850,
6850 CPU_POWERPC_440GXb
= 0x51B21851,
6851 CPU_POWERPC_440GXc
= 0x51B21892,
6852 CPU_POWERPC_440GXf
= 0x51B21894,
6854 CPU_POWERPC_440S
= xxx
,
6856 CPU_POWERPC_440SP
= 0x53221850,
6857 CPU_POWERPC_440SP2
= 0x53221891,
6858 CPU_POWERPC_440SPE
= 0x53421890,
6859 /* PowerPC 460 family */
6861 /* Generic PowerPC 464 */
6862 #define CPU_POWERPC_464 CPU_POWERPC_464H90
6864 /* PowerPC 464 microcontrolers */
6866 CPU_POWERPC_464H90
= xxx
,
6869 CPU_POWERPC_464H90FP
= xxx
,
6871 /* Freescale embedded PowerPC cores */
6872 /* PowerPC MPC 5xx cores (aka RCPU) */
6873 CPU_POWERPC_MPC5xx
= 0x00020020,
6874 #define CPU_POWERPC_MGT560 CPU_POWERPC_MPC5xx
6875 #define CPU_POWERPC_MPC509 CPU_POWERPC_MPC5xx
6876 #define CPU_POWERPC_MPC533 CPU_POWERPC_MPC5xx
6877 #define CPU_POWERPC_MPC534 CPU_POWERPC_MPC5xx
6878 #define CPU_POWERPC_MPC555 CPU_POWERPC_MPC5xx
6879 #define CPU_POWERPC_MPC556 CPU_POWERPC_MPC5xx
6880 #define CPU_POWERPC_MPC560 CPU_POWERPC_MPC5xx
6881 #define CPU_POWERPC_MPC561 CPU_POWERPC_MPC5xx
6882 #define CPU_POWERPC_MPC562 CPU_POWERPC_MPC5xx
6883 #define CPU_POWERPC_MPC563 CPU_POWERPC_MPC5xx
6884 #define CPU_POWERPC_MPC564 CPU_POWERPC_MPC5xx
6885 #define CPU_POWERPC_MPC565 CPU_POWERPC_MPC5xx
6886 #define CPU_POWERPC_MPC566 CPU_POWERPC_MPC5xx
6887 /* PowerPC MPC 8xx cores (aka PowerQUICC) */
6888 CPU_POWERPC_MPC8xx
= 0x00500000,
6889 #define CPU_POWERPC_MGT823 CPU_POWERPC_MPC8xx
6890 #define CPU_POWERPC_MPC821 CPU_POWERPC_MPC8xx
6891 #define CPU_POWERPC_MPC823 CPU_POWERPC_MPC8xx
6892 #define CPU_POWERPC_MPC850 CPU_POWERPC_MPC8xx
6893 #define CPU_POWERPC_MPC852T CPU_POWERPC_MPC8xx
6894 #define CPU_POWERPC_MPC855T CPU_POWERPC_MPC8xx
6895 #define CPU_POWERPC_MPC857 CPU_POWERPC_MPC8xx
6896 #define CPU_POWERPC_MPC859 CPU_POWERPC_MPC8xx
6897 #define CPU_POWERPC_MPC860 CPU_POWERPC_MPC8xx
6898 #define CPU_POWERPC_MPC862 CPU_POWERPC_MPC8xx
6899 #define CPU_POWERPC_MPC866 CPU_POWERPC_MPC8xx
6900 #define CPU_POWERPC_MPC870 CPU_POWERPC_MPC8xx
6901 #define CPU_POWERPC_MPC875 CPU_POWERPC_MPC8xx
6902 #define CPU_POWERPC_MPC880 CPU_POWERPC_MPC8xx
6903 #define CPU_POWERPC_MPC885 CPU_POWERPC_MPC8xx
6904 /* G2 cores (aka PowerQUICC-II) */
6905 CPU_POWERPC_G2
= 0x00810011,
6906 CPU_POWERPC_G2H4
= 0x80811010,
6907 CPU_POWERPC_G2gp
= 0x80821010,
6908 CPU_POWERPC_G2ls
= 0x90810010,
6909 CPU_POWERPC_MPC603
= 0x00810100,
6910 CPU_POWERPC_G2_HIP3
= 0x00810101,
6911 CPU_POWERPC_G2_HIP4
= 0x80811014,
6912 /* G2_LE core (aka PowerQUICC-II) */
6913 CPU_POWERPC_G2LE
= 0x80820010,
6914 CPU_POWERPC_G2LEgp
= 0x80822010,
6915 CPU_POWERPC_G2LEls
= 0xA0822010,
6916 CPU_POWERPC_G2LEgp1
= 0x80822011,
6917 CPU_POWERPC_G2LEgp3
= 0x80822013,
6918 /* MPC52xx microcontrollers */
6919 /* XXX: MPC 5121 ? */
6920 #define CPU_POWERPC_MPC52xx CPU_POWERPC_MPC5200
6921 #define CPU_POWERPC_MPC5200 CPU_POWERPC_MPC5200_v12
6922 #define CPU_POWERPC_MPC5200_v10 CPU_POWERPC_G2LEgp1
6923 #define CPU_POWERPC_MPC5200_v11 CPU_POWERPC_G2LEgp1
6924 #define CPU_POWERPC_MPC5200_v12 CPU_POWERPC_G2LEgp1
6925 #define CPU_POWERPC_MPC5200B CPU_POWERPC_MPC5200B_v21
6926 #define CPU_POWERPC_MPC5200B_v20 CPU_POWERPC_G2LEgp1
6927 #define CPU_POWERPC_MPC5200B_v21 CPU_POWERPC_G2LEgp1
6928 /* MPC82xx microcontrollers */
6929 #define CPU_POWERPC_MPC82xx CPU_POWERPC_MPC8280
6930 #define CPU_POWERPC_MPC8240 CPU_POWERPC_MPC603
6931 #define CPU_POWERPC_MPC8241 CPU_POWERPC_G2_HIP4
6932 #define CPU_POWERPC_MPC8245 CPU_POWERPC_G2_HIP4
6933 #define CPU_POWERPC_MPC8247 CPU_POWERPC_G2LEgp3
6934 #define CPU_POWERPC_MPC8248 CPU_POWERPC_G2LEgp3
6935 #define CPU_POWERPC_MPC8250 CPU_POWERPC_MPC8250_HiP4
6936 #define CPU_POWERPC_MPC8250_HiP3 CPU_POWERPC_G2_HIP3
6937 #define CPU_POWERPC_MPC8250_HiP4 CPU_POWERPC_G2_HIP4
6938 #define CPU_POWERPC_MPC8255 CPU_POWERPC_MPC8255_HiP4
6939 #define CPU_POWERPC_MPC8255_HiP3 CPU_POWERPC_G2_HIP3
6940 #define CPU_POWERPC_MPC8255_HiP4 CPU_POWERPC_G2_HIP4
6941 #define CPU_POWERPC_MPC8260 CPU_POWERPC_MPC8260_HiP4
6942 #define CPU_POWERPC_MPC8260_HiP3 CPU_POWERPC_G2_HIP3
6943 #define CPU_POWERPC_MPC8260_HiP4 CPU_POWERPC_G2_HIP4
6944 #define CPU_POWERPC_MPC8264 CPU_POWERPC_MPC8264_HiP4
6945 #define CPU_POWERPC_MPC8264_HiP3 CPU_POWERPC_G2_HIP3
6946 #define CPU_POWERPC_MPC8264_HiP4 CPU_POWERPC_G2_HIP4
6947 #define CPU_POWERPC_MPC8265 CPU_POWERPC_MPC8265_HiP4
6948 #define CPU_POWERPC_MPC8265_HiP3 CPU_POWERPC_G2_HIP3
6949 #define CPU_POWERPC_MPC8265_HiP4 CPU_POWERPC_G2_HIP4
6950 #define CPU_POWERPC_MPC8266 CPU_POWERPC_MPC8266_HiP4
6951 #define CPU_POWERPC_MPC8266_HiP3 CPU_POWERPC_G2_HIP3
6952 #define CPU_POWERPC_MPC8266_HiP4 CPU_POWERPC_G2_HIP4
6953 #define CPU_POWERPC_MPC8270 CPU_POWERPC_G2LEgp3
6954 #define CPU_POWERPC_MPC8271 CPU_POWERPC_G2LEgp3
6955 #define CPU_POWERPC_MPC8272 CPU_POWERPC_G2LEgp3
6956 #define CPU_POWERPC_MPC8275 CPU_POWERPC_G2LEgp3
6957 #define CPU_POWERPC_MPC8280 CPU_POWERPC_G2LEgp3
6960 #define CPU_POWERPC_e200 CPU_POWERPC_e200z6
6962 CPU_POWERPC_e200z0
= xxx
,
6965 CPU_POWERPC_e200z1
= xxx
,
6968 CPU_POWERPC_e200z3
= 0x81120000,
6970 CPU_POWERPC_e200z5
= 0x81000000,
6971 CPU_POWERPC_e200z6
= 0x81120000,
6972 /* MPC55xx microcontrollers */
6973 #define CPU_POWERPC_MPC55xx CPU_POWERPC_MPC5567
6975 #define CPU_POWERPC_MPC5514E CPU_POWERPC_MPC5514E_v1
6976 #define CPU_POWERPC_MPC5514E_v0 CPU_POWERPC_e200z0
6977 #define CPU_POWERPC_MPC5514E_v1 CPU_POWERPC_e200z1
6978 #define CPU_POWERPC_MPC5514G CPU_POWERPC_MPC5514G_v1
6979 #define CPU_POWERPC_MPC5514G_v0 CPU_POWERPC_e200z0
6980 #define CPU_POWERPC_MPC5514G_v1 CPU_POWERPC_e200z1
6981 #define CPU_POWERPC_MPC5515S CPU_POWERPC_e200z1
6982 #define CPU_POWERPC_MPC5516E CPU_POWERPC_MPC5516E_v1
6983 #define CPU_POWERPC_MPC5516E_v0 CPU_POWERPC_e200z0
6984 #define CPU_POWERPC_MPC5516E_v1 CPU_POWERPC_e200z1
6985 #define CPU_POWERPC_MPC5516G CPU_POWERPC_MPC5516G_v1
6986 #define CPU_POWERPC_MPC5516G_v0 CPU_POWERPC_e200z0
6987 #define CPU_POWERPC_MPC5516G_v1 CPU_POWERPC_e200z1
6988 #define CPU_POWERPC_MPC5516S CPU_POWERPC_e200z1
6991 #define CPU_POWERPC_MPC5533 CPU_POWERPC_e200z3
6992 #define CPU_POWERPC_MPC5534 CPU_POWERPC_e200z3
6994 #define CPU_POWERPC_MPC5553 CPU_POWERPC_e200z6
6995 #define CPU_POWERPC_MPC5554 CPU_POWERPC_e200z6
6996 #define CPU_POWERPC_MPC5561 CPU_POWERPC_e200z6
6997 #define CPU_POWERPC_MPC5565 CPU_POWERPC_e200z6
6998 #define CPU_POWERPC_MPC5566 CPU_POWERPC_e200z6
6999 #define CPU_POWERPC_MPC5567 CPU_POWERPC_e200z6
7002 #define CPU_POWERPC_e300 CPU_POWERPC_e300c3
7003 CPU_POWERPC_e300c1
= 0x00830010,
7004 CPU_POWERPC_e300c2
= 0x00840010,
7005 CPU_POWERPC_e300c3
= 0x00850010,
7006 CPU_POWERPC_e300c4
= 0x00860010,
7007 /* MPC83xx microcontrollers */
7008 #define CPU_POWERPC_MPC831x CPU_POWERPC_e300c3
7009 #define CPU_POWERPC_MPC832x CPU_POWERPC_e300c2
7010 #define CPU_POWERPC_MPC834x CPU_POWERPC_e300c1
7011 #define CPU_POWERPC_MPC835x CPU_POWERPC_e300c1
7012 #define CPU_POWERPC_MPC836x CPU_POWERPC_e300c1
7013 #define CPU_POWERPC_MPC837x CPU_POWERPC_e300c4
7016 #define CPU_POWERPC_e500 CPU_POWERPC_e500v2_v22
7017 #define CPU_POWERPC_e500v1 CPU_POWERPC_e500v1_v20
7018 #define CPU_POWERPC_e500v2 CPU_POWERPC_e500v2_v22
7019 CPU_POWERPC_e500v1_v10
= 0x80200010,
7020 CPU_POWERPC_e500v1_v20
= 0x80200020,
7021 CPU_POWERPC_e500v2_v10
= 0x80210010,
7022 CPU_POWERPC_e500v2_v11
= 0x80210011,
7023 CPU_POWERPC_e500v2_v20
= 0x80210020,
7024 CPU_POWERPC_e500v2_v21
= 0x80210021,
7025 CPU_POWERPC_e500v2_v22
= 0x80210022,
7026 CPU_POWERPC_e500v2_v30
= 0x80210030,
7027 /* MPC85xx microcontrollers */
7028 #define CPU_POWERPC_MPC8533 CPU_POWERPC_MPC8533_v11
7029 #define CPU_POWERPC_MPC8533_v10 CPU_POWERPC_e500v2_v21
7030 #define CPU_POWERPC_MPC8533_v11 CPU_POWERPC_e500v2_v22
7031 #define CPU_POWERPC_MPC8533E CPU_POWERPC_MPC8533E_v11
7032 #define CPU_POWERPC_MPC8533E_v10 CPU_POWERPC_e500v2_v21
7033 #define CPU_POWERPC_MPC8533E_v11 CPU_POWERPC_e500v2_v22
7034 #define CPU_POWERPC_MPC8540 CPU_POWERPC_MPC8540_v21
7035 #define CPU_POWERPC_MPC8540_v10 CPU_POWERPC_e500v1_v10
7036 #define CPU_POWERPC_MPC8540_v20 CPU_POWERPC_e500v1_v20
7037 #define CPU_POWERPC_MPC8540_v21 CPU_POWERPC_e500v1_v20
7038 #define CPU_POWERPC_MPC8541 CPU_POWERPC_MPC8541_v11
7039 #define CPU_POWERPC_MPC8541_v10 CPU_POWERPC_e500v1_v20
7040 #define CPU_POWERPC_MPC8541_v11 CPU_POWERPC_e500v1_v20
7041 #define CPU_POWERPC_MPC8541E CPU_POWERPC_MPC8541E_v11
7042 #define CPU_POWERPC_MPC8541E_v10 CPU_POWERPC_e500v1_v20
7043 #define CPU_POWERPC_MPC8541E_v11 CPU_POWERPC_e500v1_v20
7044 #define CPU_POWERPC_MPC8543 CPU_POWERPC_MPC8543_v21
7045 #define CPU_POWERPC_MPC8543_v10 CPU_POWERPC_e500v2_v10
7046 #define CPU_POWERPC_MPC8543_v11 CPU_POWERPC_e500v2_v11
7047 #define CPU_POWERPC_MPC8543_v20 CPU_POWERPC_e500v2_v20
7048 #define CPU_POWERPC_MPC8543_v21 CPU_POWERPC_e500v2_v21
7049 #define CPU_POWERPC_MPC8543E CPU_POWERPC_MPC8543E_v21
7050 #define CPU_POWERPC_MPC8543E_v10 CPU_POWERPC_e500v2_v10
7051 #define CPU_POWERPC_MPC8543E_v11 CPU_POWERPC_e500v2_v11
7052 #define CPU_POWERPC_MPC8543E_v20 CPU_POWERPC_e500v2_v20
7053 #define CPU_POWERPC_MPC8543E_v21 CPU_POWERPC_e500v2_v21
7054 #define CPU_POWERPC_MPC8544 CPU_POWERPC_MPC8544_v11
7055 #define CPU_POWERPC_MPC8544_v10 CPU_POWERPC_e500v2_v21
7056 #define CPU_POWERPC_MPC8544_v11 CPU_POWERPC_e500v2_v22
7057 #define CPU_POWERPC_MPC8544E_v11 CPU_POWERPC_e500v2_v22
7058 #define CPU_POWERPC_MPC8544E CPU_POWERPC_MPC8544E_v11
7059 #define CPU_POWERPC_MPC8544E_v10 CPU_POWERPC_e500v2_v21
7060 #define CPU_POWERPC_MPC8545 CPU_POWERPC_MPC8545_v21
7061 #define CPU_POWERPC_MPC8545_v10 CPU_POWERPC_e500v2_v10
7062 #define CPU_POWERPC_MPC8545_v20 CPU_POWERPC_e500v2_v20
7063 #define CPU_POWERPC_MPC8545_v21 CPU_POWERPC_e500v2_v21
7064 #define CPU_POWERPC_MPC8545E CPU_POWERPC_MPC8545E_v21
7065 #define CPU_POWERPC_MPC8545E_v10 CPU_POWERPC_e500v2_v10
7066 #define CPU_POWERPC_MPC8545E_v20 CPU_POWERPC_e500v2_v20
7067 #define CPU_POWERPC_MPC8545E_v21 CPU_POWERPC_e500v2_v21
7068 #define CPU_POWERPC_MPC8547E CPU_POWERPC_MPC8545E_v21
7069 #define CPU_POWERPC_MPC8547E_v10 CPU_POWERPC_e500v2_v10
7070 #define CPU_POWERPC_MPC8547E_v20 CPU_POWERPC_e500v2_v20
7071 #define CPU_POWERPC_MPC8547E_v21 CPU_POWERPC_e500v2_v21
7072 #define CPU_POWERPC_MPC8548 CPU_POWERPC_MPC8548_v21
7073 #define CPU_POWERPC_MPC8548_v10 CPU_POWERPC_e500v2_v10
7074 #define CPU_POWERPC_MPC8548_v11 CPU_POWERPC_e500v2_v11
7075 #define CPU_POWERPC_MPC8548_v20 CPU_POWERPC_e500v2_v20
7076 #define CPU_POWERPC_MPC8548_v21 CPU_POWERPC_e500v2_v21
7077 #define CPU_POWERPC_MPC8548E CPU_POWERPC_MPC8548E_v21
7078 #define CPU_POWERPC_MPC8548E_v10 CPU_POWERPC_e500v2_v10
7079 #define CPU_POWERPC_MPC8548E_v11 CPU_POWERPC_e500v2_v11
7080 #define CPU_POWERPC_MPC8548E_v20 CPU_POWERPC_e500v2_v20
7081 #define CPU_POWERPC_MPC8548E_v21 CPU_POWERPC_e500v2_v21
7082 #define CPU_POWERPC_MPC8555 CPU_POWERPC_MPC8555_v11
7083 #define CPU_POWERPC_MPC8555_v10 CPU_POWERPC_e500v2_v10
7084 #define CPU_POWERPC_MPC8555_v11 CPU_POWERPC_e500v2_v11
7085 #define CPU_POWERPC_MPC8555E CPU_POWERPC_MPC8555E_v11
7086 #define CPU_POWERPC_MPC8555E_v10 CPU_POWERPC_e500v2_v10
7087 #define CPU_POWERPC_MPC8555E_v11 CPU_POWERPC_e500v2_v11
7088 #define CPU_POWERPC_MPC8560 CPU_POWERPC_MPC8560_v21
7089 #define CPU_POWERPC_MPC8560_v10 CPU_POWERPC_e500v2_v10
7090 #define CPU_POWERPC_MPC8560_v20 CPU_POWERPC_e500v2_v20
7091 #define CPU_POWERPC_MPC8560_v21 CPU_POWERPC_e500v2_v21
7092 #define CPU_POWERPC_MPC8567 CPU_POWERPC_e500v2_v22
7093 #define CPU_POWERPC_MPC8567E CPU_POWERPC_e500v2_v22
7094 #define CPU_POWERPC_MPC8568 CPU_POWERPC_e500v2_v22
7095 #define CPU_POWERPC_MPC8568E CPU_POWERPC_e500v2_v22
7096 #define CPU_POWERPC_MPC8572 CPU_POWERPC_e500v2_v30
7097 #define CPU_POWERPC_MPC8572E CPU_POWERPC_e500v2_v30
7100 CPU_POWERPC_e600
= 0x80040010,
7101 /* MPC86xx microcontrollers */
7102 #define CPU_POWERPC_MPC8610 CPU_POWERPC_e600
7103 #define CPU_POWERPC_MPC8641 CPU_POWERPC_e600
7104 #define CPU_POWERPC_MPC8641D CPU_POWERPC_e600
7105 /* PowerPC 6xx cores */
7106 #define CPU_POWERPC_601 CPU_POWERPC_601_v2
7107 CPU_POWERPC_601_v0
= 0x00010001,
7108 CPU_POWERPC_601_v1
= 0x00010001,
7109 #define CPU_POWERPC_601v CPU_POWERPC_601_v2
7110 CPU_POWERPC_601_v2
= 0x00010002,
7111 CPU_POWERPC_602
= 0x00050100,
7112 CPU_POWERPC_603
= 0x00030100,
7113 #define CPU_POWERPC_603E CPU_POWERPC_603E_v41
7114 CPU_POWERPC_603E_v11
= 0x00060101,
7115 CPU_POWERPC_603E_v12
= 0x00060102,
7116 CPU_POWERPC_603E_v13
= 0x00060103,
7117 CPU_POWERPC_603E_v14
= 0x00060104,
7118 CPU_POWERPC_603E_v22
= 0x00060202,
7119 CPU_POWERPC_603E_v3
= 0x00060300,
7120 CPU_POWERPC_603E_v4
= 0x00060400,
7121 CPU_POWERPC_603E_v41
= 0x00060401,
7122 CPU_POWERPC_603E7t
= 0x00071201,
7123 CPU_POWERPC_603E7v
= 0x00070100,
7124 CPU_POWERPC_603E7v1
= 0x00070101,
7125 CPU_POWERPC_603E7v2
= 0x00070201,
7126 CPU_POWERPC_603E7
= 0x00070200,
7127 CPU_POWERPC_603P
= 0x00070000,
7128 #define CPU_POWERPC_603R CPU_POWERPC_603E7t
7129 /* XXX: missing 0x00040303 (604) */
7130 CPU_POWERPC_604
= 0x00040103,
7131 #define CPU_POWERPC_604E CPU_POWERPC_604E_v24
7132 /* XXX: missing 0x00091203 */
7133 /* XXX: missing 0x00092110 */
7134 /* XXX: missing 0x00092120 */
7135 CPU_POWERPC_604E_v10
= 0x00090100,
7136 CPU_POWERPC_604E_v22
= 0x00090202,
7137 CPU_POWERPC_604E_v24
= 0x00090204,
7138 /* XXX: missing 0x000a0100 */
7139 /* XXX: missing 0x00093102 */
7140 CPU_POWERPC_604R
= 0x000a0101,
7142 CPU_POWERPC_604EV
= xxx
, /* XXX: same as 604R ? */
7144 /* PowerPC 740/750 cores (aka G3) */
7145 /* XXX: missing 0x00084202 */
7146 #define CPU_POWERPC_7x0 CPU_POWERPC_7x0_v31
7147 CPU_POWERPC_7x0_v10
= 0x00080100,
7148 CPU_POWERPC_7x0_v20
= 0x00080200,
7149 CPU_POWERPC_7x0_v21
= 0x00080201,
7150 CPU_POWERPC_7x0_v22
= 0x00080202,
7151 CPU_POWERPC_7x0_v30
= 0x00080300,
7152 CPU_POWERPC_7x0_v31
= 0x00080301,
7153 CPU_POWERPC_740E
= 0x00080100,
7154 CPU_POWERPC_750E
= 0x00080200,
7155 CPU_POWERPC_7x0P
= 0x10080000,
7156 /* XXX: missing 0x00087010 (CL ?) */
7157 #define CPU_POWERPC_750CL CPU_POWERPC_750CL_v20
7158 CPU_POWERPC_750CL_v10
= 0x00087200,
7159 CPU_POWERPC_750CL_v20
= 0x00087210, /* aka rev E */
7160 #define CPU_POWERPC_750CX CPU_POWERPC_750CX_v22
7161 CPU_POWERPC_750CX_v10
= 0x00082100,
7162 CPU_POWERPC_750CX_v20
= 0x00082200,
7163 CPU_POWERPC_750CX_v21
= 0x00082201,
7164 CPU_POWERPC_750CX_v22
= 0x00082202,
7165 #define CPU_POWERPC_750CXE CPU_POWERPC_750CXE_v31b
7166 CPU_POWERPC_750CXE_v21
= 0x00082211,
7167 CPU_POWERPC_750CXE_v22
= 0x00082212,
7168 CPU_POWERPC_750CXE_v23
= 0x00082213,
7169 CPU_POWERPC_750CXE_v24
= 0x00082214,
7170 CPU_POWERPC_750CXE_v24b
= 0x00083214,
7171 CPU_POWERPC_750CXE_v30
= 0x00082310,
7172 CPU_POWERPC_750CXE_v31
= 0x00082311,
7173 CPU_POWERPC_750CXE_v31b
= 0x00083311,
7174 CPU_POWERPC_750CXR
= 0x00083410,
7175 CPU_POWERPC_750FL
= 0x70000203,
7176 #define CPU_POWERPC_750FX CPU_POWERPC_750FX_v23
7177 CPU_POWERPC_750FX_v10
= 0x70000100,
7178 CPU_POWERPC_750FX_v20
= 0x70000200,
7179 CPU_POWERPC_750FX_v21
= 0x70000201,
7180 CPU_POWERPC_750FX_v22
= 0x70000202,
7181 CPU_POWERPC_750FX_v23
= 0x70000203,
7182 CPU_POWERPC_750GL
= 0x70020102,
7183 #define CPU_POWERPC_750GX CPU_POWERPC_750GX_v12
7184 CPU_POWERPC_750GX_v10
= 0x70020100,
7185 CPU_POWERPC_750GX_v11
= 0x70020101,
7186 CPU_POWERPC_750GX_v12
= 0x70020102,
7187 #define CPU_POWERPC_750L CPU_POWERPC_750L_v32 /* Aka LoneStar */
7188 CPU_POWERPC_750L_v20
= 0x00088200,
7189 CPU_POWERPC_750L_v21
= 0x00088201,
7190 CPU_POWERPC_750L_v22
= 0x00088202,
7191 CPU_POWERPC_750L_v30
= 0x00088300,
7192 CPU_POWERPC_750L_v32
= 0x00088302,
7193 /* PowerPC 745/755 cores */
7194 #define CPU_POWERPC_7x5 CPU_POWERPC_7x5_v28
7195 CPU_POWERPC_7x5_v10
= 0x00083100,
7196 CPU_POWERPC_7x5_v11
= 0x00083101,
7197 CPU_POWERPC_7x5_v20
= 0x00083200,
7198 CPU_POWERPC_7x5_v21
= 0x00083201,
7199 CPU_POWERPC_7x5_v22
= 0x00083202, /* aka D */
7200 CPU_POWERPC_7x5_v23
= 0x00083203, /* aka E */
7201 CPU_POWERPC_7x5_v24
= 0x00083204,
7202 CPU_POWERPC_7x5_v25
= 0x00083205,
7203 CPU_POWERPC_7x5_v26
= 0x00083206,
7204 CPU_POWERPC_7x5_v27
= 0x00083207,
7205 CPU_POWERPC_7x5_v28
= 0x00083208,
7207 CPU_POWERPC_7x5P
= xxx
,
7209 /* PowerPC 74xx cores (aka G4) */
7210 /* XXX: missing 0x000C1101 */
7211 #define CPU_POWERPC_7400 CPU_POWERPC_7400_v29
7212 CPU_POWERPC_7400_v10
= 0x000C0100,
7213 CPU_POWERPC_7400_v11
= 0x000C0101,
7214 CPU_POWERPC_7400_v20
= 0x000C0200,
7215 CPU_POWERPC_7400_v21
= 0x000C0201,
7216 CPU_POWERPC_7400_v22
= 0x000C0202,
7217 CPU_POWERPC_7400_v26
= 0x000C0206,
7218 CPU_POWERPC_7400_v27
= 0x000C0207,
7219 CPU_POWERPC_7400_v28
= 0x000C0208,
7220 CPU_POWERPC_7400_v29
= 0x000C0209,
7221 #define CPU_POWERPC_7410 CPU_POWERPC_7410_v14
7222 CPU_POWERPC_7410_v10
= 0x800C1100,
7223 CPU_POWERPC_7410_v11
= 0x800C1101,
7224 CPU_POWERPC_7410_v12
= 0x800C1102, /* aka C */
7225 CPU_POWERPC_7410_v13
= 0x800C1103, /* aka D */
7226 CPU_POWERPC_7410_v14
= 0x800C1104, /* aka E */
7227 #define CPU_POWERPC_7448 CPU_POWERPC_7448_v21
7228 CPU_POWERPC_7448_v10
= 0x80040100,
7229 CPU_POWERPC_7448_v11
= 0x80040101,
7230 CPU_POWERPC_7448_v20
= 0x80040200,
7231 CPU_POWERPC_7448_v21
= 0x80040201,
7232 #define CPU_POWERPC_7450 CPU_POWERPC_7450_v21
7233 CPU_POWERPC_7450_v10
= 0x80000100,
7234 CPU_POWERPC_7450_v11
= 0x80000101,
7235 CPU_POWERPC_7450_v12
= 0x80000102,
7236 CPU_POWERPC_7450_v20
= 0x80000200, /* aka A, B, C, D: 2.04 */
7237 CPU_POWERPC_7450_v21
= 0x80000201, /* aka E */
7238 #define CPU_POWERPC_74x1 CPU_POWERPC_74x1_v23
7239 CPU_POWERPC_74x1_v23
= 0x80000203, /* aka G: 2.3 */
7240 /* XXX: this entry might be a bug in some documentation */
7241 CPU_POWERPC_74x1_v210
= 0x80000210, /* aka G: 2.3 ? */
7242 #define CPU_POWERPC_74x5 CPU_POWERPC_74x5_v32
7243 CPU_POWERPC_74x5_v10
= 0x80010100,
7244 /* XXX: missing 0x80010200 */
7245 CPU_POWERPC_74x5_v21
= 0x80010201, /* aka C: 2.1 */
7246 CPU_POWERPC_74x5_v32
= 0x80010302,
7247 CPU_POWERPC_74x5_v33
= 0x80010303, /* aka F: 3.3 */
7248 CPU_POWERPC_74x5_v34
= 0x80010304, /* aka G: 3.4 */
7249 #define CPU_POWERPC_74x7 CPU_POWERPC_74x7_v12
7250 CPU_POWERPC_74x7_v10
= 0x80020100, /* aka A: 1.0 */
7251 CPU_POWERPC_74x7_v11
= 0x80020101, /* aka B: 1.1 */
7252 CPU_POWERPC_74x7_v12
= 0x80020102, /* aka C: 1.2 */
7253 #define CPU_POWERPC_74x7A CPU_POWERPC_74x7A_v12
7254 CPU_POWERPC_74x7A_v10
= 0x80030100, /* aka A: 1.0 */
7255 CPU_POWERPC_74x7A_v11
= 0x80030101, /* aka B: 1.1 */
7256 CPU_POWERPC_74x7A_v12
= 0x80030102, /* aka C: 1.2 */
7257 /* 64 bits PowerPC */
7258 #if defined(TARGET_PPC64)
7259 CPU_POWERPC_620
= 0x00140000,
7260 CPU_POWERPC_630
= 0x00400000,
7261 CPU_POWERPC_631
= 0x00410104,
7262 CPU_POWERPC_POWER4
= 0x00350000,
7263 CPU_POWERPC_POWER4P
= 0x00380000,
7264 /* XXX: missing 0x003A0201 */
7265 CPU_POWERPC_POWER5
= 0x003A0203,
7266 #define CPU_POWERPC_POWER5GR CPU_POWERPC_POWER5
7267 CPU_POWERPC_POWER5P
= 0x003B0000,
7268 #define CPU_POWERPC_POWER5GS CPU_POWERPC_POWER5P
7269 CPU_POWERPC_POWER6
= 0x003E0000,
7270 CPU_POWERPC_POWER6_5
= 0x0F000001, /* POWER6 in POWER5 mode */
7271 CPU_POWERPC_POWER6A
= 0x0F000002,
7272 #define CPU_POWERPC_POWER7 CPU_POWERPC_POWER7_v20
7273 CPU_POWERPC_POWER7_v20
= 0x003F0200,
7274 CPU_POWERPC_970
= 0x00390202,
7275 #define CPU_POWERPC_970FX CPU_POWERPC_970FX_v31
7276 CPU_POWERPC_970FX_v10
= 0x00391100,
7277 CPU_POWERPC_970FX_v20
= 0x003C0200,
7278 CPU_POWERPC_970FX_v21
= 0x003C0201,
7279 CPU_POWERPC_970FX_v30
= 0x003C0300,
7280 CPU_POWERPC_970FX_v31
= 0x003C0301,
7281 CPU_POWERPC_970GX
= 0x00450000,
7282 #define CPU_POWERPC_970MP CPU_POWERPC_970MP_v11
7283 CPU_POWERPC_970MP_v10
= 0x00440100,
7284 CPU_POWERPC_970MP_v11
= 0x00440101,
7285 #define CPU_POWERPC_CELL CPU_POWERPC_CELL_v32
7286 CPU_POWERPC_CELL_v10
= 0x00700100,
7287 CPU_POWERPC_CELL_v20
= 0x00700400,
7288 CPU_POWERPC_CELL_v30
= 0x00700500,
7289 CPU_POWERPC_CELL_v31
= 0x00700501,
7290 #define CPU_POWERPC_CELL_v32 CPU_POWERPC_CELL_v31
7291 CPU_POWERPC_RS64
= 0x00330000,
7292 CPU_POWERPC_RS64II
= 0x00340000,
7293 CPU_POWERPC_RS64III
= 0x00360000,
7294 CPU_POWERPC_RS64IV
= 0x00370000,
7295 #endif /* defined(TARGET_PPC64) */
7296 /* Original POWER */
7297 /* XXX: should be POWER (RIOS), RSC3308, RSC4608,
7298 * POWER2 (RIOS2) & RSC2 (P2SC) here
7301 CPU_POWER
= xxx
, /* 0x20000 ? 0x30000 for RSC ? */
7304 CPU_POWER2
= xxx
, /* 0x40000 ? */
7307 CPU_POWERPC_PA6T
= 0x00900000,
7310 /* System version register (used on MPC 8xxx) */
7312 POWERPC_SVR_NONE
= 0x00000000,
7313 #define POWERPC_SVR_52xx POWERPC_SVR_5200
7314 #define POWERPC_SVR_5200 POWERPC_SVR_5200_v12
7315 POWERPC_SVR_5200_v10
= 0x80110010,
7316 POWERPC_SVR_5200_v11
= 0x80110011,
7317 POWERPC_SVR_5200_v12
= 0x80110012,
7318 #define POWERPC_SVR_5200B POWERPC_SVR_5200B_v21
7319 POWERPC_SVR_5200B_v20
= 0x80110020,
7320 POWERPC_SVR_5200B_v21
= 0x80110021,
7321 #define POWERPC_SVR_55xx POWERPC_SVR_5567
7323 POWERPC_SVR_5533
= xxx
,
7326 POWERPC_SVR_5534
= xxx
,
7329 POWERPC_SVR_5553
= xxx
,
7332 POWERPC_SVR_5554
= xxx
,
7335 POWERPC_SVR_5561
= xxx
,
7338 POWERPC_SVR_5565
= xxx
,
7341 POWERPC_SVR_5566
= xxx
,
7344 POWERPC_SVR_5567
= xxx
,
7347 POWERPC_SVR_8313
= xxx
,
7350 POWERPC_SVR_8313E
= xxx
,
7353 POWERPC_SVR_8314
= xxx
,
7356 POWERPC_SVR_8314E
= xxx
,
7359 POWERPC_SVR_8315
= xxx
,
7362 POWERPC_SVR_8315E
= xxx
,
7365 POWERPC_SVR_8321
= xxx
,
7368 POWERPC_SVR_8321E
= xxx
,
7371 POWERPC_SVR_8323
= xxx
,
7374 POWERPC_SVR_8323E
= xxx
,
7376 POWERPC_SVR_8343
= 0x80570010,
7377 POWERPC_SVR_8343A
= 0x80570030,
7378 POWERPC_SVR_8343E
= 0x80560010,
7379 POWERPC_SVR_8343EA
= 0x80560030,
7380 #define POWERPC_SVR_8347 POWERPC_SVR_8347T
7381 POWERPC_SVR_8347P
= 0x80550010, /* PBGA package */
7382 POWERPC_SVR_8347T
= 0x80530010, /* TBGA package */
7383 #define POWERPC_SVR_8347A POWERPC_SVR_8347AT
7384 POWERPC_SVR_8347AP
= 0x80550030, /* PBGA package */
7385 POWERPC_SVR_8347AT
= 0x80530030, /* TBGA package */
7386 #define POWERPC_SVR_8347E POWERPC_SVR_8347ET
7387 POWERPC_SVR_8347EP
= 0x80540010, /* PBGA package */
7388 POWERPC_SVR_8347ET
= 0x80520010, /* TBGA package */
7389 #define POWERPC_SVR_8347EA POWERPC_SVR_8347EAT
7390 POWERPC_SVR_8347EAP
= 0x80540030, /* PBGA package */
7391 POWERPC_SVR_8347EAT
= 0x80520030, /* TBGA package */
7392 POWERPC_SVR_8349
= 0x80510010,
7393 POWERPC_SVR_8349A
= 0x80510030,
7394 POWERPC_SVR_8349E
= 0x80500010,
7395 POWERPC_SVR_8349EA
= 0x80500030,
7397 POWERPC_SVR_8358E
= xxx
,
7400 POWERPC_SVR_8360E
= xxx
,
7402 #define POWERPC_SVR_E500 0x40000000
7403 POWERPC_SVR_8377
= 0x80C70010 | POWERPC_SVR_E500
,
7404 POWERPC_SVR_8377E
= 0x80C60010 | POWERPC_SVR_E500
,
7405 POWERPC_SVR_8378
= 0x80C50010 | POWERPC_SVR_E500
,
7406 POWERPC_SVR_8378E
= 0x80C40010 | POWERPC_SVR_E500
,
7407 POWERPC_SVR_8379
= 0x80C30010 | POWERPC_SVR_E500
,
7408 POWERPC_SVR_8379E
= 0x80C00010 | POWERPC_SVR_E500
,
7409 #define POWERPC_SVR_8533 POWERPC_SVR_8533_v11
7410 POWERPC_SVR_8533_v10
= 0x80340010 | POWERPC_SVR_E500
,
7411 POWERPC_SVR_8533_v11
= 0x80340011 | POWERPC_SVR_E500
,
7412 #define POWERPC_SVR_8533E POWERPC_SVR_8533E_v11
7413 POWERPC_SVR_8533E_v10
= 0x803C0010 | POWERPC_SVR_E500
,
7414 POWERPC_SVR_8533E_v11
= 0x803C0011 | POWERPC_SVR_E500
,
7415 #define POWERPC_SVR_8540 POWERPC_SVR_8540_v21
7416 POWERPC_SVR_8540_v10
= 0x80300010 | POWERPC_SVR_E500
,
7417 POWERPC_SVR_8540_v20
= 0x80300020 | POWERPC_SVR_E500
,
7418 POWERPC_SVR_8540_v21
= 0x80300021 | POWERPC_SVR_E500
,
7419 #define POWERPC_SVR_8541 POWERPC_SVR_8541_v11
7420 POWERPC_SVR_8541_v10
= 0x80720010 | POWERPC_SVR_E500
,
7421 POWERPC_SVR_8541_v11
= 0x80720011 | POWERPC_SVR_E500
,
7422 #define POWERPC_SVR_8541E POWERPC_SVR_8541E_v11
7423 POWERPC_SVR_8541E_v10
= 0x807A0010 | POWERPC_SVR_E500
,
7424 POWERPC_SVR_8541E_v11
= 0x807A0011 | POWERPC_SVR_E500
,
7425 #define POWERPC_SVR_8543 POWERPC_SVR_8543_v21
7426 POWERPC_SVR_8543_v10
= 0x80320010 | POWERPC_SVR_E500
,
7427 POWERPC_SVR_8543_v11
= 0x80320011 | POWERPC_SVR_E500
,
7428 POWERPC_SVR_8543_v20
= 0x80320020 | POWERPC_SVR_E500
,
7429 POWERPC_SVR_8543_v21
= 0x80320021 | POWERPC_SVR_E500
,
7430 #define POWERPC_SVR_8543E POWERPC_SVR_8543E_v21
7431 POWERPC_SVR_8543E_v10
= 0x803A0010 | POWERPC_SVR_E500
,
7432 POWERPC_SVR_8543E_v11
= 0x803A0011 | POWERPC_SVR_E500
,
7433 POWERPC_SVR_8543E_v20
= 0x803A0020 | POWERPC_SVR_E500
,
7434 POWERPC_SVR_8543E_v21
= 0x803A0021 | POWERPC_SVR_E500
,
7435 #define POWERPC_SVR_8544 POWERPC_SVR_8544_v11
7436 POWERPC_SVR_8544_v10
= 0x80340110 | POWERPC_SVR_E500
,
7437 POWERPC_SVR_8544_v11
= 0x80340111 | POWERPC_SVR_E500
,
7438 #define POWERPC_SVR_8544E POWERPC_SVR_8544E_v11
7439 POWERPC_SVR_8544E_v10
= 0x803C0110 | POWERPC_SVR_E500
,
7440 POWERPC_SVR_8544E_v11
= 0x803C0111 | POWERPC_SVR_E500
,
7441 #define POWERPC_SVR_8545 POWERPC_SVR_8545_v21
7442 POWERPC_SVR_8545_v20
= 0x80310220 | POWERPC_SVR_E500
,
7443 POWERPC_SVR_8545_v21
= 0x80310221 | POWERPC_SVR_E500
,
7444 #define POWERPC_SVR_8545E POWERPC_SVR_8545E_v21
7445 POWERPC_SVR_8545E_v20
= 0x80390220 | POWERPC_SVR_E500
,
7446 POWERPC_SVR_8545E_v21
= 0x80390221 | POWERPC_SVR_E500
,
7447 #define POWERPC_SVR_8547E POWERPC_SVR_8547E_v21
7448 POWERPC_SVR_8547E_v20
= 0x80390120 | POWERPC_SVR_E500
,
7449 POWERPC_SVR_8547E_v21
= 0x80390121 | POWERPC_SVR_E500
,
7450 #define POWERPC_SVR_8548 POWERPC_SVR_8548_v21
7451 POWERPC_SVR_8548_v10
= 0x80310010 | POWERPC_SVR_E500
,
7452 POWERPC_SVR_8548_v11
= 0x80310011 | POWERPC_SVR_E500
,
7453 POWERPC_SVR_8548_v20
= 0x80310020 | POWERPC_SVR_E500
,
7454 POWERPC_SVR_8548_v21
= 0x80310021 | POWERPC_SVR_E500
,
7455 #define POWERPC_SVR_8548E POWERPC_SVR_8548E_v21
7456 POWERPC_SVR_8548E_v10
= 0x80390010 | POWERPC_SVR_E500
,
7457 POWERPC_SVR_8548E_v11
= 0x80390011 | POWERPC_SVR_E500
,
7458 POWERPC_SVR_8548E_v20
= 0x80390020 | POWERPC_SVR_E500
,
7459 POWERPC_SVR_8548E_v21
= 0x80390021 | POWERPC_SVR_E500
,
7460 #define POWERPC_SVR_8555 POWERPC_SVR_8555_v11
7461 POWERPC_SVR_8555_v10
= 0x80710010 | POWERPC_SVR_E500
,
7462 POWERPC_SVR_8555_v11
= 0x80710011 | POWERPC_SVR_E500
,
7463 #define POWERPC_SVR_8555E POWERPC_SVR_8555_v11
7464 POWERPC_SVR_8555E_v10
= 0x80790010 | POWERPC_SVR_E500
,
7465 POWERPC_SVR_8555E_v11
= 0x80790011 | POWERPC_SVR_E500
,
7466 #define POWERPC_SVR_8560 POWERPC_SVR_8560_v21
7467 POWERPC_SVR_8560_v10
= 0x80700010 | POWERPC_SVR_E500
,
7468 POWERPC_SVR_8560_v20
= 0x80700020 | POWERPC_SVR_E500
,
7469 POWERPC_SVR_8560_v21
= 0x80700021 | POWERPC_SVR_E500
,
7470 POWERPC_SVR_8567
= 0x80750111 | POWERPC_SVR_E500
,
7471 POWERPC_SVR_8567E
= 0x807D0111 | POWERPC_SVR_E500
,
7472 POWERPC_SVR_8568
= 0x80750011 | POWERPC_SVR_E500
,
7473 POWERPC_SVR_8568E
= 0x807D0011 | POWERPC_SVR_E500
,
7474 POWERPC_SVR_8572
= 0x80E00010 | POWERPC_SVR_E500
,
7475 POWERPC_SVR_8572E
= 0x80E80010 | POWERPC_SVR_E500
,
7477 POWERPC_SVR_8610
= xxx
,
7479 POWERPC_SVR_8641
= 0x80900021,
7480 POWERPC_SVR_8641D
= 0x80900121,
7483 /*****************************************************************************/
7484 /* PowerPC CPU definitions */
7485 #define POWERPC_DEF_SVR(_name, _pvr, _svr, _type) \
7490 .insns_flags = glue(POWERPC_INSNS_,_type), \
7491 .insns_flags2 = glue(POWERPC_INSNS2_,_type), \
7492 .msr_mask = glue(POWERPC_MSRM_,_type), \
7493 .mmu_model = glue(POWERPC_MMU_,_type), \
7494 .excp_model = glue(POWERPC_EXCP_,_type), \
7495 .bus_model = glue(POWERPC_INPUT_,_type), \
7496 .bfd_mach = glue(POWERPC_BFDM_,_type), \
7497 .flags = glue(POWERPC_FLAG_,_type), \
7498 .init_proc = &glue(init_proc_,_type), \
7499 .check_pow = &glue(check_pow_,_type), \
7501 #define POWERPC_DEF(_name, _pvr, _type) \
7502 POWERPC_DEF_SVR(_name, _pvr, POWERPC_SVR_NONE, _type)
7504 static const ppc_def_t ppc_defs
[] = {
7505 /* Embedded PowerPC */
7506 /* PowerPC 401 family */
7507 /* Generic PowerPC 401 */
7508 POWERPC_DEF("401", CPU_POWERPC_401
, 401),
7509 /* PowerPC 401 cores */
7511 POWERPC_DEF("401A1", CPU_POWERPC_401A1
, 401),
7513 POWERPC_DEF("401B2", CPU_POWERPC_401B2
, 401x2
),
7516 POWERPC_DEF("401B3", CPU_POWERPC_401B3
, 401x3
),
7519 POWERPC_DEF("401C2", CPU_POWERPC_401C2
, 401x2
),
7521 POWERPC_DEF("401D2", CPU_POWERPC_401D2
, 401x2
),
7523 POWERPC_DEF("401E2", CPU_POWERPC_401E2
, 401x2
),
7525 POWERPC_DEF("401F2", CPU_POWERPC_401F2
, 401x2
),
7527 /* XXX: to be checked */
7528 POWERPC_DEF("401G2", CPU_POWERPC_401G2
, 401x2
),
7529 /* PowerPC 401 microcontrolers */
7532 POWERPC_DEF("401GF", CPU_POWERPC_401GF
, 401),
7534 /* IOP480 (401 microcontroler) */
7535 POWERPC_DEF("IOP480", CPU_POWERPC_IOP480
, IOP480
),
7536 /* IBM Processor for Network Resources */
7537 POWERPC_DEF("Cobra", CPU_POWERPC_COBRA
, 401),
7539 POWERPC_DEF("Xipchip", CPU_POWERPC_XIPCHIP
, 401),
7541 /* PowerPC 403 family */
7542 /* Generic PowerPC 403 */
7543 POWERPC_DEF("403", CPU_POWERPC_403
, 403),
7544 /* PowerPC 403 microcontrolers */
7545 /* PowerPC 403 GA */
7546 POWERPC_DEF("403GA", CPU_POWERPC_403GA
, 403),
7547 /* PowerPC 403 GB */
7548 POWERPC_DEF("403GB", CPU_POWERPC_403GB
, 403),
7549 /* PowerPC 403 GC */
7550 POWERPC_DEF("403GC", CPU_POWERPC_403GC
, 403),
7551 /* PowerPC 403 GCX */
7552 POWERPC_DEF("403GCX", CPU_POWERPC_403GCX
, 403GCX
),
7554 /* PowerPC 403 GP */
7555 POWERPC_DEF("403GP", CPU_POWERPC_403GP
, 403),
7557 /* PowerPC 405 family */
7558 /* Generic PowerPC 405 */
7559 POWERPC_DEF("405", CPU_POWERPC_405
, 405),
7560 /* PowerPC 405 cores */
7562 /* PowerPC 405 A3 */
7563 POWERPC_DEF("405A3", CPU_POWERPC_405A3
, 405),
7566 /* PowerPC 405 A4 */
7567 POWERPC_DEF("405A4", CPU_POWERPC_405A4
, 405),
7570 /* PowerPC 405 B3 */
7571 POWERPC_DEF("405B3", CPU_POWERPC_405B3
, 405),
7574 /* PowerPC 405 B4 */
7575 POWERPC_DEF("405B4", CPU_POWERPC_405B4
, 405),
7578 /* PowerPC 405 C3 */
7579 POWERPC_DEF("405C3", CPU_POWERPC_405C3
, 405),
7582 /* PowerPC 405 C4 */
7583 POWERPC_DEF("405C4", CPU_POWERPC_405C4
, 405),
7585 /* PowerPC 405 D2 */
7586 POWERPC_DEF("405D2", CPU_POWERPC_405D2
, 405),
7588 /* PowerPC 405 D3 */
7589 POWERPC_DEF("405D3", CPU_POWERPC_405D3
, 405),
7591 /* PowerPC 405 D4 */
7592 POWERPC_DEF("405D4", CPU_POWERPC_405D4
, 405),
7594 /* PowerPC 405 D5 */
7595 POWERPC_DEF("405D5", CPU_POWERPC_405D5
, 405),
7598 /* PowerPC 405 E4 */
7599 POWERPC_DEF("405E4", CPU_POWERPC_405E4
, 405),
7602 /* PowerPC 405 F4 */
7603 POWERPC_DEF("405F4", CPU_POWERPC_405F4
, 405),
7606 /* PowerPC 405 F5 */
7607 POWERPC_DEF("405F5", CPU_POWERPC_405F5
, 405),
7610 /* PowerPC 405 F6 */
7611 POWERPC_DEF("405F6", CPU_POWERPC_405F6
, 405),
7613 /* PowerPC 405 microcontrolers */
7614 /* PowerPC 405 CR */
7615 POWERPC_DEF("405CR", CPU_POWERPC_405CR
, 405),
7616 /* PowerPC 405 CRa */
7617 POWERPC_DEF("405CRa", CPU_POWERPC_405CRa
, 405),
7618 /* PowerPC 405 CRb */
7619 POWERPC_DEF("405CRb", CPU_POWERPC_405CRb
, 405),
7620 /* PowerPC 405 CRc */
7621 POWERPC_DEF("405CRc", CPU_POWERPC_405CRc
, 405),
7622 /* PowerPC 405 EP */
7623 POWERPC_DEF("405EP", CPU_POWERPC_405EP
, 405),
7625 /* PowerPC 405 EXr */
7626 POWERPC_DEF("405EXr", CPU_POWERPC_405EXr
, 405),
7628 /* PowerPC 405 EZ */
7629 POWERPC_DEF("405EZ", CPU_POWERPC_405EZ
, 405),
7631 /* PowerPC 405 FX */
7632 POWERPC_DEF("405FX", CPU_POWERPC_405FX
, 405),
7634 /* PowerPC 405 GP */
7635 POWERPC_DEF("405GP", CPU_POWERPC_405GP
, 405),
7636 /* PowerPC 405 GPa */
7637 POWERPC_DEF("405GPa", CPU_POWERPC_405GPa
, 405),
7638 /* PowerPC 405 GPb */
7639 POWERPC_DEF("405GPb", CPU_POWERPC_405GPb
, 405),
7640 /* PowerPC 405 GPc */
7641 POWERPC_DEF("405GPc", CPU_POWERPC_405GPc
, 405),
7642 /* PowerPC 405 GPd */
7643 POWERPC_DEF("405GPd", CPU_POWERPC_405GPd
, 405),
7644 /* PowerPC 405 GPe */
7645 POWERPC_DEF("405GPe", CPU_POWERPC_405GPe
, 405),
7646 /* PowerPC 405 GPR */
7647 POWERPC_DEF("405GPR", CPU_POWERPC_405GPR
, 405),
7650 POWERPC_DEF("405H", CPU_POWERPC_405H
, 405),
7654 POWERPC_DEF("405L", CPU_POWERPC_405L
, 405),
7656 /* PowerPC 405 LP */
7657 POWERPC_DEF("405LP", CPU_POWERPC_405LP
, 405),
7659 /* PowerPC 405 PM */
7660 POWERPC_DEF("405PM", CPU_POWERPC_405PM
, 405),
7663 /* PowerPC 405 PS */
7664 POWERPC_DEF("405PS", CPU_POWERPC_405PS
, 405),
7668 POWERPC_DEF("405S", CPU_POWERPC_405S
, 405),
7671 POWERPC_DEF("Npe405H", CPU_POWERPC_NPE405H
, 405),
7673 POWERPC_DEF("Npe405H2", CPU_POWERPC_NPE405H2
, 405),
7675 POWERPC_DEF("Npe405L", CPU_POWERPC_NPE405L
, 405),
7677 POWERPC_DEF("Npe4GS3", CPU_POWERPC_NPE4GS3
, 405),
7679 POWERPC_DEF("Npcxx1", CPU_POWERPC_NPCxx1
, 405),
7682 POWERPC_DEF("Npr161", CPU_POWERPC_NPR161
, 405),
7685 /* PowerPC LC77700 (Sanyo) */
7686 POWERPC_DEF("LC77700", CPU_POWERPC_LC77700
, 405),
7688 /* PowerPC 401/403/405 based set-top-box microcontrolers */
7691 POWERPC_DEF("STB01000", CPU_POWERPC_STB01000
, 401x2
),
7695 POWERPC_DEF("STB01010", CPU_POWERPC_STB01010
, 401x2
),
7699 POWERPC_DEF("STB0210", CPU_POWERPC_STB0210
, 401x3
),
7702 POWERPC_DEF("STB03", CPU_POWERPC_STB03
, 405),
7705 POWERPC_DEF("STB043", CPU_POWERPC_STB043
, 405),
7709 POWERPC_DEF("STB045", CPU_POWERPC_STB045
, 405),
7712 POWERPC_DEF("STB04", CPU_POWERPC_STB04
, 405),
7714 POWERPC_DEF("STB25", CPU_POWERPC_STB25
, 405),
7717 POWERPC_DEF("STB130", CPU_POWERPC_STB130
, 405),
7719 /* Xilinx PowerPC 405 cores */
7720 POWERPC_DEF("x2vp4", CPU_POWERPC_X2VP4
, 405),
7721 POWERPC_DEF("x2vp7", CPU_POWERPC_X2VP7
, 405),
7722 POWERPC_DEF("x2vp20", CPU_POWERPC_X2VP20
, 405),
7723 POWERPC_DEF("x2vp50", CPU_POWERPC_X2VP50
, 405),
7725 /* Zarlink ZL10310 */
7726 POWERPC_DEF("zl10310", CPU_POWERPC_ZL10310
, 405),
7729 /* Zarlink ZL10311 */
7730 POWERPC_DEF("zl10311", CPU_POWERPC_ZL10311
, 405),
7733 /* Zarlink ZL10320 */
7734 POWERPC_DEF("zl10320", CPU_POWERPC_ZL10320
, 405),
7737 /* Zarlink ZL10321 */
7738 POWERPC_DEF("zl10321", CPU_POWERPC_ZL10321
, 405),
7740 /* PowerPC 440 family */
7741 #if defined(TODO_USER_ONLY)
7742 /* Generic PowerPC 440 */
7743 POWERPC_DEF("440", CPU_POWERPC_440
, 440GP
),
7745 /* PowerPC 440 cores */
7747 /* PowerPC 440 A4 */
7748 POWERPC_DEF("440A4", CPU_POWERPC_440A4
, 440x4
),
7750 /* PowerPC 440 Xilinx 5 */
7751 POWERPC_DEF("440-Xilinx", CPU_POWERPC_440_XILINX
, 440x5
),
7753 /* PowerPC 440 A5 */
7754 POWERPC_DEF("440A5", CPU_POWERPC_440A5
, 440x5
),
7757 /* PowerPC 440 B4 */
7758 POWERPC_DEF("440B4", CPU_POWERPC_440B4
, 440x4
),
7761 /* PowerPC 440 G4 */
7762 POWERPC_DEF("440G4", CPU_POWERPC_440G4
, 440x4
),
7765 /* PowerPC 440 F5 */
7766 POWERPC_DEF("440F5", CPU_POWERPC_440F5
, 440x5
),
7769 /* PowerPC 440 G5 */
7770 POWERPC_DEF("440G5", CPU_POWERPC_440G5
, 440x5
),
7774 POWERPC_DEF("440H4", CPU_POWERPC_440H4
, 440x4
),
7778 POWERPC_DEF("440H6", CPU_POWERPC_440H6
, 440Gx5
),
7780 /* PowerPC 440 microcontrolers */
7781 #if defined(TODO_USER_ONLY)
7782 /* PowerPC 440 EP */
7783 POWERPC_DEF("440EP", CPU_POWERPC_440EP
, 440EP
),
7785 #if defined(TODO_USER_ONLY)
7786 /* PowerPC 440 EPa */
7787 POWERPC_DEF("440EPa", CPU_POWERPC_440EPa
, 440EP
),
7789 #if defined(TODO_USER_ONLY)
7790 /* PowerPC 440 EPb */
7791 POWERPC_DEF("440EPb", CPU_POWERPC_440EPb
, 440EP
),
7793 #if defined(TODO_USER_ONLY)
7794 /* PowerPC 440 EPX */
7795 POWERPC_DEF("440EPX", CPU_POWERPC_440EPX
, 440EP
),
7797 #if defined(TODO_USER_ONLY)
7798 /* PowerPC 440 GP */
7799 POWERPC_DEF("440GP", CPU_POWERPC_440GP
, 440GP
),
7801 #if defined(TODO_USER_ONLY)
7802 /* PowerPC 440 GPb */
7803 POWERPC_DEF("440GPb", CPU_POWERPC_440GPb
, 440GP
),
7805 #if defined(TODO_USER_ONLY)
7806 /* PowerPC 440 GPc */
7807 POWERPC_DEF("440GPc", CPU_POWERPC_440GPc
, 440GP
),
7809 #if defined(TODO_USER_ONLY)
7810 /* PowerPC 440 GR */
7811 POWERPC_DEF("440GR", CPU_POWERPC_440GR
, 440x5
),
7813 #if defined(TODO_USER_ONLY)
7814 /* PowerPC 440 GRa */
7815 POWERPC_DEF("440GRa", CPU_POWERPC_440GRa
, 440x5
),
7817 #if defined(TODO_USER_ONLY)
7818 /* PowerPC 440 GRX */
7819 POWERPC_DEF("440GRX", CPU_POWERPC_440GRX
, 440x5
),
7821 #if defined(TODO_USER_ONLY)
7822 /* PowerPC 440 GX */
7823 POWERPC_DEF("440GX", CPU_POWERPC_440GX
, 440EP
),
7825 #if defined(TODO_USER_ONLY)
7826 /* PowerPC 440 GXa */
7827 POWERPC_DEF("440GXa", CPU_POWERPC_440GXa
, 440EP
),
7829 #if defined(TODO_USER_ONLY)
7830 /* PowerPC 440 GXb */
7831 POWERPC_DEF("440GXb", CPU_POWERPC_440GXb
, 440EP
),
7833 #if defined(TODO_USER_ONLY)
7834 /* PowerPC 440 GXc */
7835 POWERPC_DEF("440GXc", CPU_POWERPC_440GXc
, 440EP
),
7837 #if defined(TODO_USER_ONLY)
7838 /* PowerPC 440 GXf */
7839 POWERPC_DEF("440GXf", CPU_POWERPC_440GXf
, 440EP
),
7843 POWERPC_DEF("440S", CPU_POWERPC_440S
, 440),
7845 #if defined(TODO_USER_ONLY)
7846 /* PowerPC 440 SP */
7847 POWERPC_DEF("440SP", CPU_POWERPC_440SP
, 440EP
),
7849 #if defined(TODO_USER_ONLY)
7850 /* PowerPC 440 SP2 */
7851 POWERPC_DEF("440SP2", CPU_POWERPC_440SP2
, 440EP
),
7853 #if defined(TODO_USER_ONLY)
7854 /* PowerPC 440 SPE */
7855 POWERPC_DEF("440SPE", CPU_POWERPC_440SPE
, 440EP
),
7857 /* PowerPC 460 family */
7859 /* Generic PowerPC 464 */
7860 POWERPC_DEF("464", CPU_POWERPC_464
, 460),
7862 /* PowerPC 464 microcontrolers */
7864 /* PowerPC 464H90 */
7865 POWERPC_DEF("464H90", CPU_POWERPC_464H90
, 460),
7868 /* PowerPC 464H90F */
7869 POWERPC_DEF("464H90F", CPU_POWERPC_464H90F
, 460F
),
7871 /* Freescale embedded PowerPC cores */
7872 /* MPC5xx family (aka RCPU) */
7873 #if defined(TODO_USER_ONLY)
7874 /* Generic MPC5xx core */
7875 POWERPC_DEF("MPC5xx", CPU_POWERPC_MPC5xx
, MPC5xx
),
7877 #if defined(TODO_USER_ONLY)
7878 /* Codename for MPC5xx core */
7879 POWERPC_DEF("RCPU", CPU_POWERPC_MPC5xx
, MPC5xx
),
7881 /* MPC5xx microcontrollers */
7882 #if defined(TODO_USER_ONLY)
7884 POWERPC_DEF("MGT560", CPU_POWERPC_MGT560
, MPC5xx
),
7886 #if defined(TODO_USER_ONLY)
7888 POWERPC_DEF("MPC509", CPU_POWERPC_MPC509
, MPC5xx
),
7890 #if defined(TODO_USER_ONLY)
7892 POWERPC_DEF("MPC533", CPU_POWERPC_MPC533
, MPC5xx
),
7894 #if defined(TODO_USER_ONLY)
7896 POWERPC_DEF("MPC534", CPU_POWERPC_MPC534
, MPC5xx
),
7898 #if defined(TODO_USER_ONLY)
7900 POWERPC_DEF("MPC555", CPU_POWERPC_MPC555
, MPC5xx
),
7902 #if defined(TODO_USER_ONLY)
7904 POWERPC_DEF("MPC556", CPU_POWERPC_MPC556
, MPC5xx
),
7906 #if defined(TODO_USER_ONLY)
7908 POWERPC_DEF("MPC560", CPU_POWERPC_MPC560
, MPC5xx
),
7910 #if defined(TODO_USER_ONLY)
7912 POWERPC_DEF("MPC561", CPU_POWERPC_MPC561
, MPC5xx
),
7914 #if defined(TODO_USER_ONLY)
7916 POWERPC_DEF("MPC562", CPU_POWERPC_MPC562
, MPC5xx
),
7918 #if defined(TODO_USER_ONLY)
7920 POWERPC_DEF("MPC563", CPU_POWERPC_MPC563
, MPC5xx
),
7922 #if defined(TODO_USER_ONLY)
7924 POWERPC_DEF("MPC564", CPU_POWERPC_MPC564
, MPC5xx
),
7926 #if defined(TODO_USER_ONLY)
7928 POWERPC_DEF("MPC565", CPU_POWERPC_MPC565
, MPC5xx
),
7930 #if defined(TODO_USER_ONLY)
7932 POWERPC_DEF("MPC566", CPU_POWERPC_MPC566
, MPC5xx
),
7934 /* MPC8xx family (aka PowerQUICC) */
7935 #if defined(TODO_USER_ONLY)
7936 /* Generic MPC8xx core */
7937 POWERPC_DEF("MPC8xx", CPU_POWERPC_MPC8xx
, MPC8xx
),
7939 #if defined(TODO_USER_ONLY)
7940 /* Codename for MPC8xx core */
7941 POWERPC_DEF("PowerQUICC", CPU_POWERPC_MPC8xx
, MPC8xx
),
7943 /* MPC8xx microcontrollers */
7944 #if defined(TODO_USER_ONLY)
7946 POWERPC_DEF("MGT823", CPU_POWERPC_MGT823
, MPC8xx
),
7948 #if defined(TODO_USER_ONLY)
7950 POWERPC_DEF("MPC821", CPU_POWERPC_MPC821
, MPC8xx
),
7952 #if defined(TODO_USER_ONLY)
7954 POWERPC_DEF("MPC823", CPU_POWERPC_MPC823
, MPC8xx
),
7956 #if defined(TODO_USER_ONLY)
7958 POWERPC_DEF("MPC850", CPU_POWERPC_MPC850
, MPC8xx
),
7960 #if defined(TODO_USER_ONLY)
7962 POWERPC_DEF("MPC852T", CPU_POWERPC_MPC852T
, MPC8xx
),
7964 #if defined(TODO_USER_ONLY)
7966 POWERPC_DEF("MPC855T", CPU_POWERPC_MPC855T
, MPC8xx
),
7968 #if defined(TODO_USER_ONLY)
7970 POWERPC_DEF("MPC857", CPU_POWERPC_MPC857
, MPC8xx
),
7972 #if defined(TODO_USER_ONLY)
7974 POWERPC_DEF("MPC859", CPU_POWERPC_MPC859
, MPC8xx
),
7976 #if defined(TODO_USER_ONLY)
7978 POWERPC_DEF("MPC860", CPU_POWERPC_MPC860
, MPC8xx
),
7980 #if defined(TODO_USER_ONLY)
7982 POWERPC_DEF("MPC862", CPU_POWERPC_MPC862
, MPC8xx
),
7984 #if defined(TODO_USER_ONLY)
7986 POWERPC_DEF("MPC866", CPU_POWERPC_MPC866
, MPC8xx
),
7988 #if defined(TODO_USER_ONLY)
7990 POWERPC_DEF("MPC870", CPU_POWERPC_MPC870
, MPC8xx
),
7992 #if defined(TODO_USER_ONLY)
7994 POWERPC_DEF("MPC875", CPU_POWERPC_MPC875
, MPC8xx
),
7996 #if defined(TODO_USER_ONLY)
7998 POWERPC_DEF("MPC880", CPU_POWERPC_MPC880
, MPC8xx
),
8000 #if defined(TODO_USER_ONLY)
8002 POWERPC_DEF("MPC885", CPU_POWERPC_MPC885
, MPC8xx
),
8004 /* MPC82xx family (aka PowerQUICC-II) */
8005 /* Generic MPC52xx core */
8006 POWERPC_DEF_SVR("MPC52xx",
8007 CPU_POWERPC_MPC52xx
, POWERPC_SVR_52xx
, G2LE
),
8008 /* Generic MPC82xx core */
8009 POWERPC_DEF("MPC82xx", CPU_POWERPC_MPC82xx
, G2
),
8010 /* Codename for MPC82xx */
8011 POWERPC_DEF("PowerQUICC-II", CPU_POWERPC_MPC82xx
, G2
),
8012 /* PowerPC G2 core */
8013 POWERPC_DEF("G2", CPU_POWERPC_G2
, G2
),
8014 /* PowerPC G2 H4 core */
8015 POWERPC_DEF("G2H4", CPU_POWERPC_G2H4
, G2
),
8016 /* PowerPC G2 GP core */
8017 POWERPC_DEF("G2GP", CPU_POWERPC_G2gp
, G2
),
8018 /* PowerPC G2 LS core */
8019 POWERPC_DEF("G2LS", CPU_POWERPC_G2ls
, G2
),
8020 /* PowerPC G2 HiP3 core */
8021 POWERPC_DEF("G2HiP3", CPU_POWERPC_G2_HIP3
, G2
),
8022 /* PowerPC G2 HiP4 core */
8023 POWERPC_DEF("G2HiP4", CPU_POWERPC_G2_HIP4
, G2
),
8024 /* PowerPC MPC603 core */
8025 POWERPC_DEF("MPC603", CPU_POWERPC_MPC603
, 603E
),
8026 /* PowerPC G2le core (same as G2 plus little-endian mode support) */
8027 POWERPC_DEF("G2le", CPU_POWERPC_G2LE
, G2LE
),
8028 /* PowerPC G2LE GP core */
8029 POWERPC_DEF("G2leGP", CPU_POWERPC_G2LEgp
, G2LE
),
8030 /* PowerPC G2LE LS core */
8031 POWERPC_DEF("G2leLS", CPU_POWERPC_G2LEls
, G2LE
),
8032 /* PowerPC G2LE GP1 core */
8033 POWERPC_DEF("G2leGP1", CPU_POWERPC_G2LEgp1
, G2LE
),
8034 /* PowerPC G2LE GP3 core */
8035 POWERPC_DEF("G2leGP3", CPU_POWERPC_G2LEgp1
, G2LE
),
8036 /* PowerPC MPC603 microcontrollers */
8038 POWERPC_DEF("MPC8240", CPU_POWERPC_MPC8240
, 603E
),
8039 /* PowerPC G2 microcontrollers */
8042 POWERPC_DEF_SVR("MPC5121",
8043 CPU_POWERPC_MPC5121
, POWERPC_SVR_5121
, G2LE
),
8046 POWERPC_DEF_SVR("MPC5200",
8047 CPU_POWERPC_MPC5200
, POWERPC_SVR_5200
, G2LE
),
8049 POWERPC_DEF_SVR("MPC5200_v10",
8050 CPU_POWERPC_MPC5200_v10
, POWERPC_SVR_5200_v10
, G2LE
),
8052 POWERPC_DEF_SVR("MPC5200_v11",
8053 CPU_POWERPC_MPC5200_v11
, POWERPC_SVR_5200_v11
, G2LE
),
8055 POWERPC_DEF_SVR("MPC5200_v12",
8056 CPU_POWERPC_MPC5200_v12
, POWERPC_SVR_5200_v12
, G2LE
),
8058 POWERPC_DEF_SVR("MPC5200B",
8059 CPU_POWERPC_MPC5200B
, POWERPC_SVR_5200B
, G2LE
),
8061 POWERPC_DEF_SVR("MPC5200B_v20",
8062 CPU_POWERPC_MPC5200B_v20
, POWERPC_SVR_5200B_v20
, G2LE
),
8064 POWERPC_DEF_SVR("MPC5200B_v21",
8065 CPU_POWERPC_MPC5200B_v21
, POWERPC_SVR_5200B_v21
, G2LE
),
8067 POWERPC_DEF("MPC8241", CPU_POWERPC_MPC8241
, G2
),
8069 POWERPC_DEF("MPC8245", CPU_POWERPC_MPC8245
, G2
),
8071 POWERPC_DEF("MPC8247", CPU_POWERPC_MPC8247
, G2LE
),
8073 POWERPC_DEF("MPC8248", CPU_POWERPC_MPC8248
, G2LE
),
8075 POWERPC_DEF("MPC8250", CPU_POWERPC_MPC8250
, G2
),
8077 POWERPC_DEF("MPC8250_HiP3", CPU_POWERPC_MPC8250_HiP3
, G2
),
8079 POWERPC_DEF("MPC8250_HiP4", CPU_POWERPC_MPC8250_HiP4
, G2
),
8081 POWERPC_DEF("MPC8255", CPU_POWERPC_MPC8255
, G2
),
8083 POWERPC_DEF("MPC8255_HiP3", CPU_POWERPC_MPC8255_HiP3
, G2
),
8085 POWERPC_DEF("MPC8255_HiP4", CPU_POWERPC_MPC8255_HiP4
, G2
),
8087 POWERPC_DEF("MPC8260", CPU_POWERPC_MPC8260
, G2
),
8089 POWERPC_DEF("MPC8260_HiP3", CPU_POWERPC_MPC8260_HiP3
, G2
),
8091 POWERPC_DEF("MPC8260_HiP4", CPU_POWERPC_MPC8260_HiP4
, G2
),
8093 POWERPC_DEF("MPC8264", CPU_POWERPC_MPC8264
, G2
),
8095 POWERPC_DEF("MPC8264_HiP3", CPU_POWERPC_MPC8264_HiP3
, G2
),
8097 POWERPC_DEF("MPC8264_HiP4", CPU_POWERPC_MPC8264_HiP4
, G2
),
8099 POWERPC_DEF("MPC8265", CPU_POWERPC_MPC8265
, G2
),
8101 POWERPC_DEF("MPC8265_HiP3", CPU_POWERPC_MPC8265_HiP3
, G2
),
8103 POWERPC_DEF("MPC8265_HiP4", CPU_POWERPC_MPC8265_HiP4
, G2
),
8105 POWERPC_DEF("MPC8266", CPU_POWERPC_MPC8266
, G2
),
8107 POWERPC_DEF("MPC8266_HiP3", CPU_POWERPC_MPC8266_HiP3
, G2
),
8109 POWERPC_DEF("MPC8266_HiP4", CPU_POWERPC_MPC8266_HiP4
, G2
),
8111 POWERPC_DEF("MPC8270", CPU_POWERPC_MPC8270
, G2LE
),
8113 POWERPC_DEF("MPC8271", CPU_POWERPC_MPC8271
, G2LE
),
8115 POWERPC_DEF("MPC8272", CPU_POWERPC_MPC8272
, G2LE
),
8117 POWERPC_DEF("MPC8275", CPU_POWERPC_MPC8275
, G2LE
),
8119 POWERPC_DEF("MPC8280", CPU_POWERPC_MPC8280
, G2LE
),
8121 /* Generic PowerPC e200 core */
8122 POWERPC_DEF("e200", CPU_POWERPC_e200
, e200
),
8123 /* Generic MPC55xx core */
8125 POWERPC_DEF_SVR("MPC55xx",
8126 CPU_POWERPC_MPC55xx
, POWERPC_SVR_55xx
, e200
),
8129 /* PowerPC e200z0 core */
8130 POWERPC_DEF("e200z0", CPU_POWERPC_e200z0
, e200
),
8133 /* PowerPC e200z1 core */
8134 POWERPC_DEF("e200z1", CPU_POWERPC_e200z1
, e200
),
8137 /* PowerPC e200z3 core */
8138 POWERPC_DEF("e200z3", CPU_POWERPC_e200z3
, e200
),
8140 /* PowerPC e200z5 core */
8141 POWERPC_DEF("e200z5", CPU_POWERPC_e200z5
, e200
),
8142 /* PowerPC e200z6 core */
8143 POWERPC_DEF("e200z6", CPU_POWERPC_e200z6
, e200
),
8144 /* PowerPC e200 microcontrollers */
8147 POWERPC_DEF_SVR("MPC5514E",
8148 CPU_POWERPC_MPC5514E
, POWERPC_SVR_5514E
, e200
),
8152 POWERPC_DEF_SVR("MPC5514E_v0",
8153 CPU_POWERPC_MPC5514E_v0
, POWERPC_SVR_5514E_v0
, e200
),
8157 POWERPC_DEF_SVR("MPC5514E_v1",
8158 CPU_POWERPC_MPC5514E_v1
, POWERPC_SVR_5514E_v1
, e200
),
8162 POWERPC_DEF_SVR("MPC5514G",
8163 CPU_POWERPC_MPC5514G
, POWERPC_SVR_5514G
, e200
),
8167 POWERPC_DEF_SVR("MPC5514G_v0",
8168 CPU_POWERPC_MPC5514G_v0
, POWERPC_SVR_5514G_v0
, e200
),
8172 POWERPC_DEF_SVR("MPC5514G_v1",
8173 CPU_POWERPC_MPC5514G_v1
, POWERPC_SVR_5514G_v1
, e200
),
8177 POWERPC_DEF_SVR("MPC5515S",
8178 CPU_POWERPC_MPC5515S
, POWERPC_SVR_5515S
, e200
),
8182 POWERPC_DEF_SVR("MPC5516E",
8183 CPU_POWERPC_MPC5516E
, POWERPC_SVR_5516E
, e200
),
8187 POWERPC_DEF_SVR("MPC5516E_v0",
8188 CPU_POWERPC_MPC5516E_v0
, POWERPC_SVR_5516E_v0
, e200
),
8192 POWERPC_DEF_SVR("MPC5516E_v1",
8193 CPU_POWERPC_MPC5516E_v1
, POWERPC_SVR_5516E_v1
, e200
),
8197 POWERPC_DEF_SVR("MPC5516G",
8198 CPU_POWERPC_MPC5516G
, POWERPC_SVR_5516G
, e200
),
8202 POWERPC_DEF_SVR("MPC5516G_v0",
8203 CPU_POWERPC_MPC5516G_v0
, POWERPC_SVR_5516G_v0
, e200
),
8207 POWERPC_DEF_SVR("MPC5516G_v1",
8208 CPU_POWERPC_MPC5516G_v1
, POWERPC_SVR_5516G_v1
, e200
),
8212 POWERPC_DEF_SVR("MPC5516S",
8213 CPU_POWERPC_MPC5516S
, POWERPC_SVR_5516S
, e200
),
8217 POWERPC_DEF_SVR("MPC5533",
8218 CPU_POWERPC_MPC5533
, POWERPC_SVR_5533
, e200
),
8222 POWERPC_DEF_SVR("MPC5534",
8223 CPU_POWERPC_MPC5534
, POWERPC_SVR_5534
, e200
),
8227 POWERPC_DEF_SVR("MPC5553",
8228 CPU_POWERPC_MPC5553
, POWERPC_SVR_5553
, e200
),
8232 POWERPC_DEF_SVR("MPC5554",
8233 CPU_POWERPC_MPC5554
, POWERPC_SVR_5554
, e200
),
8237 POWERPC_DEF_SVR("MPC5561",
8238 CPU_POWERPC_MPC5561
, POWERPC_SVR_5561
, e200
),
8242 POWERPC_DEF_SVR("MPC5565",
8243 CPU_POWERPC_MPC5565
, POWERPC_SVR_5565
, e200
),
8247 POWERPC_DEF_SVR("MPC5566",
8248 CPU_POWERPC_MPC5566
, POWERPC_SVR_5566
, e200
),
8252 POWERPC_DEF_SVR("MPC5567",
8253 CPU_POWERPC_MPC5567
, POWERPC_SVR_5567
, e200
),
8256 /* Generic PowerPC e300 core */
8257 POWERPC_DEF("e300", CPU_POWERPC_e300
, e300
),
8258 /* PowerPC e300c1 core */
8259 POWERPC_DEF("e300c1", CPU_POWERPC_e300c1
, e300
),
8260 /* PowerPC e300c2 core */
8261 POWERPC_DEF("e300c2", CPU_POWERPC_e300c2
, e300
),
8262 /* PowerPC e300c3 core */
8263 POWERPC_DEF("e300c3", CPU_POWERPC_e300c3
, e300
),
8264 /* PowerPC e300c4 core */
8265 POWERPC_DEF("e300c4", CPU_POWERPC_e300c4
, e300
),
8266 /* PowerPC e300 microcontrollers */
8269 POWERPC_DEF_SVR("MPC8313",
8270 CPU_POWERPC_MPC831x
, POWERPC_SVR_8313
, e300
),
8274 POWERPC_DEF_SVR("MPC8313E",
8275 CPU_POWERPC_MPC831x
, POWERPC_SVR_8313E
, e300
),
8279 POWERPC_DEF_SVR("MPC8314",
8280 CPU_POWERPC_MPC831x
, POWERPC_SVR_8314
, e300
),
8284 POWERPC_DEF_SVR("MPC8314E",
8285 CPU_POWERPC_MPC831x
, POWERPC_SVR_8314E
, e300
),
8289 POWERPC_DEF_SVR("MPC8315",
8290 CPU_POWERPC_MPC831x
, POWERPC_SVR_8315
, e300
),
8294 POWERPC_DEF_SVR("MPC8315E",
8295 CPU_POWERPC_MPC831x
, POWERPC_SVR_8315E
, e300
),
8299 POWERPC_DEF_SVR("MPC8321",
8300 CPU_POWERPC_MPC832x
, POWERPC_SVR_8321
, e300
),
8304 POWERPC_DEF_SVR("MPC8321E",
8305 CPU_POWERPC_MPC832x
, POWERPC_SVR_8321E
, e300
),
8309 POWERPC_DEF_SVR("MPC8323",
8310 CPU_POWERPC_MPC832x
, POWERPC_SVR_8323
, e300
),
8314 POWERPC_DEF_SVR("MPC8323E",
8315 CPU_POWERPC_MPC832x
, POWERPC_SVR_8323E
, e300
),
8318 POWERPC_DEF_SVR("MPC8343",
8319 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343
, e300
),
8321 POWERPC_DEF_SVR("MPC8343A",
8322 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343A
, e300
),
8324 POWERPC_DEF_SVR("MPC8343E",
8325 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343E
, e300
),
8327 POWERPC_DEF_SVR("MPC8343EA",
8328 CPU_POWERPC_MPC834x
, POWERPC_SVR_8343EA
, e300
),
8330 POWERPC_DEF_SVR("MPC8347",
8331 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347
, e300
),
8333 POWERPC_DEF_SVR("MPC8347T",
8334 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347T
, e300
),
8336 POWERPC_DEF_SVR("MPC8347P",
8337 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347P
, e300
),
8339 POWERPC_DEF_SVR("MPC8347A",
8340 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347A
, e300
),
8342 POWERPC_DEF_SVR("MPC8347AT",
8343 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347AT
, e300
),
8345 POWERPC_DEF_SVR("MPC8347AP",
8346 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347AP
, e300
),
8348 POWERPC_DEF_SVR("MPC8347E",
8349 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347E
, e300
),
8351 POWERPC_DEF_SVR("MPC8347ET",
8352 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347ET
, e300
),
8354 POWERPC_DEF_SVR("MPC8347EP",
8355 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EP
, e300
),
8357 POWERPC_DEF_SVR("MPC8347EA",
8358 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EA
, e300
),
8360 POWERPC_DEF_SVR("MPC8347EAT",
8361 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EAT
, e300
),
8363 POWERPC_DEF_SVR("MPC8347EAP",
8364 CPU_POWERPC_MPC834x
, POWERPC_SVR_8347EAP
, e300
),
8366 POWERPC_DEF_SVR("MPC8349",
8367 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349
, e300
),
8369 POWERPC_DEF_SVR("MPC8349A",
8370 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349A
, e300
),
8372 POWERPC_DEF_SVR("MPC8349E",
8373 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349E
, e300
),
8375 POWERPC_DEF_SVR("MPC8349EA",
8376 CPU_POWERPC_MPC834x
, POWERPC_SVR_8349EA
, e300
),
8379 POWERPC_DEF_SVR("MPC8358E",
8380 CPU_POWERPC_MPC835x
, POWERPC_SVR_8358E
, e300
),
8384 POWERPC_DEF_SVR("MPC8360E",
8385 CPU_POWERPC_MPC836x
, POWERPC_SVR_8360E
, e300
),
8388 POWERPC_DEF_SVR("MPC8377",
8389 CPU_POWERPC_MPC837x
, POWERPC_SVR_8377
, e300
),
8391 POWERPC_DEF_SVR("MPC8377E",
8392 CPU_POWERPC_MPC837x
, POWERPC_SVR_8377E
, e300
),
8394 POWERPC_DEF_SVR("MPC8378",
8395 CPU_POWERPC_MPC837x
, POWERPC_SVR_8378
, e300
),
8397 POWERPC_DEF_SVR("MPC8378E",
8398 CPU_POWERPC_MPC837x
, POWERPC_SVR_8378E
, e300
),
8400 POWERPC_DEF_SVR("MPC8379",
8401 CPU_POWERPC_MPC837x
, POWERPC_SVR_8379
, e300
),
8403 POWERPC_DEF_SVR("MPC8379E",
8404 CPU_POWERPC_MPC837x
, POWERPC_SVR_8379E
, e300
),
8406 /* PowerPC e500 core */
8407 POWERPC_DEF("e500", CPU_POWERPC_e500v2_v22
, e500v2
),
8408 /* PowerPC e500v1 core */
8409 POWERPC_DEF("e500v1", CPU_POWERPC_e500v1
, e500v1
),
8410 /* PowerPC e500 v1.0 core */
8411 POWERPC_DEF("e500_v10", CPU_POWERPC_e500v1_v10
, e500v1
),
8412 /* PowerPC e500 v2.0 core */
8413 POWERPC_DEF("e500_v20", CPU_POWERPC_e500v1_v20
, e500v1
),
8414 /* PowerPC e500v2 core */
8415 POWERPC_DEF("e500v2", CPU_POWERPC_e500v2
, e500v2
),
8416 /* PowerPC e500v2 v1.0 core */
8417 POWERPC_DEF("e500v2_v10", CPU_POWERPC_e500v2_v10
, e500v2
),
8418 /* PowerPC e500v2 v2.0 core */
8419 POWERPC_DEF("e500v2_v20", CPU_POWERPC_e500v2_v20
, e500v2
),
8420 /* PowerPC e500v2 v2.1 core */
8421 POWERPC_DEF("e500v2_v21", CPU_POWERPC_e500v2_v21
, e500v2
),
8422 /* PowerPC e500v2 v2.2 core */
8423 POWERPC_DEF("e500v2_v22", CPU_POWERPC_e500v2_v22
, e500v2
),
8424 /* PowerPC e500v2 v3.0 core */
8425 POWERPC_DEF("e500v2_v30", CPU_POWERPC_e500v2_v30
, e500v2
),
8426 /* PowerPC e500 microcontrollers */
8428 POWERPC_DEF_SVR("MPC8533",
8429 CPU_POWERPC_MPC8533
, POWERPC_SVR_8533
, e500v2
),
8431 POWERPC_DEF_SVR("MPC8533_v10",
8432 CPU_POWERPC_MPC8533_v10
, POWERPC_SVR_8533_v10
, e500v2
),
8434 POWERPC_DEF_SVR("MPC8533_v11",
8435 CPU_POWERPC_MPC8533_v11
, POWERPC_SVR_8533_v11
, e500v2
),
8437 POWERPC_DEF_SVR("MPC8533E",
8438 CPU_POWERPC_MPC8533E
, POWERPC_SVR_8533E
, e500v2
),
8440 POWERPC_DEF_SVR("MPC8533E_v10",
8441 CPU_POWERPC_MPC8533E_v10
, POWERPC_SVR_8533E_v10
, e500v2
),
8442 POWERPC_DEF_SVR("MPC8533E_v11",
8443 CPU_POWERPC_MPC8533E_v11
, POWERPC_SVR_8533E_v11
, e500v2
),
8445 POWERPC_DEF_SVR("MPC8540",
8446 CPU_POWERPC_MPC8540
, POWERPC_SVR_8540
, e500v1
),
8448 POWERPC_DEF_SVR("MPC8540_v10",
8449 CPU_POWERPC_MPC8540_v10
, POWERPC_SVR_8540_v10
, e500v1
),
8451 POWERPC_DEF_SVR("MPC8540_v20",
8452 CPU_POWERPC_MPC8540_v20
, POWERPC_SVR_8540_v20
, e500v1
),
8454 POWERPC_DEF_SVR("MPC8540_v21",
8455 CPU_POWERPC_MPC8540_v21
, POWERPC_SVR_8540_v21
, e500v1
),
8457 POWERPC_DEF_SVR("MPC8541",
8458 CPU_POWERPC_MPC8541
, POWERPC_SVR_8541
, e500v1
),
8460 POWERPC_DEF_SVR("MPC8541_v10",
8461 CPU_POWERPC_MPC8541_v10
, POWERPC_SVR_8541_v10
, e500v1
),
8463 POWERPC_DEF_SVR("MPC8541_v11",
8464 CPU_POWERPC_MPC8541_v11
, POWERPC_SVR_8541_v11
, e500v1
),
8466 POWERPC_DEF_SVR("MPC8541E",
8467 CPU_POWERPC_MPC8541E
, POWERPC_SVR_8541E
, e500v1
),
8469 POWERPC_DEF_SVR("MPC8541E_v10",
8470 CPU_POWERPC_MPC8541E_v10
, POWERPC_SVR_8541E_v10
, e500v1
),
8472 POWERPC_DEF_SVR("MPC8541E_v11",
8473 CPU_POWERPC_MPC8541E_v11
, POWERPC_SVR_8541E_v11
, e500v1
),
8475 POWERPC_DEF_SVR("MPC8543",
8476 CPU_POWERPC_MPC8543
, POWERPC_SVR_8543
, e500v2
),
8478 POWERPC_DEF_SVR("MPC8543_v10",
8479 CPU_POWERPC_MPC8543_v10
, POWERPC_SVR_8543_v10
, e500v2
),
8481 POWERPC_DEF_SVR("MPC8543_v11",
8482 CPU_POWERPC_MPC8543_v11
, POWERPC_SVR_8543_v11
, e500v2
),
8484 POWERPC_DEF_SVR("MPC8543_v20",
8485 CPU_POWERPC_MPC8543_v20
, POWERPC_SVR_8543_v20
, e500v2
),
8487 POWERPC_DEF_SVR("MPC8543_v21",
8488 CPU_POWERPC_MPC8543_v21
, POWERPC_SVR_8543_v21
, e500v2
),
8490 POWERPC_DEF_SVR("MPC8543E",
8491 CPU_POWERPC_MPC8543E
, POWERPC_SVR_8543E
, e500v2
),
8493 POWERPC_DEF_SVR("MPC8543E_v10",
8494 CPU_POWERPC_MPC8543E_v10
, POWERPC_SVR_8543E_v10
, e500v2
),
8496 POWERPC_DEF_SVR("MPC8543E_v11",
8497 CPU_POWERPC_MPC8543E_v11
, POWERPC_SVR_8543E_v11
, e500v2
),
8499 POWERPC_DEF_SVR("MPC8543E_v20",
8500 CPU_POWERPC_MPC8543E_v20
, POWERPC_SVR_8543E_v20
, e500v2
),
8502 POWERPC_DEF_SVR("MPC8543E_v21",
8503 CPU_POWERPC_MPC8543E_v21
, POWERPC_SVR_8543E_v21
, e500v2
),
8505 POWERPC_DEF_SVR("MPC8544",
8506 CPU_POWERPC_MPC8544
, POWERPC_SVR_8544
, e500v2
),
8508 POWERPC_DEF_SVR("MPC8544_v10",
8509 CPU_POWERPC_MPC8544_v10
, POWERPC_SVR_8544_v10
, e500v2
),
8511 POWERPC_DEF_SVR("MPC8544_v11",
8512 CPU_POWERPC_MPC8544_v11
, POWERPC_SVR_8544_v11
, e500v2
),
8514 POWERPC_DEF_SVR("MPC8544E",
8515 CPU_POWERPC_MPC8544E
, POWERPC_SVR_8544E
, e500v2
),
8517 POWERPC_DEF_SVR("MPC8544E_v10",
8518 CPU_POWERPC_MPC8544E_v10
, POWERPC_SVR_8544E_v10
, e500v2
),
8520 POWERPC_DEF_SVR("MPC8544E_v11",
8521 CPU_POWERPC_MPC8544E_v11
, POWERPC_SVR_8544E_v11
, e500v2
),
8523 POWERPC_DEF_SVR("MPC8545",
8524 CPU_POWERPC_MPC8545
, POWERPC_SVR_8545
, e500v2
),
8526 POWERPC_DEF_SVR("MPC8545_v20",
8527 CPU_POWERPC_MPC8545_v20
, POWERPC_SVR_8545_v20
, e500v2
),
8529 POWERPC_DEF_SVR("MPC8545_v21",
8530 CPU_POWERPC_MPC8545_v21
, POWERPC_SVR_8545_v21
, e500v2
),
8532 POWERPC_DEF_SVR("MPC8545E",
8533 CPU_POWERPC_MPC8545E
, POWERPC_SVR_8545E
, e500v2
),
8535 POWERPC_DEF_SVR("MPC8545E_v20",
8536 CPU_POWERPC_MPC8545E_v20
, POWERPC_SVR_8545E_v20
, e500v2
),
8538 POWERPC_DEF_SVR("MPC8545E_v21",
8539 CPU_POWERPC_MPC8545E_v21
, POWERPC_SVR_8545E_v21
, e500v2
),
8541 POWERPC_DEF_SVR("MPC8547E",
8542 CPU_POWERPC_MPC8547E
, POWERPC_SVR_8547E
, e500v2
),
8544 POWERPC_DEF_SVR("MPC8547E_v20",
8545 CPU_POWERPC_MPC8547E_v20
, POWERPC_SVR_8547E_v20
, e500v2
),
8547 POWERPC_DEF_SVR("MPC8547E_v21",
8548 CPU_POWERPC_MPC8547E_v21
, POWERPC_SVR_8547E_v21
, e500v2
),
8550 POWERPC_DEF_SVR("MPC8548",
8551 CPU_POWERPC_MPC8548
, POWERPC_SVR_8548
, e500v2
),
8553 POWERPC_DEF_SVR("MPC8548_v10",
8554 CPU_POWERPC_MPC8548_v10
, POWERPC_SVR_8548_v10
, e500v2
),
8556 POWERPC_DEF_SVR("MPC8548_v11",
8557 CPU_POWERPC_MPC8548_v11
, POWERPC_SVR_8548_v11
, e500v2
),
8559 POWERPC_DEF_SVR("MPC8548_v20",
8560 CPU_POWERPC_MPC8548_v20
, POWERPC_SVR_8548_v20
, e500v2
),
8562 POWERPC_DEF_SVR("MPC8548_v21",
8563 CPU_POWERPC_MPC8548_v21
, POWERPC_SVR_8548_v21
, e500v2
),
8565 POWERPC_DEF_SVR("MPC8548E",
8566 CPU_POWERPC_MPC8548E
, POWERPC_SVR_8548E
, e500v2
),
8568 POWERPC_DEF_SVR("MPC8548E_v10",
8569 CPU_POWERPC_MPC8548E_v10
, POWERPC_SVR_8548E_v10
, e500v2
),
8571 POWERPC_DEF_SVR("MPC8548E_v11",
8572 CPU_POWERPC_MPC8548E_v11
, POWERPC_SVR_8548E_v11
, e500v2
),
8574 POWERPC_DEF_SVR("MPC8548E_v20",
8575 CPU_POWERPC_MPC8548E_v20
, POWERPC_SVR_8548E_v20
, e500v2
),
8577 POWERPC_DEF_SVR("MPC8548E_v21",
8578 CPU_POWERPC_MPC8548E_v21
, POWERPC_SVR_8548E_v21
, e500v2
),
8580 POWERPC_DEF_SVR("MPC8555",
8581 CPU_POWERPC_MPC8555
, POWERPC_SVR_8555
, e500v2
),
8583 POWERPC_DEF_SVR("MPC8555_v10",
8584 CPU_POWERPC_MPC8555_v10
, POWERPC_SVR_8555_v10
, e500v2
),
8586 POWERPC_DEF_SVR("MPC8555_v11",
8587 CPU_POWERPC_MPC8555_v11
, POWERPC_SVR_8555_v11
, e500v2
),
8589 POWERPC_DEF_SVR("MPC8555E",
8590 CPU_POWERPC_MPC8555E
, POWERPC_SVR_8555E
, e500v2
),
8592 POWERPC_DEF_SVR("MPC8555E_v10",
8593 CPU_POWERPC_MPC8555E_v10
, POWERPC_SVR_8555E_v10
, e500v2
),
8595 POWERPC_DEF_SVR("MPC8555E_v11",
8596 CPU_POWERPC_MPC8555E_v11
, POWERPC_SVR_8555E_v11
, e500v2
),
8598 POWERPC_DEF_SVR("MPC8560",
8599 CPU_POWERPC_MPC8560
, POWERPC_SVR_8560
, e500v2
),
8601 POWERPC_DEF_SVR("MPC8560_v10",
8602 CPU_POWERPC_MPC8560_v10
, POWERPC_SVR_8560_v10
, e500v2
),
8604 POWERPC_DEF_SVR("MPC8560_v20",
8605 CPU_POWERPC_MPC8560_v20
, POWERPC_SVR_8560_v20
, e500v2
),
8607 POWERPC_DEF_SVR("MPC8560_v21",
8608 CPU_POWERPC_MPC8560_v21
, POWERPC_SVR_8560_v21
, e500v2
),
8610 POWERPC_DEF_SVR("MPC8567",
8611 CPU_POWERPC_MPC8567
, POWERPC_SVR_8567
, e500v2
),
8613 POWERPC_DEF_SVR("MPC8567E",
8614 CPU_POWERPC_MPC8567E
, POWERPC_SVR_8567E
, e500v2
),
8616 POWERPC_DEF_SVR("MPC8568",
8617 CPU_POWERPC_MPC8568
, POWERPC_SVR_8568
, e500v2
),
8619 POWERPC_DEF_SVR("MPC8568E",
8620 CPU_POWERPC_MPC8568E
, POWERPC_SVR_8568E
, e500v2
),
8622 POWERPC_DEF_SVR("MPC8572",
8623 CPU_POWERPC_MPC8572
, POWERPC_SVR_8572
, e500v2
),
8625 POWERPC_DEF_SVR("MPC8572E",
8626 CPU_POWERPC_MPC8572E
, POWERPC_SVR_8572E
, e500v2
),
8628 /* PowerPC e600 core */
8629 POWERPC_DEF("e600", CPU_POWERPC_e600
, 7400),
8630 /* PowerPC e600 microcontrollers */
8633 POWERPC_DEF_SVR("MPC8610",
8634 CPU_POWERPC_MPC8610
, POWERPC_SVR_8610
, 7400),
8637 POWERPC_DEF_SVR("MPC8641",
8638 CPU_POWERPC_MPC8641
, POWERPC_SVR_8641
, 7400),
8640 POWERPC_DEF_SVR("MPC8641D",
8641 CPU_POWERPC_MPC8641D
, POWERPC_SVR_8641D
, 7400),
8642 /* 32 bits "classic" PowerPC */
8643 /* PowerPC 6xx family */
8645 POWERPC_DEF("601", CPU_POWERPC_601
, 601v
),
8647 POWERPC_DEF("601_v0", CPU_POWERPC_601_v0
, 601),
8649 POWERPC_DEF("601_v1", CPU_POWERPC_601_v1
, 601),
8651 POWERPC_DEF("601v", CPU_POWERPC_601v
, 601v
),
8653 POWERPC_DEF("601_v2", CPU_POWERPC_601_v2
, 601v
),
8655 POWERPC_DEF("602", CPU_POWERPC_602
, 602),
8657 POWERPC_DEF("603", CPU_POWERPC_603
, 603),
8658 /* Code name for PowerPC 603 */
8659 POWERPC_DEF("Vanilla", CPU_POWERPC_603
, 603),
8660 /* PowerPC 603e (aka PID6) */
8661 POWERPC_DEF("603e", CPU_POWERPC_603E
, 603E
),
8662 /* Code name for PowerPC 603e */
8663 POWERPC_DEF("Stretch", CPU_POWERPC_603E
, 603E
),
8664 /* PowerPC 603e v1.1 */
8665 POWERPC_DEF("603e_v1.1", CPU_POWERPC_603E_v11
, 603E
),
8666 /* PowerPC 603e v1.2 */
8667 POWERPC_DEF("603e_v1.2", CPU_POWERPC_603E_v12
, 603E
),
8668 /* PowerPC 603e v1.3 */
8669 POWERPC_DEF("603e_v1.3", CPU_POWERPC_603E_v13
, 603E
),
8670 /* PowerPC 603e v1.4 */
8671 POWERPC_DEF("603e_v1.4", CPU_POWERPC_603E_v14
, 603E
),
8672 /* PowerPC 603e v2.2 */
8673 POWERPC_DEF("603e_v2.2", CPU_POWERPC_603E_v22
, 603E
),
8674 /* PowerPC 603e v3 */
8675 POWERPC_DEF("603e_v3", CPU_POWERPC_603E_v3
, 603E
),
8676 /* PowerPC 603e v4 */
8677 POWERPC_DEF("603e_v4", CPU_POWERPC_603E_v4
, 603E
),
8678 /* PowerPC 603e v4.1 */
8679 POWERPC_DEF("603e_v4.1", CPU_POWERPC_603E_v41
, 603E
),
8680 /* PowerPC 603e (aka PID7) */
8681 POWERPC_DEF("603e7", CPU_POWERPC_603E7
, 603E
),
8682 /* PowerPC 603e7t */
8683 POWERPC_DEF("603e7t", CPU_POWERPC_603E7t
, 603E
),
8684 /* PowerPC 603e7v */
8685 POWERPC_DEF("603e7v", CPU_POWERPC_603E7v
, 603E
),
8686 /* Code name for PowerPC 603ev */
8687 POWERPC_DEF("Vaillant", CPU_POWERPC_603E7v
, 603E
),
8688 /* PowerPC 603e7v1 */
8689 POWERPC_DEF("603e7v1", CPU_POWERPC_603E7v1
, 603E
),
8690 /* PowerPC 603e7v2 */
8691 POWERPC_DEF("603e7v2", CPU_POWERPC_603E7v2
, 603E
),
8692 /* PowerPC 603p (aka PID7v) */
8693 POWERPC_DEF("603p", CPU_POWERPC_603P
, 603E
),
8694 /* PowerPC 603r (aka PID7t) */
8695 POWERPC_DEF("603r", CPU_POWERPC_603R
, 603E
),
8696 /* Code name for PowerPC 603r */
8697 POWERPC_DEF("Goldeneye", CPU_POWERPC_603R
, 603E
),
8699 POWERPC_DEF("604", CPU_POWERPC_604
, 604),
8700 /* PowerPC 604e (aka PID9) */
8701 POWERPC_DEF("604e", CPU_POWERPC_604E
, 604E
),
8702 /* Code name for PowerPC 604e */
8703 POWERPC_DEF("Sirocco", CPU_POWERPC_604E
, 604E
),
8704 /* PowerPC 604e v1.0 */
8705 POWERPC_DEF("604e_v1.0", CPU_POWERPC_604E_v10
, 604E
),
8706 /* PowerPC 604e v2.2 */
8707 POWERPC_DEF("604e_v2.2", CPU_POWERPC_604E_v22
, 604E
),
8708 /* PowerPC 604e v2.4 */
8709 POWERPC_DEF("604e_v2.4", CPU_POWERPC_604E_v24
, 604E
),
8710 /* PowerPC 604r (aka PIDA) */
8711 POWERPC_DEF("604r", CPU_POWERPC_604R
, 604E
),
8712 /* Code name for PowerPC 604r */
8713 POWERPC_DEF("Mach5", CPU_POWERPC_604R
, 604E
),
8716 POWERPC_DEF("604ev", CPU_POWERPC_604EV
, 604E
),
8718 /* PowerPC 7xx family */
8719 /* Generic PowerPC 740 (G3) */
8720 POWERPC_DEF("740", CPU_POWERPC_7x0
, 740),
8721 /* Code name for PowerPC 740 */
8722 POWERPC_DEF("Arthur", CPU_POWERPC_7x0
, 740),
8723 /* Generic PowerPC 750 (G3) */
8724 POWERPC_DEF("750", CPU_POWERPC_7x0
, 750),
8725 /* Code name for PowerPC 750 */
8726 POWERPC_DEF("Typhoon", CPU_POWERPC_7x0
, 750),
8727 /* PowerPC 740/750 is also known as G3 */
8728 POWERPC_DEF("G3", CPU_POWERPC_7x0
, 750),
8729 /* PowerPC 740 v1.0 (G3) */
8730 POWERPC_DEF("740_v1.0", CPU_POWERPC_7x0_v10
, 740),
8731 /* PowerPC 750 v1.0 (G3) */
8732 POWERPC_DEF("750_v1.0", CPU_POWERPC_7x0_v10
, 750),
8733 /* PowerPC 740 v2.0 (G3) */
8734 POWERPC_DEF("740_v2.0", CPU_POWERPC_7x0_v20
, 740),
8735 /* PowerPC 750 v2.0 (G3) */
8736 POWERPC_DEF("750_v2.0", CPU_POWERPC_7x0_v20
, 750),
8737 /* PowerPC 740 v2.1 (G3) */
8738 POWERPC_DEF("740_v2.1", CPU_POWERPC_7x0_v21
, 740),
8739 /* PowerPC 750 v2.1 (G3) */
8740 POWERPC_DEF("750_v2.1", CPU_POWERPC_7x0_v21
, 750),
8741 /* PowerPC 740 v2.2 (G3) */
8742 POWERPC_DEF("740_v2.2", CPU_POWERPC_7x0_v22
, 740),
8743 /* PowerPC 750 v2.2 (G3) */
8744 POWERPC_DEF("750_v2.2", CPU_POWERPC_7x0_v22
, 750),
8745 /* PowerPC 740 v3.0 (G3) */
8746 POWERPC_DEF("740_v3.0", CPU_POWERPC_7x0_v30
, 740),
8747 /* PowerPC 750 v3.0 (G3) */
8748 POWERPC_DEF("750_v3.0", CPU_POWERPC_7x0_v30
, 750),
8749 /* PowerPC 740 v3.1 (G3) */
8750 POWERPC_DEF("740_v3.1", CPU_POWERPC_7x0_v31
, 740),
8751 /* PowerPC 750 v3.1 (G3) */
8752 POWERPC_DEF("750_v3.1", CPU_POWERPC_7x0_v31
, 750),
8753 /* PowerPC 740E (G3) */
8754 POWERPC_DEF("740e", CPU_POWERPC_740E
, 740),
8755 /* PowerPC 750E (G3) */
8756 POWERPC_DEF("750e", CPU_POWERPC_750E
, 750),
8757 /* PowerPC 740P (G3) */
8758 POWERPC_DEF("740p", CPU_POWERPC_7x0P
, 740),
8759 /* PowerPC 750P (G3) */
8760 POWERPC_DEF("750p", CPU_POWERPC_7x0P
, 750),
8761 /* Code name for PowerPC 740P/750P (G3) */
8762 POWERPC_DEF("Conan/Doyle", CPU_POWERPC_7x0P
, 750),
8763 /* PowerPC 750CL (G3 embedded) */
8764 POWERPC_DEF("750cl", CPU_POWERPC_750CL
, 750cl
),
8765 /* PowerPC 750CL v1.0 */
8766 POWERPC_DEF("750cl_v1.0", CPU_POWERPC_750CL_v10
, 750cl
),
8767 /* PowerPC 750CL v2.0 */
8768 POWERPC_DEF("750cl_v2.0", CPU_POWERPC_750CL_v20
, 750cl
),
8769 /* PowerPC 750CX (G3 embedded) */
8770 POWERPC_DEF("750cx", CPU_POWERPC_750CX
, 750cx
),
8771 /* PowerPC 750CX v1.0 (G3 embedded) */
8772 POWERPC_DEF("750cx_v1.0", CPU_POWERPC_750CX_v10
, 750cx
),
8773 /* PowerPC 750CX v2.1 (G3 embedded) */
8774 POWERPC_DEF("750cx_v2.0", CPU_POWERPC_750CX_v20
, 750cx
),
8775 /* PowerPC 750CX v2.1 (G3 embedded) */
8776 POWERPC_DEF("750cx_v2.1", CPU_POWERPC_750CX_v21
, 750cx
),
8777 /* PowerPC 750CX v2.2 (G3 embedded) */
8778 POWERPC_DEF("750cx_v2.2", CPU_POWERPC_750CX_v22
, 750cx
),
8779 /* PowerPC 750CXe (G3 embedded) */
8780 POWERPC_DEF("750cxe", CPU_POWERPC_750CXE
, 750cx
),
8781 /* PowerPC 750CXe v2.1 (G3 embedded) */
8782 POWERPC_DEF("750cxe_v2.1", CPU_POWERPC_750CXE_v21
, 750cx
),
8783 /* PowerPC 750CXe v2.2 (G3 embedded) */
8784 POWERPC_DEF("750cxe_v2.2", CPU_POWERPC_750CXE_v22
, 750cx
),
8785 /* PowerPC 750CXe v2.3 (G3 embedded) */
8786 POWERPC_DEF("750cxe_v2.3", CPU_POWERPC_750CXE_v23
, 750cx
),
8787 /* PowerPC 750CXe v2.4 (G3 embedded) */
8788 POWERPC_DEF("750cxe_v2.4", CPU_POWERPC_750CXE_v24
, 750cx
),
8789 /* PowerPC 750CXe v2.4b (G3 embedded) */
8790 POWERPC_DEF("750cxe_v2.4b", CPU_POWERPC_750CXE_v24b
, 750cx
),
8791 /* PowerPC 750CXe v3.0 (G3 embedded) */
8792 POWERPC_DEF("750cxe_v3.0", CPU_POWERPC_750CXE_v30
, 750cx
),
8793 /* PowerPC 750CXe v3.1 (G3 embedded) */
8794 POWERPC_DEF("750cxe_v3.1", CPU_POWERPC_750CXE_v31
, 750cx
),
8795 /* PowerPC 750CXe v3.1b (G3 embedded) */
8796 POWERPC_DEF("750cxe_v3.1b", CPU_POWERPC_750CXE_v31b
, 750cx
),
8797 /* PowerPC 750CXr (G3 embedded) */
8798 POWERPC_DEF("750cxr", CPU_POWERPC_750CXR
, 750cx
),
8799 /* PowerPC 750FL (G3 embedded) */
8800 POWERPC_DEF("750fl", CPU_POWERPC_750FL
, 750fx
),
8801 /* PowerPC 750FX (G3 embedded) */
8802 POWERPC_DEF("750fx", CPU_POWERPC_750FX
, 750fx
),
8803 /* PowerPC 750FX v1.0 (G3 embedded) */
8804 POWERPC_DEF("750fx_v1.0", CPU_POWERPC_750FX_v10
, 750fx
),
8805 /* PowerPC 750FX v2.0 (G3 embedded) */
8806 POWERPC_DEF("750fx_v2.0", CPU_POWERPC_750FX_v20
, 750fx
),
8807 /* PowerPC 750FX v2.1 (G3 embedded) */
8808 POWERPC_DEF("750fx_v2.1", CPU_POWERPC_750FX_v21
, 750fx
),
8809 /* PowerPC 750FX v2.2 (G3 embedded) */
8810 POWERPC_DEF("750fx_v2.2", CPU_POWERPC_750FX_v22
, 750fx
),
8811 /* PowerPC 750FX v2.3 (G3 embedded) */
8812 POWERPC_DEF("750fx_v2.3", CPU_POWERPC_750FX_v23
, 750fx
),
8813 /* PowerPC 750GL (G3 embedded) */
8814 POWERPC_DEF("750gl", CPU_POWERPC_750GL
, 750gx
),
8815 /* PowerPC 750GX (G3 embedded) */
8816 POWERPC_DEF("750gx", CPU_POWERPC_750GX
, 750gx
),
8817 /* PowerPC 750GX v1.0 (G3 embedded) */
8818 POWERPC_DEF("750gx_v1.0", CPU_POWERPC_750GX_v10
, 750gx
),
8819 /* PowerPC 750GX v1.1 (G3 embedded) */
8820 POWERPC_DEF("750gx_v1.1", CPU_POWERPC_750GX_v11
, 750gx
),
8821 /* PowerPC 750GX v1.2 (G3 embedded) */
8822 POWERPC_DEF("750gx_v1.2", CPU_POWERPC_750GX_v12
, 750gx
),
8823 /* PowerPC 750L (G3 embedded) */
8824 POWERPC_DEF("750l", CPU_POWERPC_750L
, 750),
8825 /* Code name for PowerPC 750L (G3 embedded) */
8826 POWERPC_DEF("LoneStar", CPU_POWERPC_750L
, 750),
8827 /* PowerPC 750L v2.0 (G3 embedded) */
8828 POWERPC_DEF("750l_v2.0", CPU_POWERPC_750L_v20
, 750),
8829 /* PowerPC 750L v2.1 (G3 embedded) */
8830 POWERPC_DEF("750l_v2.1", CPU_POWERPC_750L_v21
, 750),
8831 /* PowerPC 750L v2.2 (G3 embedded) */
8832 POWERPC_DEF("750l_v2.2", CPU_POWERPC_750L_v22
, 750),
8833 /* PowerPC 750L v3.0 (G3 embedded) */
8834 POWERPC_DEF("750l_v3.0", CPU_POWERPC_750L_v30
, 750),
8835 /* PowerPC 750L v3.2 (G3 embedded) */
8836 POWERPC_DEF("750l_v3.2", CPU_POWERPC_750L_v32
, 750),
8837 /* Generic PowerPC 745 */
8838 POWERPC_DEF("745", CPU_POWERPC_7x5
, 745),
8839 /* Generic PowerPC 755 */
8840 POWERPC_DEF("755", CPU_POWERPC_7x5
, 755),
8841 /* Code name for PowerPC 745/755 */
8842 POWERPC_DEF("Goldfinger", CPU_POWERPC_7x5
, 755),
8843 /* PowerPC 745 v1.0 */
8844 POWERPC_DEF("745_v1.0", CPU_POWERPC_7x5_v10
, 745),
8845 /* PowerPC 755 v1.0 */
8846 POWERPC_DEF("755_v1.0", CPU_POWERPC_7x5_v10
, 755),
8847 /* PowerPC 745 v1.1 */
8848 POWERPC_DEF("745_v1.1", CPU_POWERPC_7x5_v11
, 745),
8849 /* PowerPC 755 v1.1 */
8850 POWERPC_DEF("755_v1.1", CPU_POWERPC_7x5_v11
, 755),
8851 /* PowerPC 745 v2.0 */
8852 POWERPC_DEF("745_v2.0", CPU_POWERPC_7x5_v20
, 745),
8853 /* PowerPC 755 v2.0 */
8854 POWERPC_DEF("755_v2.0", CPU_POWERPC_7x5_v20
, 755),
8855 /* PowerPC 745 v2.1 */
8856 POWERPC_DEF("745_v2.1", CPU_POWERPC_7x5_v21
, 745),
8857 /* PowerPC 755 v2.1 */
8858 POWERPC_DEF("755_v2.1", CPU_POWERPC_7x5_v21
, 755),
8859 /* PowerPC 745 v2.2 */
8860 POWERPC_DEF("745_v2.2", CPU_POWERPC_7x5_v22
, 745),
8861 /* PowerPC 755 v2.2 */
8862 POWERPC_DEF("755_v2.2", CPU_POWERPC_7x5_v22
, 755),
8863 /* PowerPC 745 v2.3 */
8864 POWERPC_DEF("745_v2.3", CPU_POWERPC_7x5_v23
, 745),
8865 /* PowerPC 755 v2.3 */
8866 POWERPC_DEF("755_v2.3", CPU_POWERPC_7x5_v23
, 755),
8867 /* PowerPC 745 v2.4 */
8868 POWERPC_DEF("745_v2.4", CPU_POWERPC_7x5_v24
, 745),
8869 /* PowerPC 755 v2.4 */
8870 POWERPC_DEF("755_v2.4", CPU_POWERPC_7x5_v24
, 755),
8871 /* PowerPC 745 v2.5 */
8872 POWERPC_DEF("745_v2.5", CPU_POWERPC_7x5_v25
, 745),
8873 /* PowerPC 755 v2.5 */
8874 POWERPC_DEF("755_v2.5", CPU_POWERPC_7x5_v25
, 755),
8875 /* PowerPC 745 v2.6 */
8876 POWERPC_DEF("745_v2.6", CPU_POWERPC_7x5_v26
, 745),
8877 /* PowerPC 755 v2.6 */
8878 POWERPC_DEF("755_v2.6", CPU_POWERPC_7x5_v26
, 755),
8879 /* PowerPC 745 v2.7 */
8880 POWERPC_DEF("745_v2.7", CPU_POWERPC_7x5_v27
, 745),
8881 /* PowerPC 755 v2.7 */
8882 POWERPC_DEF("755_v2.7", CPU_POWERPC_7x5_v27
, 755),
8883 /* PowerPC 745 v2.8 */
8884 POWERPC_DEF("745_v2.8", CPU_POWERPC_7x5_v28
, 745),
8885 /* PowerPC 755 v2.8 */
8886 POWERPC_DEF("755_v2.8", CPU_POWERPC_7x5_v28
, 755),
8888 /* PowerPC 745P (G3) */
8889 POWERPC_DEF("745p", CPU_POWERPC_7x5P
, 745),
8890 /* PowerPC 755P (G3) */
8891 POWERPC_DEF("755p", CPU_POWERPC_7x5P
, 755),
8893 /* PowerPC 74xx family */
8894 /* PowerPC 7400 (G4) */
8895 POWERPC_DEF("7400", CPU_POWERPC_7400
, 7400),
8896 /* Code name for PowerPC 7400 */
8897 POWERPC_DEF("Max", CPU_POWERPC_7400
, 7400),
8898 /* PowerPC 74xx is also well known as G4 */
8899 POWERPC_DEF("G4", CPU_POWERPC_7400
, 7400),
8900 /* PowerPC 7400 v1.0 (G4) */
8901 POWERPC_DEF("7400_v1.0", CPU_POWERPC_7400_v10
, 7400),
8902 /* PowerPC 7400 v1.1 (G4) */
8903 POWERPC_DEF("7400_v1.1", CPU_POWERPC_7400_v11
, 7400),
8904 /* PowerPC 7400 v2.0 (G4) */
8905 POWERPC_DEF("7400_v2.0", CPU_POWERPC_7400_v20
, 7400),
8906 /* PowerPC 7400 v2.1 (G4) */
8907 POWERPC_DEF("7400_v2.1", CPU_POWERPC_7400_v21
, 7400),
8908 /* PowerPC 7400 v2.2 (G4) */
8909 POWERPC_DEF("7400_v2.2", CPU_POWERPC_7400_v22
, 7400),
8910 /* PowerPC 7400 v2.6 (G4) */
8911 POWERPC_DEF("7400_v2.6", CPU_POWERPC_7400_v26
, 7400),
8912 /* PowerPC 7400 v2.7 (G4) */
8913 POWERPC_DEF("7400_v2.7", CPU_POWERPC_7400_v27
, 7400),
8914 /* PowerPC 7400 v2.8 (G4) */
8915 POWERPC_DEF("7400_v2.8", CPU_POWERPC_7400_v28
, 7400),
8916 /* PowerPC 7400 v2.9 (G4) */
8917 POWERPC_DEF("7400_v2.9", CPU_POWERPC_7400_v29
, 7400),
8918 /* PowerPC 7410 (G4) */
8919 POWERPC_DEF("7410", CPU_POWERPC_7410
, 7410),
8920 /* Code name for PowerPC 7410 */
8921 POWERPC_DEF("Nitro", CPU_POWERPC_7410
, 7410),
8922 /* PowerPC 7410 v1.0 (G4) */
8923 POWERPC_DEF("7410_v1.0", CPU_POWERPC_7410_v10
, 7410),
8924 /* PowerPC 7410 v1.1 (G4) */
8925 POWERPC_DEF("7410_v1.1", CPU_POWERPC_7410_v11
, 7410),
8926 /* PowerPC 7410 v1.2 (G4) */
8927 POWERPC_DEF("7410_v1.2", CPU_POWERPC_7410_v12
, 7410),
8928 /* PowerPC 7410 v1.3 (G4) */
8929 POWERPC_DEF("7410_v1.3", CPU_POWERPC_7410_v13
, 7410),
8930 /* PowerPC 7410 v1.4 (G4) */
8931 POWERPC_DEF("7410_v1.4", CPU_POWERPC_7410_v14
, 7410),
8932 /* PowerPC 7448 (G4) */
8933 POWERPC_DEF("7448", CPU_POWERPC_7448
, 7400),
8934 /* PowerPC 7448 v1.0 (G4) */
8935 POWERPC_DEF("7448_v1.0", CPU_POWERPC_7448_v10
, 7400),
8936 /* PowerPC 7448 v1.1 (G4) */
8937 POWERPC_DEF("7448_v1.1", CPU_POWERPC_7448_v11
, 7400),
8938 /* PowerPC 7448 v2.0 (G4) */
8939 POWERPC_DEF("7448_v2.0", CPU_POWERPC_7448_v20
, 7400),
8940 /* PowerPC 7448 v2.1 (G4) */
8941 POWERPC_DEF("7448_v2.1", CPU_POWERPC_7448_v21
, 7400),
8942 /* PowerPC 7450 (G4) */
8943 POWERPC_DEF("7450", CPU_POWERPC_7450
, 7450),
8944 /* Code name for PowerPC 7450 */
8945 POWERPC_DEF("Vger", CPU_POWERPC_7450
, 7450),
8946 /* PowerPC 7450 v1.0 (G4) */
8947 POWERPC_DEF("7450_v1.0", CPU_POWERPC_7450_v10
, 7450),
8948 /* PowerPC 7450 v1.1 (G4) */
8949 POWERPC_DEF("7450_v1.1", CPU_POWERPC_7450_v11
, 7450),
8950 /* PowerPC 7450 v1.2 (G4) */
8951 POWERPC_DEF("7450_v1.2", CPU_POWERPC_7450_v12
, 7450),
8952 /* PowerPC 7450 v2.0 (G4) */
8953 POWERPC_DEF("7450_v2.0", CPU_POWERPC_7450_v20
, 7450),
8954 /* PowerPC 7450 v2.1 (G4) */
8955 POWERPC_DEF("7450_v2.1", CPU_POWERPC_7450_v21
, 7450),
8956 /* PowerPC 7441 (G4) */
8957 POWERPC_DEF("7441", CPU_POWERPC_74x1
, 7440),
8958 /* PowerPC 7451 (G4) */
8959 POWERPC_DEF("7451", CPU_POWERPC_74x1
, 7450),
8960 /* PowerPC 7441 v2.1 (G4) */
8961 POWERPC_DEF("7441_v2.1", CPU_POWERPC_7450_v21
, 7440),
8962 /* PowerPC 7441 v2.3 (G4) */
8963 POWERPC_DEF("7441_v2.3", CPU_POWERPC_74x1_v23
, 7440),
8964 /* PowerPC 7451 v2.3 (G4) */
8965 POWERPC_DEF("7451_v2.3", CPU_POWERPC_74x1_v23
, 7450),
8966 /* PowerPC 7441 v2.10 (G4) */
8967 POWERPC_DEF("7441_v2.10", CPU_POWERPC_74x1_v210
, 7440),
8968 /* PowerPC 7451 v2.10 (G4) */
8969 POWERPC_DEF("7451_v2.10", CPU_POWERPC_74x1_v210
, 7450),
8970 /* PowerPC 7445 (G4) */
8971 POWERPC_DEF("7445", CPU_POWERPC_74x5
, 7445),
8972 /* PowerPC 7455 (G4) */
8973 POWERPC_DEF("7455", CPU_POWERPC_74x5
, 7455),
8974 /* Code name for PowerPC 7445/7455 */
8975 POWERPC_DEF("Apollo6", CPU_POWERPC_74x5
, 7455),
8976 /* PowerPC 7445 v1.0 (G4) */
8977 POWERPC_DEF("7445_v1.0", CPU_POWERPC_74x5_v10
, 7445),
8978 /* PowerPC 7455 v1.0 (G4) */
8979 POWERPC_DEF("7455_v1.0", CPU_POWERPC_74x5_v10
, 7455),
8980 /* PowerPC 7445 v2.1 (G4) */
8981 POWERPC_DEF("7445_v2.1", CPU_POWERPC_74x5_v21
, 7445),
8982 /* PowerPC 7455 v2.1 (G4) */
8983 POWERPC_DEF("7455_v2.1", CPU_POWERPC_74x5_v21
, 7455),
8984 /* PowerPC 7445 v3.2 (G4) */
8985 POWERPC_DEF("7445_v3.2", CPU_POWERPC_74x5_v32
, 7445),
8986 /* PowerPC 7455 v3.2 (G4) */
8987 POWERPC_DEF("7455_v3.2", CPU_POWERPC_74x5_v32
, 7455),
8988 /* PowerPC 7445 v3.3 (G4) */
8989 POWERPC_DEF("7445_v3.3", CPU_POWERPC_74x5_v33
, 7445),
8990 /* PowerPC 7455 v3.3 (G4) */
8991 POWERPC_DEF("7455_v3.3", CPU_POWERPC_74x5_v33
, 7455),
8992 /* PowerPC 7445 v3.4 (G4) */
8993 POWERPC_DEF("7445_v3.4", CPU_POWERPC_74x5_v34
, 7445),
8994 /* PowerPC 7455 v3.4 (G4) */
8995 POWERPC_DEF("7455_v3.4", CPU_POWERPC_74x5_v34
, 7455),
8996 /* PowerPC 7447 (G4) */
8997 POWERPC_DEF("7447", CPU_POWERPC_74x7
, 7445),
8998 /* PowerPC 7457 (G4) */
8999 POWERPC_DEF("7457", CPU_POWERPC_74x7
, 7455),
9000 /* Code name for PowerPC 7447/7457 */
9001 POWERPC_DEF("Apollo7", CPU_POWERPC_74x7
, 7455),
9002 /* PowerPC 7447 v1.0 (G4) */
9003 POWERPC_DEF("7447_v1.0", CPU_POWERPC_74x7_v10
, 7445),
9004 /* PowerPC 7457 v1.0 (G4) */
9005 POWERPC_DEF("7457_v1.0", CPU_POWERPC_74x7_v10
, 7455),
9006 /* PowerPC 7447 v1.1 (G4) */
9007 POWERPC_DEF("7447_v1.1", CPU_POWERPC_74x7_v11
, 7445),
9008 /* PowerPC 7457 v1.1 (G4) */
9009 POWERPC_DEF("7457_v1.1", CPU_POWERPC_74x7_v11
, 7455),
9010 /* PowerPC 7457 v1.2 (G4) */
9011 POWERPC_DEF("7457_v1.2", CPU_POWERPC_74x7_v12
, 7455),
9012 /* PowerPC 7447A (G4) */
9013 POWERPC_DEF("7447A", CPU_POWERPC_74x7A
, 7445),
9014 /* PowerPC 7457A (G4) */
9015 POWERPC_DEF("7457A", CPU_POWERPC_74x7A
, 7455),
9016 /* PowerPC 7447A v1.0 (G4) */
9017 POWERPC_DEF("7447A_v1.0", CPU_POWERPC_74x7A_v10
, 7445),
9018 /* PowerPC 7457A v1.0 (G4) */
9019 POWERPC_DEF("7457A_v1.0", CPU_POWERPC_74x7A_v10
, 7455),
9020 /* Code name for PowerPC 7447A/7457A */
9021 POWERPC_DEF("Apollo7PM", CPU_POWERPC_74x7A_v10
, 7455),
9022 /* PowerPC 7447A v1.1 (G4) */
9023 POWERPC_DEF("7447A_v1.1", CPU_POWERPC_74x7A_v11
, 7445),
9024 /* PowerPC 7457A v1.1 (G4) */
9025 POWERPC_DEF("7457A_v1.1", CPU_POWERPC_74x7A_v11
, 7455),
9026 /* PowerPC 7447A v1.2 (G4) */
9027 POWERPC_DEF("7447A_v1.2", CPU_POWERPC_74x7A_v12
, 7445),
9028 /* PowerPC 7457A v1.2 (G4) */
9029 POWERPC_DEF("7457A_v1.2", CPU_POWERPC_74x7A_v12
, 7455),
9030 /* 64 bits PowerPC */
9031 #if defined (TARGET_PPC64)
9033 POWERPC_DEF("620", CPU_POWERPC_620
, 620),
9034 /* Code name for PowerPC 620 */
9035 POWERPC_DEF("Trident", CPU_POWERPC_620
, 620),
9037 /* PowerPC 630 (POWER3) */
9038 POWERPC_DEF("630", CPU_POWERPC_630
, 630),
9039 POWERPC_DEF("POWER3", CPU_POWERPC_630
, 630),
9040 /* Code names for POWER3 */
9041 POWERPC_DEF("Boxer", CPU_POWERPC_630
, 630),
9042 POWERPC_DEF("Dino", CPU_POWERPC_630
, 630),
9045 /* PowerPC 631 (Power 3+) */
9046 POWERPC_DEF("631", CPU_POWERPC_631
, 631),
9047 POWERPC_DEF("POWER3+", CPU_POWERPC_631
, 631),
9051 POWERPC_DEF("POWER4", CPU_POWERPC_POWER4
, POWER4
),
9055 POWERPC_DEF("POWER4+", CPU_POWERPC_POWER4P
, POWER4P
),
9059 POWERPC_DEF("POWER5", CPU_POWERPC_POWER5
, POWER5
),
9061 POWERPC_DEF("POWER5gr", CPU_POWERPC_POWER5GR
, POWER5
),
9065 POWERPC_DEF("POWER5+", CPU_POWERPC_POWER5P
, POWER5P
),
9067 POWERPC_DEF("POWER5gs", CPU_POWERPC_POWER5GS
, POWER5P
),
9071 POWERPC_DEF("POWER6", CPU_POWERPC_POWER6
, POWER6
),
9072 /* POWER6 running in POWER5 mode */
9073 POWERPC_DEF("POWER6_5", CPU_POWERPC_POWER6_5
, POWER5
),
9075 POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A
, POWER6
),
9078 POWERPC_DEF("POWER7", CPU_POWERPC_POWER7
, POWER7
),
9079 POWERPC_DEF("POWER7_v2.0", CPU_POWERPC_POWER7_v20
, POWER7
),
9081 POWERPC_DEF("970", CPU_POWERPC_970
, 970),
9082 /* PowerPC 970FX (G5) */
9083 POWERPC_DEF("970fx", CPU_POWERPC_970FX
, 970FX
),
9084 /* PowerPC 970FX v1.0 (G5) */
9085 POWERPC_DEF("970fx_v1.0", CPU_POWERPC_970FX_v10
, 970FX
),
9086 /* PowerPC 970FX v2.0 (G5) */
9087 POWERPC_DEF("970fx_v2.0", CPU_POWERPC_970FX_v20
, 970FX
),
9088 /* PowerPC 970FX v2.1 (G5) */
9089 POWERPC_DEF("970fx_v2.1", CPU_POWERPC_970FX_v21
, 970FX
),
9090 /* PowerPC 970FX v3.0 (G5) */
9091 POWERPC_DEF("970fx_v3.0", CPU_POWERPC_970FX_v30
, 970FX
),
9092 /* PowerPC 970FX v3.1 (G5) */
9093 POWERPC_DEF("970fx_v3.1", CPU_POWERPC_970FX_v31
, 970FX
),
9094 /* PowerPC 970GX (G5) */
9095 POWERPC_DEF("970gx", CPU_POWERPC_970GX
, 970GX
),
9097 POWERPC_DEF("970mp", CPU_POWERPC_970MP
, 970MP
),
9098 /* PowerPC 970MP v1.0 */
9099 POWERPC_DEF("970mp_v1.0", CPU_POWERPC_970MP_v10
, 970MP
),
9100 /* PowerPC 970MP v1.1 */
9101 POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11
, 970MP
),
9104 POWERPC_DEF("Cell", CPU_POWERPC_CELL
, 970),
9107 /* PowerPC Cell v1.0 */
9108 POWERPC_DEF("Cell_v1.0", CPU_POWERPC_CELL_v10
, 970),
9111 /* PowerPC Cell v2.0 */
9112 POWERPC_DEF("Cell_v2.0", CPU_POWERPC_CELL_v20
, 970),
9115 /* PowerPC Cell v3.0 */
9116 POWERPC_DEF("Cell_v3.0", CPU_POWERPC_CELL_v30
, 970),
9119 /* PowerPC Cell v3.1 */
9120 POWERPC_DEF("Cell_v3.1", CPU_POWERPC_CELL_v31
, 970),
9123 /* PowerPC Cell v3.2 */
9124 POWERPC_DEF("Cell_v3.2", CPU_POWERPC_CELL_v32
, 970),
9127 /* RS64 (Apache/A35) */
9128 /* This one seems to support the whole POWER2 instruction set
9129 * and the PowerPC 64 one.
9131 /* What about A10 & A30 ? */
9132 POWERPC_DEF("RS64", CPU_POWERPC_RS64
, RS64
),
9133 POWERPC_DEF("Apache", CPU_POWERPC_RS64
, RS64
),
9134 POWERPC_DEF("A35", CPU_POWERPC_RS64
, RS64
),
9137 /* RS64-II (NorthStar/A50) */
9138 POWERPC_DEF("RS64-II", CPU_POWERPC_RS64II
, RS64
),
9139 POWERPC_DEF("NorthStar", CPU_POWERPC_RS64II
, RS64
),
9140 POWERPC_DEF("A50", CPU_POWERPC_RS64II
, RS64
),
9143 /* RS64-III (Pulsar) */
9144 POWERPC_DEF("RS64-III", CPU_POWERPC_RS64III
, RS64
),
9145 POWERPC_DEF("Pulsar", CPU_POWERPC_RS64III
, RS64
),
9148 /* RS64-IV (IceStar/IStar/SStar) */
9149 POWERPC_DEF("RS64-IV", CPU_POWERPC_RS64IV
, RS64
),
9150 POWERPC_DEF("IceStar", CPU_POWERPC_RS64IV
, RS64
),
9151 POWERPC_DEF("IStar", CPU_POWERPC_RS64IV
, RS64
),
9152 POWERPC_DEF("SStar", CPU_POWERPC_RS64IV
, RS64
),
9154 #endif /* defined (TARGET_PPC64) */
9157 /* Original POWER */
9158 POWERPC_DEF("POWER", CPU_POWERPC_POWER
, POWER
),
9159 POWERPC_DEF("RIOS", CPU_POWERPC_POWER
, POWER
),
9160 POWERPC_DEF("RSC", CPU_POWERPC_POWER
, POWER
),
9161 POWERPC_DEF("RSC3308", CPU_POWERPC_POWER
, POWER
),
9162 POWERPC_DEF("RSC4608", CPU_POWERPC_POWER
, POWER
),
9166 POWERPC_DEF("POWER2", CPU_POWERPC_POWER2
, POWER
),
9167 POWERPC_DEF("RSC2", CPU_POWERPC_POWER2
, POWER
),
9168 POWERPC_DEF("P2SC", CPU_POWERPC_POWER2
, POWER
),
9173 POWERPC_DEF("PA6T", CPU_POWERPC_PA6T
, PA6T
),
9175 /* Generic PowerPCs */
9176 #if defined (TARGET_PPC64)
9177 POWERPC_DEF("ppc64", CPU_POWERPC_PPC64
, PPC64
),
9179 POWERPC_DEF("ppc32", CPU_POWERPC_PPC32
, PPC32
),
9180 POWERPC_DEF("ppc", CPU_POWERPC_DEFAULT
, DEFAULT
),
9182 POWERPC_DEF("default", CPU_POWERPC_DEFAULT
, DEFAULT
),
9185 /*****************************************************************************/
9186 /* Generic CPU instantiation routine */
9187 static void init_ppc_proc (CPUPPCState
*env
, const ppc_def_t
*def
)
9189 #if !defined(CONFIG_USER_ONLY)
9192 env
->irq_inputs
= NULL
;
9193 /* Set all exception vectors to an invalid address */
9194 for (i
= 0; i
< POWERPC_EXCP_NB
; i
++)
9195 env
->excp_vectors
[i
] = (target_ulong
)(-1ULL);
9196 env
->hreset_excp_prefix
= 0x00000000;
9197 env
->ivor_mask
= 0x00000000;
9198 env
->ivpr_mask
= 0x00000000;
9199 /* Default MMU definitions */
9203 env
->tlb_type
= TLB_NONE
;
9205 /* Register SPR common to all PowerPC implementations */
9206 gen_spr_generic(env
);
9207 spr_register(env
, SPR_PVR
, "PVR",
9208 /* Linux permits userspace to read PVR */
9209 #if defined(CONFIG_LINUX_USER)
9215 &spr_read_generic
, SPR_NOACCESS
,
9217 /* Register SVR if it's defined to anything else than POWERPC_SVR_NONE */
9218 if (def
->svr
!= POWERPC_SVR_NONE
) {
9219 if (def
->svr
& POWERPC_SVR_E500
) {
9220 spr_register(env
, SPR_E500_SVR
, "SVR",
9221 SPR_NOACCESS
, SPR_NOACCESS
,
9222 &spr_read_generic
, SPR_NOACCESS
,
9223 def
->svr
& ~POWERPC_SVR_E500
);
9225 spr_register(env
, SPR_SVR
, "SVR",
9226 SPR_NOACCESS
, SPR_NOACCESS
,
9227 &spr_read_generic
, SPR_NOACCESS
,
9231 /* PowerPC implementation specific initialisations (SPRs, timers, ...) */
9232 (*def
->init_proc
)(env
);
9233 #if !defined(CONFIG_USER_ONLY)
9234 env
->excp_prefix
= env
->hreset_excp_prefix
;
9236 /* MSR bits & flags consistency checks */
9237 if (env
->msr_mask
& (1 << 25)) {
9238 switch (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
9239 case POWERPC_FLAG_SPE
:
9240 case POWERPC_FLAG_VRE
:
9243 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9244 "Should define POWERPC_FLAG_SPE or POWERPC_FLAG_VRE\n");
9247 } else if (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
9248 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9249 "Should not define POWERPC_FLAG_SPE nor POWERPC_FLAG_VRE\n");
9252 if (env
->msr_mask
& (1 << 17)) {
9253 switch (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
9254 case POWERPC_FLAG_TGPR
:
9255 case POWERPC_FLAG_CE
:
9258 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9259 "Should define POWERPC_FLAG_TGPR or POWERPC_FLAG_CE\n");
9262 } else if (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
9263 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9264 "Should not define POWERPC_FLAG_TGPR nor POWERPC_FLAG_CE\n");
9267 if (env
->msr_mask
& (1 << 10)) {
9268 switch (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
9269 POWERPC_FLAG_UBLE
)) {
9270 case POWERPC_FLAG_SE
:
9271 case POWERPC_FLAG_DWE
:
9272 case POWERPC_FLAG_UBLE
:
9275 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9276 "Should define POWERPC_FLAG_SE or POWERPC_FLAG_DWE or "
9277 "POWERPC_FLAG_UBLE\n");
9280 } else if (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
9281 POWERPC_FLAG_UBLE
)) {
9282 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9283 "Should not define POWERPC_FLAG_SE nor POWERPC_FLAG_DWE nor "
9284 "POWERPC_FLAG_UBLE\n");
9287 if (env
->msr_mask
& (1 << 9)) {
9288 switch (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
9289 case POWERPC_FLAG_BE
:
9290 case POWERPC_FLAG_DE
:
9293 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9294 "Should define POWERPC_FLAG_BE or POWERPC_FLAG_DE\n");
9297 } else if (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
9298 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9299 "Should not define POWERPC_FLAG_BE nor POWERPC_FLAG_DE\n");
9302 if (env
->msr_mask
& (1 << 2)) {
9303 switch (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
9304 case POWERPC_FLAG_PX
:
9305 case POWERPC_FLAG_PMM
:
9308 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9309 "Should define POWERPC_FLAG_PX or POWERPC_FLAG_PMM\n");
9312 } else if (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
9313 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
9314 "Should not define POWERPC_FLAG_PX nor POWERPC_FLAG_PMM\n");
9317 if ((env
->flags
& (POWERPC_FLAG_RTC_CLK
| POWERPC_FLAG_BUS_CLK
)) == 0) {
9318 fprintf(stderr
, "PowerPC flags inconsistency\n"
9319 "Should define the time-base and decrementer clock source\n");
9322 /* Allocate TLBs buffer when needed */
9323 #if !defined(CONFIG_USER_ONLY)
9324 if (env
->nb_tlb
!= 0) {
9325 int nb_tlb
= env
->nb_tlb
;
9326 if (env
->id_tlbs
!= 0)
9328 switch (env
->tlb_type
) {
9330 env
->tlb
.tlb6
= qemu_mallocz(nb_tlb
* sizeof(ppc6xx_tlb_t
));
9333 env
->tlb
.tlbe
= qemu_mallocz(nb_tlb
* sizeof(ppcemb_tlb_t
));
9336 env
->tlb
.tlbm
= qemu_mallocz(nb_tlb
* sizeof(ppcmas_tlb_t
));
9339 /* Pre-compute some useful values */
9340 env
->tlb_per_way
= env
->nb_tlb
/ env
->nb_ways
;
9342 if (env
->irq_inputs
== NULL
) {
9343 fprintf(stderr
, "WARNING: no internal IRQ controller registered.\n"
9344 " Attempt Qemu to crash very soon !\n");
9347 if (env
->check_pow
== NULL
) {
9348 fprintf(stderr
, "WARNING: no power management check handler "
9350 " Attempt Qemu to crash very soon !\n");
9354 #if defined(PPC_DUMP_CPU)
9355 static void dump_ppc_sprs (CPUPPCState
*env
)
9358 #if !defined(CONFIG_USER_ONLY)
9364 printf("Special purpose registers:\n");
9365 for (i
= 0; i
< 32; i
++) {
9366 for (j
= 0; j
< 32; j
++) {
9368 spr
= &env
->spr_cb
[n
];
9369 uw
= spr
->uea_write
!= NULL
&& spr
->uea_write
!= SPR_NOACCESS
;
9370 ur
= spr
->uea_read
!= NULL
&& spr
->uea_read
!= SPR_NOACCESS
;
9371 #if !defined(CONFIG_USER_ONLY)
9372 sw
= spr
->oea_write
!= NULL
&& spr
->oea_write
!= SPR_NOACCESS
;
9373 sr
= spr
->oea_read
!= NULL
&& spr
->oea_read
!= SPR_NOACCESS
;
9374 if (sw
|| sr
|| uw
|| ur
) {
9375 printf("SPR: %4d (%03x) %-8s s%c%c u%c%c\n",
9376 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9377 sw
? 'w' : '-', sr
? 'r' : '-',
9378 uw
? 'w' : '-', ur
? 'r' : '-');
9382 printf("SPR: %4d (%03x) %-8s u%c%c\n",
9383 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9384 uw
? 'w' : '-', ur
? 'r' : '-');
9394 /*****************************************************************************/
9400 PPC_DIRECT
= 0, /* Opcode routine */
9401 PPC_INDIRECT
= 1, /* Indirect opcode table */
9404 static inline int is_indirect_opcode (void *handler
)
9406 return ((unsigned long)handler
& 0x03) == PPC_INDIRECT
;
9409 static inline opc_handler_t
**ind_table(void *handler
)
9411 return (opc_handler_t
**)((unsigned long)handler
& ~3);
9414 /* Instruction table creation */
9415 /* Opcodes tables creation */
9416 static void fill_new_table (opc_handler_t
**table
, int len
)
9420 for (i
= 0; i
< len
; i
++)
9421 table
[i
] = &invalid_handler
;
9424 static int create_new_table (opc_handler_t
**table
, unsigned char idx
)
9426 opc_handler_t
**tmp
;
9428 tmp
= malloc(0x20 * sizeof(opc_handler_t
));
9429 fill_new_table(tmp
, 0x20);
9430 table
[idx
] = (opc_handler_t
*)((unsigned long)tmp
| PPC_INDIRECT
);
9435 static int insert_in_table (opc_handler_t
**table
, unsigned char idx
,
9436 opc_handler_t
*handler
)
9438 if (table
[idx
] != &invalid_handler
)
9440 table
[idx
] = handler
;
9445 static int register_direct_insn (opc_handler_t
**ppc_opcodes
,
9446 unsigned char idx
, opc_handler_t
*handler
)
9448 if (insert_in_table(ppc_opcodes
, idx
, handler
) < 0) {
9449 printf("*** ERROR: opcode %02x already assigned in main "
9450 "opcode table\n", idx
);
9451 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9452 printf(" Registered handler '%s' - new handler '%s'\n",
9453 ppc_opcodes
[idx
]->oname
, handler
->oname
);
9461 static int register_ind_in_table (opc_handler_t
**table
,
9462 unsigned char idx1
, unsigned char idx2
,
9463 opc_handler_t
*handler
)
9465 if (table
[idx1
] == &invalid_handler
) {
9466 if (create_new_table(table
, idx1
) < 0) {
9467 printf("*** ERROR: unable to create indirect table "
9468 "idx=%02x\n", idx1
);
9472 if (!is_indirect_opcode(table
[idx1
])) {
9473 printf("*** ERROR: idx %02x already assigned to a direct "
9475 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9476 printf(" Registered handler '%s' - new handler '%s'\n",
9477 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9482 if (handler
!= NULL
&&
9483 insert_in_table(ind_table(table
[idx1
]), idx2
, handler
) < 0) {
9484 printf("*** ERROR: opcode %02x already assigned in "
9485 "opcode table %02x\n", idx2
, idx1
);
9486 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9487 printf(" Registered handler '%s' - new handler '%s'\n",
9488 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9496 static int register_ind_insn (opc_handler_t
**ppc_opcodes
,
9497 unsigned char idx1
, unsigned char idx2
,
9498 opc_handler_t
*handler
)
9502 ret
= register_ind_in_table(ppc_opcodes
, idx1
, idx2
, handler
);
9507 static int register_dblind_insn (opc_handler_t
**ppc_opcodes
,
9508 unsigned char idx1
, unsigned char idx2
,
9509 unsigned char idx3
, opc_handler_t
*handler
)
9511 if (register_ind_in_table(ppc_opcodes
, idx1
, idx2
, NULL
) < 0) {
9512 printf("*** ERROR: unable to join indirect table idx "
9513 "[%02x-%02x]\n", idx1
, idx2
);
9516 if (register_ind_in_table(ind_table(ppc_opcodes
[idx1
]), idx2
, idx3
,
9518 printf("*** ERROR: unable to insert opcode "
9519 "[%02x-%02x-%02x]\n", idx1
, idx2
, idx3
);
9526 static int register_insn (opc_handler_t
**ppc_opcodes
, opcode_t
*insn
)
9528 if (insn
->opc2
!= 0xFF) {
9529 if (insn
->opc3
!= 0xFF) {
9530 if (register_dblind_insn(ppc_opcodes
, insn
->opc1
, insn
->opc2
,
9531 insn
->opc3
, &insn
->handler
) < 0)
9534 if (register_ind_insn(ppc_opcodes
, insn
->opc1
,
9535 insn
->opc2
, &insn
->handler
) < 0)
9539 if (register_direct_insn(ppc_opcodes
, insn
->opc1
, &insn
->handler
) < 0)
9546 static int test_opcode_table (opc_handler_t
**table
, int len
)
9550 for (i
= 0, count
= 0; i
< len
; i
++) {
9551 /* Consistency fixup */
9552 if (table
[i
] == NULL
)
9553 table
[i
] = &invalid_handler
;
9554 if (table
[i
] != &invalid_handler
) {
9555 if (is_indirect_opcode(table
[i
])) {
9556 tmp
= test_opcode_table(ind_table(table
[i
]), 0x20);
9559 table
[i
] = &invalid_handler
;
9572 static void fix_opcode_tables (opc_handler_t
**ppc_opcodes
)
9574 if (test_opcode_table(ppc_opcodes
, 0x40) == 0)
9575 printf("*** WARNING: no opcode defined !\n");
9578 /*****************************************************************************/
9579 static int create_ppc_opcodes (CPUPPCState
*env
, const ppc_def_t
*def
)
9583 fill_new_table(env
->opcodes
, 0x40);
9584 for (opc
= opcodes
; opc
< &opcodes
[ARRAY_SIZE(opcodes
)]; opc
++) {
9585 if (((opc
->handler
.type
& def
->insns_flags
) != 0) ||
9586 ((opc
->handler
.type2
& def
->insns_flags2
) != 0)) {
9587 if (register_insn(env
->opcodes
, opc
) < 0) {
9588 printf("*** ERROR initializing PowerPC instruction "
9589 "0x%02x 0x%02x 0x%02x\n", opc
->opc1
, opc
->opc2
,
9595 fix_opcode_tables(env
->opcodes
);
9602 #if defined(PPC_DUMP_CPU)
9603 static void dump_ppc_insns (CPUPPCState
*env
)
9605 opc_handler_t
**table
, *handler
;
9607 uint8_t opc1
, opc2
, opc3
;
9609 printf("Instructions set:\n");
9610 /* opc1 is 6 bits long */
9611 for (opc1
= 0x00; opc1
< 0x40; opc1
++) {
9612 table
= env
->opcodes
;
9613 handler
= table
[opc1
];
9614 if (is_indirect_opcode(handler
)) {
9615 /* opc2 is 5 bits long */
9616 for (opc2
= 0; opc2
< 0x20; opc2
++) {
9617 table
= env
->opcodes
;
9618 handler
= env
->opcodes
[opc1
];
9619 table
= ind_table(handler
);
9620 handler
= table
[opc2
];
9621 if (is_indirect_opcode(handler
)) {
9622 table
= ind_table(handler
);
9623 /* opc3 is 5 bits long */
9624 for (opc3
= 0; opc3
< 0x20; opc3
++) {
9625 handler
= table
[opc3
];
9626 if (handler
->handler
!= &gen_invalid
) {
9627 /* Special hack to properly dump SPE insns */
9628 p
= strchr(handler
->oname
, '_');
9630 printf("INSN: %02x %02x %02x (%02d %04d) : "
9632 opc1
, opc2
, opc3
, opc1
,
9637 if ((p
- handler
->oname
) != strlen(q
) ||
9638 memcmp(handler
->oname
, q
, strlen(q
)) != 0) {
9639 /* First instruction */
9640 printf("INSN: %02x %02x %02x (%02d %04d) : "
9642 opc1
, opc2
<< 1, opc3
, opc1
,
9643 (opc3
<< 6) | (opc2
<< 1),
9644 (int)(p
- handler
->oname
),
9647 if (strcmp(p
+ 1, q
) != 0) {
9648 /* Second instruction */
9649 printf("INSN: %02x %02x %02x (%02d %04d) : "
9651 opc1
, (opc2
<< 1) | 1, opc3
, opc1
,
9652 (opc3
<< 6) | (opc2
<< 1) | 1,
9659 if (handler
->handler
!= &gen_invalid
) {
9660 printf("INSN: %02x %02x -- (%02d %04d) : %s\n",
9661 opc1
, opc2
, opc1
, opc2
, handler
->oname
);
9666 if (handler
->handler
!= &gen_invalid
) {
9667 printf("INSN: %02x -- -- (%02d ----) : %s\n",
9668 opc1
, opc1
, handler
->oname
);
9675 static int gdb_get_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9678 stfq_p(mem_buf
, env
->fpr
[n
]);
9682 /* FPSCR not implemented */
9683 memset(mem_buf
, 0, 4);
9689 static int gdb_set_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9692 env
->fpr
[n
] = ldfq_p(mem_buf
);
9696 /* FPSCR not implemented */
9702 static int gdb_get_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9705 #ifdef HOST_WORDS_BIGENDIAN
9706 stq_p(mem_buf
, env
->avr
[n
].u64
[0]);
9707 stq_p(mem_buf
+8, env
->avr
[n
].u64
[1]);
9709 stq_p(mem_buf
, env
->avr
[n
].u64
[1]);
9710 stq_p(mem_buf
+8, env
->avr
[n
].u64
[0]);
9715 stl_p(mem_buf
, env
->vscr
);
9719 stl_p(mem_buf
, (uint32_t)env
->spr
[SPR_VRSAVE
]);
9725 static int gdb_set_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9728 #ifdef HOST_WORDS_BIGENDIAN
9729 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
);
9730 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
+8);
9732 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
);
9733 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
+8);
9738 env
->vscr
= ldl_p(mem_buf
);
9742 env
->spr
[SPR_VRSAVE
] = (target_ulong
)ldl_p(mem_buf
);
9748 static int gdb_get_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9751 #if defined(TARGET_PPC64)
9752 stl_p(mem_buf
, env
->gpr
[n
] >> 32);
9754 stl_p(mem_buf
, env
->gprh
[n
]);
9759 stq_p(mem_buf
, env
->spe_acc
);
9763 stl_p(mem_buf
, env
->spe_fscr
);
9769 static int gdb_set_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9772 #if defined(TARGET_PPC64)
9773 target_ulong lo
= (uint32_t)env
->gpr
[n
];
9774 target_ulong hi
= (target_ulong
)ldl_p(mem_buf
) << 32;
9775 env
->gpr
[n
] = lo
| hi
;
9777 env
->gprh
[n
] = ldl_p(mem_buf
);
9782 env
->spe_acc
= ldq_p(mem_buf
);
9786 env
->spe_fscr
= ldl_p(mem_buf
);
9792 int cpu_ppc_register_internal (CPUPPCState
*env
, const ppc_def_t
*def
)
9794 env
->msr_mask
= def
->msr_mask
;
9795 env
->mmu_model
= def
->mmu_model
;
9796 env
->excp_model
= def
->excp_model
;
9797 env
->bus_model
= def
->bus_model
;
9798 env
->insns_flags
= def
->insns_flags
;
9799 env
->insns_flags2
= def
->insns_flags2
;
9800 env
->flags
= def
->flags
;
9801 env
->bfd_mach
= def
->bfd_mach
;
9802 env
->check_pow
= def
->check_pow
;
9803 if (create_ppc_opcodes(env
, def
) < 0)
9805 init_ppc_proc(env
, def
);
9807 if (def
->insns_flags
& PPC_FLOAT
) {
9808 gdb_register_coprocessor(env
, gdb_get_float_reg
, gdb_set_float_reg
,
9809 33, "power-fpu.xml", 0);
9811 if (def
->insns_flags
& PPC_ALTIVEC
) {
9812 gdb_register_coprocessor(env
, gdb_get_avr_reg
, gdb_set_avr_reg
,
9813 34, "power-altivec.xml", 0);
9815 if (def
->insns_flags
& PPC_SPE
) {
9816 gdb_register_coprocessor(env
, gdb_get_spe_reg
, gdb_set_spe_reg
,
9817 34, "power-spe.xml", 0);
9820 #if defined(PPC_DUMP_CPU)
9822 const char *mmu_model
, *excp_model
, *bus_model
;
9823 switch (env
->mmu_model
) {
9824 case POWERPC_MMU_32B
:
9825 mmu_model
= "PowerPC 32";
9827 case POWERPC_MMU_SOFT_6xx
:
9828 mmu_model
= "PowerPC 6xx/7xx with software driven TLBs";
9830 case POWERPC_MMU_SOFT_74xx
:
9831 mmu_model
= "PowerPC 74xx with software driven TLBs";
9833 case POWERPC_MMU_SOFT_4xx
:
9834 mmu_model
= "PowerPC 4xx with software driven TLBs";
9836 case POWERPC_MMU_SOFT_4xx_Z
:
9837 mmu_model
= "PowerPC 4xx with software driven TLBs "
9838 "and zones protections";
9840 case POWERPC_MMU_REAL
:
9841 mmu_model
= "PowerPC real mode only";
9843 case POWERPC_MMU_MPC8xx
:
9844 mmu_model
= "PowerPC MPC8xx";
9846 case POWERPC_MMU_BOOKE
:
9847 mmu_model
= "PowerPC BookE";
9849 case POWERPC_MMU_BOOKE206
:
9850 mmu_model
= "PowerPC BookE 2.06";
9852 case POWERPC_MMU_601
:
9853 mmu_model
= "PowerPC 601";
9855 #if defined (TARGET_PPC64)
9856 case POWERPC_MMU_64B
:
9857 mmu_model
= "PowerPC 64";
9859 case POWERPC_MMU_620
:
9860 mmu_model
= "PowerPC 620";
9864 mmu_model
= "Unknown or invalid";
9867 switch (env
->excp_model
) {
9868 case POWERPC_EXCP_STD
:
9869 excp_model
= "PowerPC";
9871 case POWERPC_EXCP_40x
:
9872 excp_model
= "PowerPC 40x";
9874 case POWERPC_EXCP_601
:
9875 excp_model
= "PowerPC 601";
9877 case POWERPC_EXCP_602
:
9878 excp_model
= "PowerPC 602";
9880 case POWERPC_EXCP_603
:
9881 excp_model
= "PowerPC 603";
9883 case POWERPC_EXCP_603E
:
9884 excp_model
= "PowerPC 603e";
9886 case POWERPC_EXCP_604
:
9887 excp_model
= "PowerPC 604";
9889 case POWERPC_EXCP_7x0
:
9890 excp_model
= "PowerPC 740/750";
9892 case POWERPC_EXCP_7x5
:
9893 excp_model
= "PowerPC 745/755";
9895 case POWERPC_EXCP_74xx
:
9896 excp_model
= "PowerPC 74xx";
9898 case POWERPC_EXCP_BOOKE
:
9899 excp_model
= "PowerPC BookE";
9901 #if defined (TARGET_PPC64)
9902 case POWERPC_EXCP_970
:
9903 excp_model
= "PowerPC 970";
9907 excp_model
= "Unknown or invalid";
9910 switch (env
->bus_model
) {
9911 case PPC_FLAGS_INPUT_6xx
:
9912 bus_model
= "PowerPC 6xx";
9914 case PPC_FLAGS_INPUT_BookE
:
9915 bus_model
= "PowerPC BookE";
9917 case PPC_FLAGS_INPUT_405
:
9918 bus_model
= "PowerPC 405";
9920 case PPC_FLAGS_INPUT_401
:
9921 bus_model
= "PowerPC 401/403";
9923 case PPC_FLAGS_INPUT_RCPU
:
9924 bus_model
= "RCPU / MPC8xx";
9926 #if defined (TARGET_PPC64)
9927 case PPC_FLAGS_INPUT_970
:
9928 bus_model
= "PowerPC 970";
9932 bus_model
= "Unknown or invalid";
9935 printf("PowerPC %-12s : PVR %08x MSR %016" PRIx64
"\n"
9936 " MMU model : %s\n",
9937 def
->name
, def
->pvr
, def
->msr_mask
, mmu_model
);
9938 #if !defined(CONFIG_USER_ONLY)
9939 if (env
->tlb
!= NULL
) {
9940 printf(" %d %s TLB in %d ways\n",
9941 env
->nb_tlb
, env
->id_tlbs
? "splitted" : "merged",
9945 printf(" Exceptions model : %s\n"
9946 " Bus model : %s\n",
9947 excp_model
, bus_model
);
9948 printf(" MSR features :\n");
9949 if (env
->flags
& POWERPC_FLAG_SPE
)
9950 printf(" signal processing engine enable"
9952 else if (env
->flags
& POWERPC_FLAG_VRE
)
9953 printf(" vector processor enable\n");
9954 if (env
->flags
& POWERPC_FLAG_TGPR
)
9955 printf(" temporary GPRs\n");
9956 else if (env
->flags
& POWERPC_FLAG_CE
)
9957 printf(" critical input enable\n");
9958 if (env
->flags
& POWERPC_FLAG_SE
)
9959 printf(" single-step trace mode\n");
9960 else if (env
->flags
& POWERPC_FLAG_DWE
)
9961 printf(" debug wait enable\n");
9962 else if (env
->flags
& POWERPC_FLAG_UBLE
)
9963 printf(" user BTB lock enable\n");
9964 if (env
->flags
& POWERPC_FLAG_BE
)
9965 printf(" branch-step trace mode\n");
9966 else if (env
->flags
& POWERPC_FLAG_DE
)
9967 printf(" debug interrupt enable\n");
9968 if (env
->flags
& POWERPC_FLAG_PX
)
9969 printf(" inclusive protection\n");
9970 else if (env
->flags
& POWERPC_FLAG_PMM
)
9971 printf(" performance monitor mark\n");
9972 if (env
->flags
== POWERPC_FLAG_NONE
)
9974 printf(" Time-base/decrementer clock source: %s\n",
9975 env
->flags
& POWERPC_FLAG_RTC_CLK
? "RTC clock" : "bus clock");
9977 dump_ppc_insns(env
);
9985 static const ppc_def_t
*ppc_find_by_pvr (uint32_t pvr
)
9987 const ppc_def_t
*ret
;
9989 int i
, best
, match
, best_match
, max
;
9992 max
= ARRAY_SIZE(ppc_defs
);
9994 pvr_rev
= pvr
& 0xFFFF;
9995 /* We want all specified bits to match */
9996 best_match
= 32 - ctz32(pvr_rev
);
9997 for (i
= 0; i
< max
; i
++) {
9998 /* We check that the 16 higher bits are the same to ensure the CPU
9999 * model will be the choosen one.
10001 if (((pvr
^ ppc_defs
[i
].pvr
) >> 16) == 0) {
10002 /* We want as much as possible of the low-level 16 bits
10003 * to be the same but we allow inexact matches.
10005 match
= clz32(pvr_rev
^ (ppc_defs
[i
].pvr
& 0xFFFF));
10006 /* We check '>=' instead of '>' because the PPC_defs table
10007 * is ordered by increasing revision.
10008 * Then, we will match the higher revision compatible
10009 * with the requested PVR
10011 if (match
>= best_match
) {
10013 best_match
= match
;
10018 ret
= &ppc_defs
[best
];
10025 const ppc_def_t
*cpu_ppc_find_by_name (const char *name
)
10027 const ppc_def_t
*ret
;
10031 /* Check if the given name is a PVR */
10032 len
= strlen(name
);
10033 if (len
== 10 && name
[0] == '0' && name
[1] == 'x') {
10036 } else if (len
== 8) {
10039 for (i
= 0; i
< 8; i
++) {
10040 if (!qemu_isxdigit(*p
++))
10044 return ppc_find_by_pvr(strtoul(name
, NULL
, 16));
10047 max
= ARRAY_SIZE(ppc_defs
);
10048 for (i
= 0; i
< max
; i
++) {
10049 if (strcasecmp(name
, ppc_defs
[i
].name
) == 0) {
10050 ret
= &ppc_defs
[i
];
10058 void ppc_cpu_list (FILE *f
, fprintf_function cpu_fprintf
)
10062 max
= ARRAY_SIZE(ppc_defs
);
10063 for (i
= 0; i
< max
; i
++) {
10064 (*cpu_fprintf
)(f
, "PowerPC %-16s PVR %08x\n",
10065 ppc_defs
[i
].name
, ppc_defs
[i
].pvr
);