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, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
21 /* A lot of PowerPC definition have been included here.
22 * Most of them are not usable for now but have been kept
23 * inside "#if defined(TODO) ... #endif" statements to make tests easier.
29 //#define PPC_DUMP_CPU
30 //#define PPC_DEBUG_SPR
31 //#define PPC_DUMP_SPR_ACCESSES
32 #if defined(CONFIG_USER_ONLY)
33 #define TODO_USER_ONLY 1
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(e500
);
68 * do nothing but store/retrieve spr value
70 static void spr_read_generic (void *opaque
, int gprn
, int sprn
)
72 gen_load_spr(cpu_gpr
[gprn
], sprn
);
73 #ifdef PPC_DUMP_SPR_ACCESSES
75 TCGv t0
= tcg_const_i32(sprn
);
76 gen_helper_load_dump_spr(t0
);
77 tcg_temp_free_i32(t0
);
82 static void spr_write_generic (void *opaque
, int sprn
, int gprn
)
84 gen_store_spr(sprn
, cpu_gpr
[gprn
]);
85 #ifdef PPC_DUMP_SPR_ACCESSES
87 TCGv t0
= tcg_const_i32(sprn
);
88 gen_helper_store_dump_spr(t0
);
89 tcg_temp_free_i32(t0
);
94 #if !defined(CONFIG_USER_ONLY)
95 static void spr_write_clear (void *opaque
, int sprn
, int gprn
)
97 TCGv t0
= tcg_temp_new();
98 TCGv t1
= tcg_temp_new();
99 gen_load_spr(t0
, sprn
);
100 tcg_gen_neg_tl(t1
, cpu_gpr
[gprn
]);
101 tcg_gen_and_tl(t0
, t0
, t1
);
102 gen_store_spr(sprn
, t0
);
108 /* SPR common to all PowerPC */
110 static void spr_read_xer (void *opaque
, int gprn
, int sprn
)
112 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_xer
);
115 static void spr_write_xer (void *opaque
, int sprn
, int gprn
)
117 tcg_gen_mov_tl(cpu_xer
, cpu_gpr
[gprn
]);
121 static void spr_read_lr (void *opaque
, int gprn
, int sprn
)
123 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_lr
);
126 static void spr_write_lr (void *opaque
, int sprn
, int gprn
)
128 tcg_gen_mov_tl(cpu_lr
, cpu_gpr
[gprn
]);
132 static void spr_read_ctr (void *opaque
, int gprn
, int sprn
)
134 tcg_gen_mov_tl(cpu_gpr
[gprn
], cpu_ctr
);
137 static void spr_write_ctr (void *opaque
, int sprn
, int gprn
)
139 tcg_gen_mov_tl(cpu_ctr
, cpu_gpr
[gprn
]);
142 /* User read access to SPR */
148 static void spr_read_ureg (void *opaque
, int gprn
, int sprn
)
150 gen_load_spr(cpu_gpr
[gprn
], sprn
+ 0x10);
153 /* SPR common to all non-embedded PowerPC */
155 #if !defined(CONFIG_USER_ONLY)
156 static void spr_read_decr (void *opaque
, int gprn
, int sprn
)
158 gen_helper_load_decr(cpu_gpr
[gprn
]);
161 static void spr_write_decr (void *opaque
, int sprn
, int gprn
)
163 gen_helper_store_decr(cpu_gpr
[gprn
]);
167 /* SPR common to all non-embedded PowerPC, except 601 */
169 static void spr_read_tbl (void *opaque
, int gprn
, int sprn
)
171 gen_helper_load_tbl(cpu_gpr
[gprn
]);
174 static void spr_read_tbu (void *opaque
, int gprn
, int sprn
)
176 gen_helper_load_tbu(cpu_gpr
[gprn
]);
179 __attribute__ (( unused
))
180 static void spr_read_atbl (void *opaque
, int gprn
, int sprn
)
182 gen_helper_load_atbl(cpu_gpr
[gprn
]);
185 __attribute__ (( unused
))
186 static void spr_read_atbu (void *opaque
, int gprn
, int sprn
)
188 gen_helper_load_atbu(cpu_gpr
[gprn
]);
191 #if !defined(CONFIG_USER_ONLY)
192 static void spr_write_tbl (void *opaque
, int sprn
, int gprn
)
194 gen_helper_store_tbl(cpu_gpr
[gprn
]);
197 static void spr_write_tbu (void *opaque
, int sprn
, int gprn
)
199 gen_helper_store_tbu(cpu_gpr
[gprn
]);
202 __attribute__ (( unused
))
203 static void spr_write_atbl (void *opaque
, int sprn
, int gprn
)
205 gen_helper_store_atbl(cpu_gpr
[gprn
]);
208 __attribute__ (( unused
))
209 static void spr_write_atbu (void *opaque
, int sprn
, int gprn
)
211 gen_helper_store_atbu(cpu_gpr
[gprn
]);
215 #if !defined(CONFIG_USER_ONLY)
216 /* IBAT0U...IBAT0U */
217 /* IBAT0L...IBAT7L */
218 static void spr_read_ibat (void *opaque
, int gprn
, int sprn
)
220 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT0U
) / 2]));
223 static void spr_read_ibat_h (void *opaque
, int gprn
, int sprn
)
225 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT4U
) / 2]));
228 static void spr_write_ibatu (void *opaque
, int sprn
, int gprn
)
230 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
231 gen_helper_store_ibatu(t0
, cpu_gpr
[gprn
]);
232 tcg_temp_free_i32(t0
);
235 static void spr_write_ibatu_h (void *opaque
, int sprn
, int gprn
)
237 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT4U
) / 2);
238 gen_helper_store_ibatu(t0
, cpu_gpr
[gprn
]);
239 tcg_temp_free_i32(t0
);
242 static void spr_write_ibatl (void *opaque
, int sprn
, int gprn
)
244 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0L
) / 2);
245 gen_helper_store_ibatl(t0
, cpu_gpr
[gprn
]);
246 tcg_temp_free_i32(t0
);
249 static void spr_write_ibatl_h (void *opaque
, int sprn
, int gprn
)
251 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT4L
) / 2);
252 gen_helper_store_ibatl(t0
, cpu_gpr
[gprn
]);
253 tcg_temp_free_i32(t0
);
256 /* DBAT0U...DBAT7U */
257 /* DBAT0L...DBAT7L */
258 static void spr_read_dbat (void *opaque
, int gprn
, int sprn
)
260 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, DBAT
[sprn
& 1][(sprn
- SPR_DBAT0U
) / 2]));
263 static void spr_read_dbat_h (void *opaque
, int gprn
, int sprn
)
265 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, DBAT
[sprn
& 1][((sprn
- SPR_DBAT4U
) / 2) + 4]));
268 static void spr_write_dbatu (void *opaque
, int sprn
, int gprn
)
270 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_DBAT0U
) / 2);
271 gen_helper_store_dbatu(t0
, cpu_gpr
[gprn
]);
272 tcg_temp_free_i32(t0
);
275 static void spr_write_dbatu_h (void *opaque
, int sprn
, int gprn
)
277 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_DBAT4U
) / 2) + 4);
278 gen_helper_store_dbatu(t0
, cpu_gpr
[gprn
]);
279 tcg_temp_free_i32(t0
);
282 static void spr_write_dbatl (void *opaque
, int sprn
, int gprn
)
284 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_DBAT0L
) / 2);
285 gen_helper_store_dbatl(t0
, cpu_gpr
[gprn
]);
286 tcg_temp_free_i32(t0
);
289 static void spr_write_dbatl_h (void *opaque
, int sprn
, int gprn
)
291 TCGv_i32 t0
= tcg_const_i32(((sprn
- SPR_DBAT4L
) / 2) + 4);
292 gen_helper_store_dbatl(t0
, cpu_gpr
[gprn
]);
293 tcg_temp_free_i32(t0
);
297 static void spr_read_sdr1 (void *opaque
, int gprn
, int sprn
)
299 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, sdr1
));
302 static void spr_write_sdr1 (void *opaque
, int sprn
, int gprn
)
304 gen_helper_store_sdr1(cpu_gpr
[gprn
]);
307 /* 64 bits PowerPC specific SPRs */
309 #if defined(TARGET_PPC64)
310 static void spr_read_hior (void *opaque
, int gprn
, int sprn
)
312 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, excp_prefix
));
315 static void spr_write_hior (void *opaque
, int sprn
, int gprn
)
317 TCGv t0
= tcg_temp_new();
318 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], 0x3FFFFF00000ULL
);
319 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_prefix
));
323 static void spr_read_asr (void *opaque
, int gprn
, int sprn
)
325 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, asr
));
328 static void spr_write_asr (void *opaque
, int sprn
, int gprn
)
330 gen_helper_store_asr(cpu_gpr
[gprn
]);
335 /* PowerPC 601 specific registers */
337 static void spr_read_601_rtcl (void *opaque
, int gprn
, int sprn
)
339 gen_helper_load_601_rtcl(cpu_gpr
[gprn
]);
342 static void spr_read_601_rtcu (void *opaque
, int gprn
, int sprn
)
344 gen_helper_load_601_rtcu(cpu_gpr
[gprn
]);
347 #if !defined(CONFIG_USER_ONLY)
348 static void spr_write_601_rtcu (void *opaque
, int sprn
, int gprn
)
350 gen_helper_store_601_rtcu(cpu_gpr
[gprn
]);
353 static void spr_write_601_rtcl (void *opaque
, int sprn
, int gprn
)
355 gen_helper_store_601_rtcl(cpu_gpr
[gprn
]);
358 static void spr_write_hid0_601 (void *opaque
, int sprn
, int gprn
)
360 DisasContext
*ctx
= opaque
;
362 gen_helper_store_hid0_601(cpu_gpr
[gprn
]);
363 /* Must stop the translation as endianness may have changed */
364 gen_stop_exception(ctx
);
369 #if !defined(CONFIG_USER_ONLY)
370 static void spr_read_601_ubat (void *opaque
, int gprn
, int sprn
)
372 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, IBAT
[sprn
& 1][(sprn
- SPR_IBAT0U
) / 2]));
375 static void spr_write_601_ubatu (void *opaque
, int sprn
, int gprn
)
377 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
378 gen_helper_store_601_batl(t0
, cpu_gpr
[gprn
]);
379 tcg_temp_free_i32(t0
);
382 static void spr_write_601_ubatl (void *opaque
, int sprn
, int gprn
)
384 TCGv_i32 t0
= tcg_const_i32((sprn
- SPR_IBAT0U
) / 2);
385 gen_helper_store_601_batu(t0
, cpu_gpr
[gprn
]);
386 tcg_temp_free_i32(t0
);
390 /* PowerPC 40x specific registers */
391 #if !defined(CONFIG_USER_ONLY)
392 static void spr_read_40x_pit (void *opaque
, int gprn
, int sprn
)
394 gen_helper_load_40x_pit(cpu_gpr
[gprn
]);
397 static void spr_write_40x_pit (void *opaque
, int sprn
, int gprn
)
399 gen_helper_store_40x_pit(cpu_gpr
[gprn
]);
402 static void spr_write_40x_dbcr0 (void *opaque
, int sprn
, int gprn
)
404 DisasContext
*ctx
= opaque
;
406 gen_helper_store_40x_dbcr0(cpu_gpr
[gprn
]);
407 /* We must stop translation as we may have rebooted */
408 gen_stop_exception(ctx
);
411 static void spr_write_40x_sler (void *opaque
, int sprn
, int gprn
)
413 gen_helper_store_40x_sler(cpu_gpr
[gprn
]);
416 static void spr_write_booke_tcr (void *opaque
, int sprn
, int gprn
)
418 gen_helper_store_booke_tcr(cpu_gpr
[gprn
]);
421 static void spr_write_booke_tsr (void *opaque
, int sprn
, int gprn
)
423 gen_helper_store_booke_tsr(cpu_gpr
[gprn
]);
427 /* PowerPC 403 specific registers */
428 /* PBL1 / PBU1 / PBL2 / PBU2 */
429 #if !defined(CONFIG_USER_ONLY)
430 static void spr_read_403_pbr (void *opaque
, int gprn
, int sprn
)
432 tcg_gen_ld_tl(cpu_gpr
[gprn
], cpu_env
, offsetof(CPUState
, pb
[sprn
- SPR_403_PBL1
]));
435 static void spr_write_403_pbr (void *opaque
, int sprn
, int gprn
)
437 TCGv_i32 t0
= tcg_const_i32(sprn
- SPR_403_PBL1
);
438 gen_helper_store_403_pbr(t0
, cpu_gpr
[gprn
]);
439 tcg_temp_free_i32(t0
);
442 static void spr_write_pir (void *opaque
, int sprn
, int gprn
)
444 TCGv t0
= tcg_temp_new();
445 tcg_gen_andi_tl(t0
, cpu_gpr
[gprn
], 0xF);
446 gen_store_spr(SPR_PIR
, t0
);
451 #if !defined(CONFIG_USER_ONLY)
452 /* Callback used to write the exception vector base */
453 static void spr_write_excp_prefix (void *opaque
, int sprn
, int gprn
)
455 TCGv t0
= tcg_temp_new();
456 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivpr_mask
));
457 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
458 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_prefix
));
459 gen_store_spr(sprn
, t0
);
462 static void spr_write_excp_vector (void *opaque
, int sprn
, int gprn
)
464 DisasContext
*ctx
= opaque
;
466 if (sprn
>= SPR_BOOKE_IVOR0
&& sprn
<= SPR_BOOKE_IVOR15
) {
467 TCGv t0
= tcg_temp_new();
468 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivor_mask
));
469 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
470 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_vectors
[sprn
- SPR_BOOKE_IVOR0
]));
471 gen_store_spr(sprn
, t0
);
473 } else if (sprn
>= SPR_BOOKE_IVOR32
&& sprn
<= SPR_BOOKE_IVOR37
) {
474 TCGv t0
= tcg_temp_new();
475 tcg_gen_ld_tl(t0
, cpu_env
, offsetof(CPUState
, ivor_mask
));
476 tcg_gen_and_tl(t0
, t0
, cpu_gpr
[gprn
]);
477 tcg_gen_st_tl(t0
, cpu_env
, offsetof(CPUState
, excp_vectors
[sprn
- SPR_BOOKE_IVOR32
+ 32]));
478 gen_store_spr(sprn
, t0
);
481 printf("Trying to write an unknown exception vector %d %03x\n",
483 gen_inval_exception(ctx
, POWERPC_EXCP_PRIV_REG
);
488 static inline void vscr_init (CPUPPCState
*env
, uint32_t val
)
491 /* Altivec always uses round-to-nearest */
492 set_float_rounding_mode(float_round_nearest_even
, &env
->vec_status
);
493 set_flush_to_zero(vscr_nj
, &env
->vec_status
);
496 #if defined(CONFIG_USER_ONLY)
497 #define spr_register(env, num, name, uea_read, uea_write, \
498 oea_read, oea_write, initial_value) \
500 _spr_register(env, num, name, uea_read, uea_write, initial_value); \
502 static inline void _spr_register (CPUPPCState
*env
, int num
,
504 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
505 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
506 target_ulong initial_value
)
508 static inline void spr_register (CPUPPCState
*env
, int num
,
510 void (*uea_read
)(void *opaque
, int gprn
, int sprn
),
511 void (*uea_write
)(void *opaque
, int sprn
, int gprn
),
512 void (*oea_read
)(void *opaque
, int gprn
, int sprn
),
513 void (*oea_write
)(void *opaque
, int sprn
, int gprn
),
514 target_ulong initial_value
)
519 spr
= &env
->spr_cb
[num
];
520 if (spr
->name
!= NULL
||env
-> spr
[num
] != 0x00000000 ||
521 #if !defined(CONFIG_USER_ONLY)
522 spr
->oea_read
!= NULL
|| spr
->oea_write
!= NULL
||
524 spr
->uea_read
!= NULL
|| spr
->uea_write
!= NULL
) {
525 printf("Error: Trying to register SPR %d (%03x) twice !\n", num
, num
);
528 #if defined(PPC_DEBUG_SPR)
529 printf("*** register spr %d (%03x) %s val " ADDRX
"\n", num
, num
, name
,
533 spr
->uea_read
= uea_read
;
534 spr
->uea_write
= uea_write
;
535 #if !defined(CONFIG_USER_ONLY)
536 spr
->oea_read
= oea_read
;
537 spr
->oea_write
= oea_write
;
539 env
->spr
[num
] = initial_value
;
542 /* Generic PowerPC SPRs */
543 static void gen_spr_generic (CPUPPCState
*env
)
545 /* Integer processing */
546 spr_register(env
, SPR_XER
, "XER",
547 &spr_read_xer
, &spr_write_xer
,
548 &spr_read_xer
, &spr_write_xer
,
551 spr_register(env
, SPR_LR
, "LR",
552 &spr_read_lr
, &spr_write_lr
,
553 &spr_read_lr
, &spr_write_lr
,
555 spr_register(env
, SPR_CTR
, "CTR",
556 &spr_read_ctr
, &spr_write_ctr
,
557 &spr_read_ctr
, &spr_write_ctr
,
559 /* Interrupt processing */
560 spr_register(env
, SPR_SRR0
, "SRR0",
561 SPR_NOACCESS
, SPR_NOACCESS
,
562 &spr_read_generic
, &spr_write_generic
,
564 spr_register(env
, SPR_SRR1
, "SRR1",
565 SPR_NOACCESS
, SPR_NOACCESS
,
566 &spr_read_generic
, &spr_write_generic
,
568 /* Processor control */
569 spr_register(env
, SPR_SPRG0
, "SPRG0",
570 SPR_NOACCESS
, SPR_NOACCESS
,
571 &spr_read_generic
, &spr_write_generic
,
573 spr_register(env
, SPR_SPRG1
, "SPRG1",
574 SPR_NOACCESS
, SPR_NOACCESS
,
575 &spr_read_generic
, &spr_write_generic
,
577 spr_register(env
, SPR_SPRG2
, "SPRG2",
578 SPR_NOACCESS
, SPR_NOACCESS
,
579 &spr_read_generic
, &spr_write_generic
,
581 spr_register(env
, SPR_SPRG3
, "SPRG3",
582 SPR_NOACCESS
, SPR_NOACCESS
,
583 &spr_read_generic
, &spr_write_generic
,
587 /* SPR common to all non-embedded PowerPC, including 601 */
588 static void gen_spr_ne_601 (CPUPPCState
*env
)
590 /* Exception processing */
591 spr_register(env
, SPR_DSISR
, "DSISR",
592 SPR_NOACCESS
, SPR_NOACCESS
,
593 &spr_read_generic
, &spr_write_generic
,
595 spr_register(env
, SPR_DAR
, "DAR",
596 SPR_NOACCESS
, SPR_NOACCESS
,
597 &spr_read_generic
, &spr_write_generic
,
600 spr_register(env
, SPR_DECR
, "DECR",
601 SPR_NOACCESS
, SPR_NOACCESS
,
602 &spr_read_decr
, &spr_write_decr
,
604 /* Memory management */
605 spr_register(env
, SPR_SDR1
, "SDR1",
606 SPR_NOACCESS
, SPR_NOACCESS
,
607 &spr_read_sdr1
, &spr_write_sdr1
,
612 static void gen_low_BATs (CPUPPCState
*env
)
614 #if !defined(CONFIG_USER_ONLY)
615 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
616 SPR_NOACCESS
, SPR_NOACCESS
,
617 &spr_read_ibat
, &spr_write_ibatu
,
619 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
620 SPR_NOACCESS
, SPR_NOACCESS
,
621 &spr_read_ibat
, &spr_write_ibatl
,
623 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
624 SPR_NOACCESS
, SPR_NOACCESS
,
625 &spr_read_ibat
, &spr_write_ibatu
,
627 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
628 SPR_NOACCESS
, SPR_NOACCESS
,
629 &spr_read_ibat
, &spr_write_ibatl
,
631 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
632 SPR_NOACCESS
, SPR_NOACCESS
,
633 &spr_read_ibat
, &spr_write_ibatu
,
635 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
636 SPR_NOACCESS
, SPR_NOACCESS
,
637 &spr_read_ibat
, &spr_write_ibatl
,
639 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
640 SPR_NOACCESS
, SPR_NOACCESS
,
641 &spr_read_ibat
, &spr_write_ibatu
,
643 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
644 SPR_NOACCESS
, SPR_NOACCESS
,
645 &spr_read_ibat
, &spr_write_ibatl
,
647 spr_register(env
, SPR_DBAT0U
, "DBAT0U",
648 SPR_NOACCESS
, SPR_NOACCESS
,
649 &spr_read_dbat
, &spr_write_dbatu
,
651 spr_register(env
, SPR_DBAT0L
, "DBAT0L",
652 SPR_NOACCESS
, SPR_NOACCESS
,
653 &spr_read_dbat
, &spr_write_dbatl
,
655 spr_register(env
, SPR_DBAT1U
, "DBAT1U",
656 SPR_NOACCESS
, SPR_NOACCESS
,
657 &spr_read_dbat
, &spr_write_dbatu
,
659 spr_register(env
, SPR_DBAT1L
, "DBAT1L",
660 SPR_NOACCESS
, SPR_NOACCESS
,
661 &spr_read_dbat
, &spr_write_dbatl
,
663 spr_register(env
, SPR_DBAT2U
, "DBAT2U",
664 SPR_NOACCESS
, SPR_NOACCESS
,
665 &spr_read_dbat
, &spr_write_dbatu
,
667 spr_register(env
, SPR_DBAT2L
, "DBAT2L",
668 SPR_NOACCESS
, SPR_NOACCESS
,
669 &spr_read_dbat
, &spr_write_dbatl
,
671 spr_register(env
, SPR_DBAT3U
, "DBAT3U",
672 SPR_NOACCESS
, SPR_NOACCESS
,
673 &spr_read_dbat
, &spr_write_dbatu
,
675 spr_register(env
, SPR_DBAT3L
, "DBAT3L",
676 SPR_NOACCESS
, SPR_NOACCESS
,
677 &spr_read_dbat
, &spr_write_dbatl
,
684 static void gen_high_BATs (CPUPPCState
*env
)
686 #if !defined(CONFIG_USER_ONLY)
687 spr_register(env
, SPR_IBAT4U
, "IBAT4U",
688 SPR_NOACCESS
, SPR_NOACCESS
,
689 &spr_read_ibat_h
, &spr_write_ibatu_h
,
691 spr_register(env
, SPR_IBAT4L
, "IBAT4L",
692 SPR_NOACCESS
, SPR_NOACCESS
,
693 &spr_read_ibat_h
, &spr_write_ibatl_h
,
695 spr_register(env
, SPR_IBAT5U
, "IBAT5U",
696 SPR_NOACCESS
, SPR_NOACCESS
,
697 &spr_read_ibat_h
, &spr_write_ibatu_h
,
699 spr_register(env
, SPR_IBAT5L
, "IBAT5L",
700 SPR_NOACCESS
, SPR_NOACCESS
,
701 &spr_read_ibat_h
, &spr_write_ibatl_h
,
703 spr_register(env
, SPR_IBAT6U
, "IBAT6U",
704 SPR_NOACCESS
, SPR_NOACCESS
,
705 &spr_read_ibat_h
, &spr_write_ibatu_h
,
707 spr_register(env
, SPR_IBAT6L
, "IBAT6L",
708 SPR_NOACCESS
, SPR_NOACCESS
,
709 &spr_read_ibat_h
, &spr_write_ibatl_h
,
711 spr_register(env
, SPR_IBAT7U
, "IBAT7U",
712 SPR_NOACCESS
, SPR_NOACCESS
,
713 &spr_read_ibat_h
, &spr_write_ibatu_h
,
715 spr_register(env
, SPR_IBAT7L
, "IBAT7L",
716 SPR_NOACCESS
, SPR_NOACCESS
,
717 &spr_read_ibat_h
, &spr_write_ibatl_h
,
719 spr_register(env
, SPR_DBAT4U
, "DBAT4U",
720 SPR_NOACCESS
, SPR_NOACCESS
,
721 &spr_read_dbat_h
, &spr_write_dbatu_h
,
723 spr_register(env
, SPR_DBAT4L
, "DBAT4L",
724 SPR_NOACCESS
, SPR_NOACCESS
,
725 &spr_read_dbat_h
, &spr_write_dbatl_h
,
727 spr_register(env
, SPR_DBAT5U
, "DBAT5U",
728 SPR_NOACCESS
, SPR_NOACCESS
,
729 &spr_read_dbat_h
, &spr_write_dbatu_h
,
731 spr_register(env
, SPR_DBAT5L
, "DBAT5L",
732 SPR_NOACCESS
, SPR_NOACCESS
,
733 &spr_read_dbat_h
, &spr_write_dbatl_h
,
735 spr_register(env
, SPR_DBAT6U
, "DBAT6U",
736 SPR_NOACCESS
, SPR_NOACCESS
,
737 &spr_read_dbat_h
, &spr_write_dbatu_h
,
739 spr_register(env
, SPR_DBAT6L
, "DBAT6L",
740 SPR_NOACCESS
, SPR_NOACCESS
,
741 &spr_read_dbat_h
, &spr_write_dbatl_h
,
743 spr_register(env
, SPR_DBAT7U
, "DBAT7U",
744 SPR_NOACCESS
, SPR_NOACCESS
,
745 &spr_read_dbat_h
, &spr_write_dbatu_h
,
747 spr_register(env
, SPR_DBAT7L
, "DBAT7L",
748 SPR_NOACCESS
, SPR_NOACCESS
,
749 &spr_read_dbat_h
, &spr_write_dbatl_h
,
755 /* Generic PowerPC time base */
756 static void gen_tbl (CPUPPCState
*env
)
758 spr_register(env
, SPR_VTBL
, "TBL",
759 &spr_read_tbl
, SPR_NOACCESS
,
760 &spr_read_tbl
, SPR_NOACCESS
,
762 spr_register(env
, SPR_TBL
, "TBL",
763 SPR_NOACCESS
, SPR_NOACCESS
,
764 SPR_NOACCESS
, &spr_write_tbl
,
766 spr_register(env
, SPR_VTBU
, "TBU",
767 &spr_read_tbu
, SPR_NOACCESS
,
768 &spr_read_tbu
, SPR_NOACCESS
,
770 spr_register(env
, SPR_TBU
, "TBU",
771 SPR_NOACCESS
, SPR_NOACCESS
,
772 SPR_NOACCESS
, &spr_write_tbu
,
776 /* Softare table search registers */
777 static void gen_6xx_7xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
779 #if !defined(CONFIG_USER_ONLY)
780 env
->nb_tlb
= nb_tlbs
;
781 env
->nb_ways
= nb_ways
;
783 spr_register(env
, SPR_DMISS
, "DMISS",
784 SPR_NOACCESS
, SPR_NOACCESS
,
785 &spr_read_generic
, SPR_NOACCESS
,
787 spr_register(env
, SPR_DCMP
, "DCMP",
788 SPR_NOACCESS
, SPR_NOACCESS
,
789 &spr_read_generic
, SPR_NOACCESS
,
791 spr_register(env
, SPR_HASH1
, "HASH1",
792 SPR_NOACCESS
, SPR_NOACCESS
,
793 &spr_read_generic
, SPR_NOACCESS
,
795 spr_register(env
, SPR_HASH2
, "HASH2",
796 SPR_NOACCESS
, SPR_NOACCESS
,
797 &spr_read_generic
, SPR_NOACCESS
,
799 spr_register(env
, SPR_IMISS
, "IMISS",
800 SPR_NOACCESS
, SPR_NOACCESS
,
801 &spr_read_generic
, SPR_NOACCESS
,
803 spr_register(env
, SPR_ICMP
, "ICMP",
804 SPR_NOACCESS
, SPR_NOACCESS
,
805 &spr_read_generic
, SPR_NOACCESS
,
807 spr_register(env
, SPR_RPA
, "RPA",
808 SPR_NOACCESS
, SPR_NOACCESS
,
809 &spr_read_generic
, &spr_write_generic
,
814 /* SPR common to MPC755 and G2 */
815 static void gen_spr_G2_755 (CPUPPCState
*env
)
818 spr_register(env
, SPR_SPRG4
, "SPRG4",
819 SPR_NOACCESS
, SPR_NOACCESS
,
820 &spr_read_generic
, &spr_write_generic
,
822 spr_register(env
, SPR_SPRG5
, "SPRG5",
823 SPR_NOACCESS
, SPR_NOACCESS
,
824 &spr_read_generic
, &spr_write_generic
,
826 spr_register(env
, SPR_SPRG6
, "SPRG6",
827 SPR_NOACCESS
, SPR_NOACCESS
,
828 &spr_read_generic
, &spr_write_generic
,
830 spr_register(env
, SPR_SPRG7
, "SPRG7",
831 SPR_NOACCESS
, SPR_NOACCESS
,
832 &spr_read_generic
, &spr_write_generic
,
836 /* SPR common to all 7xx PowerPC implementations */
837 static void gen_spr_7xx (CPUPPCState
*env
)
840 /* XXX : not implemented */
841 spr_register(env
, SPR_DABR
, "DABR",
842 SPR_NOACCESS
, SPR_NOACCESS
,
843 &spr_read_generic
, &spr_write_generic
,
845 /* XXX : not implemented */
846 spr_register(env
, SPR_IABR
, "IABR",
847 SPR_NOACCESS
, SPR_NOACCESS
,
848 &spr_read_generic
, &spr_write_generic
,
850 /* Cache management */
851 /* XXX : not implemented */
852 spr_register(env
, SPR_ICTC
, "ICTC",
853 SPR_NOACCESS
, SPR_NOACCESS
,
854 &spr_read_generic
, &spr_write_generic
,
856 /* Performance monitors */
857 /* XXX : not implemented */
858 spr_register(env
, SPR_MMCR0
, "MMCR0",
859 SPR_NOACCESS
, SPR_NOACCESS
,
860 &spr_read_generic
, &spr_write_generic
,
862 /* XXX : not implemented */
863 spr_register(env
, SPR_MMCR1
, "MMCR1",
864 SPR_NOACCESS
, SPR_NOACCESS
,
865 &spr_read_generic
, &spr_write_generic
,
867 /* XXX : not implemented */
868 spr_register(env
, SPR_PMC1
, "PMC1",
869 SPR_NOACCESS
, SPR_NOACCESS
,
870 &spr_read_generic
, &spr_write_generic
,
872 /* XXX : not implemented */
873 spr_register(env
, SPR_PMC2
, "PMC2",
874 SPR_NOACCESS
, SPR_NOACCESS
,
875 &spr_read_generic
, &spr_write_generic
,
877 /* XXX : not implemented */
878 spr_register(env
, SPR_PMC3
, "PMC3",
879 SPR_NOACCESS
, SPR_NOACCESS
,
880 &spr_read_generic
, &spr_write_generic
,
882 /* XXX : not implemented */
883 spr_register(env
, SPR_PMC4
, "PMC4",
884 SPR_NOACCESS
, SPR_NOACCESS
,
885 &spr_read_generic
, &spr_write_generic
,
887 /* XXX : not implemented */
888 spr_register(env
, SPR_SIAR
, "SIAR",
889 SPR_NOACCESS
, SPR_NOACCESS
,
890 &spr_read_generic
, SPR_NOACCESS
,
892 /* XXX : not implemented */
893 spr_register(env
, SPR_UMMCR0
, "UMMCR0",
894 &spr_read_ureg
, SPR_NOACCESS
,
895 &spr_read_ureg
, SPR_NOACCESS
,
897 /* XXX : not implemented */
898 spr_register(env
, SPR_UMMCR1
, "UMMCR1",
899 &spr_read_ureg
, SPR_NOACCESS
,
900 &spr_read_ureg
, SPR_NOACCESS
,
902 /* XXX : not implemented */
903 spr_register(env
, SPR_UPMC1
, "UPMC1",
904 &spr_read_ureg
, SPR_NOACCESS
,
905 &spr_read_ureg
, SPR_NOACCESS
,
907 /* XXX : not implemented */
908 spr_register(env
, SPR_UPMC2
, "UPMC2",
909 &spr_read_ureg
, SPR_NOACCESS
,
910 &spr_read_ureg
, SPR_NOACCESS
,
912 /* XXX : not implemented */
913 spr_register(env
, SPR_UPMC3
, "UPMC3",
914 &spr_read_ureg
, SPR_NOACCESS
,
915 &spr_read_ureg
, SPR_NOACCESS
,
917 /* XXX : not implemented */
918 spr_register(env
, SPR_UPMC4
, "UPMC4",
919 &spr_read_ureg
, SPR_NOACCESS
,
920 &spr_read_ureg
, SPR_NOACCESS
,
922 /* XXX : not implemented */
923 spr_register(env
, SPR_USIAR
, "USIAR",
924 &spr_read_ureg
, SPR_NOACCESS
,
925 &spr_read_ureg
, SPR_NOACCESS
,
927 /* External access control */
928 /* XXX : not implemented */
929 spr_register(env
, SPR_EAR
, "EAR",
930 SPR_NOACCESS
, SPR_NOACCESS
,
931 &spr_read_generic
, &spr_write_generic
,
935 static void gen_spr_thrm (CPUPPCState
*env
)
937 /* Thermal management */
938 /* XXX : not implemented */
939 spr_register(env
, SPR_THRM1
, "THRM1",
940 SPR_NOACCESS
, SPR_NOACCESS
,
941 &spr_read_generic
, &spr_write_generic
,
943 /* XXX : not implemented */
944 spr_register(env
, SPR_THRM2
, "THRM2",
945 SPR_NOACCESS
, SPR_NOACCESS
,
946 &spr_read_generic
, &spr_write_generic
,
948 /* XXX : not implemented */
949 spr_register(env
, SPR_THRM3
, "THRM3",
950 SPR_NOACCESS
, SPR_NOACCESS
,
951 &spr_read_generic
, &spr_write_generic
,
955 /* SPR specific to PowerPC 604 implementation */
956 static void gen_spr_604 (CPUPPCState
*env
)
958 /* Processor identification */
959 spr_register(env
, SPR_PIR
, "PIR",
960 SPR_NOACCESS
, SPR_NOACCESS
,
961 &spr_read_generic
, &spr_write_pir
,
964 /* XXX : not implemented */
965 spr_register(env
, SPR_IABR
, "IABR",
966 SPR_NOACCESS
, SPR_NOACCESS
,
967 &spr_read_generic
, &spr_write_generic
,
969 /* XXX : not implemented */
970 spr_register(env
, SPR_DABR
, "DABR",
971 SPR_NOACCESS
, SPR_NOACCESS
,
972 &spr_read_generic
, &spr_write_generic
,
974 /* Performance counters */
975 /* XXX : not implemented */
976 spr_register(env
, SPR_MMCR0
, "MMCR0",
977 SPR_NOACCESS
, SPR_NOACCESS
,
978 &spr_read_generic
, &spr_write_generic
,
980 /* XXX : not implemented */
981 spr_register(env
, SPR_PMC1
, "PMC1",
982 SPR_NOACCESS
, SPR_NOACCESS
,
983 &spr_read_generic
, &spr_write_generic
,
985 /* XXX : not implemented */
986 spr_register(env
, SPR_PMC2
, "PMC2",
987 SPR_NOACCESS
, SPR_NOACCESS
,
988 &spr_read_generic
, &spr_write_generic
,
990 /* XXX : not implemented */
991 spr_register(env
, SPR_SIAR
, "SIAR",
992 SPR_NOACCESS
, SPR_NOACCESS
,
993 &spr_read_generic
, SPR_NOACCESS
,
995 /* XXX : not implemented */
996 spr_register(env
, SPR_SDA
, "SDA",
997 SPR_NOACCESS
, SPR_NOACCESS
,
998 &spr_read_generic
, SPR_NOACCESS
,
1000 /* External access control */
1001 /* XXX : not implemented */
1002 spr_register(env
, SPR_EAR
, "EAR",
1003 SPR_NOACCESS
, SPR_NOACCESS
,
1004 &spr_read_generic
, &spr_write_generic
,
1008 /* SPR specific to PowerPC 603 implementation */
1009 static void gen_spr_603 (CPUPPCState
*env
)
1011 /* External access control */
1012 /* XXX : not implemented */
1013 spr_register(env
, SPR_EAR
, "EAR",
1014 SPR_NOACCESS
, SPR_NOACCESS
,
1015 &spr_read_generic
, &spr_write_generic
,
1019 /* SPR specific to PowerPC G2 implementation */
1020 static void gen_spr_G2 (CPUPPCState
*env
)
1022 /* Memory base address */
1024 /* XXX : not implemented */
1025 spr_register(env
, SPR_MBAR
, "MBAR",
1026 SPR_NOACCESS
, SPR_NOACCESS
,
1027 &spr_read_generic
, &spr_write_generic
,
1029 /* Exception processing */
1030 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1031 SPR_NOACCESS
, SPR_NOACCESS
,
1032 &spr_read_generic
, &spr_write_generic
,
1034 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1035 SPR_NOACCESS
, SPR_NOACCESS
,
1036 &spr_read_generic
, &spr_write_generic
,
1039 /* XXX : not implemented */
1040 spr_register(env
, SPR_DABR
, "DABR",
1041 SPR_NOACCESS
, SPR_NOACCESS
,
1042 &spr_read_generic
, &spr_write_generic
,
1044 /* XXX : not implemented */
1045 spr_register(env
, SPR_DABR2
, "DABR2",
1046 SPR_NOACCESS
, SPR_NOACCESS
,
1047 &spr_read_generic
, &spr_write_generic
,
1049 /* XXX : not implemented */
1050 spr_register(env
, SPR_IABR
, "IABR",
1051 SPR_NOACCESS
, SPR_NOACCESS
,
1052 &spr_read_generic
, &spr_write_generic
,
1054 /* XXX : not implemented */
1055 spr_register(env
, SPR_IABR2
, "IABR2",
1056 SPR_NOACCESS
, SPR_NOACCESS
,
1057 &spr_read_generic
, &spr_write_generic
,
1059 /* XXX : not implemented */
1060 spr_register(env
, SPR_IBCR
, "IBCR",
1061 SPR_NOACCESS
, SPR_NOACCESS
,
1062 &spr_read_generic
, &spr_write_generic
,
1064 /* XXX : not implemented */
1065 spr_register(env
, SPR_DBCR
, "DBCR",
1066 SPR_NOACCESS
, SPR_NOACCESS
,
1067 &spr_read_generic
, &spr_write_generic
,
1071 /* SPR specific to PowerPC 602 implementation */
1072 static void gen_spr_602 (CPUPPCState
*env
)
1075 /* XXX : not implemented */
1076 spr_register(env
, SPR_SER
, "SER",
1077 SPR_NOACCESS
, SPR_NOACCESS
,
1078 &spr_read_generic
, &spr_write_generic
,
1080 /* XXX : not implemented */
1081 spr_register(env
, SPR_SEBR
, "SEBR",
1082 SPR_NOACCESS
, SPR_NOACCESS
,
1083 &spr_read_generic
, &spr_write_generic
,
1085 /* XXX : not implemented */
1086 spr_register(env
, SPR_ESASRR
, "ESASRR",
1087 SPR_NOACCESS
, SPR_NOACCESS
,
1088 &spr_read_generic
, &spr_write_generic
,
1090 /* Floating point status */
1091 /* XXX : not implemented */
1092 spr_register(env
, SPR_SP
, "SP",
1093 SPR_NOACCESS
, SPR_NOACCESS
,
1094 &spr_read_generic
, &spr_write_generic
,
1096 /* XXX : not implemented */
1097 spr_register(env
, SPR_LT
, "LT",
1098 SPR_NOACCESS
, SPR_NOACCESS
,
1099 &spr_read_generic
, &spr_write_generic
,
1101 /* Watchdog timer */
1102 /* XXX : not implemented */
1103 spr_register(env
, SPR_TCR
, "TCR",
1104 SPR_NOACCESS
, SPR_NOACCESS
,
1105 &spr_read_generic
, &spr_write_generic
,
1107 /* Interrupt base */
1108 spr_register(env
, SPR_IBR
, "IBR",
1109 SPR_NOACCESS
, SPR_NOACCESS
,
1110 &spr_read_generic
, &spr_write_generic
,
1112 /* XXX : not implemented */
1113 spr_register(env
, SPR_IABR
, "IABR",
1114 SPR_NOACCESS
, SPR_NOACCESS
,
1115 &spr_read_generic
, &spr_write_generic
,
1119 /* SPR specific to PowerPC 601 implementation */
1120 static void gen_spr_601 (CPUPPCState
*env
)
1122 /* Multiplication/division register */
1124 spr_register(env
, SPR_MQ
, "MQ",
1125 &spr_read_generic
, &spr_write_generic
,
1126 &spr_read_generic
, &spr_write_generic
,
1129 spr_register(env
, SPR_601_RTCU
, "RTCU",
1130 SPR_NOACCESS
, SPR_NOACCESS
,
1131 SPR_NOACCESS
, &spr_write_601_rtcu
,
1133 spr_register(env
, SPR_601_VRTCU
, "RTCU",
1134 &spr_read_601_rtcu
, SPR_NOACCESS
,
1135 &spr_read_601_rtcu
, SPR_NOACCESS
,
1137 spr_register(env
, SPR_601_RTCL
, "RTCL",
1138 SPR_NOACCESS
, SPR_NOACCESS
,
1139 SPR_NOACCESS
, &spr_write_601_rtcl
,
1141 spr_register(env
, SPR_601_VRTCL
, "RTCL",
1142 &spr_read_601_rtcl
, SPR_NOACCESS
,
1143 &spr_read_601_rtcl
, SPR_NOACCESS
,
1147 spr_register(env
, SPR_601_UDECR
, "UDECR",
1148 &spr_read_decr
, SPR_NOACCESS
,
1149 &spr_read_decr
, SPR_NOACCESS
,
1152 /* External access control */
1153 /* XXX : not implemented */
1154 spr_register(env
, SPR_EAR
, "EAR",
1155 SPR_NOACCESS
, SPR_NOACCESS
,
1156 &spr_read_generic
, &spr_write_generic
,
1158 /* Memory management */
1159 #if !defined(CONFIG_USER_ONLY)
1160 spr_register(env
, SPR_IBAT0U
, "IBAT0U",
1161 SPR_NOACCESS
, SPR_NOACCESS
,
1162 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1164 spr_register(env
, SPR_IBAT0L
, "IBAT0L",
1165 SPR_NOACCESS
, SPR_NOACCESS
,
1166 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1168 spr_register(env
, SPR_IBAT1U
, "IBAT1U",
1169 SPR_NOACCESS
, SPR_NOACCESS
,
1170 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1172 spr_register(env
, SPR_IBAT1L
, "IBAT1L",
1173 SPR_NOACCESS
, SPR_NOACCESS
,
1174 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1176 spr_register(env
, SPR_IBAT2U
, "IBAT2U",
1177 SPR_NOACCESS
, SPR_NOACCESS
,
1178 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1180 spr_register(env
, SPR_IBAT2L
, "IBAT2L",
1181 SPR_NOACCESS
, SPR_NOACCESS
,
1182 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1184 spr_register(env
, SPR_IBAT3U
, "IBAT3U",
1185 SPR_NOACCESS
, SPR_NOACCESS
,
1186 &spr_read_601_ubat
, &spr_write_601_ubatu
,
1188 spr_register(env
, SPR_IBAT3L
, "IBAT3L",
1189 SPR_NOACCESS
, SPR_NOACCESS
,
1190 &spr_read_601_ubat
, &spr_write_601_ubatl
,
1196 static void gen_spr_74xx (CPUPPCState
*env
)
1198 /* Processor identification */
1199 spr_register(env
, SPR_PIR
, "PIR",
1200 SPR_NOACCESS
, SPR_NOACCESS
,
1201 &spr_read_generic
, &spr_write_pir
,
1203 /* XXX : not implemented */
1204 spr_register(env
, SPR_MMCR2
, "MMCR2",
1205 SPR_NOACCESS
, SPR_NOACCESS
,
1206 &spr_read_generic
, &spr_write_generic
,
1208 /* XXX : not implemented */
1209 spr_register(env
, SPR_UMMCR2
, "UMMCR2",
1210 &spr_read_ureg
, SPR_NOACCESS
,
1211 &spr_read_ureg
, SPR_NOACCESS
,
1213 /* XXX: not implemented */
1214 spr_register(env
, SPR_BAMR
, "BAMR",
1215 SPR_NOACCESS
, SPR_NOACCESS
,
1216 &spr_read_generic
, &spr_write_generic
,
1218 /* XXX : not implemented */
1219 spr_register(env
, SPR_MSSCR0
, "MSSCR0",
1220 SPR_NOACCESS
, SPR_NOACCESS
,
1221 &spr_read_generic
, &spr_write_generic
,
1223 /* Hardware implementation registers */
1224 /* XXX : not implemented */
1225 spr_register(env
, SPR_HID0
, "HID0",
1226 SPR_NOACCESS
, SPR_NOACCESS
,
1227 &spr_read_generic
, &spr_write_generic
,
1229 /* XXX : not implemented */
1230 spr_register(env
, SPR_HID1
, "HID1",
1231 SPR_NOACCESS
, SPR_NOACCESS
,
1232 &spr_read_generic
, &spr_write_generic
,
1235 spr_register(env
, SPR_VRSAVE
, "VRSAVE",
1236 &spr_read_generic
, &spr_write_generic
,
1237 &spr_read_generic
, &spr_write_generic
,
1239 /* XXX : not implemented */
1240 spr_register(env
, SPR_L2CR
, "L2CR",
1241 SPR_NOACCESS
, SPR_NOACCESS
,
1242 &spr_read_generic
, &spr_write_generic
,
1244 /* Not strictly an SPR */
1245 vscr_init(env
, 0x00010000);
1248 static void gen_l3_ctrl (CPUPPCState
*env
)
1251 /* XXX : not implemented */
1252 spr_register(env
, SPR_L3CR
, "L3CR",
1253 SPR_NOACCESS
, SPR_NOACCESS
,
1254 &spr_read_generic
, &spr_write_generic
,
1257 /* XXX : not implemented */
1258 spr_register(env
, SPR_L3ITCR0
, "L3ITCR0",
1259 SPR_NOACCESS
, SPR_NOACCESS
,
1260 &spr_read_generic
, &spr_write_generic
,
1263 /* XXX : not implemented */
1264 spr_register(env
, SPR_L3PM
, "L3PM",
1265 SPR_NOACCESS
, SPR_NOACCESS
,
1266 &spr_read_generic
, &spr_write_generic
,
1270 static void gen_74xx_soft_tlb (CPUPPCState
*env
, int nb_tlbs
, int nb_ways
)
1272 #if !defined(CONFIG_USER_ONLY)
1273 env
->nb_tlb
= nb_tlbs
;
1274 env
->nb_ways
= nb_ways
;
1276 /* XXX : not implemented */
1277 spr_register(env
, SPR_PTEHI
, "PTEHI",
1278 SPR_NOACCESS
, SPR_NOACCESS
,
1279 &spr_read_generic
, &spr_write_generic
,
1281 /* XXX : not implemented */
1282 spr_register(env
, SPR_PTELO
, "PTELO",
1283 SPR_NOACCESS
, SPR_NOACCESS
,
1284 &spr_read_generic
, &spr_write_generic
,
1286 /* XXX : not implemented */
1287 spr_register(env
, SPR_TLBMISS
, "TLBMISS",
1288 SPR_NOACCESS
, SPR_NOACCESS
,
1289 &spr_read_generic
, &spr_write_generic
,
1294 static void gen_spr_usprgh (CPUPPCState
*env
)
1296 spr_register(env
, SPR_USPRG4
, "USPRG4",
1297 &spr_read_ureg
, SPR_NOACCESS
,
1298 &spr_read_ureg
, SPR_NOACCESS
,
1300 spr_register(env
, SPR_USPRG5
, "USPRG5",
1301 &spr_read_ureg
, SPR_NOACCESS
,
1302 &spr_read_ureg
, SPR_NOACCESS
,
1304 spr_register(env
, SPR_USPRG6
, "USPRG6",
1305 &spr_read_ureg
, SPR_NOACCESS
,
1306 &spr_read_ureg
, SPR_NOACCESS
,
1308 spr_register(env
, SPR_USPRG7
, "USPRG7",
1309 &spr_read_ureg
, SPR_NOACCESS
,
1310 &spr_read_ureg
, SPR_NOACCESS
,
1314 /* PowerPC BookE SPR */
1315 static void gen_spr_BookE (CPUPPCState
*env
, uint64_t ivor_mask
)
1317 const char *ivor_names
[64] = {
1318 "IVOR0", "IVOR1", "IVOR2", "IVOR3",
1319 "IVOR4", "IVOR5", "IVOR6", "IVOR7",
1320 "IVOR8", "IVOR9", "IVOR10", "IVOR11",
1321 "IVOR12", "IVOR13", "IVOR14", "IVOR15",
1322 "IVOR16", "IVOR17", "IVOR18", "IVOR19",
1323 "IVOR20", "IVOR21", "IVOR22", "IVOR23",
1324 "IVOR24", "IVOR25", "IVOR26", "IVOR27",
1325 "IVOR28", "IVOR29", "IVOR30", "IVOR31",
1326 "IVOR32", "IVOR33", "IVOR34", "IVOR35",
1327 "IVOR36", "IVOR37", "IVOR38", "IVOR39",
1328 "IVOR40", "IVOR41", "IVOR42", "IVOR43",
1329 "IVOR44", "IVOR45", "IVOR46", "IVOR47",
1330 "IVOR48", "IVOR49", "IVOR50", "IVOR51",
1331 "IVOR52", "IVOR53", "IVOR54", "IVOR55",
1332 "IVOR56", "IVOR57", "IVOR58", "IVOR59",
1333 "IVOR60", "IVOR61", "IVOR62", "IVOR63",
1335 #define SPR_BOOKE_IVORxx (-1)
1336 int ivor_sprn
[64] = {
1337 SPR_BOOKE_IVOR0
, SPR_BOOKE_IVOR1
, SPR_BOOKE_IVOR2
, SPR_BOOKE_IVOR3
,
1338 SPR_BOOKE_IVOR4
, SPR_BOOKE_IVOR5
, SPR_BOOKE_IVOR6
, SPR_BOOKE_IVOR7
,
1339 SPR_BOOKE_IVOR8
, SPR_BOOKE_IVOR9
, SPR_BOOKE_IVOR10
, SPR_BOOKE_IVOR11
,
1340 SPR_BOOKE_IVOR12
, SPR_BOOKE_IVOR13
, SPR_BOOKE_IVOR14
, SPR_BOOKE_IVOR15
,
1341 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1342 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1343 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1344 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1345 SPR_BOOKE_IVOR32
, SPR_BOOKE_IVOR33
, SPR_BOOKE_IVOR34
, SPR_BOOKE_IVOR35
,
1346 SPR_BOOKE_IVOR36
, SPR_BOOKE_IVOR37
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1347 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1348 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1349 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1350 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1351 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1352 SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
, SPR_BOOKE_IVORxx
,
1356 /* Interrupt processing */
1357 spr_register(env
, SPR_BOOKE_CSRR0
, "CSRR0",
1358 SPR_NOACCESS
, SPR_NOACCESS
,
1359 &spr_read_generic
, &spr_write_generic
,
1361 spr_register(env
, SPR_BOOKE_CSRR1
, "CSRR1",
1362 SPR_NOACCESS
, SPR_NOACCESS
,
1363 &spr_read_generic
, &spr_write_generic
,
1366 /* XXX : not implemented */
1367 spr_register(env
, SPR_BOOKE_IAC1
, "IAC1",
1368 SPR_NOACCESS
, SPR_NOACCESS
,
1369 &spr_read_generic
, &spr_write_generic
,
1371 /* XXX : not implemented */
1372 spr_register(env
, SPR_BOOKE_IAC2
, "IAC2",
1373 SPR_NOACCESS
, SPR_NOACCESS
,
1374 &spr_read_generic
, &spr_write_generic
,
1376 /* XXX : not implemented */
1377 spr_register(env
, SPR_BOOKE_DAC1
, "DAC1",
1378 SPR_NOACCESS
, SPR_NOACCESS
,
1379 &spr_read_generic
, &spr_write_generic
,
1381 /* XXX : not implemented */
1382 spr_register(env
, SPR_BOOKE_DAC2
, "DAC2",
1383 SPR_NOACCESS
, SPR_NOACCESS
,
1384 &spr_read_generic
, &spr_write_generic
,
1386 /* XXX : not implemented */
1387 spr_register(env
, SPR_BOOKE_DBCR0
, "DBCR0",
1388 SPR_NOACCESS
, SPR_NOACCESS
,
1389 &spr_read_generic
, &spr_write_generic
,
1391 /* XXX : not implemented */
1392 spr_register(env
, SPR_BOOKE_DBCR1
, "DBCR1",
1393 SPR_NOACCESS
, SPR_NOACCESS
,
1394 &spr_read_generic
, &spr_write_generic
,
1396 /* XXX : not implemented */
1397 spr_register(env
, SPR_BOOKE_DBCR2
, "DBCR2",
1398 SPR_NOACCESS
, SPR_NOACCESS
,
1399 &spr_read_generic
, &spr_write_generic
,
1401 /* XXX : not implemented */
1402 spr_register(env
, SPR_BOOKE_DBSR
, "DBSR",
1403 SPR_NOACCESS
, SPR_NOACCESS
,
1404 &spr_read_generic
, &spr_write_clear
,
1406 spr_register(env
, SPR_BOOKE_DEAR
, "DEAR",
1407 SPR_NOACCESS
, SPR_NOACCESS
,
1408 &spr_read_generic
, &spr_write_generic
,
1410 spr_register(env
, SPR_BOOKE_ESR
, "ESR",
1411 SPR_NOACCESS
, SPR_NOACCESS
,
1412 &spr_read_generic
, &spr_write_generic
,
1414 spr_register(env
, SPR_BOOKE_IVPR
, "IVPR",
1415 SPR_NOACCESS
, SPR_NOACCESS
,
1416 &spr_read_generic
, &spr_write_excp_prefix
,
1418 /* Exception vectors */
1419 for (i
= 0; i
< 64; i
++) {
1420 if (ivor_mask
& (1ULL << i
)) {
1421 if (ivor_sprn
[i
] == SPR_BOOKE_IVORxx
) {
1422 fprintf(stderr
, "ERROR: IVOR %d SPR is not defined\n", i
);
1425 spr_register(env
, ivor_sprn
[i
], ivor_names
[i
],
1426 SPR_NOACCESS
, SPR_NOACCESS
,
1427 &spr_read_generic
, &spr_write_excp_vector
,
1431 spr_register(env
, SPR_BOOKE_PID
, "PID",
1432 SPR_NOACCESS
, SPR_NOACCESS
,
1433 &spr_read_generic
, &spr_write_generic
,
1435 spr_register(env
, SPR_BOOKE_TCR
, "TCR",
1436 SPR_NOACCESS
, SPR_NOACCESS
,
1437 &spr_read_generic
, &spr_write_booke_tcr
,
1439 spr_register(env
, SPR_BOOKE_TSR
, "TSR",
1440 SPR_NOACCESS
, SPR_NOACCESS
,
1441 &spr_read_generic
, &spr_write_booke_tsr
,
1444 spr_register(env
, SPR_DECR
, "DECR",
1445 SPR_NOACCESS
, SPR_NOACCESS
,
1446 &spr_read_decr
, &spr_write_decr
,
1448 spr_register(env
, SPR_BOOKE_DECAR
, "DECAR",
1449 SPR_NOACCESS
, SPR_NOACCESS
,
1450 SPR_NOACCESS
, &spr_write_generic
,
1453 spr_register(env
, SPR_USPRG0
, "USPRG0",
1454 &spr_read_generic
, &spr_write_generic
,
1455 &spr_read_generic
, &spr_write_generic
,
1457 spr_register(env
, SPR_SPRG4
, "SPRG4",
1458 SPR_NOACCESS
, SPR_NOACCESS
,
1459 &spr_read_generic
, &spr_write_generic
,
1461 spr_register(env
, SPR_SPRG5
, "SPRG5",
1462 SPR_NOACCESS
, SPR_NOACCESS
,
1463 &spr_read_generic
, &spr_write_generic
,
1465 spr_register(env
, SPR_SPRG6
, "SPRG6",
1466 SPR_NOACCESS
, SPR_NOACCESS
,
1467 &spr_read_generic
, &spr_write_generic
,
1469 spr_register(env
, SPR_SPRG7
, "SPRG7",
1470 SPR_NOACCESS
, SPR_NOACCESS
,
1471 &spr_read_generic
, &spr_write_generic
,
1475 /* FSL storage control registers */
1476 static void gen_spr_BookE_FSL (CPUPPCState
*env
, uint32_t mas_mask
)
1478 #if !defined(CONFIG_USER_ONLY)
1479 const char *mas_names
[8] = {
1480 "MAS0", "MAS1", "MAS2", "MAS3", "MAS4", "MAS5", "MAS6", "MAS7",
1483 SPR_BOOKE_MAS0
, SPR_BOOKE_MAS1
, SPR_BOOKE_MAS2
, SPR_BOOKE_MAS3
,
1484 SPR_BOOKE_MAS4
, SPR_BOOKE_MAS5
, SPR_BOOKE_MAS6
, SPR_BOOKE_MAS7
,
1488 /* TLB assist registers */
1489 /* XXX : not implemented */
1490 for (i
= 0; i
< 8; i
++) {
1491 if (mas_mask
& (1 << i
)) {
1492 spr_register(env
, mas_sprn
[i
], mas_names
[i
],
1493 SPR_NOACCESS
, SPR_NOACCESS
,
1494 &spr_read_generic
, &spr_write_generic
,
1498 if (env
->nb_pids
> 1) {
1499 /* XXX : not implemented */
1500 spr_register(env
, SPR_BOOKE_PID1
, "PID1",
1501 SPR_NOACCESS
, SPR_NOACCESS
,
1502 &spr_read_generic
, &spr_write_generic
,
1505 if (env
->nb_pids
> 2) {
1506 /* XXX : not implemented */
1507 spr_register(env
, SPR_BOOKE_PID2
, "PID2",
1508 SPR_NOACCESS
, SPR_NOACCESS
,
1509 &spr_read_generic
, &spr_write_generic
,
1512 /* XXX : not implemented */
1513 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
1514 SPR_NOACCESS
, SPR_NOACCESS
,
1515 &spr_read_generic
, SPR_NOACCESS
,
1516 0x00000000); /* TOFIX */
1517 /* XXX : not implemented */
1518 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
1519 SPR_NOACCESS
, SPR_NOACCESS
,
1520 &spr_read_generic
, &spr_write_generic
,
1521 0x00000000); /* TOFIX */
1522 switch (env
->nb_ways
) {
1524 /* XXX : not implemented */
1525 spr_register(env
, SPR_BOOKE_TLB3CFG
, "TLB3CFG",
1526 SPR_NOACCESS
, SPR_NOACCESS
,
1527 &spr_read_generic
, SPR_NOACCESS
,
1528 0x00000000); /* TOFIX */
1531 /* XXX : not implemented */
1532 spr_register(env
, SPR_BOOKE_TLB2CFG
, "TLB2CFG",
1533 SPR_NOACCESS
, SPR_NOACCESS
,
1534 &spr_read_generic
, SPR_NOACCESS
,
1535 0x00000000); /* TOFIX */
1538 /* XXX : not implemented */
1539 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
1540 SPR_NOACCESS
, SPR_NOACCESS
,
1541 &spr_read_generic
, SPR_NOACCESS
,
1542 0x00000000); /* TOFIX */
1545 /* XXX : not implemented */
1546 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
1547 SPR_NOACCESS
, SPR_NOACCESS
,
1548 &spr_read_generic
, SPR_NOACCESS
,
1549 0x00000000); /* TOFIX */
1558 /* SPR specific to PowerPC 440 implementation */
1559 static void gen_spr_440 (CPUPPCState
*env
)
1562 /* XXX : not implemented */
1563 spr_register(env
, SPR_440_DNV0
, "DNV0",
1564 SPR_NOACCESS
, SPR_NOACCESS
,
1565 &spr_read_generic
, &spr_write_generic
,
1567 /* XXX : not implemented */
1568 spr_register(env
, SPR_440_DNV1
, "DNV1",
1569 SPR_NOACCESS
, SPR_NOACCESS
,
1570 &spr_read_generic
, &spr_write_generic
,
1572 /* XXX : not implemented */
1573 spr_register(env
, SPR_440_DNV2
, "DNV2",
1574 SPR_NOACCESS
, SPR_NOACCESS
,
1575 &spr_read_generic
, &spr_write_generic
,
1577 /* XXX : not implemented */
1578 spr_register(env
, SPR_440_DNV3
, "DNV3",
1579 SPR_NOACCESS
, SPR_NOACCESS
,
1580 &spr_read_generic
, &spr_write_generic
,
1582 /* XXX : not implemented */
1583 spr_register(env
, SPR_440_DTV0
, "DTV0",
1584 SPR_NOACCESS
, SPR_NOACCESS
,
1585 &spr_read_generic
, &spr_write_generic
,
1587 /* XXX : not implemented */
1588 spr_register(env
, SPR_440_DTV1
, "DTV1",
1589 SPR_NOACCESS
, SPR_NOACCESS
,
1590 &spr_read_generic
, &spr_write_generic
,
1592 /* XXX : not implemented */
1593 spr_register(env
, SPR_440_DTV2
, "DTV2",
1594 SPR_NOACCESS
, SPR_NOACCESS
,
1595 &spr_read_generic
, &spr_write_generic
,
1597 /* XXX : not implemented */
1598 spr_register(env
, SPR_440_DTV3
, "DTV3",
1599 SPR_NOACCESS
, SPR_NOACCESS
,
1600 &spr_read_generic
, &spr_write_generic
,
1602 /* XXX : not implemented */
1603 spr_register(env
, SPR_440_DVLIM
, "DVLIM",
1604 SPR_NOACCESS
, SPR_NOACCESS
,
1605 &spr_read_generic
, &spr_write_generic
,
1607 /* XXX : not implemented */
1608 spr_register(env
, SPR_440_INV0
, "INV0",
1609 SPR_NOACCESS
, SPR_NOACCESS
,
1610 &spr_read_generic
, &spr_write_generic
,
1612 /* XXX : not implemented */
1613 spr_register(env
, SPR_440_INV1
, "INV1",
1614 SPR_NOACCESS
, SPR_NOACCESS
,
1615 &spr_read_generic
, &spr_write_generic
,
1617 /* XXX : not implemented */
1618 spr_register(env
, SPR_440_INV2
, "INV2",
1619 SPR_NOACCESS
, SPR_NOACCESS
,
1620 &spr_read_generic
, &spr_write_generic
,
1622 /* XXX : not implemented */
1623 spr_register(env
, SPR_440_INV3
, "INV3",
1624 SPR_NOACCESS
, SPR_NOACCESS
,
1625 &spr_read_generic
, &spr_write_generic
,
1627 /* XXX : not implemented */
1628 spr_register(env
, SPR_440_ITV0
, "ITV0",
1629 SPR_NOACCESS
, SPR_NOACCESS
,
1630 &spr_read_generic
, &spr_write_generic
,
1632 /* XXX : not implemented */
1633 spr_register(env
, SPR_440_ITV1
, "ITV1",
1634 SPR_NOACCESS
, SPR_NOACCESS
,
1635 &spr_read_generic
, &spr_write_generic
,
1637 /* XXX : not implemented */
1638 spr_register(env
, SPR_440_ITV2
, "ITV2",
1639 SPR_NOACCESS
, SPR_NOACCESS
,
1640 &spr_read_generic
, &spr_write_generic
,
1642 /* XXX : not implemented */
1643 spr_register(env
, SPR_440_ITV3
, "ITV3",
1644 SPR_NOACCESS
, SPR_NOACCESS
,
1645 &spr_read_generic
, &spr_write_generic
,
1647 /* XXX : not implemented */
1648 spr_register(env
, SPR_440_IVLIM
, "IVLIM",
1649 SPR_NOACCESS
, SPR_NOACCESS
,
1650 &spr_read_generic
, &spr_write_generic
,
1653 /* XXX : not implemented */
1654 spr_register(env
, SPR_BOOKE_DCDBTRH
, "DCDBTRH",
1655 SPR_NOACCESS
, SPR_NOACCESS
,
1656 &spr_read_generic
, SPR_NOACCESS
,
1658 /* XXX : not implemented */
1659 spr_register(env
, SPR_BOOKE_DCDBTRL
, "DCDBTRL",
1660 SPR_NOACCESS
, SPR_NOACCESS
,
1661 &spr_read_generic
, SPR_NOACCESS
,
1663 /* XXX : not implemented */
1664 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1665 SPR_NOACCESS
, SPR_NOACCESS
,
1666 &spr_read_generic
, SPR_NOACCESS
,
1668 /* XXX : not implemented */
1669 spr_register(env
, SPR_BOOKE_ICDBTRH
, "ICDBTRH",
1670 SPR_NOACCESS
, SPR_NOACCESS
,
1671 &spr_read_generic
, SPR_NOACCESS
,
1673 /* XXX : not implemented */
1674 spr_register(env
, SPR_BOOKE_ICDBTRL
, "ICDBTRL",
1675 SPR_NOACCESS
, SPR_NOACCESS
,
1676 &spr_read_generic
, SPR_NOACCESS
,
1678 /* XXX : not implemented */
1679 spr_register(env
, SPR_440_DBDR
, "DBDR",
1680 SPR_NOACCESS
, SPR_NOACCESS
,
1681 &spr_read_generic
, &spr_write_generic
,
1683 /* Processor control */
1684 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1685 SPR_NOACCESS
, SPR_NOACCESS
,
1686 &spr_read_generic
, &spr_write_generic
,
1688 spr_register(env
, SPR_440_RSTCFG
, "RSTCFG",
1689 SPR_NOACCESS
, SPR_NOACCESS
,
1690 &spr_read_generic
, SPR_NOACCESS
,
1692 /* Storage control */
1693 spr_register(env
, SPR_440_MMUCR
, "MMUCR",
1694 SPR_NOACCESS
, SPR_NOACCESS
,
1695 &spr_read_generic
, &spr_write_generic
,
1699 /* SPR shared between PowerPC 40x implementations */
1700 static void gen_spr_40x (CPUPPCState
*env
)
1703 /* not emulated, as Qemu do not emulate caches */
1704 spr_register(env
, SPR_40x_DCCR
, "DCCR",
1705 SPR_NOACCESS
, SPR_NOACCESS
,
1706 &spr_read_generic
, &spr_write_generic
,
1708 /* not emulated, as Qemu do not emulate caches */
1709 spr_register(env
, SPR_40x_ICCR
, "ICCR",
1710 SPR_NOACCESS
, SPR_NOACCESS
,
1711 &spr_read_generic
, &spr_write_generic
,
1713 /* not emulated, as Qemu do not emulate caches */
1714 spr_register(env
, SPR_BOOKE_ICDBDR
, "ICDBDR",
1715 SPR_NOACCESS
, SPR_NOACCESS
,
1716 &spr_read_generic
, SPR_NOACCESS
,
1719 spr_register(env
, SPR_40x_DEAR
, "DEAR",
1720 SPR_NOACCESS
, SPR_NOACCESS
,
1721 &spr_read_generic
, &spr_write_generic
,
1723 spr_register(env
, SPR_40x_ESR
, "ESR",
1724 SPR_NOACCESS
, SPR_NOACCESS
,
1725 &spr_read_generic
, &spr_write_generic
,
1727 spr_register(env
, SPR_40x_EVPR
, "EVPR",
1728 SPR_NOACCESS
, SPR_NOACCESS
,
1729 &spr_read_generic
, &spr_write_excp_prefix
,
1731 spr_register(env
, SPR_40x_SRR2
, "SRR2",
1732 &spr_read_generic
, &spr_write_generic
,
1733 &spr_read_generic
, &spr_write_generic
,
1735 spr_register(env
, SPR_40x_SRR3
, "SRR3",
1736 &spr_read_generic
, &spr_write_generic
,
1737 &spr_read_generic
, &spr_write_generic
,
1740 spr_register(env
, SPR_40x_PIT
, "PIT",
1741 SPR_NOACCESS
, SPR_NOACCESS
,
1742 &spr_read_40x_pit
, &spr_write_40x_pit
,
1744 spr_register(env
, SPR_40x_TCR
, "TCR",
1745 SPR_NOACCESS
, SPR_NOACCESS
,
1746 &spr_read_generic
, &spr_write_booke_tcr
,
1748 spr_register(env
, SPR_40x_TSR
, "TSR",
1749 SPR_NOACCESS
, SPR_NOACCESS
,
1750 &spr_read_generic
, &spr_write_booke_tsr
,
1754 /* SPR specific to PowerPC 405 implementation */
1755 static void gen_spr_405 (CPUPPCState
*env
)
1758 spr_register(env
, SPR_40x_PID
, "PID",
1759 SPR_NOACCESS
, SPR_NOACCESS
,
1760 &spr_read_generic
, &spr_write_generic
,
1762 spr_register(env
, SPR_4xx_CCR0
, "CCR0",
1763 SPR_NOACCESS
, SPR_NOACCESS
,
1764 &spr_read_generic
, &spr_write_generic
,
1766 /* Debug interface */
1767 /* XXX : not implemented */
1768 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
1769 SPR_NOACCESS
, SPR_NOACCESS
,
1770 &spr_read_generic
, &spr_write_40x_dbcr0
,
1772 /* XXX : not implemented */
1773 spr_register(env
, SPR_405_DBCR1
, "DBCR1",
1774 SPR_NOACCESS
, SPR_NOACCESS
,
1775 &spr_read_generic
, &spr_write_generic
,
1777 /* XXX : not implemented */
1778 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1779 SPR_NOACCESS
, SPR_NOACCESS
,
1780 &spr_read_generic
, &spr_write_clear
,
1781 /* Last reset was system reset */
1783 /* XXX : not implemented */
1784 spr_register(env
, SPR_40x_DAC1
, "DAC1",
1785 SPR_NOACCESS
, SPR_NOACCESS
,
1786 &spr_read_generic
, &spr_write_generic
,
1788 spr_register(env
, SPR_40x_DAC2
, "DAC2",
1789 SPR_NOACCESS
, SPR_NOACCESS
,
1790 &spr_read_generic
, &spr_write_generic
,
1792 /* XXX : not implemented */
1793 spr_register(env
, SPR_405_DVC1
, "DVC1",
1794 SPR_NOACCESS
, SPR_NOACCESS
,
1795 &spr_read_generic
, &spr_write_generic
,
1797 /* XXX : not implemented */
1798 spr_register(env
, SPR_405_DVC2
, "DVC2",
1799 SPR_NOACCESS
, SPR_NOACCESS
,
1800 &spr_read_generic
, &spr_write_generic
,
1802 /* XXX : not implemented */
1803 spr_register(env
, SPR_40x_IAC1
, "IAC1",
1804 SPR_NOACCESS
, SPR_NOACCESS
,
1805 &spr_read_generic
, &spr_write_generic
,
1807 spr_register(env
, SPR_40x_IAC2
, "IAC2",
1808 SPR_NOACCESS
, SPR_NOACCESS
,
1809 &spr_read_generic
, &spr_write_generic
,
1811 /* XXX : not implemented */
1812 spr_register(env
, SPR_405_IAC3
, "IAC3",
1813 SPR_NOACCESS
, SPR_NOACCESS
,
1814 &spr_read_generic
, &spr_write_generic
,
1816 /* XXX : not implemented */
1817 spr_register(env
, SPR_405_IAC4
, "IAC4",
1818 SPR_NOACCESS
, SPR_NOACCESS
,
1819 &spr_read_generic
, &spr_write_generic
,
1821 /* Storage control */
1822 /* XXX: TODO: not implemented */
1823 spr_register(env
, SPR_405_SLER
, "SLER",
1824 SPR_NOACCESS
, SPR_NOACCESS
,
1825 &spr_read_generic
, &spr_write_40x_sler
,
1827 spr_register(env
, SPR_40x_ZPR
, "ZPR",
1828 SPR_NOACCESS
, SPR_NOACCESS
,
1829 &spr_read_generic
, &spr_write_generic
,
1831 /* XXX : not implemented */
1832 spr_register(env
, SPR_405_SU0R
, "SU0R",
1833 SPR_NOACCESS
, SPR_NOACCESS
,
1834 &spr_read_generic
, &spr_write_generic
,
1837 spr_register(env
, SPR_USPRG0
, "USPRG0",
1838 &spr_read_ureg
, SPR_NOACCESS
,
1839 &spr_read_ureg
, SPR_NOACCESS
,
1841 spr_register(env
, SPR_SPRG4
, "SPRG4",
1842 SPR_NOACCESS
, SPR_NOACCESS
,
1843 &spr_read_generic
, &spr_write_generic
,
1845 spr_register(env
, SPR_SPRG5
, "SPRG5",
1846 SPR_NOACCESS
, SPR_NOACCESS
,
1847 spr_read_generic
, &spr_write_generic
,
1849 spr_register(env
, SPR_SPRG6
, "SPRG6",
1850 SPR_NOACCESS
, SPR_NOACCESS
,
1851 spr_read_generic
, &spr_write_generic
,
1853 spr_register(env
, SPR_SPRG7
, "SPRG7",
1854 SPR_NOACCESS
, SPR_NOACCESS
,
1855 spr_read_generic
, &spr_write_generic
,
1857 gen_spr_usprgh(env
);
1860 /* SPR shared between PowerPC 401 & 403 implementations */
1861 static void gen_spr_401_403 (CPUPPCState
*env
)
1864 spr_register(env
, SPR_403_VTBL
, "TBL",
1865 &spr_read_tbl
, SPR_NOACCESS
,
1866 &spr_read_tbl
, SPR_NOACCESS
,
1868 spr_register(env
, SPR_403_TBL
, "TBL",
1869 SPR_NOACCESS
, SPR_NOACCESS
,
1870 SPR_NOACCESS
, &spr_write_tbl
,
1872 spr_register(env
, SPR_403_VTBU
, "TBU",
1873 &spr_read_tbu
, SPR_NOACCESS
,
1874 &spr_read_tbu
, SPR_NOACCESS
,
1876 spr_register(env
, SPR_403_TBU
, "TBU",
1877 SPR_NOACCESS
, SPR_NOACCESS
,
1878 SPR_NOACCESS
, &spr_write_tbu
,
1881 /* not emulated, as Qemu do not emulate caches */
1882 spr_register(env
, SPR_403_CDBCR
, "CDBCR",
1883 SPR_NOACCESS
, SPR_NOACCESS
,
1884 &spr_read_generic
, &spr_write_generic
,
1888 /* SPR specific to PowerPC 401 implementation */
1889 static void gen_spr_401 (CPUPPCState
*env
)
1891 /* Debug interface */
1892 /* XXX : not implemented */
1893 spr_register(env
, SPR_40x_DBCR0
, "DBCR",
1894 SPR_NOACCESS
, SPR_NOACCESS
,
1895 &spr_read_generic
, &spr_write_40x_dbcr0
,
1897 /* XXX : not implemented */
1898 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1899 SPR_NOACCESS
, SPR_NOACCESS
,
1900 &spr_read_generic
, &spr_write_clear
,
1901 /* Last reset was system reset */
1903 /* XXX : not implemented */
1904 spr_register(env
, SPR_40x_DAC1
, "DAC",
1905 SPR_NOACCESS
, SPR_NOACCESS
,
1906 &spr_read_generic
, &spr_write_generic
,
1908 /* XXX : not implemented */
1909 spr_register(env
, SPR_40x_IAC1
, "IAC",
1910 SPR_NOACCESS
, SPR_NOACCESS
,
1911 &spr_read_generic
, &spr_write_generic
,
1913 /* Storage control */
1914 /* XXX: TODO: not implemented */
1915 spr_register(env
, SPR_405_SLER
, "SLER",
1916 SPR_NOACCESS
, SPR_NOACCESS
,
1917 &spr_read_generic
, &spr_write_40x_sler
,
1919 /* not emulated, as Qemu never does speculative access */
1920 spr_register(env
, SPR_40x_SGR
, "SGR",
1921 SPR_NOACCESS
, SPR_NOACCESS
,
1922 &spr_read_generic
, &spr_write_generic
,
1924 /* not emulated, as Qemu do not emulate caches */
1925 spr_register(env
, SPR_40x_DCWR
, "DCWR",
1926 SPR_NOACCESS
, SPR_NOACCESS
,
1927 &spr_read_generic
, &spr_write_generic
,
1931 static void gen_spr_401x2 (CPUPPCState
*env
)
1934 spr_register(env
, SPR_40x_PID
, "PID",
1935 SPR_NOACCESS
, SPR_NOACCESS
,
1936 &spr_read_generic
, &spr_write_generic
,
1938 spr_register(env
, SPR_40x_ZPR
, "ZPR",
1939 SPR_NOACCESS
, SPR_NOACCESS
,
1940 &spr_read_generic
, &spr_write_generic
,
1944 /* SPR specific to PowerPC 403 implementation */
1945 static void gen_spr_403 (CPUPPCState
*env
)
1947 /* Debug interface */
1948 /* XXX : not implemented */
1949 spr_register(env
, SPR_40x_DBCR0
, "DBCR0",
1950 SPR_NOACCESS
, SPR_NOACCESS
,
1951 &spr_read_generic
, &spr_write_40x_dbcr0
,
1953 /* XXX : not implemented */
1954 spr_register(env
, SPR_40x_DBSR
, "DBSR",
1955 SPR_NOACCESS
, SPR_NOACCESS
,
1956 &spr_read_generic
, &spr_write_clear
,
1957 /* Last reset was system reset */
1959 /* XXX : not implemented */
1960 spr_register(env
, SPR_40x_DAC1
, "DAC1",
1961 SPR_NOACCESS
, SPR_NOACCESS
,
1962 &spr_read_generic
, &spr_write_generic
,
1964 /* XXX : not implemented */
1965 spr_register(env
, SPR_40x_DAC2
, "DAC2",
1966 SPR_NOACCESS
, SPR_NOACCESS
,
1967 &spr_read_generic
, &spr_write_generic
,
1969 /* XXX : not implemented */
1970 spr_register(env
, SPR_40x_IAC1
, "IAC1",
1971 SPR_NOACCESS
, SPR_NOACCESS
,
1972 &spr_read_generic
, &spr_write_generic
,
1974 /* XXX : not implemented */
1975 spr_register(env
, SPR_40x_IAC2
, "IAC2",
1976 SPR_NOACCESS
, SPR_NOACCESS
,
1977 &spr_read_generic
, &spr_write_generic
,
1981 static void gen_spr_403_real (CPUPPCState
*env
)
1983 spr_register(env
, SPR_403_PBL1
, "PBL1",
1984 SPR_NOACCESS
, SPR_NOACCESS
,
1985 &spr_read_403_pbr
, &spr_write_403_pbr
,
1987 spr_register(env
, SPR_403_PBU1
, "PBU1",
1988 SPR_NOACCESS
, SPR_NOACCESS
,
1989 &spr_read_403_pbr
, &spr_write_403_pbr
,
1991 spr_register(env
, SPR_403_PBL2
, "PBL2",
1992 SPR_NOACCESS
, SPR_NOACCESS
,
1993 &spr_read_403_pbr
, &spr_write_403_pbr
,
1995 spr_register(env
, SPR_403_PBU2
, "PBU2",
1996 SPR_NOACCESS
, SPR_NOACCESS
,
1997 &spr_read_403_pbr
, &spr_write_403_pbr
,
2001 static void gen_spr_403_mmu (CPUPPCState
*env
)
2004 spr_register(env
, SPR_40x_PID
, "PID",
2005 SPR_NOACCESS
, SPR_NOACCESS
,
2006 &spr_read_generic
, &spr_write_generic
,
2008 spr_register(env
, SPR_40x_ZPR
, "ZPR",
2009 SPR_NOACCESS
, SPR_NOACCESS
,
2010 &spr_read_generic
, &spr_write_generic
,
2014 /* SPR specific to PowerPC compression coprocessor extension */
2015 static void gen_spr_compress (CPUPPCState
*env
)
2017 /* XXX : not implemented */
2018 spr_register(env
, SPR_401_SKR
, "SKR",
2019 SPR_NOACCESS
, SPR_NOACCESS
,
2020 &spr_read_generic
, &spr_write_generic
,
2024 #if defined (TARGET_PPC64)
2025 /* SPR specific to PowerPC 620 */
2026 static void gen_spr_620 (CPUPPCState
*env
)
2028 /* Processor identification */
2029 spr_register(env
, SPR_PIR
, "PIR",
2030 SPR_NOACCESS
, SPR_NOACCESS
,
2031 &spr_read_generic
, &spr_write_pir
,
2033 spr_register(env
, SPR_ASR
, "ASR",
2034 SPR_NOACCESS
, SPR_NOACCESS
,
2035 &spr_read_asr
, &spr_write_asr
,
2038 /* XXX : not implemented */
2039 spr_register(env
, SPR_IABR
, "IABR",
2040 SPR_NOACCESS
, SPR_NOACCESS
,
2041 &spr_read_generic
, &spr_write_generic
,
2043 /* XXX : not implemented */
2044 spr_register(env
, SPR_DABR
, "DABR",
2045 SPR_NOACCESS
, SPR_NOACCESS
,
2046 &spr_read_generic
, &spr_write_generic
,
2048 /* XXX : not implemented */
2049 spr_register(env
, SPR_SIAR
, "SIAR",
2050 SPR_NOACCESS
, SPR_NOACCESS
,
2051 &spr_read_generic
, SPR_NOACCESS
,
2053 /* XXX : not implemented */
2054 spr_register(env
, SPR_SDA
, "SDA",
2055 SPR_NOACCESS
, SPR_NOACCESS
,
2056 &spr_read_generic
, SPR_NOACCESS
,
2058 /* XXX : not implemented */
2059 spr_register(env
, SPR_620_PMC1R
, "PMC1",
2060 SPR_NOACCESS
, SPR_NOACCESS
,
2061 &spr_read_generic
, SPR_NOACCESS
,
2063 spr_register(env
, SPR_620_PMC1W
, "PMC1",
2064 SPR_NOACCESS
, SPR_NOACCESS
,
2065 SPR_NOACCESS
, &spr_write_generic
,
2067 /* XXX : not implemented */
2068 spr_register(env
, SPR_620_PMC2R
, "PMC2",
2069 SPR_NOACCESS
, SPR_NOACCESS
,
2070 &spr_read_generic
, SPR_NOACCESS
,
2072 spr_register(env
, SPR_620_PMC2W
, "PMC2",
2073 SPR_NOACCESS
, SPR_NOACCESS
,
2074 SPR_NOACCESS
, &spr_write_generic
,
2076 /* XXX : not implemented */
2077 spr_register(env
, SPR_620_MMCR0R
, "MMCR0",
2078 SPR_NOACCESS
, SPR_NOACCESS
,
2079 &spr_read_generic
, SPR_NOACCESS
,
2081 spr_register(env
, SPR_620_MMCR0W
, "MMCR0",
2082 SPR_NOACCESS
, SPR_NOACCESS
,
2083 SPR_NOACCESS
, &spr_write_generic
,
2085 /* External access control */
2086 /* XXX : not implemented */
2087 spr_register(env
, SPR_EAR
, "EAR",
2088 SPR_NOACCESS
, SPR_NOACCESS
,
2089 &spr_read_generic
, &spr_write_generic
,
2091 #if 0 // XXX: check this
2092 /* XXX : not implemented */
2093 spr_register(env
, SPR_620_PMR0
, "PMR0",
2094 SPR_NOACCESS
, SPR_NOACCESS
,
2095 &spr_read_generic
, &spr_write_generic
,
2097 /* XXX : not implemented */
2098 spr_register(env
, SPR_620_PMR1
, "PMR1",
2099 SPR_NOACCESS
, SPR_NOACCESS
,
2100 &spr_read_generic
, &spr_write_generic
,
2102 /* XXX : not implemented */
2103 spr_register(env
, SPR_620_PMR2
, "PMR2",
2104 SPR_NOACCESS
, SPR_NOACCESS
,
2105 &spr_read_generic
, &spr_write_generic
,
2107 /* XXX : not implemented */
2108 spr_register(env
, SPR_620_PMR3
, "PMR3",
2109 SPR_NOACCESS
, SPR_NOACCESS
,
2110 &spr_read_generic
, &spr_write_generic
,
2112 /* XXX : not implemented */
2113 spr_register(env
, SPR_620_PMR4
, "PMR4",
2114 SPR_NOACCESS
, SPR_NOACCESS
,
2115 &spr_read_generic
, &spr_write_generic
,
2117 /* XXX : not implemented */
2118 spr_register(env
, SPR_620_PMR5
, "PMR5",
2119 SPR_NOACCESS
, SPR_NOACCESS
,
2120 &spr_read_generic
, &spr_write_generic
,
2122 /* XXX : not implemented */
2123 spr_register(env
, SPR_620_PMR6
, "PMR6",
2124 SPR_NOACCESS
, SPR_NOACCESS
,
2125 &spr_read_generic
, &spr_write_generic
,
2127 /* XXX : not implemented */
2128 spr_register(env
, SPR_620_PMR7
, "PMR7",
2129 SPR_NOACCESS
, SPR_NOACCESS
,
2130 &spr_read_generic
, &spr_write_generic
,
2132 /* XXX : not implemented */
2133 spr_register(env
, SPR_620_PMR8
, "PMR8",
2134 SPR_NOACCESS
, SPR_NOACCESS
,
2135 &spr_read_generic
, &spr_write_generic
,
2137 /* XXX : not implemented */
2138 spr_register(env
, SPR_620_PMR9
, "PMR9",
2139 SPR_NOACCESS
, SPR_NOACCESS
,
2140 &spr_read_generic
, &spr_write_generic
,
2142 /* XXX : not implemented */
2143 spr_register(env
, SPR_620_PMRA
, "PMR10",
2144 SPR_NOACCESS
, SPR_NOACCESS
,
2145 &spr_read_generic
, &spr_write_generic
,
2147 /* XXX : not implemented */
2148 spr_register(env
, SPR_620_PMRB
, "PMR11",
2149 SPR_NOACCESS
, SPR_NOACCESS
,
2150 &spr_read_generic
, &spr_write_generic
,
2152 /* XXX : not implemented */
2153 spr_register(env
, SPR_620_PMRC
, "PMR12",
2154 SPR_NOACCESS
, SPR_NOACCESS
,
2155 &spr_read_generic
, &spr_write_generic
,
2157 /* XXX : not implemented */
2158 spr_register(env
, SPR_620_PMRD
, "PMR13",
2159 SPR_NOACCESS
, SPR_NOACCESS
,
2160 &spr_read_generic
, &spr_write_generic
,
2162 /* XXX : not implemented */
2163 spr_register(env
, SPR_620_PMRE
, "PMR14",
2164 SPR_NOACCESS
, SPR_NOACCESS
,
2165 &spr_read_generic
, &spr_write_generic
,
2167 /* XXX : not implemented */
2168 spr_register(env
, SPR_620_PMRF
, "PMR15",
2169 SPR_NOACCESS
, SPR_NOACCESS
,
2170 &spr_read_generic
, &spr_write_generic
,
2173 /* XXX : not implemented */
2174 spr_register(env
, SPR_620_BUSCSR
, "BUSCSR",
2175 SPR_NOACCESS
, SPR_NOACCESS
,
2176 &spr_read_generic
, &spr_write_generic
,
2178 /* XXX : not implemented */
2179 spr_register(env
, SPR_620_L2CR
, "L2CR",
2180 SPR_NOACCESS
, SPR_NOACCESS
,
2181 &spr_read_generic
, &spr_write_generic
,
2183 /* XXX : not implemented */
2184 spr_register(env
, SPR_620_L2SR
, "L2SR",
2185 SPR_NOACCESS
, SPR_NOACCESS
,
2186 &spr_read_generic
, &spr_write_generic
,
2189 #endif /* defined (TARGET_PPC64) */
2191 static void gen_spr_5xx_8xx (CPUPPCState
*env
)
2193 /* Exception processing */
2194 spr_register(env
, SPR_DSISR
, "DSISR",
2195 SPR_NOACCESS
, SPR_NOACCESS
,
2196 &spr_read_generic
, &spr_write_generic
,
2198 spr_register(env
, SPR_DAR
, "DAR",
2199 SPR_NOACCESS
, SPR_NOACCESS
,
2200 &spr_read_generic
, &spr_write_generic
,
2203 spr_register(env
, SPR_DECR
, "DECR",
2204 SPR_NOACCESS
, SPR_NOACCESS
,
2205 &spr_read_decr
, &spr_write_decr
,
2207 /* XXX : not implemented */
2208 spr_register(env
, SPR_MPC_EIE
, "EIE",
2209 SPR_NOACCESS
, SPR_NOACCESS
,
2210 &spr_read_generic
, &spr_write_generic
,
2212 /* XXX : not implemented */
2213 spr_register(env
, SPR_MPC_EID
, "EID",
2214 SPR_NOACCESS
, SPR_NOACCESS
,
2215 &spr_read_generic
, &spr_write_generic
,
2217 /* XXX : not implemented */
2218 spr_register(env
, SPR_MPC_NRI
, "NRI",
2219 SPR_NOACCESS
, SPR_NOACCESS
,
2220 &spr_read_generic
, &spr_write_generic
,
2222 /* XXX : not implemented */
2223 spr_register(env
, SPR_MPC_CMPA
, "CMPA",
2224 SPR_NOACCESS
, SPR_NOACCESS
,
2225 &spr_read_generic
, &spr_write_generic
,
2227 /* XXX : not implemented */
2228 spr_register(env
, SPR_MPC_CMPB
, "CMPB",
2229 SPR_NOACCESS
, SPR_NOACCESS
,
2230 &spr_read_generic
, &spr_write_generic
,
2232 /* XXX : not implemented */
2233 spr_register(env
, SPR_MPC_CMPC
, "CMPC",
2234 SPR_NOACCESS
, SPR_NOACCESS
,
2235 &spr_read_generic
, &spr_write_generic
,
2237 /* XXX : not implemented */
2238 spr_register(env
, SPR_MPC_CMPD
, "CMPD",
2239 SPR_NOACCESS
, SPR_NOACCESS
,
2240 &spr_read_generic
, &spr_write_generic
,
2242 /* XXX : not implemented */
2243 spr_register(env
, SPR_MPC_ECR
, "ECR",
2244 SPR_NOACCESS
, SPR_NOACCESS
,
2245 &spr_read_generic
, &spr_write_generic
,
2247 /* XXX : not implemented */
2248 spr_register(env
, SPR_MPC_DER
, "DER",
2249 SPR_NOACCESS
, SPR_NOACCESS
,
2250 &spr_read_generic
, &spr_write_generic
,
2252 /* XXX : not implemented */
2253 spr_register(env
, SPR_MPC_COUNTA
, "COUNTA",
2254 SPR_NOACCESS
, SPR_NOACCESS
,
2255 &spr_read_generic
, &spr_write_generic
,
2257 /* XXX : not implemented */
2258 spr_register(env
, SPR_MPC_COUNTB
, "COUNTB",
2259 SPR_NOACCESS
, SPR_NOACCESS
,
2260 &spr_read_generic
, &spr_write_generic
,
2262 /* XXX : not implemented */
2263 spr_register(env
, SPR_MPC_CMPE
, "CMPE",
2264 SPR_NOACCESS
, SPR_NOACCESS
,
2265 &spr_read_generic
, &spr_write_generic
,
2267 /* XXX : not implemented */
2268 spr_register(env
, SPR_MPC_CMPF
, "CMPF",
2269 SPR_NOACCESS
, SPR_NOACCESS
,
2270 &spr_read_generic
, &spr_write_generic
,
2272 /* XXX : not implemented */
2273 spr_register(env
, SPR_MPC_CMPG
, "CMPG",
2274 SPR_NOACCESS
, SPR_NOACCESS
,
2275 &spr_read_generic
, &spr_write_generic
,
2277 /* XXX : not implemented */
2278 spr_register(env
, SPR_MPC_CMPH
, "CMPH",
2279 SPR_NOACCESS
, SPR_NOACCESS
,
2280 &spr_read_generic
, &spr_write_generic
,
2282 /* XXX : not implemented */
2283 spr_register(env
, SPR_MPC_LCTRL1
, "LCTRL1",
2284 SPR_NOACCESS
, SPR_NOACCESS
,
2285 &spr_read_generic
, &spr_write_generic
,
2287 /* XXX : not implemented */
2288 spr_register(env
, SPR_MPC_LCTRL2
, "LCTRL2",
2289 SPR_NOACCESS
, SPR_NOACCESS
,
2290 &spr_read_generic
, &spr_write_generic
,
2292 /* XXX : not implemented */
2293 spr_register(env
, SPR_MPC_BAR
, "BAR",
2294 SPR_NOACCESS
, SPR_NOACCESS
,
2295 &spr_read_generic
, &spr_write_generic
,
2297 /* XXX : not implemented */
2298 spr_register(env
, SPR_MPC_DPDR
, "DPDR",
2299 SPR_NOACCESS
, SPR_NOACCESS
,
2300 &spr_read_generic
, &spr_write_generic
,
2302 /* XXX : not implemented */
2303 spr_register(env
, SPR_MPC_IMMR
, "IMMR",
2304 SPR_NOACCESS
, SPR_NOACCESS
,
2305 &spr_read_generic
, &spr_write_generic
,
2309 static void gen_spr_5xx (CPUPPCState
*env
)
2311 /* XXX : not implemented */
2312 spr_register(env
, SPR_RCPU_MI_GRA
, "MI_GRA",
2313 SPR_NOACCESS
, SPR_NOACCESS
,
2314 &spr_read_generic
, &spr_write_generic
,
2316 /* XXX : not implemented */
2317 spr_register(env
, SPR_RCPU_L2U_GRA
, "L2U_GRA",
2318 SPR_NOACCESS
, SPR_NOACCESS
,
2319 &spr_read_generic
, &spr_write_generic
,
2321 /* XXX : not implemented */
2322 spr_register(env
, SPR_RPCU_BBCMCR
, "L2U_BBCMCR",
2323 SPR_NOACCESS
, SPR_NOACCESS
,
2324 &spr_read_generic
, &spr_write_generic
,
2326 /* XXX : not implemented */
2327 spr_register(env
, SPR_RCPU_L2U_MCR
, "L2U_MCR",
2328 SPR_NOACCESS
, SPR_NOACCESS
,
2329 &spr_read_generic
, &spr_write_generic
,
2331 /* XXX : not implemented */
2332 spr_register(env
, SPR_RCPU_MI_RBA0
, "MI_RBA0",
2333 SPR_NOACCESS
, SPR_NOACCESS
,
2334 &spr_read_generic
, &spr_write_generic
,
2336 /* XXX : not implemented */
2337 spr_register(env
, SPR_RCPU_MI_RBA1
, "MI_RBA1",
2338 SPR_NOACCESS
, SPR_NOACCESS
,
2339 &spr_read_generic
, &spr_write_generic
,
2341 /* XXX : not implemented */
2342 spr_register(env
, SPR_RCPU_MI_RBA2
, "MI_RBA2",
2343 SPR_NOACCESS
, SPR_NOACCESS
,
2344 &spr_read_generic
, &spr_write_generic
,
2346 /* XXX : not implemented */
2347 spr_register(env
, SPR_RCPU_MI_RBA3
, "MI_RBA3",
2348 SPR_NOACCESS
, SPR_NOACCESS
,
2349 &spr_read_generic
, &spr_write_generic
,
2351 /* XXX : not implemented */
2352 spr_register(env
, SPR_RCPU_L2U_RBA0
, "L2U_RBA0",
2353 SPR_NOACCESS
, SPR_NOACCESS
,
2354 &spr_read_generic
, &spr_write_generic
,
2356 /* XXX : not implemented */
2357 spr_register(env
, SPR_RCPU_L2U_RBA1
, "L2U_RBA1",
2358 SPR_NOACCESS
, SPR_NOACCESS
,
2359 &spr_read_generic
, &spr_write_generic
,
2361 /* XXX : not implemented */
2362 spr_register(env
, SPR_RCPU_L2U_RBA2
, "L2U_RBA2",
2363 SPR_NOACCESS
, SPR_NOACCESS
,
2364 &spr_read_generic
, &spr_write_generic
,
2366 /* XXX : not implemented */
2367 spr_register(env
, SPR_RCPU_L2U_RBA3
, "L2U_RBA3",
2368 SPR_NOACCESS
, SPR_NOACCESS
,
2369 &spr_read_generic
, &spr_write_generic
,
2371 /* XXX : not implemented */
2372 spr_register(env
, SPR_RCPU_MI_RA0
, "MI_RA0",
2373 SPR_NOACCESS
, SPR_NOACCESS
,
2374 &spr_read_generic
, &spr_write_generic
,
2376 /* XXX : not implemented */
2377 spr_register(env
, SPR_RCPU_MI_RA1
, "MI_RA1",
2378 SPR_NOACCESS
, SPR_NOACCESS
,
2379 &spr_read_generic
, &spr_write_generic
,
2381 /* XXX : not implemented */
2382 spr_register(env
, SPR_RCPU_MI_RA2
, "MI_RA2",
2383 SPR_NOACCESS
, SPR_NOACCESS
,
2384 &spr_read_generic
, &spr_write_generic
,
2386 /* XXX : not implemented */
2387 spr_register(env
, SPR_RCPU_MI_RA3
, "MI_RA3",
2388 SPR_NOACCESS
, SPR_NOACCESS
,
2389 &spr_read_generic
, &spr_write_generic
,
2391 /* XXX : not implemented */
2392 spr_register(env
, SPR_RCPU_L2U_RA0
, "L2U_RA0",
2393 SPR_NOACCESS
, SPR_NOACCESS
,
2394 &spr_read_generic
, &spr_write_generic
,
2396 /* XXX : not implemented */
2397 spr_register(env
, SPR_RCPU_L2U_RA1
, "L2U_RA1",
2398 SPR_NOACCESS
, SPR_NOACCESS
,
2399 &spr_read_generic
, &spr_write_generic
,
2401 /* XXX : not implemented */
2402 spr_register(env
, SPR_RCPU_L2U_RA2
, "L2U_RA2",
2403 SPR_NOACCESS
, SPR_NOACCESS
,
2404 &spr_read_generic
, &spr_write_generic
,
2406 /* XXX : not implemented */
2407 spr_register(env
, SPR_RCPU_L2U_RA3
, "L2U_RA3",
2408 SPR_NOACCESS
, SPR_NOACCESS
,
2409 &spr_read_generic
, &spr_write_generic
,
2411 /* XXX : not implemented */
2412 spr_register(env
, SPR_RCPU_FPECR
, "FPECR",
2413 SPR_NOACCESS
, SPR_NOACCESS
,
2414 &spr_read_generic
, &spr_write_generic
,
2418 static void gen_spr_8xx (CPUPPCState
*env
)
2420 /* XXX : not implemented */
2421 spr_register(env
, SPR_MPC_IC_CST
, "IC_CST",
2422 SPR_NOACCESS
, SPR_NOACCESS
,
2423 &spr_read_generic
, &spr_write_generic
,
2425 /* XXX : not implemented */
2426 spr_register(env
, SPR_MPC_IC_ADR
, "IC_ADR",
2427 SPR_NOACCESS
, SPR_NOACCESS
,
2428 &spr_read_generic
, &spr_write_generic
,
2430 /* XXX : not implemented */
2431 spr_register(env
, SPR_MPC_IC_DAT
, "IC_DAT",
2432 SPR_NOACCESS
, SPR_NOACCESS
,
2433 &spr_read_generic
, &spr_write_generic
,
2435 /* XXX : not implemented */
2436 spr_register(env
, SPR_MPC_DC_CST
, "DC_CST",
2437 SPR_NOACCESS
, SPR_NOACCESS
,
2438 &spr_read_generic
, &spr_write_generic
,
2440 /* XXX : not implemented */
2441 spr_register(env
, SPR_MPC_DC_ADR
, "DC_ADR",
2442 SPR_NOACCESS
, SPR_NOACCESS
,
2443 &spr_read_generic
, &spr_write_generic
,
2445 /* XXX : not implemented */
2446 spr_register(env
, SPR_MPC_DC_DAT
, "DC_DAT",
2447 SPR_NOACCESS
, SPR_NOACCESS
,
2448 &spr_read_generic
, &spr_write_generic
,
2450 /* XXX : not implemented */
2451 spr_register(env
, SPR_MPC_MI_CTR
, "MI_CTR",
2452 SPR_NOACCESS
, SPR_NOACCESS
,
2453 &spr_read_generic
, &spr_write_generic
,
2455 /* XXX : not implemented */
2456 spr_register(env
, SPR_MPC_MI_AP
, "MI_AP",
2457 SPR_NOACCESS
, SPR_NOACCESS
,
2458 &spr_read_generic
, &spr_write_generic
,
2460 /* XXX : not implemented */
2461 spr_register(env
, SPR_MPC_MI_EPN
, "MI_EPN",
2462 SPR_NOACCESS
, SPR_NOACCESS
,
2463 &spr_read_generic
, &spr_write_generic
,
2465 /* XXX : not implemented */
2466 spr_register(env
, SPR_MPC_MI_TWC
, "MI_TWC",
2467 SPR_NOACCESS
, SPR_NOACCESS
,
2468 &spr_read_generic
, &spr_write_generic
,
2470 /* XXX : not implemented */
2471 spr_register(env
, SPR_MPC_MI_RPN
, "MI_RPN",
2472 SPR_NOACCESS
, SPR_NOACCESS
,
2473 &spr_read_generic
, &spr_write_generic
,
2475 /* XXX : not implemented */
2476 spr_register(env
, SPR_MPC_MI_DBCAM
, "MI_DBCAM",
2477 SPR_NOACCESS
, SPR_NOACCESS
,
2478 &spr_read_generic
, &spr_write_generic
,
2480 /* XXX : not implemented */
2481 spr_register(env
, SPR_MPC_MI_DBRAM0
, "MI_DBRAM0",
2482 SPR_NOACCESS
, SPR_NOACCESS
,
2483 &spr_read_generic
, &spr_write_generic
,
2485 /* XXX : not implemented */
2486 spr_register(env
, SPR_MPC_MI_DBRAM1
, "MI_DBRAM1",
2487 SPR_NOACCESS
, SPR_NOACCESS
,
2488 &spr_read_generic
, &spr_write_generic
,
2490 /* XXX : not implemented */
2491 spr_register(env
, SPR_MPC_MD_CTR
, "MD_CTR",
2492 SPR_NOACCESS
, SPR_NOACCESS
,
2493 &spr_read_generic
, &spr_write_generic
,
2495 /* XXX : not implemented */
2496 spr_register(env
, SPR_MPC_MD_CASID
, "MD_CASID",
2497 SPR_NOACCESS
, SPR_NOACCESS
,
2498 &spr_read_generic
, &spr_write_generic
,
2500 /* XXX : not implemented */
2501 spr_register(env
, SPR_MPC_MD_AP
, "MD_AP",
2502 SPR_NOACCESS
, SPR_NOACCESS
,
2503 &spr_read_generic
, &spr_write_generic
,
2505 /* XXX : not implemented */
2506 spr_register(env
, SPR_MPC_MD_EPN
, "MD_EPN",
2507 SPR_NOACCESS
, SPR_NOACCESS
,
2508 &spr_read_generic
, &spr_write_generic
,
2510 /* XXX : not implemented */
2511 spr_register(env
, SPR_MPC_MD_TWB
, "MD_TWB",
2512 SPR_NOACCESS
, SPR_NOACCESS
,
2513 &spr_read_generic
, &spr_write_generic
,
2515 /* XXX : not implemented */
2516 spr_register(env
, SPR_MPC_MD_TWC
, "MD_TWC",
2517 SPR_NOACCESS
, SPR_NOACCESS
,
2518 &spr_read_generic
, &spr_write_generic
,
2520 /* XXX : not implemented */
2521 spr_register(env
, SPR_MPC_MD_RPN
, "MD_RPN",
2522 SPR_NOACCESS
, SPR_NOACCESS
,
2523 &spr_read_generic
, &spr_write_generic
,
2525 /* XXX : not implemented */
2526 spr_register(env
, SPR_MPC_MD_TW
, "MD_TW",
2527 SPR_NOACCESS
, SPR_NOACCESS
,
2528 &spr_read_generic
, &spr_write_generic
,
2530 /* XXX : not implemented */
2531 spr_register(env
, SPR_MPC_MD_DBCAM
, "MD_DBCAM",
2532 SPR_NOACCESS
, SPR_NOACCESS
,
2533 &spr_read_generic
, &spr_write_generic
,
2535 /* XXX : not implemented */
2536 spr_register(env
, SPR_MPC_MD_DBRAM0
, "MD_DBRAM0",
2537 SPR_NOACCESS
, SPR_NOACCESS
,
2538 &spr_read_generic
, &spr_write_generic
,
2540 /* XXX : not implemented */
2541 spr_register(env
, SPR_MPC_MD_DBRAM1
, "MD_DBRAM1",
2542 SPR_NOACCESS
, SPR_NOACCESS
,
2543 &spr_read_generic
, &spr_write_generic
,
2549 * AMR => SPR 29 (Power 2.04)
2550 * CTRL => SPR 136 (Power 2.04)
2551 * CTRL => SPR 152 (Power 2.04)
2552 * SCOMC => SPR 276 (64 bits ?)
2553 * SCOMD => SPR 277 (64 bits ?)
2554 * TBU40 => SPR 286 (Power 2.04 hypv)
2555 * HSPRG0 => SPR 304 (Power 2.04 hypv)
2556 * HSPRG1 => SPR 305 (Power 2.04 hypv)
2557 * HDSISR => SPR 306 (Power 2.04 hypv)
2558 * HDAR => SPR 307 (Power 2.04 hypv)
2559 * PURR => SPR 309 (Power 2.04 hypv)
2560 * HDEC => SPR 310 (Power 2.04 hypv)
2561 * HIOR => SPR 311 (hypv)
2562 * RMOR => SPR 312 (970)
2563 * HRMOR => SPR 313 (Power 2.04 hypv)
2564 * HSRR0 => SPR 314 (Power 2.04 hypv)
2565 * HSRR1 => SPR 315 (Power 2.04 hypv)
2566 * LPCR => SPR 316 (970)
2567 * LPIDR => SPR 317 (970)
2568 * SPEFSCR => SPR 512 (Power 2.04 emb)
2569 * EPR => SPR 702 (Power 2.04 emb)
2570 * perf => 768-783 (Power 2.04)
2571 * perf => 784-799 (Power 2.04)
2572 * PPR => SPR 896 (Power 2.04)
2573 * EPLC => SPR 947 (Power 2.04 emb)
2574 * EPSC => SPR 948 (Power 2.04 emb)
2575 * DABRX => 1015 (Power 2.04 hypv)
2576 * FPECR => SPR 1022 (?)
2577 * ... and more (thermal management, performance counters, ...)
2580 /*****************************************************************************/
2581 /* Exception vectors models */
2582 static void init_excp_4xx_real (CPUPPCState
*env
)
2584 #if !defined(CONFIG_USER_ONLY)
2585 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2586 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2587 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2588 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2589 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2590 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2591 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2592 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2593 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2594 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2595 env
->excp_prefix
= 0x00000000UL
;
2596 env
->ivor_mask
= 0x0000FFF0UL
;
2597 env
->ivpr_mask
= 0xFFFF0000UL
;
2598 /* Hardware reset vector */
2599 env
->hreset_vector
= 0xFFFFFFFCUL
;
2603 static void init_excp_4xx_softmmu (CPUPPCState
*env
)
2605 #if !defined(CONFIG_USER_ONLY)
2606 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000100;
2607 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2608 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2609 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2610 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2611 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2612 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2613 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2614 env
->excp_vectors
[POWERPC_EXCP_PIT
] = 0x00001000;
2615 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00001010;
2616 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001020;
2617 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001100;
2618 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001200;
2619 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00002000;
2620 env
->excp_prefix
= 0x00000000UL
;
2621 env
->ivor_mask
= 0x0000FFF0UL
;
2622 env
->ivpr_mask
= 0xFFFF0000UL
;
2623 /* Hardware reset vector */
2624 env
->hreset_vector
= 0xFFFFFFFCUL
;
2628 static void init_excp_MPC5xx (CPUPPCState
*env
)
2630 #if !defined(CONFIG_USER_ONLY)
2631 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2632 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2633 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2634 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2635 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2636 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2637 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2638 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2639 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2640 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2641 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2642 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2643 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2644 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2645 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2646 env
->excp_prefix
= 0x00000000UL
;
2647 env
->ivor_mask
= 0x0000FFF0UL
;
2648 env
->ivpr_mask
= 0xFFFF0000UL
;
2649 /* Hardware reset vector */
2650 env
->hreset_vector
= 0xFFFFFFFCUL
;
2654 static void init_excp_MPC8xx (CPUPPCState
*env
)
2656 #if !defined(CONFIG_USER_ONLY)
2657 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2658 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2659 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2660 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2661 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2662 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2663 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2664 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000900;
2665 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2666 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2667 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2668 env
->excp_vectors
[POWERPC_EXCP_FPA
] = 0x00000E00;
2669 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001000;
2670 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00001100;
2671 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00001200;
2672 env
->excp_vectors
[POWERPC_EXCP_ITLBE
] = 0x00001300;
2673 env
->excp_vectors
[POWERPC_EXCP_DTLBE
] = 0x00001400;
2674 env
->excp_vectors
[POWERPC_EXCP_DABR
] = 0x00001C00;
2675 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001C00;
2676 env
->excp_vectors
[POWERPC_EXCP_MEXTBR
] = 0x00001E00;
2677 env
->excp_vectors
[POWERPC_EXCP_NMEXTBR
] = 0x00001F00;
2678 env
->excp_prefix
= 0x00000000UL
;
2679 env
->ivor_mask
= 0x0000FFF0UL
;
2680 env
->ivpr_mask
= 0xFFFF0000UL
;
2681 /* Hardware reset vector */
2682 env
->hreset_vector
= 0xFFFFFFFCUL
;
2686 static void init_excp_G2 (CPUPPCState
*env
)
2688 #if !defined(CONFIG_USER_ONLY)
2689 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2690 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2691 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2692 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2693 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2694 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2695 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2696 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2697 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2698 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000A00;
2699 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2700 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2701 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2702 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2703 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2704 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2705 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2706 env
->excp_prefix
= 0x00000000UL
;
2707 /* Hardware reset vector */
2708 env
->hreset_vector
= 0xFFFFFFFCUL
;
2712 static void init_excp_e200 (CPUPPCState
*env
)
2714 #if !defined(CONFIG_USER_ONLY)
2715 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000FFC;
2716 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2717 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2718 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2719 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2720 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2721 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2722 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2723 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2724 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2725 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2726 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2727 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2728 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2729 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2730 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2731 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2732 env
->excp_vectors
[POWERPC_EXCP_SPEU
] = 0x00000000;
2733 env
->excp_vectors
[POWERPC_EXCP_EFPDI
] = 0x00000000;
2734 env
->excp_vectors
[POWERPC_EXCP_EFPRI
] = 0x00000000;
2735 env
->excp_prefix
= 0x00000000UL
;
2736 env
->ivor_mask
= 0x0000FFF7UL
;
2737 env
->ivpr_mask
= 0xFFFF0000UL
;
2738 /* Hardware reset vector */
2739 env
->hreset_vector
= 0xFFFFFFFCUL
;
2743 static void init_excp_BookE (CPUPPCState
*env
)
2745 #if !defined(CONFIG_USER_ONLY)
2746 env
->excp_vectors
[POWERPC_EXCP_CRITICAL
] = 0x00000000;
2747 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000000;
2748 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000000;
2749 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000000;
2750 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000000;
2751 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000000;
2752 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000000;
2753 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000000;
2754 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000000;
2755 env
->excp_vectors
[POWERPC_EXCP_APU
] = 0x00000000;
2756 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000000;
2757 env
->excp_vectors
[POWERPC_EXCP_FIT
] = 0x00000000;
2758 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00000000;
2759 env
->excp_vectors
[POWERPC_EXCP_DTLB
] = 0x00000000;
2760 env
->excp_vectors
[POWERPC_EXCP_ITLB
] = 0x00000000;
2761 env
->excp_vectors
[POWERPC_EXCP_DEBUG
] = 0x00000000;
2762 env
->excp_prefix
= 0x00000000UL
;
2763 env
->ivor_mask
= 0x0000FFE0UL
;
2764 env
->ivpr_mask
= 0xFFFF0000UL
;
2765 /* Hardware reset vector */
2766 env
->hreset_vector
= 0xFFFFFFFCUL
;
2770 static void init_excp_601 (CPUPPCState
*env
)
2772 #if !defined(CONFIG_USER_ONLY)
2773 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2774 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2775 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2776 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2777 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2778 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2779 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2780 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2781 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2782 env
->excp_vectors
[POWERPC_EXCP_IO
] = 0x00000A00;
2783 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2784 env
->excp_vectors
[POWERPC_EXCP_RUNM
] = 0x00002000;
2785 env
->excp_prefix
= 0xFFF00000UL
;
2786 /* Hardware reset vector */
2787 env
->hreset_vector
= 0x00000100UL
;
2791 static void init_excp_602 (CPUPPCState
*env
)
2793 #if !defined(CONFIG_USER_ONLY)
2794 /* XXX: exception prefix has a special behavior on 602 */
2795 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2796 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2797 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2798 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2799 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2800 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2801 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2802 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2803 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2804 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2805 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2806 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2807 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2808 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2809 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2810 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2811 env
->excp_vectors
[POWERPC_EXCP_WDT
] = 0x00001500;
2812 env
->excp_vectors
[POWERPC_EXCP_EMUL
] = 0x00001600;
2813 env
->excp_prefix
= 0xFFF00000UL
;
2814 /* Hardware reset vector */
2815 env
->hreset_vector
= 0xFFFFFFFCUL
;
2819 static void init_excp_603 (CPUPPCState
*env
)
2821 #if !defined(CONFIG_USER_ONLY)
2822 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2823 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2824 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2825 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2826 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2827 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2828 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2829 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2830 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2831 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2832 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2833 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2834 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2835 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2836 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2837 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2838 env
->excp_prefix
= 0x00000000UL
;
2839 /* Hardware reset vector */
2840 env
->hreset_vector
= 0xFFFFFFFCUL
;
2844 static void init_excp_604 (CPUPPCState
*env
)
2846 #if !defined(CONFIG_USER_ONLY)
2847 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2848 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2849 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2850 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2851 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2852 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2853 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2854 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2855 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2856 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2857 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2858 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2859 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2860 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2861 env
->excp_prefix
= 0x00000000UL
;
2862 /* Hardware reset vector */
2863 env
->hreset_vector
= 0xFFFFFFFCUL
;
2867 #if defined(TARGET_PPC64)
2868 static void init_excp_620 (CPUPPCState
*env
)
2870 #if !defined(CONFIG_USER_ONLY)
2871 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2872 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2873 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2874 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2875 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2876 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2877 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2878 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2879 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2880 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2881 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2882 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2883 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2884 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2885 env
->excp_prefix
= 0xFFF00000UL
;
2886 /* Hardware reset vector */
2887 env
->hreset_vector
= 0x0000000000000100ULL
;
2890 #endif /* defined(TARGET_PPC64) */
2892 static void init_excp_7x0 (CPUPPCState
*env
)
2894 #if !defined(CONFIG_USER_ONLY)
2895 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2896 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2897 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2898 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2899 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2900 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2901 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2902 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2903 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2904 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2905 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2906 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2907 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2908 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2909 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
2910 env
->excp_prefix
= 0x00000000UL
;
2911 /* Hardware reset vector */
2912 env
->hreset_vector
= 0xFFFFFFFCUL
;
2916 static void init_excp_750cl (CPUPPCState
*env
)
2918 #if !defined(CONFIG_USER_ONLY)
2919 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2920 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2921 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2922 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2923 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2924 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2925 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2926 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2927 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2928 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2929 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2930 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2931 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2932 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2933 env
->excp_prefix
= 0x00000000UL
;
2934 /* Hardware reset vector */
2935 env
->hreset_vector
= 0xFFFFFFFCUL
;
2939 static void init_excp_750cx (CPUPPCState
*env
)
2941 #if !defined(CONFIG_USER_ONLY)
2942 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2943 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2944 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2945 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2946 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2947 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2948 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2949 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2950 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2951 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2952 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2953 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2954 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2955 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
2956 env
->excp_prefix
= 0x00000000UL
;
2957 /* Hardware reset vector */
2958 env
->hreset_vector
= 0xFFFFFFFCUL
;
2962 /* XXX: Check if this is correct */
2963 static void init_excp_7x5 (CPUPPCState
*env
)
2965 #if !defined(CONFIG_USER_ONLY)
2966 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2967 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2968 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2969 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2970 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2971 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2972 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
2973 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
2974 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
2975 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
2976 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
2977 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
2978 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
2979 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
2980 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
2981 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
2982 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
2983 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
2984 env
->excp_prefix
= 0x00000000UL
;
2985 /* Hardware reset vector */
2986 env
->hreset_vector
= 0xFFFFFFFCUL
;
2990 static void init_excp_7400 (CPUPPCState
*env
)
2992 #if !defined(CONFIG_USER_ONLY)
2993 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
2994 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
2995 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
2996 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
2997 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
2998 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
2999 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3000 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3001 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3002 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3003 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3004 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3005 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3006 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3007 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3008 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3009 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001700;
3010 env
->excp_prefix
= 0x00000000UL
;
3011 /* Hardware reset vector */
3012 env
->hreset_vector
= 0xFFFFFFFCUL
;
3016 static void init_excp_7450 (CPUPPCState
*env
)
3018 #if !defined(CONFIG_USER_ONLY)
3019 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3020 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3021 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3022 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3023 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3024 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3025 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3026 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3027 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3028 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3029 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3030 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3031 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3032 env
->excp_vectors
[POWERPC_EXCP_IFTLB
] = 0x00001000;
3033 env
->excp_vectors
[POWERPC_EXCP_DLTLB
] = 0x00001100;
3034 env
->excp_vectors
[POWERPC_EXCP_DSTLB
] = 0x00001200;
3035 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3036 env
->excp_vectors
[POWERPC_EXCP_SMI
] = 0x00001400;
3037 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001600;
3038 env
->excp_prefix
= 0x00000000UL
;
3039 /* Hardware reset vector */
3040 env
->hreset_vector
= 0xFFFFFFFCUL
;
3044 #if defined (TARGET_PPC64)
3045 static void init_excp_970 (CPUPPCState
*env
)
3047 #if !defined(CONFIG_USER_ONLY)
3048 env
->excp_vectors
[POWERPC_EXCP_RESET
] = 0x00000100;
3049 env
->excp_vectors
[POWERPC_EXCP_MCHECK
] = 0x00000200;
3050 env
->excp_vectors
[POWERPC_EXCP_DSI
] = 0x00000300;
3051 env
->excp_vectors
[POWERPC_EXCP_DSEG
] = 0x00000380;
3052 env
->excp_vectors
[POWERPC_EXCP_ISI
] = 0x00000400;
3053 env
->excp_vectors
[POWERPC_EXCP_ISEG
] = 0x00000480;
3054 env
->excp_vectors
[POWERPC_EXCP_EXTERNAL
] = 0x00000500;
3055 env
->excp_vectors
[POWERPC_EXCP_ALIGN
] = 0x00000600;
3056 env
->excp_vectors
[POWERPC_EXCP_PROGRAM
] = 0x00000700;
3057 env
->excp_vectors
[POWERPC_EXCP_FPU
] = 0x00000800;
3058 env
->excp_vectors
[POWERPC_EXCP_DECR
] = 0x00000900;
3059 env
->excp_vectors
[POWERPC_EXCP_HDECR
] = 0x00000980;
3060 env
->excp_vectors
[POWERPC_EXCP_SYSCALL
] = 0x00000C00;
3061 env
->excp_vectors
[POWERPC_EXCP_TRACE
] = 0x00000D00;
3062 env
->excp_vectors
[POWERPC_EXCP_PERFM
] = 0x00000F00;
3063 env
->excp_vectors
[POWERPC_EXCP_VPU
] = 0x00000F20;
3064 env
->excp_vectors
[POWERPC_EXCP_IABR
] = 0x00001300;
3065 env
->excp_vectors
[POWERPC_EXCP_MAINT
] = 0x00001600;
3066 env
->excp_vectors
[POWERPC_EXCP_VPUA
] = 0x00001700;
3067 env
->excp_vectors
[POWERPC_EXCP_THERM
] = 0x00001800;
3068 env
->excp_prefix
= 0x00000000FFF00000ULL
;
3069 /* Hardware reset vector */
3070 env
->hreset_vector
= 0x0000000000000100ULL
;
3075 /*****************************************************************************/
3076 /* Power management enable checks */
3077 static int check_pow_none (CPUPPCState
*env
)
3082 static int check_pow_nocheck (CPUPPCState
*env
)
3087 static int check_pow_hid0 (CPUPPCState
*env
)
3089 if (env
->spr
[SPR_HID0
] & 0x00E00000)
3095 static int check_pow_hid0_74xx (CPUPPCState
*env
)
3097 if (env
->spr
[SPR_HID0
] & 0x00600000)
3103 /*****************************************************************************/
3104 /* PowerPC implementations definitions */
3107 #define POWERPC_INSNS_401 (PPC_INSNS_BASE | PPC_STRING | \
3108 PPC_WRTEE | PPC_DCR | \
3109 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3111 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3112 PPC_4xx_COMMON | PPC_40x_EXCP)
3113 #define POWERPC_MSRM_401 (0x00000000000FD201ULL)
3114 #define POWERPC_MMU_401 (POWERPC_MMU_REAL)
3115 #define POWERPC_EXCP_401 (POWERPC_EXCP_40x)
3116 #define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401)
3117 #define POWERPC_BFDM_401 (bfd_mach_ppc_403)
3118 #define POWERPC_FLAG_401 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3119 POWERPC_FLAG_BUS_CLK)
3120 #define check_pow_401 check_pow_nocheck
3122 static void init_proc_401 (CPUPPCState
*env
)
3125 gen_spr_401_403(env
);
3127 init_excp_4xx_real(env
);
3128 env
->dcache_line_size
= 32;
3129 env
->icache_line_size
= 32;
3130 /* Allocate hardware IRQ controller */
3131 ppc40x_irq_init(env
);
3135 #define POWERPC_INSNS_401x2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3136 PPC_DCR | PPC_WRTEE | \
3137 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3138 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3139 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3140 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3141 PPC_4xx_COMMON | PPC_40x_EXCP)
3142 #define POWERPC_MSRM_401x2 (0x00000000001FD231ULL)
3143 #define POWERPC_MMU_401x2 (POWERPC_MMU_SOFT_4xx_Z)
3144 #define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x)
3145 #define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401)
3146 #define POWERPC_BFDM_401x2 (bfd_mach_ppc_403)
3147 #define POWERPC_FLAG_401x2 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3148 POWERPC_FLAG_BUS_CLK)
3149 #define check_pow_401x2 check_pow_nocheck
3151 static void init_proc_401x2 (CPUPPCState
*env
)
3154 gen_spr_401_403(env
);
3156 gen_spr_compress(env
);
3157 /* Memory management */
3158 #if !defined(CONFIG_USER_ONLY)
3163 init_excp_4xx_softmmu(env
);
3164 env
->dcache_line_size
= 32;
3165 env
->icache_line_size
= 32;
3166 /* Allocate hardware IRQ controller */
3167 ppc40x_irq_init(env
);
3171 #define POWERPC_INSNS_401x3 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3172 PPC_DCR | PPC_WRTEE | \
3173 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3174 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3175 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3176 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3177 PPC_4xx_COMMON | PPC_40x_EXCP)
3178 #define POWERPC_MSRM_401x3 (0x00000000001FD631ULL)
3179 #define POWERPC_MMU_401x3 (POWERPC_MMU_SOFT_4xx_Z)
3180 #define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x)
3181 #define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401)
3182 #define POWERPC_BFDM_401x3 (bfd_mach_ppc_403)
3183 #define POWERPC_FLAG_401x3 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3184 POWERPC_FLAG_BUS_CLK)
3185 #define check_pow_401x3 check_pow_nocheck
3187 __attribute__ (( unused
))
3188 static void init_proc_401x3 (CPUPPCState
*env
)
3191 gen_spr_401_403(env
);
3194 gen_spr_compress(env
);
3195 init_excp_4xx_softmmu(env
);
3196 env
->dcache_line_size
= 32;
3197 env
->icache_line_size
= 32;
3198 /* Allocate hardware IRQ controller */
3199 ppc40x_irq_init(env
);
3203 #define POWERPC_INSNS_IOP480 (PPC_INSNS_BASE | PPC_STRING | \
3204 PPC_DCR | PPC_WRTEE | \
3205 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3206 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3207 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3208 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3209 PPC_4xx_COMMON | PPC_40x_EXCP)
3210 #define POWERPC_MSRM_IOP480 (0x00000000001FD231ULL)
3211 #define POWERPC_MMU_IOP480 (POWERPC_MMU_SOFT_4xx_Z)
3212 #define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x)
3213 #define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401)
3214 #define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403)
3215 #define POWERPC_FLAG_IOP480 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \
3216 POWERPC_FLAG_BUS_CLK)
3217 #define check_pow_IOP480 check_pow_nocheck
3219 static void init_proc_IOP480 (CPUPPCState
*env
)
3222 gen_spr_401_403(env
);
3224 gen_spr_compress(env
);
3225 /* Memory management */
3226 #if !defined(CONFIG_USER_ONLY)
3231 init_excp_4xx_softmmu(env
);
3232 env
->dcache_line_size
= 32;
3233 env
->icache_line_size
= 32;
3234 /* Allocate hardware IRQ controller */
3235 ppc40x_irq_init(env
);
3239 #define POWERPC_INSNS_403 (PPC_INSNS_BASE | PPC_STRING | \
3240 PPC_DCR | PPC_WRTEE | \
3241 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3243 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3244 PPC_4xx_COMMON | PPC_40x_EXCP)
3245 #define POWERPC_MSRM_403 (0x000000000007D00DULL)
3246 #define POWERPC_MMU_403 (POWERPC_MMU_REAL)
3247 #define POWERPC_EXCP_403 (POWERPC_EXCP_40x)
3248 #define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401)
3249 #define POWERPC_BFDM_403 (bfd_mach_ppc_403)
3250 #define POWERPC_FLAG_403 (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3251 POWERPC_FLAG_BUS_CLK)
3252 #define check_pow_403 check_pow_nocheck
3254 static void init_proc_403 (CPUPPCState
*env
)
3257 gen_spr_401_403(env
);
3259 gen_spr_403_real(env
);
3260 init_excp_4xx_real(env
);
3261 env
->dcache_line_size
= 32;
3262 env
->icache_line_size
= 32;
3263 /* Allocate hardware IRQ controller */
3264 ppc40x_irq_init(env
);
3267 /* PowerPC 403 GCX */
3268 #define POWERPC_INSNS_403GCX (PPC_INSNS_BASE | PPC_STRING | \
3269 PPC_DCR | PPC_WRTEE | \
3270 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3272 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3273 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3274 PPC_4xx_COMMON | PPC_40x_EXCP)
3275 #define POWERPC_MSRM_403GCX (0x000000000007D00DULL)
3276 #define POWERPC_MMU_403GCX (POWERPC_MMU_SOFT_4xx_Z)
3277 #define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x)
3278 #define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401)
3279 #define POWERPC_BFDM_403GCX (bfd_mach_ppc_403)
3280 #define POWERPC_FLAG_403GCX (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \
3281 POWERPC_FLAG_BUS_CLK)
3282 #define check_pow_403GCX check_pow_nocheck
3284 static void init_proc_403GCX (CPUPPCState
*env
)
3287 gen_spr_401_403(env
);
3289 gen_spr_403_real(env
);
3290 gen_spr_403_mmu(env
);
3291 /* Bus access control */
3292 /* not emulated, as Qemu never does speculative access */
3293 spr_register(env
, SPR_40x_SGR
, "SGR",
3294 SPR_NOACCESS
, SPR_NOACCESS
,
3295 &spr_read_generic
, &spr_write_generic
,
3297 /* not emulated, as Qemu do not emulate caches */
3298 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3299 SPR_NOACCESS
, SPR_NOACCESS
,
3300 &spr_read_generic
, &spr_write_generic
,
3302 /* Memory management */
3303 #if !defined(CONFIG_USER_ONLY)
3308 init_excp_4xx_softmmu(env
);
3309 env
->dcache_line_size
= 32;
3310 env
->icache_line_size
= 32;
3311 /* Allocate hardware IRQ controller */
3312 ppc40x_irq_init(env
);
3316 #define POWERPC_INSNS_405 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3317 PPC_DCR | PPC_WRTEE | \
3318 PPC_CACHE | PPC_CACHE_ICBI | PPC_40x_ICBT | \
3319 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3320 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3321 PPC_40x_TLB | PPC_MEM_TLBIA | PPC_MEM_TLBSYNC | \
3322 PPC_4xx_COMMON | PPC_405_MAC | PPC_40x_EXCP)
3323 #define POWERPC_MSRM_405 (0x000000000006E630ULL)
3324 #define POWERPC_MMU_405 (POWERPC_MMU_SOFT_4xx)
3325 #define POWERPC_EXCP_405 (POWERPC_EXCP_40x)
3326 #define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405)
3327 #define POWERPC_BFDM_405 (bfd_mach_ppc_403)
3328 #define POWERPC_FLAG_405 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3329 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3330 #define check_pow_405 check_pow_nocheck
3332 static void init_proc_405 (CPUPPCState
*env
)
3338 /* Bus access control */
3339 /* not emulated, as Qemu never does speculative access */
3340 spr_register(env
, SPR_40x_SGR
, "SGR",
3341 SPR_NOACCESS
, SPR_NOACCESS
,
3342 &spr_read_generic
, &spr_write_generic
,
3344 /* not emulated, as Qemu do not emulate caches */
3345 spr_register(env
, SPR_40x_DCWR
, "DCWR",
3346 SPR_NOACCESS
, SPR_NOACCESS
,
3347 &spr_read_generic
, &spr_write_generic
,
3349 /* Memory management */
3350 #if !defined(CONFIG_USER_ONLY)
3355 init_excp_4xx_softmmu(env
);
3356 env
->dcache_line_size
= 32;
3357 env
->icache_line_size
= 32;
3358 /* Allocate hardware IRQ controller */
3359 ppc40x_irq_init(env
);
3362 /* PowerPC 440 EP */
3363 #define POWERPC_INSNS_440EP (PPC_INSNS_BASE | PPC_STRING | \
3364 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3365 PPC_CACHE | PPC_CACHE_ICBI | \
3366 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3368 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3370 #define POWERPC_MSRM_440EP (0x000000000006D630ULL)
3371 #define POWERPC_MMU_440EP (POWERPC_MMU_BOOKE)
3372 #define POWERPC_EXCP_440EP (POWERPC_EXCP_BOOKE)
3373 #define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE)
3374 #define POWERPC_BFDM_440EP (bfd_mach_ppc_403)
3375 #define POWERPC_FLAG_440EP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3376 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3377 #define check_pow_440EP check_pow_nocheck
3379 __attribute__ (( unused
))
3380 static void init_proc_440EP (CPUPPCState
*env
)
3384 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3386 gen_spr_usprgh(env
);
3387 /* Processor identification */
3388 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3389 SPR_NOACCESS
, SPR_NOACCESS
,
3390 &spr_read_generic
, &spr_write_pir
,
3392 /* XXX : not implemented */
3393 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3394 SPR_NOACCESS
, SPR_NOACCESS
,
3395 &spr_read_generic
, &spr_write_generic
,
3397 /* XXX : not implemented */
3398 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3399 SPR_NOACCESS
, SPR_NOACCESS
,
3400 &spr_read_generic
, &spr_write_generic
,
3402 /* XXX : not implemented */
3403 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3404 SPR_NOACCESS
, SPR_NOACCESS
,
3405 &spr_read_generic
, &spr_write_generic
,
3407 /* XXX : not implemented */
3408 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3409 SPR_NOACCESS
, SPR_NOACCESS
,
3410 &spr_read_generic
, &spr_write_generic
,
3412 /* XXX : not implemented */
3413 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3414 SPR_NOACCESS
, SPR_NOACCESS
,
3415 &spr_read_generic
, &spr_write_generic
,
3417 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3418 SPR_NOACCESS
, SPR_NOACCESS
,
3419 &spr_read_generic
, &spr_write_generic
,
3421 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3422 SPR_NOACCESS
, SPR_NOACCESS
,
3423 &spr_read_generic
, &spr_write_generic
,
3425 /* XXX : not implemented */
3426 spr_register(env
, SPR_440_CCR1
, "CCR1",
3427 SPR_NOACCESS
, SPR_NOACCESS
,
3428 &spr_read_generic
, &spr_write_generic
,
3430 /* Memory management */
3431 #if !defined(CONFIG_USER_ONLY)
3436 init_excp_BookE(env
);
3437 env
->dcache_line_size
= 32;
3438 env
->icache_line_size
= 32;
3439 /* XXX: TODO: allocate internal IRQ controller */
3442 /* PowerPC 440 GP */
3443 #define POWERPC_INSNS_440GP (PPC_INSNS_BASE | PPC_STRING | \
3444 PPC_DCR | PPC_DCRX | PPC_WRTEE | PPC_MFAPIDI | \
3445 PPC_CACHE | PPC_CACHE_ICBI | \
3446 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3447 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3448 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3450 #define POWERPC_MSRM_440GP (0x000000000006FF30ULL)
3451 #define POWERPC_MMU_440GP (POWERPC_MMU_BOOKE)
3452 #define POWERPC_EXCP_440GP (POWERPC_EXCP_BOOKE)
3453 #define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE)
3454 #define POWERPC_BFDM_440GP (bfd_mach_ppc_403)
3455 #define POWERPC_FLAG_440GP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3456 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3457 #define check_pow_440GP check_pow_nocheck
3459 __attribute__ (( unused
))
3460 static void init_proc_440GP (CPUPPCState
*env
)
3464 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3466 gen_spr_usprgh(env
);
3467 /* Processor identification */
3468 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3469 SPR_NOACCESS
, SPR_NOACCESS
,
3470 &spr_read_generic
, &spr_write_pir
,
3472 /* XXX : not implemented */
3473 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3474 SPR_NOACCESS
, SPR_NOACCESS
,
3475 &spr_read_generic
, &spr_write_generic
,
3477 /* XXX : not implemented */
3478 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3479 SPR_NOACCESS
, SPR_NOACCESS
,
3480 &spr_read_generic
, &spr_write_generic
,
3482 /* XXX : not implemented */
3483 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3484 SPR_NOACCESS
, SPR_NOACCESS
,
3485 &spr_read_generic
, &spr_write_generic
,
3487 /* XXX : not implemented */
3488 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3489 SPR_NOACCESS
, SPR_NOACCESS
,
3490 &spr_read_generic
, &spr_write_generic
,
3492 /* Memory management */
3493 #if !defined(CONFIG_USER_ONLY)
3498 init_excp_BookE(env
);
3499 env
->dcache_line_size
= 32;
3500 env
->icache_line_size
= 32;
3501 /* XXX: TODO: allocate internal IRQ controller */
3505 #define POWERPC_INSNS_440x4 (PPC_INSNS_BASE | PPC_STRING | \
3506 PPC_DCR | PPC_WRTEE | \
3507 PPC_CACHE | PPC_CACHE_ICBI | \
3508 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3510 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3512 #define POWERPC_MSRM_440x4 (0x000000000006FF30ULL)
3513 #define POWERPC_MMU_440x4 (POWERPC_MMU_BOOKE)
3514 #define POWERPC_EXCP_440x4 (POWERPC_EXCP_BOOKE)
3515 #define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE)
3516 #define POWERPC_BFDM_440x4 (bfd_mach_ppc_403)
3517 #define POWERPC_FLAG_440x4 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3518 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3519 #define check_pow_440x4 check_pow_nocheck
3521 __attribute__ (( unused
))
3522 static void init_proc_440x4 (CPUPPCState
*env
)
3526 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3528 gen_spr_usprgh(env
);
3529 /* Processor identification */
3530 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3531 SPR_NOACCESS
, SPR_NOACCESS
,
3532 &spr_read_generic
, &spr_write_pir
,
3534 /* XXX : not implemented */
3535 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3536 SPR_NOACCESS
, SPR_NOACCESS
,
3537 &spr_read_generic
, &spr_write_generic
,
3539 /* XXX : not implemented */
3540 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3541 SPR_NOACCESS
, SPR_NOACCESS
,
3542 &spr_read_generic
, &spr_write_generic
,
3544 /* XXX : not implemented */
3545 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3546 SPR_NOACCESS
, SPR_NOACCESS
,
3547 &spr_read_generic
, &spr_write_generic
,
3549 /* XXX : not implemented */
3550 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3551 SPR_NOACCESS
, SPR_NOACCESS
,
3552 &spr_read_generic
, &spr_write_generic
,
3554 /* Memory management */
3555 #if !defined(CONFIG_USER_ONLY)
3560 init_excp_BookE(env
);
3561 env
->dcache_line_size
= 32;
3562 env
->icache_line_size
= 32;
3563 /* XXX: TODO: allocate internal IRQ controller */
3567 #define POWERPC_INSNS_440x5 (PPC_INSNS_BASE | PPC_STRING | \
3568 PPC_DCR | PPC_WRTEE | PPC_RFMCI | \
3569 PPC_CACHE | PPC_CACHE_ICBI | \
3570 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3572 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3574 #define POWERPC_MSRM_440x5 (0x000000000006FF30ULL)
3575 #define POWERPC_MMU_440x5 (POWERPC_MMU_BOOKE)
3576 #define POWERPC_EXCP_440x5 (POWERPC_EXCP_BOOKE)
3577 #define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE)
3578 #define POWERPC_BFDM_440x5 (bfd_mach_ppc_403)
3579 #define POWERPC_FLAG_440x5 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3580 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3581 #define check_pow_440x5 check_pow_nocheck
3583 __attribute__ (( unused
))
3584 static void init_proc_440x5 (CPUPPCState
*env
)
3588 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3590 gen_spr_usprgh(env
);
3591 /* Processor identification */
3592 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3593 SPR_NOACCESS
, SPR_NOACCESS
,
3594 &spr_read_generic
, &spr_write_pir
,
3596 /* XXX : not implemented */
3597 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3598 SPR_NOACCESS
, SPR_NOACCESS
,
3599 &spr_read_generic
, &spr_write_generic
,
3601 /* XXX : not implemented */
3602 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3603 SPR_NOACCESS
, SPR_NOACCESS
,
3604 &spr_read_generic
, &spr_write_generic
,
3606 /* XXX : not implemented */
3607 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3608 SPR_NOACCESS
, SPR_NOACCESS
,
3609 &spr_read_generic
, &spr_write_generic
,
3611 /* XXX : not implemented */
3612 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3613 SPR_NOACCESS
, SPR_NOACCESS
,
3614 &spr_read_generic
, &spr_write_generic
,
3616 /* XXX : not implemented */
3617 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3618 SPR_NOACCESS
, SPR_NOACCESS
,
3619 &spr_read_generic
, &spr_write_generic
,
3621 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3622 SPR_NOACCESS
, SPR_NOACCESS
,
3623 &spr_read_generic
, &spr_write_generic
,
3625 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3626 SPR_NOACCESS
, SPR_NOACCESS
,
3627 &spr_read_generic
, &spr_write_generic
,
3629 /* XXX : not implemented */
3630 spr_register(env
, SPR_440_CCR1
, "CCR1",
3631 SPR_NOACCESS
, SPR_NOACCESS
,
3632 &spr_read_generic
, &spr_write_generic
,
3634 /* Memory management */
3635 #if !defined(CONFIG_USER_ONLY)
3640 init_excp_BookE(env
);
3641 env
->dcache_line_size
= 32;
3642 env
->icache_line_size
= 32;
3643 /* XXX: TODO: allocate internal IRQ controller */
3646 /* PowerPC 460 (guessed) */
3647 #define POWERPC_INSNS_460 (PPC_INSNS_BASE | PPC_STRING | \
3648 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3649 PPC_WRTEE | PPC_MFAPIDI | \
3650 PPC_CACHE | PPC_CACHE_ICBI | \
3651 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3652 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3653 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3655 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3656 #define POWERPC_MMU_460 (POWERPC_MMU_BOOKE)
3657 #define POWERPC_EXCP_460 (POWERPC_EXCP_BOOKE)
3658 #define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE)
3659 #define POWERPC_BFDM_460 (bfd_mach_ppc_403)
3660 #define POWERPC_FLAG_460 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3661 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3662 #define check_pow_460 check_pow_nocheck
3664 __attribute__ (( unused
))
3665 static void init_proc_460 (CPUPPCState
*env
)
3669 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3671 gen_spr_usprgh(env
);
3672 /* Processor identification */
3673 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3674 SPR_NOACCESS
, SPR_NOACCESS
,
3675 &spr_read_generic
, &spr_write_pir
,
3677 /* XXX : not implemented */
3678 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3679 SPR_NOACCESS
, SPR_NOACCESS
,
3680 &spr_read_generic
, &spr_write_generic
,
3682 /* XXX : not implemented */
3683 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3684 SPR_NOACCESS
, SPR_NOACCESS
,
3685 &spr_read_generic
, &spr_write_generic
,
3687 /* XXX : not implemented */
3688 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3689 SPR_NOACCESS
, SPR_NOACCESS
,
3690 &spr_read_generic
, &spr_write_generic
,
3692 /* XXX : not implemented */
3693 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3694 SPR_NOACCESS
, SPR_NOACCESS
,
3695 &spr_read_generic
, &spr_write_generic
,
3697 /* XXX : not implemented */
3698 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3699 SPR_NOACCESS
, SPR_NOACCESS
,
3700 &spr_read_generic
, &spr_write_generic
,
3702 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3703 SPR_NOACCESS
, SPR_NOACCESS
,
3704 &spr_read_generic
, &spr_write_generic
,
3706 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3707 SPR_NOACCESS
, SPR_NOACCESS
,
3708 &spr_read_generic
, &spr_write_generic
,
3710 /* XXX : not implemented */
3711 spr_register(env
, SPR_440_CCR1
, "CCR1",
3712 SPR_NOACCESS
, SPR_NOACCESS
,
3713 &spr_read_generic
, &spr_write_generic
,
3715 /* XXX : not implemented */
3716 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3717 &spr_read_generic
, &spr_write_generic
,
3718 &spr_read_generic
, &spr_write_generic
,
3720 /* Memory management */
3721 #if !defined(CONFIG_USER_ONLY)
3726 init_excp_BookE(env
);
3727 env
->dcache_line_size
= 32;
3728 env
->icache_line_size
= 32;
3729 /* XXX: TODO: allocate internal IRQ controller */
3732 /* PowerPC 460F (guessed) */
3733 #define POWERPC_INSNS_460F (PPC_INSNS_BASE | PPC_STRING | \
3734 PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \
3735 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
3736 PPC_FLOAT_STFIWX | \
3737 PPC_DCR | PPC_DCRX | PPC_DCRUX | \
3738 PPC_WRTEE | PPC_MFAPIDI | \
3739 PPC_CACHE | PPC_CACHE_ICBI | \
3740 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
3741 PPC_MEM_TLBSYNC | PPC_TLBIVA | \
3742 PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \
3744 #define POWERPC_MSRM_460 (0x000000000006FF30ULL)
3745 #define POWERPC_MMU_460F (POWERPC_MMU_BOOKE)
3746 #define POWERPC_EXCP_460F (POWERPC_EXCP_BOOKE)
3747 #define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE)
3748 #define POWERPC_BFDM_460F (bfd_mach_ppc_403)
3749 #define POWERPC_FLAG_460F (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \
3750 POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)
3751 #define check_pow_460F check_pow_nocheck
3753 __attribute__ (( unused
))
3754 static void init_proc_460F (CPUPPCState
*env
)
3758 gen_spr_BookE(env
, 0x000000000000FFFFULL
);
3760 gen_spr_usprgh(env
);
3761 /* Processor identification */
3762 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
3763 SPR_NOACCESS
, SPR_NOACCESS
,
3764 &spr_read_generic
, &spr_write_pir
,
3766 /* XXX : not implemented */
3767 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
3768 SPR_NOACCESS
, SPR_NOACCESS
,
3769 &spr_read_generic
, &spr_write_generic
,
3771 /* XXX : not implemented */
3772 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
3773 SPR_NOACCESS
, SPR_NOACCESS
,
3774 &spr_read_generic
, &spr_write_generic
,
3776 /* XXX : not implemented */
3777 spr_register(env
, SPR_BOOKE_DVC1
, "DVC1",
3778 SPR_NOACCESS
, SPR_NOACCESS
,
3779 &spr_read_generic
, &spr_write_generic
,
3781 /* XXX : not implemented */
3782 spr_register(env
, SPR_BOOKE_DVC2
, "DVC2",
3783 SPR_NOACCESS
, SPR_NOACCESS
,
3784 &spr_read_generic
, &spr_write_generic
,
3786 /* XXX : not implemented */
3787 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
3788 SPR_NOACCESS
, SPR_NOACCESS
,
3789 &spr_read_generic
, &spr_write_generic
,
3791 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
3792 SPR_NOACCESS
, SPR_NOACCESS
,
3793 &spr_read_generic
, &spr_write_generic
,
3795 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
3796 SPR_NOACCESS
, SPR_NOACCESS
,
3797 &spr_read_generic
, &spr_write_generic
,
3799 /* XXX : not implemented */
3800 spr_register(env
, SPR_440_CCR1
, "CCR1",
3801 SPR_NOACCESS
, SPR_NOACCESS
,
3802 &spr_read_generic
, &spr_write_generic
,
3804 /* XXX : not implemented */
3805 spr_register(env
, SPR_DCRIPR
, "SPR_DCRIPR",
3806 &spr_read_generic
, &spr_write_generic
,
3807 &spr_read_generic
, &spr_write_generic
,
3809 /* Memory management */
3810 #if !defined(CONFIG_USER_ONLY)
3815 init_excp_BookE(env
);
3816 env
->dcache_line_size
= 32;
3817 env
->icache_line_size
= 32;
3818 /* XXX: TODO: allocate internal IRQ controller */
3821 /* Freescale 5xx cores (aka RCPU) */
3822 #define POWERPC_INSNS_MPC5xx (PPC_INSNS_BASE | PPC_STRING | \
3823 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
3824 PPC_CACHE_ICBI | PPC_FLOAT | PPC_FLOAT_STFIWX | \
3826 #define POWERPC_MSRM_MPC5xx (0x000000000001FF43ULL)
3827 #define POWERPC_MMU_MPC5xx (POWERPC_MMU_REAL)
3828 #define POWERPC_EXCP_MPC5xx (POWERPC_EXCP_603)
3829 #define POWERPC_INPUT_MPC5xx (PPC_FLAGS_INPUT_RCPU)
3830 #define POWERPC_BFDM_MPC5xx (bfd_mach_ppc_505)
3831 #define POWERPC_FLAG_MPC5xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
3832 POWERPC_FLAG_BUS_CLK)
3833 #define check_pow_MPC5xx check_pow_none
3835 __attribute__ (( unused
))
3836 static void init_proc_MPC5xx (CPUPPCState
*env
)
3840 gen_spr_5xx_8xx(env
);
3842 init_excp_MPC5xx(env
);
3843 env
->dcache_line_size
= 32;
3844 env
->icache_line_size
= 32;
3845 /* XXX: TODO: allocate internal IRQ controller */
3848 /* Freescale 8xx cores (aka PowerQUICC) */
3849 #define POWERPC_INSNS_MPC8xx (PPC_INSNS_BASE | PPC_STRING | \
3850 PPC_MEM_EIEIO | PPC_MEM_SYNC | \
3851 PPC_CACHE_ICBI | PPC_MFTB)
3852 #define POWERPC_MSRM_MPC8xx (0x000000000001F673ULL)
3853 #define POWERPC_MMU_MPC8xx (POWERPC_MMU_MPC8xx)
3854 #define POWERPC_EXCP_MPC8xx (POWERPC_EXCP_603)
3855 #define POWERPC_INPUT_MPC8xx (PPC_FLAGS_INPUT_RCPU)
3856 #define POWERPC_BFDM_MPC8xx (bfd_mach_ppc_860)
3857 #define POWERPC_FLAG_MPC8xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
3858 POWERPC_FLAG_BUS_CLK)
3859 #define check_pow_MPC8xx check_pow_none
3861 __attribute__ (( unused
))
3862 static void init_proc_MPC8xx (CPUPPCState
*env
)
3866 gen_spr_5xx_8xx(env
);
3868 init_excp_MPC8xx(env
);
3869 env
->dcache_line_size
= 32;
3870 env
->icache_line_size
= 32;
3871 /* XXX: TODO: allocate internal IRQ controller */
3874 /* Freescale 82xx cores (aka PowerQUICC-II) */
3876 #define POWERPC_INSNS_G2 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3877 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
3878 PPC_FLOAT_STFIWX | \
3879 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
3880 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3881 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
3882 PPC_SEGMENT | PPC_EXTERN)
3883 #define POWERPC_MSRM_G2 (0x000000000006FFF2ULL)
3884 #define POWERPC_MMU_G2 (POWERPC_MMU_SOFT_6xx)
3885 //#define POWERPC_EXCP_G2 (POWERPC_EXCP_G2)
3886 #define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx)
3887 #define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e)
3888 #define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
3889 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
3890 #define check_pow_G2 check_pow_hid0
3892 static void init_proc_G2 (CPUPPCState
*env
)
3894 gen_spr_ne_601(env
);
3895 gen_spr_G2_755(env
);
3899 /* External access control */
3900 /* XXX : not implemented */
3901 spr_register(env
, SPR_EAR
, "EAR",
3902 SPR_NOACCESS
, SPR_NOACCESS
,
3903 &spr_read_generic
, &spr_write_generic
,
3905 /* Hardware implementation register */
3906 /* XXX : not implemented */
3907 spr_register(env
, SPR_HID0
, "HID0",
3908 SPR_NOACCESS
, SPR_NOACCESS
,
3909 &spr_read_generic
, &spr_write_generic
,
3911 /* XXX : not implemented */
3912 spr_register(env
, SPR_HID1
, "HID1",
3913 SPR_NOACCESS
, SPR_NOACCESS
,
3914 &spr_read_generic
, &spr_write_generic
,
3916 /* XXX : not implemented */
3917 spr_register(env
, SPR_HID2
, "HID2",
3918 SPR_NOACCESS
, SPR_NOACCESS
,
3919 &spr_read_generic
, &spr_write_generic
,
3921 /* Memory management */
3924 gen_6xx_7xx_soft_tlb(env
, 64, 2);
3926 env
->dcache_line_size
= 32;
3927 env
->icache_line_size
= 32;
3928 /* Allocate hardware IRQ controller */
3929 ppc6xx_irq_init(env
);
3933 #define POWERPC_INSNS_G2LE (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
3934 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
3935 PPC_FLOAT_STFIWX | \
3936 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
3937 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
3938 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
3939 PPC_SEGMENT | PPC_EXTERN)
3940 #define POWERPC_MSRM_G2LE (0x000000000007FFF3ULL)
3941 #define POWERPC_MMU_G2LE (POWERPC_MMU_SOFT_6xx)
3942 #define POWERPC_EXCP_G2LE (POWERPC_EXCP_G2)
3943 #define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx)
3944 #define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e)
3945 #define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
3946 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
3947 #define check_pow_G2LE check_pow_hid0
3949 static void init_proc_G2LE (CPUPPCState
*env
)
3951 gen_spr_ne_601(env
);
3952 gen_spr_G2_755(env
);
3956 /* External access control */
3957 /* XXX : not implemented */
3958 spr_register(env
, SPR_EAR
, "EAR",
3959 SPR_NOACCESS
, SPR_NOACCESS
,
3960 &spr_read_generic
, &spr_write_generic
,
3962 /* Hardware implementation register */
3963 /* XXX : not implemented */
3964 spr_register(env
, SPR_HID0
, "HID0",
3965 SPR_NOACCESS
, SPR_NOACCESS
,
3966 &spr_read_generic
, &spr_write_generic
,
3968 /* XXX : not implemented */
3969 spr_register(env
, SPR_HID1
, "HID1",
3970 SPR_NOACCESS
, SPR_NOACCESS
,
3971 &spr_read_generic
, &spr_write_generic
,
3973 /* XXX : not implemented */
3974 spr_register(env
, SPR_HID2
, "HID2",
3975 SPR_NOACCESS
, SPR_NOACCESS
,
3976 &spr_read_generic
, &spr_write_generic
,
3978 /* Memory management */
3981 gen_6xx_7xx_soft_tlb(env
, 64, 2);
3983 env
->dcache_line_size
= 32;
3984 env
->icache_line_size
= 32;
3985 /* Allocate hardware IRQ controller */
3986 ppc6xx_irq_init(env
);
3990 /* XXX: unimplemented instructions:
3997 * all SPE multiply-accumulate instructions
3999 #define POWERPC_INSNS_e200 (PPC_INSNS_BASE | PPC_ISEL | \
4000 PPC_SPE | PPC_SPE_SINGLE | \
4001 PPC_WRTEE | PPC_RFDI | \
4002 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4003 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4004 PPC_MEM_TLBSYNC | PPC_TLBIVAX | \
4006 #define POWERPC_MSRM_e200 (0x000000000606FF30ULL)
4007 #define POWERPC_MMU_e200 (POWERPC_MMU_BOOKE_FSL)
4008 #define POWERPC_EXCP_e200 (POWERPC_EXCP_BOOKE)
4009 #define POWERPC_INPUT_e200 (PPC_FLAGS_INPUT_BookE)
4010 #define POWERPC_BFDM_e200 (bfd_mach_ppc_860)
4011 #define POWERPC_FLAG_e200 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4012 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4013 POWERPC_FLAG_BUS_CLK)
4014 #define check_pow_e200 check_pow_hid0
4016 __attribute__ (( unused
))
4017 static void init_proc_e200 (CPUPPCState
*env
)
4021 gen_spr_BookE(env
, 0x000000070000FFFFULL
);
4022 /* XXX : not implemented */
4023 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4024 SPR_NOACCESS
, SPR_NOACCESS
,
4025 &spr_read_generic
, &spr_write_generic
,
4027 /* Memory management */
4028 gen_spr_BookE_FSL(env
, 0x0000005D);
4029 /* XXX : not implemented */
4030 spr_register(env
, SPR_HID0
, "HID0",
4031 SPR_NOACCESS
, SPR_NOACCESS
,
4032 &spr_read_generic
, &spr_write_generic
,
4034 /* XXX : not implemented */
4035 spr_register(env
, SPR_HID1
, "HID1",
4036 SPR_NOACCESS
, SPR_NOACCESS
,
4037 &spr_read_generic
, &spr_write_generic
,
4039 /* XXX : not implemented */
4040 spr_register(env
, SPR_Exxx_ALTCTXCR
, "ALTCTXCR",
4041 SPR_NOACCESS
, SPR_NOACCESS
,
4042 &spr_read_generic
, &spr_write_generic
,
4044 /* XXX : not implemented */
4045 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4046 SPR_NOACCESS
, SPR_NOACCESS
,
4047 &spr_read_generic
, &spr_write_generic
,
4049 /* XXX : not implemented */
4050 spr_register(env
, SPR_Exxx_CTXCR
, "CTXCR",
4051 SPR_NOACCESS
, SPR_NOACCESS
,
4052 &spr_read_generic
, &spr_write_generic
,
4054 /* XXX : not implemented */
4055 spr_register(env
, SPR_Exxx_DBCNT
, "DBCNT",
4056 SPR_NOACCESS
, SPR_NOACCESS
,
4057 &spr_read_generic
, &spr_write_generic
,
4059 /* XXX : not implemented */
4060 spr_register(env
, SPR_Exxx_DBCR3
, "DBCR3",
4061 SPR_NOACCESS
, SPR_NOACCESS
,
4062 &spr_read_generic
, &spr_write_generic
,
4064 /* XXX : not implemented */
4065 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4066 SPR_NOACCESS
, SPR_NOACCESS
,
4067 &spr_read_generic
, &spr_write_generic
,
4069 /* XXX : not implemented */
4070 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4071 SPR_NOACCESS
, SPR_NOACCESS
,
4072 &spr_read_generic
, &spr_write_generic
,
4074 /* XXX : not implemented */
4075 spr_register(env
, SPR_Exxx_L1FINV0
, "L1FINV0",
4076 SPR_NOACCESS
, SPR_NOACCESS
,
4077 &spr_read_generic
, &spr_write_generic
,
4079 /* XXX : not implemented */
4080 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
4081 SPR_NOACCESS
, SPR_NOACCESS
,
4082 &spr_read_generic
, &spr_write_generic
,
4084 /* XXX : not implemented */
4085 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
4086 SPR_NOACCESS
, SPR_NOACCESS
,
4087 &spr_read_generic
, &spr_write_generic
,
4089 /* XXX : not implemented */
4090 spr_register(env
, SPR_BOOKE_IAC3
, "IAC3",
4091 SPR_NOACCESS
, SPR_NOACCESS
,
4092 &spr_read_generic
, &spr_write_generic
,
4094 /* XXX : not implemented */
4095 spr_register(env
, SPR_BOOKE_IAC4
, "IAC4",
4096 SPR_NOACCESS
, SPR_NOACCESS
,
4097 &spr_read_generic
, &spr_write_generic
,
4099 spr_register(env
, SPR_BOOKE_DSRR0
, "DSRR0",
4100 SPR_NOACCESS
, SPR_NOACCESS
,
4101 &spr_read_generic
, &spr_write_generic
,
4103 spr_register(env
, SPR_BOOKE_DSRR1
, "DSRR1",
4104 SPR_NOACCESS
, SPR_NOACCESS
,
4105 &spr_read_generic
, &spr_write_generic
,
4107 #if !defined(CONFIG_USER_ONLY)
4112 init_excp_e200(env
);
4113 env
->dcache_line_size
= 32;
4114 env
->icache_line_size
= 32;
4115 /* XXX: TODO: allocate internal IRQ controller */
4119 #define POWERPC_INSNS_e300 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4120 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4121 PPC_FLOAT_STFIWX | \
4122 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4123 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4124 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4125 PPC_SEGMENT | PPC_EXTERN)
4126 #define POWERPC_MSRM_e300 (0x000000000007FFF3ULL)
4127 #define POWERPC_MMU_e300 (POWERPC_MMU_SOFT_6xx)
4128 #define POWERPC_EXCP_e300 (POWERPC_EXCP_603)
4129 #define POWERPC_INPUT_e300 (PPC_FLAGS_INPUT_6xx)
4130 #define POWERPC_BFDM_e300 (bfd_mach_ppc_603)
4131 #define POWERPC_FLAG_e300 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4132 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4133 #define check_pow_e300 check_pow_hid0
4135 __attribute__ (( unused
))
4136 static void init_proc_e300 (CPUPPCState
*env
)
4138 gen_spr_ne_601(env
);
4142 /* hardware implementation registers */
4143 /* XXX : not implemented */
4144 spr_register(env
, SPR_HID0
, "HID0",
4145 SPR_NOACCESS
, SPR_NOACCESS
,
4146 &spr_read_generic
, &spr_write_generic
,
4148 /* XXX : not implemented */
4149 spr_register(env
, SPR_HID1
, "HID1",
4150 SPR_NOACCESS
, SPR_NOACCESS
,
4151 &spr_read_generic
, &spr_write_generic
,
4153 /* Memory management */
4155 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4157 env
->dcache_line_size
= 32;
4158 env
->icache_line_size
= 32;
4159 /* Allocate hardware IRQ controller */
4160 ppc6xx_irq_init(env
);
4164 #define POWERPC_INSNS_e500v1 (PPC_INSNS_BASE | PPC_ISEL | \
4165 PPC_SPE | PPC_SPE_SINGLE | \
4166 PPC_WRTEE | PPC_RFDI | \
4167 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4168 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4169 PPC_MEM_TLBSYNC | PPC_TLBIVAX | \
4171 #define POWERPC_MSRM_e500v1 (0x000000000606FF30ULL)
4172 #define POWERPC_MMU_e500v1 (POWERPC_MMU_BOOKE_FSL)
4173 #define POWERPC_EXCP_e500v1 (POWERPC_EXCP_BOOKE)
4174 #define POWERPC_INPUT_e500v1 (PPC_FLAGS_INPUT_BookE)
4175 #define POWERPC_BFDM_e500v1 (bfd_mach_ppc_860)
4176 #define POWERPC_FLAG_e500v1 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4177 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4178 POWERPC_FLAG_BUS_CLK)
4179 #define check_pow_e500v1 check_pow_hid0
4180 #define init_proc_e500v1 init_proc_e500
4183 #define POWERPC_INSNS_e500v2 (PPC_INSNS_BASE | PPC_ISEL | \
4184 PPC_SPE | PPC_SPE_SINGLE | PPC_SPE_DOUBLE | \
4185 PPC_WRTEE | PPC_RFDI | \
4186 PPC_CACHE | PPC_CACHE_LOCK | PPC_CACHE_ICBI | \
4187 PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
4188 PPC_MEM_TLBSYNC | PPC_TLBIVAX | \
4190 #define POWERPC_MSRM_e500v2 (0x000000000606FF30ULL)
4191 #define POWERPC_MMU_e500v2 (POWERPC_MMU_BOOKE_FSL)
4192 #define POWERPC_EXCP_e500v2 (POWERPC_EXCP_BOOKE)
4193 #define POWERPC_INPUT_e500v2 (PPC_FLAGS_INPUT_BookE)
4194 #define POWERPC_BFDM_e500v2 (bfd_mach_ppc_860)
4195 #define POWERPC_FLAG_e500v2 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \
4196 POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \
4197 POWERPC_FLAG_BUS_CLK)
4198 #define check_pow_e500v2 check_pow_hid0
4199 #define init_proc_e500v2 init_proc_e500
4201 static void init_proc_e500 (CPUPPCState
*env
)
4205 gen_spr_BookE(env
, 0x0000000F0000FD7FULL
);
4206 /* Processor identification */
4207 spr_register(env
, SPR_BOOKE_PIR
, "PIR",
4208 SPR_NOACCESS
, SPR_NOACCESS
,
4209 &spr_read_generic
, &spr_write_pir
,
4211 /* XXX : not implemented */
4212 spr_register(env
, SPR_BOOKE_SPEFSCR
, "SPEFSCR",
4213 SPR_NOACCESS
, SPR_NOACCESS
,
4214 &spr_read_generic
, &spr_write_generic
,
4216 /* Memory management */
4217 #if !defined(CONFIG_USER_ONLY)
4220 gen_spr_BookE_FSL(env
, 0x0000005F);
4221 /* XXX : not implemented */
4222 spr_register(env
, SPR_HID0
, "HID0",
4223 SPR_NOACCESS
, SPR_NOACCESS
,
4224 &spr_read_generic
, &spr_write_generic
,
4226 /* XXX : not implemented */
4227 spr_register(env
, SPR_HID1
, "HID1",
4228 SPR_NOACCESS
, SPR_NOACCESS
,
4229 &spr_read_generic
, &spr_write_generic
,
4231 /* XXX : not implemented */
4232 spr_register(env
, SPR_Exxx_BBEAR
, "BBEAR",
4233 SPR_NOACCESS
, SPR_NOACCESS
,
4234 &spr_read_generic
, &spr_write_generic
,
4236 /* XXX : not implemented */
4237 spr_register(env
, SPR_Exxx_BBTAR
, "BBTAR",
4238 SPR_NOACCESS
, SPR_NOACCESS
,
4239 &spr_read_generic
, &spr_write_generic
,
4241 /* XXX : not implemented */
4242 spr_register(env
, SPR_Exxx_MCAR
, "MCAR",
4243 SPR_NOACCESS
, SPR_NOACCESS
,
4244 &spr_read_generic
, &spr_write_generic
,
4246 /* XXX : not implemented */
4247 spr_register(env
, SPR_BOOKE_MCSR
, "MCSR",
4248 SPR_NOACCESS
, SPR_NOACCESS
,
4249 &spr_read_generic
, &spr_write_generic
,
4251 /* XXX : not implemented */
4252 spr_register(env
, SPR_Exxx_NPIDR
, "NPIDR",
4253 SPR_NOACCESS
, SPR_NOACCESS
,
4254 &spr_read_generic
, &spr_write_generic
,
4256 /* XXX : not implemented */
4257 spr_register(env
, SPR_Exxx_BUCSR
, "BUCSR",
4258 SPR_NOACCESS
, SPR_NOACCESS
,
4259 &spr_read_generic
, &spr_write_generic
,
4261 /* XXX : not implemented */
4262 spr_register(env
, SPR_Exxx_L1CFG0
, "L1CFG0",
4263 SPR_NOACCESS
, SPR_NOACCESS
,
4264 &spr_read_generic
, &spr_write_generic
,
4266 /* XXX : not implemented */
4267 spr_register(env
, SPR_Exxx_L1CSR0
, "L1CSR0",
4268 SPR_NOACCESS
, SPR_NOACCESS
,
4269 &spr_read_generic
, &spr_write_generic
,
4271 /* XXX : not implemented */
4272 spr_register(env
, SPR_Exxx_L1CSR1
, "L1CSR1",
4273 SPR_NOACCESS
, SPR_NOACCESS
,
4274 &spr_read_generic
, &spr_write_generic
,
4276 /* XXX : not implemented */
4277 spr_register(env
, SPR_BOOKE_TLB0CFG
, "TLB0CFG",
4278 SPR_NOACCESS
, SPR_NOACCESS
,
4279 &spr_read_generic
, &spr_write_generic
,
4281 /* XXX : not implemented */
4282 spr_register(env
, SPR_BOOKE_TLB1CFG
, "TLB1CFG",
4283 SPR_NOACCESS
, SPR_NOACCESS
,
4284 &spr_read_generic
, &spr_write_generic
,
4286 spr_register(env
, SPR_BOOKE_MCSRR0
, "MCSRR0",
4287 SPR_NOACCESS
, SPR_NOACCESS
,
4288 &spr_read_generic
, &spr_write_generic
,
4290 spr_register(env
, SPR_BOOKE_MCSRR1
, "MCSRR1",
4291 SPR_NOACCESS
, SPR_NOACCESS
,
4292 &spr_read_generic
, &spr_write_generic
,
4294 #if !defined(CONFIG_USER_ONLY)
4299 init_excp_e200(env
);
4300 env
->dcache_line_size
= 32;
4301 env
->icache_line_size
= 32;
4302 /* Allocate hardware IRQ controller */
4303 ppce500_irq_init(env
);
4306 /* Non-embedded PowerPC */
4308 /* POWER : same as 601, without mfmsr, mfsr */
4310 #define POWERPC_INSNS_POWER (XXX_TODO)
4311 /* POWER RSC (from RAD6000) */
4312 #define POWERPC_MSRM_POWER (0x00000000FEF0ULL)
4316 #define POWERPC_INSNS_601 (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4318 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4319 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4320 PPC_SEGMENT | PPC_EXTERN)
4321 #define POWERPC_MSRM_601 (0x000000000000FD70ULL)
4322 #define POWERPC_MSRR_601 (0x0000000000001040ULL)
4323 //#define POWERPC_MMU_601 (POWERPC_MMU_601)
4324 //#define POWERPC_EXCP_601 (POWERPC_EXCP_601)
4325 #define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx)
4326 #define POWERPC_BFDM_601 (bfd_mach_ppc_601)
4327 #define POWERPC_FLAG_601 (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4328 #define check_pow_601 check_pow_none
4330 static void init_proc_601 (CPUPPCState
*env
)
4332 gen_spr_ne_601(env
);
4334 /* Hardware implementation registers */
4335 /* XXX : not implemented */
4336 spr_register(env
, SPR_HID0
, "HID0",
4337 SPR_NOACCESS
, SPR_NOACCESS
,
4338 &spr_read_generic
, &spr_write_hid0_601
,
4340 /* XXX : not implemented */
4341 spr_register(env
, SPR_HID1
, "HID1",
4342 SPR_NOACCESS
, SPR_NOACCESS
,
4343 &spr_read_generic
, &spr_write_generic
,
4345 /* XXX : not implemented */
4346 spr_register(env
, SPR_601_HID2
, "HID2",
4347 SPR_NOACCESS
, SPR_NOACCESS
,
4348 &spr_read_generic
, &spr_write_generic
,
4350 /* XXX : not implemented */
4351 spr_register(env
, SPR_601_HID5
, "HID5",
4352 SPR_NOACCESS
, SPR_NOACCESS
,
4353 &spr_read_generic
, &spr_write_generic
,
4355 /* Memory management */
4357 /* XXX: beware that dcache line size is 64
4358 * but dcbz uses 32 bytes "sectors"
4359 * XXX: this breaks clcs instruction !
4361 env
->dcache_line_size
= 32;
4362 env
->icache_line_size
= 64;
4363 /* Allocate hardware IRQ controller */
4364 ppc6xx_irq_init(env
);
4368 #define POWERPC_INSNS_601v (PPC_INSNS_BASE | PPC_STRING | PPC_POWER_BR | \
4370 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4371 PPC_MEM_SYNC | PPC_MEM_EIEIO | PPC_MEM_TLBIE | \
4372 PPC_SEGMENT | PPC_EXTERN)
4373 #define POWERPC_MSRM_601v (0x000000000000FD70ULL)
4374 #define POWERPC_MSRR_601v (0x0000000000001040ULL)
4375 #define POWERPC_MMU_601v (POWERPC_MMU_601)
4376 #define POWERPC_EXCP_601v (POWERPC_EXCP_601)
4377 #define POWERPC_INPUT_601v (PPC_FLAGS_INPUT_6xx)
4378 #define POWERPC_BFDM_601v (bfd_mach_ppc_601)
4379 #define POWERPC_FLAG_601v (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK)
4380 #define check_pow_601v check_pow_none
4382 static void init_proc_601v (CPUPPCState
*env
)
4385 /* XXX : not implemented */
4386 spr_register(env
, SPR_601_HID15
, "HID15",
4387 SPR_NOACCESS
, SPR_NOACCESS
,
4388 &spr_read_generic
, &spr_write_generic
,
4393 #define POWERPC_INSNS_602 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4394 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4395 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4396 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4397 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4398 PPC_MEM_TLBIE | PPC_6xx_TLB | PPC_MEM_TLBSYNC | \
4399 PPC_SEGMENT | PPC_602_SPEC)
4400 #define POWERPC_MSRM_602 (0x0000000000C7FF73ULL)
4401 /* XXX: 602 MMU is quite specific. Should add a special case */
4402 #define POWERPC_MMU_602 (POWERPC_MMU_SOFT_6xx)
4403 //#define POWERPC_EXCP_602 (POWERPC_EXCP_602)
4404 #define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx)
4405 #define POWERPC_BFDM_602 (bfd_mach_ppc_602)
4406 #define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4407 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4408 #define check_pow_602 check_pow_hid0
4410 static void init_proc_602 (CPUPPCState
*env
)
4412 gen_spr_ne_601(env
);
4416 /* hardware implementation registers */
4417 /* XXX : not implemented */
4418 spr_register(env
, SPR_HID0
, "HID0",
4419 SPR_NOACCESS
, SPR_NOACCESS
,
4420 &spr_read_generic
, &spr_write_generic
,
4422 /* XXX : not implemented */
4423 spr_register(env
, SPR_HID1
, "HID1",
4424 SPR_NOACCESS
, SPR_NOACCESS
,
4425 &spr_read_generic
, &spr_write_generic
,
4427 /* Memory management */
4429 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4431 env
->dcache_line_size
= 32;
4432 env
->icache_line_size
= 32;
4433 /* Allocate hardware IRQ controller */
4434 ppc6xx_irq_init(env
);
4438 #define POWERPC_INSNS_603 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4439 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4440 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4441 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4442 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4443 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4444 PPC_SEGMENT | PPC_EXTERN)
4445 #define POWERPC_MSRM_603 (0x000000000007FF73ULL)
4446 #define POWERPC_MMU_603 (POWERPC_MMU_SOFT_6xx)
4447 //#define POWERPC_EXCP_603 (POWERPC_EXCP_603)
4448 #define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx)
4449 #define POWERPC_BFDM_603 (bfd_mach_ppc_603)
4450 #define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4451 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4452 #define check_pow_603 check_pow_hid0
4454 static void init_proc_603 (CPUPPCState
*env
)
4456 gen_spr_ne_601(env
);
4460 /* hardware implementation registers */
4461 /* XXX : not implemented */
4462 spr_register(env
, SPR_HID0
, "HID0",
4463 SPR_NOACCESS
, SPR_NOACCESS
,
4464 &spr_read_generic
, &spr_write_generic
,
4466 /* XXX : not implemented */
4467 spr_register(env
, SPR_HID1
, "HID1",
4468 SPR_NOACCESS
, SPR_NOACCESS
,
4469 &spr_read_generic
, &spr_write_generic
,
4471 /* Memory management */
4473 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4475 env
->dcache_line_size
= 32;
4476 env
->icache_line_size
= 32;
4477 /* Allocate hardware IRQ controller */
4478 ppc6xx_irq_init(env
);
4482 #define POWERPC_INSNS_603E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4483 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4484 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4485 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4486 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4487 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
4488 PPC_SEGMENT | PPC_EXTERN)
4489 #define POWERPC_MSRM_603E (0x000000000007FF73ULL)
4490 #define POWERPC_MMU_603E (POWERPC_MMU_SOFT_6xx)
4491 //#define POWERPC_EXCP_603E (POWERPC_EXCP_603E)
4492 #define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx)
4493 #define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e)
4494 #define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \
4495 POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK)
4496 #define check_pow_603E check_pow_hid0
4498 static void init_proc_603E (CPUPPCState
*env
)
4500 gen_spr_ne_601(env
);
4504 /* hardware implementation registers */
4505 /* XXX : not implemented */
4506 spr_register(env
, SPR_HID0
, "HID0",
4507 SPR_NOACCESS
, SPR_NOACCESS
,
4508 &spr_read_generic
, &spr_write_generic
,
4510 /* XXX : not implemented */
4511 spr_register(env
, SPR_HID1
, "HID1",
4512 SPR_NOACCESS
, SPR_NOACCESS
,
4513 &spr_read_generic
, &spr_write_generic
,
4515 /* XXX : not implemented */
4516 spr_register(env
, SPR_IABR
, "IABR",
4517 SPR_NOACCESS
, SPR_NOACCESS
,
4518 &spr_read_generic
, &spr_write_generic
,
4520 /* Memory management */
4522 gen_6xx_7xx_soft_tlb(env
, 64, 2);
4524 env
->dcache_line_size
= 32;
4525 env
->icache_line_size
= 32;
4526 /* Allocate hardware IRQ controller */
4527 ppc6xx_irq_init(env
);
4531 #define POWERPC_INSNS_604 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4532 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4533 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4534 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4535 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4536 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4537 PPC_SEGMENT | PPC_EXTERN)
4538 #define POWERPC_MSRM_604 (0x000000000005FF77ULL)
4539 #define POWERPC_MMU_604 (POWERPC_MMU_32B)
4540 //#define POWERPC_EXCP_604 (POWERPC_EXCP_604)
4541 #define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx)
4542 #define POWERPC_BFDM_604 (bfd_mach_ppc_604)
4543 #define POWERPC_FLAG_604 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4544 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4545 #define check_pow_604 check_pow_nocheck
4547 static void init_proc_604 (CPUPPCState
*env
)
4549 gen_spr_ne_601(env
);
4553 /* Hardware implementation registers */
4554 /* XXX : not implemented */
4555 spr_register(env
, SPR_HID0
, "HID0",
4556 SPR_NOACCESS
, SPR_NOACCESS
,
4557 &spr_read_generic
, &spr_write_generic
,
4559 /* Memory management */
4562 env
->dcache_line_size
= 32;
4563 env
->icache_line_size
= 32;
4564 /* Allocate hardware IRQ controller */
4565 ppc6xx_irq_init(env
);
4569 #define POWERPC_INSNS_604E (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4570 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4571 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4572 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4573 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4574 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4575 PPC_SEGMENT | PPC_EXTERN)
4576 #define POWERPC_MSRM_604E (0x000000000005FF77ULL)
4577 #define POWERPC_MMU_604E (POWERPC_MMU_32B)
4578 #define POWERPC_EXCP_604E (POWERPC_EXCP_604)
4579 #define POWERPC_INPUT_604E (PPC_FLAGS_INPUT_6xx)
4580 #define POWERPC_BFDM_604E (bfd_mach_ppc_604)
4581 #define POWERPC_FLAG_604E (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4582 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4583 #define check_pow_604E check_pow_nocheck
4585 static void init_proc_604E (CPUPPCState
*env
)
4587 gen_spr_ne_601(env
);
4589 /* XXX : not implemented */
4590 spr_register(env
, SPR_MMCR1
, "MMCR1",
4591 SPR_NOACCESS
, SPR_NOACCESS
,
4592 &spr_read_generic
, &spr_write_generic
,
4594 /* XXX : not implemented */
4595 spr_register(env
, SPR_PMC3
, "PMC3",
4596 SPR_NOACCESS
, SPR_NOACCESS
,
4597 &spr_read_generic
, &spr_write_generic
,
4599 /* XXX : not implemented */
4600 spr_register(env
, SPR_PMC4
, "PMC4",
4601 SPR_NOACCESS
, SPR_NOACCESS
,
4602 &spr_read_generic
, &spr_write_generic
,
4606 /* Hardware implementation registers */
4607 /* XXX : not implemented */
4608 spr_register(env
, SPR_HID0
, "HID0",
4609 SPR_NOACCESS
, SPR_NOACCESS
,
4610 &spr_read_generic
, &spr_write_generic
,
4612 /* XXX : not implemented */
4613 spr_register(env
, SPR_HID1
, "HID1",
4614 SPR_NOACCESS
, SPR_NOACCESS
,
4615 &spr_read_generic
, &spr_write_generic
,
4617 /* Memory management */
4620 env
->dcache_line_size
= 32;
4621 env
->icache_line_size
= 32;
4622 /* Allocate hardware IRQ controller */
4623 ppc6xx_irq_init(env
);
4627 #define POWERPC_INSNS_740 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4628 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4629 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4630 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4631 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4632 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4633 PPC_SEGMENT | PPC_EXTERN)
4634 #define POWERPC_MSRM_740 (0x000000000005FF77ULL)
4635 #define POWERPC_MMU_740 (POWERPC_MMU_32B)
4636 #define POWERPC_EXCP_740 (POWERPC_EXCP_7x0)
4637 #define POWERPC_INPUT_740 (PPC_FLAGS_INPUT_6xx)
4638 #define POWERPC_BFDM_740 (bfd_mach_ppc_750)
4639 #define POWERPC_FLAG_740 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4640 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4641 #define check_pow_740 check_pow_hid0
4643 static void init_proc_740 (CPUPPCState
*env
)
4645 gen_spr_ne_601(env
);
4649 /* Thermal management */
4651 /* Hardware implementation registers */
4652 /* XXX : not implemented */
4653 spr_register(env
, SPR_HID0
, "HID0",
4654 SPR_NOACCESS
, SPR_NOACCESS
,
4655 &spr_read_generic
, &spr_write_generic
,
4657 /* XXX : not implemented */
4658 spr_register(env
, SPR_HID1
, "HID1",
4659 SPR_NOACCESS
, SPR_NOACCESS
,
4660 &spr_read_generic
, &spr_write_generic
,
4662 /* Memory management */
4665 env
->dcache_line_size
= 32;
4666 env
->icache_line_size
= 32;
4667 /* Allocate hardware IRQ controller */
4668 ppc6xx_irq_init(env
);
4672 #define POWERPC_INSNS_750 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4673 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4674 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4675 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4676 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4677 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4678 PPC_SEGMENT | PPC_EXTERN)
4679 #define POWERPC_MSRM_750 (0x000000000005FF77ULL)
4680 #define POWERPC_MMU_750 (POWERPC_MMU_32B)
4681 #define POWERPC_EXCP_750 (POWERPC_EXCP_7x0)
4682 #define POWERPC_INPUT_750 (PPC_FLAGS_INPUT_6xx)
4683 #define POWERPC_BFDM_750 (bfd_mach_ppc_750)
4684 #define POWERPC_FLAG_750 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4685 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4686 #define check_pow_750 check_pow_hid0
4688 static void init_proc_750 (CPUPPCState
*env
)
4690 gen_spr_ne_601(env
);
4692 /* XXX : not implemented */
4693 spr_register(env
, SPR_L2CR
, "L2CR",
4694 SPR_NOACCESS
, SPR_NOACCESS
,
4695 &spr_read_generic
, &spr_write_generic
,
4699 /* Thermal management */
4701 /* Hardware implementation registers */
4702 /* XXX : not implemented */
4703 spr_register(env
, SPR_HID0
, "HID0",
4704 SPR_NOACCESS
, SPR_NOACCESS
,
4705 &spr_read_generic
, &spr_write_generic
,
4707 /* XXX : not implemented */
4708 spr_register(env
, SPR_HID1
, "HID1",
4709 SPR_NOACCESS
, SPR_NOACCESS
,
4710 &spr_read_generic
, &spr_write_generic
,
4712 /* Memory management */
4714 /* XXX: high BATs are also present but are known to be bugged on
4718 env
->dcache_line_size
= 32;
4719 env
->icache_line_size
= 32;
4720 /* Allocate hardware IRQ controller */
4721 ppc6xx_irq_init(env
);
4724 /* PowerPC 750 CL */
4725 /* XXX: not implemented:
4726 * cache lock instructions:
4728 * floating point paired instructions
4763 #define POWERPC_INSNS_750cl (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4764 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4765 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4766 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4767 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4768 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4769 PPC_SEGMENT | PPC_EXTERN)
4770 #define POWERPC_MSRM_750cl (0x000000000005FF77ULL)
4771 #define POWERPC_MMU_750cl (POWERPC_MMU_32B)
4772 #define POWERPC_EXCP_750cl (POWERPC_EXCP_7x0)
4773 #define POWERPC_INPUT_750cl (PPC_FLAGS_INPUT_6xx)
4774 #define POWERPC_BFDM_750cl (bfd_mach_ppc_750)
4775 #define POWERPC_FLAG_750cl (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4776 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4777 #define check_pow_750cl check_pow_hid0
4779 static void init_proc_750cl (CPUPPCState
*env
)
4781 gen_spr_ne_601(env
);
4783 /* XXX : not implemented */
4784 spr_register(env
, SPR_L2CR
, "L2CR",
4785 SPR_NOACCESS
, SPR_NOACCESS
,
4786 &spr_read_generic
, &spr_write_generic
,
4790 /* Thermal management */
4791 /* Those registers are fake on 750CL */
4792 spr_register(env
, SPR_THRM1
, "THRM1",
4793 SPR_NOACCESS
, SPR_NOACCESS
,
4794 &spr_read_generic
, &spr_write_generic
,
4796 spr_register(env
, SPR_THRM2
, "THRM2",
4797 SPR_NOACCESS
, SPR_NOACCESS
,
4798 &spr_read_generic
, &spr_write_generic
,
4800 spr_register(env
, SPR_THRM3
, "THRM3",
4801 SPR_NOACCESS
, SPR_NOACCESS
,
4802 &spr_read_generic
, &spr_write_generic
,
4804 /* XXX: not implemented */
4805 spr_register(env
, SPR_750_TDCL
, "TDCL",
4806 SPR_NOACCESS
, SPR_NOACCESS
,
4807 &spr_read_generic
, &spr_write_generic
,
4809 spr_register(env
, SPR_750_TDCH
, "TDCH",
4810 SPR_NOACCESS
, SPR_NOACCESS
,
4811 &spr_read_generic
, &spr_write_generic
,
4814 /* XXX : not implemented */
4815 spr_register(env
, SPR_750_WPAR
, "WPAR",
4816 SPR_NOACCESS
, SPR_NOACCESS
,
4817 &spr_read_generic
, &spr_write_generic
,
4819 spr_register(env
, SPR_750_DMAL
, "DMAL",
4820 SPR_NOACCESS
, SPR_NOACCESS
,
4821 &spr_read_generic
, &spr_write_generic
,
4823 spr_register(env
, SPR_750_DMAU
, "DMAU",
4824 SPR_NOACCESS
, SPR_NOACCESS
,
4825 &spr_read_generic
, &spr_write_generic
,
4827 /* Hardware implementation registers */
4828 /* XXX : not implemented */
4829 spr_register(env
, SPR_HID0
, "HID0",
4830 SPR_NOACCESS
, SPR_NOACCESS
,
4831 &spr_read_generic
, &spr_write_generic
,
4833 /* XXX : not implemented */
4834 spr_register(env
, SPR_HID1
, "HID1",
4835 SPR_NOACCESS
, SPR_NOACCESS
,
4836 &spr_read_generic
, &spr_write_generic
,
4838 /* XXX : not implemented */
4839 spr_register(env
, SPR_750CL_HID2
, "HID2",
4840 SPR_NOACCESS
, SPR_NOACCESS
,
4841 &spr_read_generic
, &spr_write_generic
,
4843 /* XXX : not implemented */
4844 spr_register(env
, SPR_750CL_HID4
, "HID4",
4845 SPR_NOACCESS
, SPR_NOACCESS
,
4846 &spr_read_generic
, &spr_write_generic
,
4848 /* Quantization registers */
4849 /* XXX : not implemented */
4850 spr_register(env
, SPR_750_GQR0
, "GQR0",
4851 SPR_NOACCESS
, SPR_NOACCESS
,
4852 &spr_read_generic
, &spr_write_generic
,
4854 /* XXX : not implemented */
4855 spr_register(env
, SPR_750_GQR1
, "GQR1",
4856 SPR_NOACCESS
, SPR_NOACCESS
,
4857 &spr_read_generic
, &spr_write_generic
,
4859 /* XXX : not implemented */
4860 spr_register(env
, SPR_750_GQR2
, "GQR2",
4861 SPR_NOACCESS
, SPR_NOACCESS
,
4862 &spr_read_generic
, &spr_write_generic
,
4864 /* XXX : not implemented */
4865 spr_register(env
, SPR_750_GQR3
, "GQR3",
4866 SPR_NOACCESS
, SPR_NOACCESS
,
4867 &spr_read_generic
, &spr_write_generic
,
4869 /* XXX : not implemented */
4870 spr_register(env
, SPR_750_GQR4
, "GQR4",
4871 SPR_NOACCESS
, SPR_NOACCESS
,
4872 &spr_read_generic
, &spr_write_generic
,
4874 /* XXX : not implemented */
4875 spr_register(env
, SPR_750_GQR5
, "GQR5",
4876 SPR_NOACCESS
, SPR_NOACCESS
,
4877 &spr_read_generic
, &spr_write_generic
,
4879 /* XXX : not implemented */
4880 spr_register(env
, SPR_750_GQR6
, "GQR6",
4881 SPR_NOACCESS
, SPR_NOACCESS
,
4882 &spr_read_generic
, &spr_write_generic
,
4884 /* XXX : not implemented */
4885 spr_register(env
, SPR_750_GQR7
, "GQR7",
4886 SPR_NOACCESS
, SPR_NOACCESS
,
4887 &spr_read_generic
, &spr_write_generic
,
4889 /* Memory management */
4891 /* PowerPC 750cl has 8 DBATs and 8 IBATs */
4893 init_excp_750cl(env
);
4894 env
->dcache_line_size
= 32;
4895 env
->icache_line_size
= 32;
4896 /* Allocate hardware IRQ controller */
4897 ppc6xx_irq_init(env
);
4901 #define POWERPC_INSNS_750cx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4902 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4903 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4904 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4905 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4906 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4907 PPC_SEGMENT | PPC_EXTERN)
4908 #define POWERPC_MSRM_750cx (0x000000000005FF77ULL)
4909 #define POWERPC_MMU_750cx (POWERPC_MMU_32B)
4910 #define POWERPC_EXCP_750cx (POWERPC_EXCP_7x0)
4911 #define POWERPC_INPUT_750cx (PPC_FLAGS_INPUT_6xx)
4912 #define POWERPC_BFDM_750cx (bfd_mach_ppc_750)
4913 #define POWERPC_FLAG_750cx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4914 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4915 #define check_pow_750cx check_pow_hid0
4917 static void init_proc_750cx (CPUPPCState
*env
)
4919 gen_spr_ne_601(env
);
4921 /* XXX : not implemented */
4922 spr_register(env
, SPR_L2CR
, "L2CR",
4923 SPR_NOACCESS
, SPR_NOACCESS
,
4924 &spr_read_generic
, &spr_write_generic
,
4928 /* Thermal management */
4930 /* This register is not implemented but is present for compatibility */
4931 spr_register(env
, SPR_SDA
, "SDA",
4932 SPR_NOACCESS
, SPR_NOACCESS
,
4933 &spr_read_generic
, &spr_write_generic
,
4935 /* Hardware implementation registers */
4936 /* XXX : not implemented */
4937 spr_register(env
, SPR_HID0
, "HID0",
4938 SPR_NOACCESS
, SPR_NOACCESS
,
4939 &spr_read_generic
, &spr_write_generic
,
4941 /* XXX : not implemented */
4942 spr_register(env
, SPR_HID1
, "HID1",
4943 SPR_NOACCESS
, SPR_NOACCESS
,
4944 &spr_read_generic
, &spr_write_generic
,
4946 /* Memory management */
4948 /* PowerPC 750cx has 8 DBATs and 8 IBATs */
4950 init_excp_750cx(env
);
4951 env
->dcache_line_size
= 32;
4952 env
->icache_line_size
= 32;
4953 /* Allocate hardware IRQ controller */
4954 ppc6xx_irq_init(env
);
4958 #define POWERPC_INSNS_750fx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
4959 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
4960 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
4961 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
4962 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
4963 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
4964 PPC_SEGMENT | PPC_EXTERN)
4965 #define POWERPC_MSRM_750fx (0x000000000005FF77ULL)
4966 #define POWERPC_MMU_750fx (POWERPC_MMU_32B)
4967 #define POWERPC_EXCP_750fx (POWERPC_EXCP_7x0)
4968 #define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx)
4969 #define POWERPC_BFDM_750fx (bfd_mach_ppc_750)
4970 #define POWERPC_FLAG_750fx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
4971 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
4972 #define check_pow_750fx check_pow_hid0
4974 static void init_proc_750fx (CPUPPCState
*env
)
4976 gen_spr_ne_601(env
);
4978 /* XXX : not implemented */
4979 spr_register(env
, SPR_L2CR
, "L2CR",
4980 SPR_NOACCESS
, SPR_NOACCESS
,
4981 &spr_read_generic
, &spr_write_generic
,
4985 /* Thermal management */
4987 /* XXX : not implemented */
4988 spr_register(env
, SPR_750_THRM4
, "THRM4",
4989 SPR_NOACCESS
, SPR_NOACCESS
,
4990 &spr_read_generic
, &spr_write_generic
,
4992 /* Hardware implementation registers */
4993 /* XXX : not implemented */
4994 spr_register(env
, SPR_HID0
, "HID0",
4995 SPR_NOACCESS
, SPR_NOACCESS
,
4996 &spr_read_generic
, &spr_write_generic
,
4998 /* XXX : not implemented */
4999 spr_register(env
, SPR_HID1
, "HID1",
5000 SPR_NOACCESS
, SPR_NOACCESS
,
5001 &spr_read_generic
, &spr_write_generic
,
5003 /* XXX : not implemented */
5004 spr_register(env
, SPR_750FX_HID2
, "HID2",
5005 SPR_NOACCESS
, SPR_NOACCESS
,
5006 &spr_read_generic
, &spr_write_generic
,
5008 /* Memory management */
5010 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5013 env
->dcache_line_size
= 32;
5014 env
->icache_line_size
= 32;
5015 /* Allocate hardware IRQ controller */
5016 ppc6xx_irq_init(env
);
5020 #define POWERPC_INSNS_750gx (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5021 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5022 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5023 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5024 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5025 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5026 PPC_SEGMENT | PPC_EXTERN)
5027 #define POWERPC_MSRM_750gx (0x000000000005FF77ULL)
5028 #define POWERPC_MMU_750gx (POWERPC_MMU_32B)
5029 #define POWERPC_EXCP_750gx (POWERPC_EXCP_7x0)
5030 #define POWERPC_INPUT_750gx (PPC_FLAGS_INPUT_6xx)
5031 #define POWERPC_BFDM_750gx (bfd_mach_ppc_750)
5032 #define POWERPC_FLAG_750gx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5033 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5034 #define check_pow_750gx check_pow_hid0
5036 static void init_proc_750gx (CPUPPCState
*env
)
5038 gen_spr_ne_601(env
);
5040 /* XXX : not implemented (XXX: different from 750fx) */
5041 spr_register(env
, SPR_L2CR
, "L2CR",
5042 SPR_NOACCESS
, SPR_NOACCESS
,
5043 &spr_read_generic
, &spr_write_generic
,
5047 /* Thermal management */
5049 /* XXX : not implemented */
5050 spr_register(env
, SPR_750_THRM4
, "THRM4",
5051 SPR_NOACCESS
, SPR_NOACCESS
,
5052 &spr_read_generic
, &spr_write_generic
,
5054 /* Hardware implementation registers */
5055 /* XXX : not implemented (XXX: different from 750fx) */
5056 spr_register(env
, SPR_HID0
, "HID0",
5057 SPR_NOACCESS
, SPR_NOACCESS
,
5058 &spr_read_generic
, &spr_write_generic
,
5060 /* XXX : not implemented */
5061 spr_register(env
, SPR_HID1
, "HID1",
5062 SPR_NOACCESS
, SPR_NOACCESS
,
5063 &spr_read_generic
, &spr_write_generic
,
5065 /* XXX : not implemented (XXX: different from 750fx) */
5066 spr_register(env
, SPR_750FX_HID2
, "HID2",
5067 SPR_NOACCESS
, SPR_NOACCESS
,
5068 &spr_read_generic
, &spr_write_generic
,
5070 /* Memory management */
5072 /* PowerPC 750fx & 750gx has 8 DBATs and 8 IBATs */
5075 env
->dcache_line_size
= 32;
5076 env
->icache_line_size
= 32;
5077 /* Allocate hardware IRQ controller */
5078 ppc6xx_irq_init(env
);
5082 #define POWERPC_INSNS_745 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5083 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5084 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5085 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5086 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5087 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5088 PPC_SEGMENT | PPC_EXTERN)
5089 #define POWERPC_MSRM_745 (0x000000000005FF77ULL)
5090 #define POWERPC_MMU_745 (POWERPC_MMU_SOFT_6xx)
5091 #define POWERPC_EXCP_745 (POWERPC_EXCP_7x5)
5092 #define POWERPC_INPUT_745 (PPC_FLAGS_INPUT_6xx)
5093 #define POWERPC_BFDM_745 (bfd_mach_ppc_750)
5094 #define POWERPC_FLAG_745 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5095 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5096 #define check_pow_745 check_pow_hid0
5098 static void init_proc_745 (CPUPPCState
*env
)
5100 gen_spr_ne_601(env
);
5102 gen_spr_G2_755(env
);
5105 /* Thermal management */
5107 /* Hardware implementation registers */
5108 /* XXX : not implemented */
5109 spr_register(env
, SPR_HID0
, "HID0",
5110 SPR_NOACCESS
, SPR_NOACCESS
,
5111 &spr_read_generic
, &spr_write_generic
,
5113 /* XXX : not implemented */
5114 spr_register(env
, SPR_HID1
, "HID1",
5115 SPR_NOACCESS
, SPR_NOACCESS
,
5116 &spr_read_generic
, &spr_write_generic
,
5118 /* XXX : not implemented */
5119 spr_register(env
, SPR_HID2
, "HID2",
5120 SPR_NOACCESS
, SPR_NOACCESS
,
5121 &spr_read_generic
, &spr_write_generic
,
5123 /* Memory management */
5126 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5128 env
->dcache_line_size
= 32;
5129 env
->icache_line_size
= 32;
5130 /* Allocate hardware IRQ controller */
5131 ppc6xx_irq_init(env
);
5135 #define POWERPC_INSNS_755 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5136 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5137 PPC_FLOAT_FRSQRTE | PPC_FLOAT_STFIWX | \
5138 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
5139 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5140 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | PPC_6xx_TLB | \
5141 PPC_SEGMENT | PPC_EXTERN)
5142 #define POWERPC_MSRM_755 (0x000000000005FF77ULL)
5143 #define POWERPC_MMU_755 (POWERPC_MMU_SOFT_6xx)
5144 #define POWERPC_EXCP_755 (POWERPC_EXCP_7x5)
5145 #define POWERPC_INPUT_755 (PPC_FLAGS_INPUT_6xx)
5146 #define POWERPC_BFDM_755 (bfd_mach_ppc_750)
5147 #define POWERPC_FLAG_755 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
5148 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
5149 #define check_pow_755 check_pow_hid0
5151 static void init_proc_755 (CPUPPCState
*env
)
5153 gen_spr_ne_601(env
);
5155 gen_spr_G2_755(env
);
5158 /* L2 cache control */
5159 /* XXX : not implemented */
5160 spr_register(env
, SPR_L2CR
, "L2CR",
5161 SPR_NOACCESS
, SPR_NOACCESS
,
5162 &spr_read_generic
, &spr_write_generic
,
5164 /* XXX : not implemented */
5165 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5166 SPR_NOACCESS
, SPR_NOACCESS
,
5167 &spr_read_generic
, &spr_write_generic
,
5169 /* Thermal management */
5171 /* Hardware implementation registers */
5172 /* XXX : not implemented */
5173 spr_register(env
, SPR_HID0
, "HID0",
5174 SPR_NOACCESS
, SPR_NOACCESS
,
5175 &spr_read_generic
, &spr_write_generic
,
5177 /* XXX : not implemented */
5178 spr_register(env
, SPR_HID1
, "HID1",
5179 SPR_NOACCESS
, SPR_NOACCESS
,
5180 &spr_read_generic
, &spr_write_generic
,
5182 /* XXX : not implemented */
5183 spr_register(env
, SPR_HID2
, "HID2",
5184 SPR_NOACCESS
, SPR_NOACCESS
,
5185 &spr_read_generic
, &spr_write_generic
,
5187 /* Memory management */
5190 gen_6xx_7xx_soft_tlb(env
, 64, 2);
5192 env
->dcache_line_size
= 32;
5193 env
->icache_line_size
= 32;
5194 /* Allocate hardware IRQ controller */
5195 ppc6xx_irq_init(env
);
5198 /* PowerPC 7400 (aka G4) */
5199 #define POWERPC_INSNS_7400 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5200 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5201 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5202 PPC_FLOAT_STFIWX | \
5203 PPC_CACHE | PPC_CACHE_ICBI | \
5204 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5205 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5206 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5208 PPC_SEGMENT | PPC_EXTERN | \
5210 #define POWERPC_MSRM_7400 (0x000000000205FF77ULL)
5211 #define POWERPC_MMU_7400 (POWERPC_MMU_32B)
5212 #define POWERPC_EXCP_7400 (POWERPC_EXCP_74xx)
5213 #define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx)
5214 #define POWERPC_BFDM_7400 (bfd_mach_ppc_7400)
5215 #define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5216 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5217 POWERPC_FLAG_BUS_CLK)
5218 #define check_pow_7400 check_pow_hid0_74xx
5220 static void init_proc_7400 (CPUPPCState
*env
)
5222 gen_spr_ne_601(env
);
5226 /* 74xx specific SPR */
5228 /* XXX : not implemented */
5229 spr_register(env
, SPR_UBAMR
, "UBAMR",
5230 &spr_read_ureg
, SPR_NOACCESS
,
5231 &spr_read_ureg
, SPR_NOACCESS
,
5233 /* XXX: this seems not implemented on all revisions. */
5234 /* XXX : not implemented */
5235 spr_register(env
, SPR_MSSCR1
, "MSSCR1",
5236 SPR_NOACCESS
, SPR_NOACCESS
,
5237 &spr_read_generic
, &spr_write_generic
,
5239 /* Thermal management */
5241 /* Memory management */
5243 init_excp_7400(env
);
5244 env
->dcache_line_size
= 32;
5245 env
->icache_line_size
= 32;
5246 /* Allocate hardware IRQ controller */
5247 ppc6xx_irq_init(env
);
5250 /* PowerPC 7410 (aka G4) */
5251 #define POWERPC_INSNS_7410 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5252 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5253 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5254 PPC_FLOAT_STFIWX | \
5255 PPC_CACHE | PPC_CACHE_ICBI | \
5256 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5257 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5258 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5260 PPC_SEGMENT | PPC_EXTERN | \
5262 #define POWERPC_MSRM_7410 (0x000000000205FF77ULL)
5263 #define POWERPC_MMU_7410 (POWERPC_MMU_32B)
5264 #define POWERPC_EXCP_7410 (POWERPC_EXCP_74xx)
5265 #define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx)
5266 #define POWERPC_BFDM_7410 (bfd_mach_ppc_7400)
5267 #define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5268 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5269 POWERPC_FLAG_BUS_CLK)
5270 #define check_pow_7410 check_pow_hid0_74xx
5272 static void init_proc_7410 (CPUPPCState
*env
)
5274 gen_spr_ne_601(env
);
5278 /* 74xx specific SPR */
5280 /* XXX : not implemented */
5281 spr_register(env
, SPR_UBAMR
, "UBAMR",
5282 &spr_read_ureg
, SPR_NOACCESS
,
5283 &spr_read_ureg
, SPR_NOACCESS
,
5285 /* Thermal management */
5288 /* XXX : not implemented */
5289 spr_register(env
, SPR_L2PMCR
, "L2PMCR",
5290 SPR_NOACCESS
, SPR_NOACCESS
,
5291 &spr_read_generic
, &spr_write_generic
,
5294 /* XXX : not implemented */
5295 spr_register(env
, SPR_LDSTDB
, "LDSTDB",
5296 SPR_NOACCESS
, SPR_NOACCESS
,
5297 &spr_read_generic
, &spr_write_generic
,
5299 /* Memory management */
5301 init_excp_7400(env
);
5302 env
->dcache_line_size
= 32;
5303 env
->icache_line_size
= 32;
5304 /* Allocate hardware IRQ controller */
5305 ppc6xx_irq_init(env
);
5308 /* PowerPC 7440 (aka G4) */
5309 #define POWERPC_INSNS_7440 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5310 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5311 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5312 PPC_FLOAT_STFIWX | \
5313 PPC_CACHE | PPC_CACHE_ICBI | \
5314 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5315 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5316 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5317 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5318 PPC_SEGMENT | PPC_EXTERN | \
5320 #define POWERPC_MSRM_7440 (0x000000000205FF77ULL)
5321 #define POWERPC_MMU_7440 (POWERPC_MMU_SOFT_74xx)
5322 #define POWERPC_EXCP_7440 (POWERPC_EXCP_74xx)
5323 #define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx)
5324 #define POWERPC_BFDM_7440 (bfd_mach_ppc_7400)
5325 #define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5326 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5327 POWERPC_FLAG_BUS_CLK)
5328 #define check_pow_7440 check_pow_hid0_74xx
5330 __attribute__ (( unused
))
5331 static void init_proc_7440 (CPUPPCState
*env
)
5333 gen_spr_ne_601(env
);
5337 /* 74xx specific SPR */
5339 /* XXX : not implemented */
5340 spr_register(env
, SPR_UBAMR
, "UBAMR",
5341 &spr_read_ureg
, SPR_NOACCESS
,
5342 &spr_read_ureg
, SPR_NOACCESS
,
5345 /* XXX : not implemented */
5346 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5347 SPR_NOACCESS
, SPR_NOACCESS
,
5348 &spr_read_generic
, &spr_write_generic
,
5351 /* XXX : not implemented */
5352 spr_register(env
, SPR_ICTRL
, "ICTRL",
5353 SPR_NOACCESS
, SPR_NOACCESS
,
5354 &spr_read_generic
, &spr_write_generic
,
5357 /* XXX : not implemented */
5358 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5359 SPR_NOACCESS
, SPR_NOACCESS
,
5360 &spr_read_generic
, &spr_write_generic
,
5363 /* XXX : not implemented */
5364 spr_register(env
, SPR_PMC5
, "PMC5",
5365 SPR_NOACCESS
, SPR_NOACCESS
,
5366 &spr_read_generic
, &spr_write_generic
,
5368 /* XXX : not implemented */
5369 spr_register(env
, SPR_UPMC5
, "UPMC5",
5370 &spr_read_ureg
, SPR_NOACCESS
,
5371 &spr_read_ureg
, SPR_NOACCESS
,
5373 /* XXX : not implemented */
5374 spr_register(env
, SPR_PMC6
, "PMC6",
5375 SPR_NOACCESS
, SPR_NOACCESS
,
5376 &spr_read_generic
, &spr_write_generic
,
5378 /* XXX : not implemented */
5379 spr_register(env
, SPR_UPMC6
, "UPMC6",
5380 &spr_read_ureg
, SPR_NOACCESS
,
5381 &spr_read_ureg
, SPR_NOACCESS
,
5383 /* Memory management */
5385 gen_74xx_soft_tlb(env
, 128, 2);
5386 init_excp_7450(env
);
5387 env
->dcache_line_size
= 32;
5388 env
->icache_line_size
= 32;
5389 /* Allocate hardware IRQ controller */
5390 ppc6xx_irq_init(env
);
5393 /* PowerPC 7450 (aka G4) */
5394 #define POWERPC_INSNS_7450 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5395 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5396 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5397 PPC_FLOAT_STFIWX | \
5398 PPC_CACHE | PPC_CACHE_ICBI | \
5399 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5400 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5401 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5402 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5403 PPC_SEGMENT | PPC_EXTERN | \
5405 #define POWERPC_MSRM_7450 (0x000000000205FF77ULL)
5406 #define POWERPC_MMU_7450 (POWERPC_MMU_SOFT_74xx)
5407 #define POWERPC_EXCP_7450 (POWERPC_EXCP_74xx)
5408 #define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx)
5409 #define POWERPC_BFDM_7450 (bfd_mach_ppc_7400)
5410 #define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5411 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5412 POWERPC_FLAG_BUS_CLK)
5413 #define check_pow_7450 check_pow_hid0_74xx
5415 __attribute__ (( unused
))
5416 static void init_proc_7450 (CPUPPCState
*env
)
5418 gen_spr_ne_601(env
);
5422 /* 74xx specific SPR */
5424 /* Level 3 cache control */
5427 /* XXX : not implemented */
5428 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
5429 SPR_NOACCESS
, SPR_NOACCESS
,
5430 &spr_read_generic
, &spr_write_generic
,
5433 /* XXX : not implemented */
5434 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
5435 SPR_NOACCESS
, SPR_NOACCESS
,
5436 &spr_read_generic
, &spr_write_generic
,
5439 /* XXX : not implemented */
5440 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
5441 SPR_NOACCESS
, SPR_NOACCESS
,
5442 &spr_read_generic
, &spr_write_generic
,
5445 /* XXX : not implemented */
5446 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
5447 SPR_NOACCESS
, SPR_NOACCESS
,
5448 &spr_read_generic
, &spr_write_generic
,
5450 /* XXX : not implemented */
5451 spr_register(env
, SPR_UBAMR
, "UBAMR",
5452 &spr_read_ureg
, SPR_NOACCESS
,
5453 &spr_read_ureg
, SPR_NOACCESS
,
5456 /* XXX : not implemented */
5457 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5458 SPR_NOACCESS
, SPR_NOACCESS
,
5459 &spr_read_generic
, &spr_write_generic
,
5462 /* XXX : not implemented */
5463 spr_register(env
, SPR_ICTRL
, "ICTRL",
5464 SPR_NOACCESS
, SPR_NOACCESS
,
5465 &spr_read_generic
, &spr_write_generic
,
5468 /* XXX : not implemented */
5469 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5470 SPR_NOACCESS
, SPR_NOACCESS
,
5471 &spr_read_generic
, &spr_write_generic
,
5474 /* XXX : not implemented */
5475 spr_register(env
, SPR_PMC5
, "PMC5",
5476 SPR_NOACCESS
, SPR_NOACCESS
,
5477 &spr_read_generic
, &spr_write_generic
,
5479 /* XXX : not implemented */
5480 spr_register(env
, SPR_UPMC5
, "UPMC5",
5481 &spr_read_ureg
, SPR_NOACCESS
,
5482 &spr_read_ureg
, SPR_NOACCESS
,
5484 /* XXX : not implemented */
5485 spr_register(env
, SPR_PMC6
, "PMC6",
5486 SPR_NOACCESS
, SPR_NOACCESS
,
5487 &spr_read_generic
, &spr_write_generic
,
5489 /* XXX : not implemented */
5490 spr_register(env
, SPR_UPMC6
, "UPMC6",
5491 &spr_read_ureg
, SPR_NOACCESS
,
5492 &spr_read_ureg
, SPR_NOACCESS
,
5494 /* Memory management */
5496 gen_74xx_soft_tlb(env
, 128, 2);
5497 init_excp_7450(env
);
5498 env
->dcache_line_size
= 32;
5499 env
->icache_line_size
= 32;
5500 /* Allocate hardware IRQ controller */
5501 ppc6xx_irq_init(env
);
5504 /* PowerPC 7445 (aka G4) */
5505 #define POWERPC_INSNS_7445 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5506 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5507 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5508 PPC_FLOAT_STFIWX | \
5509 PPC_CACHE | PPC_CACHE_ICBI | \
5510 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5511 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5512 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5513 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5514 PPC_SEGMENT | PPC_EXTERN | \
5516 #define POWERPC_MSRM_7445 (0x000000000205FF77ULL)
5517 #define POWERPC_MMU_7445 (POWERPC_MMU_SOFT_74xx)
5518 #define POWERPC_EXCP_7445 (POWERPC_EXCP_74xx)
5519 #define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx)
5520 #define POWERPC_BFDM_7445 (bfd_mach_ppc_7400)
5521 #define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5522 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5523 POWERPC_FLAG_BUS_CLK)
5524 #define check_pow_7445 check_pow_hid0_74xx
5526 __attribute__ (( unused
))
5527 static void init_proc_7445 (CPUPPCState
*env
)
5529 gen_spr_ne_601(env
);
5533 /* 74xx specific SPR */
5536 /* XXX : not implemented */
5537 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5538 SPR_NOACCESS
, SPR_NOACCESS
,
5539 &spr_read_generic
, &spr_write_generic
,
5542 /* XXX : not implemented */
5543 spr_register(env
, SPR_ICTRL
, "ICTRL",
5544 SPR_NOACCESS
, SPR_NOACCESS
,
5545 &spr_read_generic
, &spr_write_generic
,
5548 /* XXX : not implemented */
5549 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5550 SPR_NOACCESS
, SPR_NOACCESS
,
5551 &spr_read_generic
, &spr_write_generic
,
5554 /* XXX : not implemented */
5555 spr_register(env
, SPR_PMC5
, "PMC5",
5556 SPR_NOACCESS
, SPR_NOACCESS
,
5557 &spr_read_generic
, &spr_write_generic
,
5559 /* XXX : not implemented */
5560 spr_register(env
, SPR_UPMC5
, "UPMC5",
5561 &spr_read_ureg
, SPR_NOACCESS
,
5562 &spr_read_ureg
, SPR_NOACCESS
,
5564 /* XXX : not implemented */
5565 spr_register(env
, SPR_PMC6
, "PMC6",
5566 SPR_NOACCESS
, SPR_NOACCESS
,
5567 &spr_read_generic
, &spr_write_generic
,
5569 /* XXX : not implemented */
5570 spr_register(env
, SPR_UPMC6
, "UPMC6",
5571 &spr_read_ureg
, SPR_NOACCESS
,
5572 &spr_read_ureg
, SPR_NOACCESS
,
5575 spr_register(env
, SPR_SPRG4
, "SPRG4",
5576 SPR_NOACCESS
, SPR_NOACCESS
,
5577 &spr_read_generic
, &spr_write_generic
,
5579 spr_register(env
, SPR_USPRG4
, "USPRG4",
5580 &spr_read_ureg
, SPR_NOACCESS
,
5581 &spr_read_ureg
, SPR_NOACCESS
,
5583 spr_register(env
, SPR_SPRG5
, "SPRG5",
5584 SPR_NOACCESS
, SPR_NOACCESS
,
5585 &spr_read_generic
, &spr_write_generic
,
5587 spr_register(env
, SPR_USPRG5
, "USPRG5",
5588 &spr_read_ureg
, SPR_NOACCESS
,
5589 &spr_read_ureg
, SPR_NOACCESS
,
5591 spr_register(env
, SPR_SPRG6
, "SPRG6",
5592 SPR_NOACCESS
, SPR_NOACCESS
,
5593 &spr_read_generic
, &spr_write_generic
,
5595 spr_register(env
, SPR_USPRG6
, "USPRG6",
5596 &spr_read_ureg
, SPR_NOACCESS
,
5597 &spr_read_ureg
, SPR_NOACCESS
,
5599 spr_register(env
, SPR_SPRG7
, "SPRG7",
5600 SPR_NOACCESS
, SPR_NOACCESS
,
5601 &spr_read_generic
, &spr_write_generic
,
5603 spr_register(env
, SPR_USPRG7
, "USPRG7",
5604 &spr_read_ureg
, SPR_NOACCESS
,
5605 &spr_read_ureg
, SPR_NOACCESS
,
5607 /* Memory management */
5610 gen_74xx_soft_tlb(env
, 128, 2);
5611 init_excp_7450(env
);
5612 env
->dcache_line_size
= 32;
5613 env
->icache_line_size
= 32;
5614 /* Allocate hardware IRQ controller */
5615 ppc6xx_irq_init(env
);
5618 /* PowerPC 7455 (aka G4) */
5619 #define POWERPC_INSNS_7455 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5620 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5621 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5622 PPC_FLOAT_STFIWX | \
5623 PPC_CACHE | PPC_CACHE_ICBI | \
5624 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5625 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5626 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5627 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5628 PPC_SEGMENT | PPC_EXTERN | \
5630 #define POWERPC_MSRM_7455 (0x000000000205FF77ULL)
5631 #define POWERPC_MMU_7455 (POWERPC_MMU_SOFT_74xx)
5632 #define POWERPC_EXCP_7455 (POWERPC_EXCP_74xx)
5633 #define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx)
5634 #define POWERPC_BFDM_7455 (bfd_mach_ppc_7400)
5635 #define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5636 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5637 POWERPC_FLAG_BUS_CLK)
5638 #define check_pow_7455 check_pow_hid0_74xx
5640 __attribute__ (( unused
))
5641 static void init_proc_7455 (CPUPPCState
*env
)
5643 gen_spr_ne_601(env
);
5647 /* 74xx specific SPR */
5649 /* Level 3 cache control */
5652 /* XXX : not implemented */
5653 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5654 SPR_NOACCESS
, SPR_NOACCESS
,
5655 &spr_read_generic
, &spr_write_generic
,
5658 /* XXX : not implemented */
5659 spr_register(env
, SPR_ICTRL
, "ICTRL",
5660 SPR_NOACCESS
, SPR_NOACCESS
,
5661 &spr_read_generic
, &spr_write_generic
,
5664 /* XXX : not implemented */
5665 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5666 SPR_NOACCESS
, SPR_NOACCESS
,
5667 &spr_read_generic
, &spr_write_generic
,
5670 /* XXX : not implemented */
5671 spr_register(env
, SPR_PMC5
, "PMC5",
5672 SPR_NOACCESS
, SPR_NOACCESS
,
5673 &spr_read_generic
, &spr_write_generic
,
5675 /* XXX : not implemented */
5676 spr_register(env
, SPR_UPMC5
, "UPMC5",
5677 &spr_read_ureg
, SPR_NOACCESS
,
5678 &spr_read_ureg
, SPR_NOACCESS
,
5680 /* XXX : not implemented */
5681 spr_register(env
, SPR_PMC6
, "PMC6",
5682 SPR_NOACCESS
, SPR_NOACCESS
,
5683 &spr_read_generic
, &spr_write_generic
,
5685 /* XXX : not implemented */
5686 spr_register(env
, SPR_UPMC6
, "UPMC6",
5687 &spr_read_ureg
, SPR_NOACCESS
,
5688 &spr_read_ureg
, SPR_NOACCESS
,
5691 spr_register(env
, SPR_SPRG4
, "SPRG4",
5692 SPR_NOACCESS
, SPR_NOACCESS
,
5693 &spr_read_generic
, &spr_write_generic
,
5695 spr_register(env
, SPR_USPRG4
, "USPRG4",
5696 &spr_read_ureg
, SPR_NOACCESS
,
5697 &spr_read_ureg
, SPR_NOACCESS
,
5699 spr_register(env
, SPR_SPRG5
, "SPRG5",
5700 SPR_NOACCESS
, SPR_NOACCESS
,
5701 &spr_read_generic
, &spr_write_generic
,
5703 spr_register(env
, SPR_USPRG5
, "USPRG5",
5704 &spr_read_ureg
, SPR_NOACCESS
,
5705 &spr_read_ureg
, SPR_NOACCESS
,
5707 spr_register(env
, SPR_SPRG6
, "SPRG6",
5708 SPR_NOACCESS
, SPR_NOACCESS
,
5709 &spr_read_generic
, &spr_write_generic
,
5711 spr_register(env
, SPR_USPRG6
, "USPRG6",
5712 &spr_read_ureg
, SPR_NOACCESS
,
5713 &spr_read_ureg
, SPR_NOACCESS
,
5715 spr_register(env
, SPR_SPRG7
, "SPRG7",
5716 SPR_NOACCESS
, SPR_NOACCESS
,
5717 &spr_read_generic
, &spr_write_generic
,
5719 spr_register(env
, SPR_USPRG7
, "USPRG7",
5720 &spr_read_ureg
, SPR_NOACCESS
,
5721 &spr_read_ureg
, SPR_NOACCESS
,
5723 /* Memory management */
5726 gen_74xx_soft_tlb(env
, 128, 2);
5727 init_excp_7450(env
);
5728 env
->dcache_line_size
= 32;
5729 env
->icache_line_size
= 32;
5730 /* Allocate hardware IRQ controller */
5731 ppc6xx_irq_init(env
);
5734 /* PowerPC 7457 (aka G4) */
5735 #define POWERPC_INSNS_7457 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5736 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5737 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5738 PPC_FLOAT_STFIWX | \
5739 PPC_CACHE | PPC_CACHE_ICBI | \
5740 PPC_CACHE_DCBA | PPC_CACHE_DCBZ | \
5741 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5742 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5743 PPC_MEM_TLBIA | PPC_74xx_TLB | \
5744 PPC_SEGMENT | PPC_EXTERN | \
5746 #define POWERPC_MSRM_7457 (0x000000000205FF77ULL)
5747 #define POWERPC_MMU_7457 (POWERPC_MMU_SOFT_74xx)
5748 #define POWERPC_EXCP_7457 (POWERPC_EXCP_74xx)
5749 #define POWERPC_INPUT_7457 (PPC_FLAGS_INPUT_6xx)
5750 #define POWERPC_BFDM_7457 (bfd_mach_ppc_7400)
5751 #define POWERPC_FLAG_7457 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5752 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5753 POWERPC_FLAG_BUS_CLK)
5754 #define check_pow_7457 check_pow_hid0_74xx
5756 __attribute__ (( unused
))
5757 static void init_proc_7457 (CPUPPCState
*env
)
5759 gen_spr_ne_601(env
);
5763 /* 74xx specific SPR */
5765 /* Level 3 cache control */
5768 /* XXX : not implemented */
5769 spr_register(env
, SPR_L3ITCR1
, "L3ITCR1",
5770 SPR_NOACCESS
, SPR_NOACCESS
,
5771 &spr_read_generic
, &spr_write_generic
,
5774 /* XXX : not implemented */
5775 spr_register(env
, SPR_L3ITCR2
, "L3ITCR2",
5776 SPR_NOACCESS
, SPR_NOACCESS
,
5777 &spr_read_generic
, &spr_write_generic
,
5780 /* XXX : not implemented */
5781 spr_register(env
, SPR_L3ITCR3
, "L3ITCR3",
5782 SPR_NOACCESS
, SPR_NOACCESS
,
5783 &spr_read_generic
, &spr_write_generic
,
5786 /* XXX : not implemented */
5787 spr_register(env
, SPR_L3OHCR
, "L3OHCR",
5788 SPR_NOACCESS
, SPR_NOACCESS
,
5789 &spr_read_generic
, &spr_write_generic
,
5792 /* XXX : not implemented */
5793 spr_register(env
, SPR_LDSTCR
, "LDSTCR",
5794 SPR_NOACCESS
, SPR_NOACCESS
,
5795 &spr_read_generic
, &spr_write_generic
,
5798 /* XXX : not implemented */
5799 spr_register(env
, SPR_ICTRL
, "ICTRL",
5800 SPR_NOACCESS
, SPR_NOACCESS
,
5801 &spr_read_generic
, &spr_write_generic
,
5804 /* XXX : not implemented */
5805 spr_register(env
, SPR_MSSSR0
, "MSSSR0",
5806 SPR_NOACCESS
, SPR_NOACCESS
,
5807 &spr_read_generic
, &spr_write_generic
,
5810 /* XXX : not implemented */
5811 spr_register(env
, SPR_PMC5
, "PMC5",
5812 SPR_NOACCESS
, SPR_NOACCESS
,
5813 &spr_read_generic
, &spr_write_generic
,
5815 /* XXX : not implemented */
5816 spr_register(env
, SPR_UPMC5
, "UPMC5",
5817 &spr_read_ureg
, SPR_NOACCESS
,
5818 &spr_read_ureg
, SPR_NOACCESS
,
5820 /* XXX : not implemented */
5821 spr_register(env
, SPR_PMC6
, "PMC6",
5822 SPR_NOACCESS
, SPR_NOACCESS
,
5823 &spr_read_generic
, &spr_write_generic
,
5825 /* XXX : not implemented */
5826 spr_register(env
, SPR_UPMC6
, "UPMC6",
5827 &spr_read_ureg
, SPR_NOACCESS
,
5828 &spr_read_ureg
, SPR_NOACCESS
,
5831 spr_register(env
, SPR_SPRG4
, "SPRG4",
5832 SPR_NOACCESS
, SPR_NOACCESS
,
5833 &spr_read_generic
, &spr_write_generic
,
5835 spr_register(env
, SPR_USPRG4
, "USPRG4",
5836 &spr_read_ureg
, SPR_NOACCESS
,
5837 &spr_read_ureg
, SPR_NOACCESS
,
5839 spr_register(env
, SPR_SPRG5
, "SPRG5",
5840 SPR_NOACCESS
, SPR_NOACCESS
,
5841 &spr_read_generic
, &spr_write_generic
,
5843 spr_register(env
, SPR_USPRG5
, "USPRG5",
5844 &spr_read_ureg
, SPR_NOACCESS
,
5845 &spr_read_ureg
, SPR_NOACCESS
,
5847 spr_register(env
, SPR_SPRG6
, "SPRG6",
5848 SPR_NOACCESS
, SPR_NOACCESS
,
5849 &spr_read_generic
, &spr_write_generic
,
5851 spr_register(env
, SPR_USPRG6
, "USPRG6",
5852 &spr_read_ureg
, SPR_NOACCESS
,
5853 &spr_read_ureg
, SPR_NOACCESS
,
5855 spr_register(env
, SPR_SPRG7
, "SPRG7",
5856 SPR_NOACCESS
, SPR_NOACCESS
,
5857 &spr_read_generic
, &spr_write_generic
,
5859 spr_register(env
, SPR_USPRG7
, "USPRG7",
5860 &spr_read_ureg
, SPR_NOACCESS
,
5861 &spr_read_ureg
, SPR_NOACCESS
,
5863 /* Memory management */
5866 gen_74xx_soft_tlb(env
, 128, 2);
5867 init_excp_7450(env
);
5868 env
->dcache_line_size
= 32;
5869 env
->icache_line_size
= 32;
5870 /* Allocate hardware IRQ controller */
5871 ppc6xx_irq_init(env
);
5874 #if defined (TARGET_PPC64)
5876 #define POWERPC_INSNS_970 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5877 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5878 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5879 PPC_FLOAT_STFIWX | \
5880 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
5881 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5882 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5883 PPC_64B | PPC_ALTIVEC | \
5884 PPC_SEGMENT_64B | PPC_SLBI)
5885 #define POWERPC_MSRM_970 (0x900000000204FF36ULL)
5886 #define POWERPC_MMU_970 (POWERPC_MMU_64B)
5887 //#define POWERPC_EXCP_970 (POWERPC_EXCP_970)
5888 #define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970)
5889 #define POWERPC_BFDM_970 (bfd_mach_ppc64)
5890 #define POWERPC_FLAG_970 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5891 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5892 POWERPC_FLAG_BUS_CLK)
5894 #if defined(CONFIG_USER_ONLY)
5895 #define POWERPC970_HID5_INIT 0x00000080
5897 #define POWERPC970_HID5_INIT 0x00000000
5900 static int check_pow_970 (CPUPPCState
*env
)
5902 if (env
->spr
[SPR_HID0
] & 0x00600000)
5908 static void init_proc_970 (CPUPPCState
*env
)
5910 gen_spr_ne_601(env
);
5914 /* Hardware implementation registers */
5915 /* XXX : not implemented */
5916 spr_register(env
, SPR_HID0
, "HID0",
5917 SPR_NOACCESS
, SPR_NOACCESS
,
5918 &spr_read_generic
, &spr_write_clear
,
5920 /* XXX : not implemented */
5921 spr_register(env
, SPR_HID1
, "HID1",
5922 SPR_NOACCESS
, SPR_NOACCESS
,
5923 &spr_read_generic
, &spr_write_generic
,
5925 /* XXX : not implemented */
5926 spr_register(env
, SPR_750FX_HID2
, "HID2",
5927 SPR_NOACCESS
, SPR_NOACCESS
,
5928 &spr_read_generic
, &spr_write_generic
,
5930 /* XXX : not implemented */
5931 spr_register(env
, SPR_970_HID5
, "HID5",
5932 SPR_NOACCESS
, SPR_NOACCESS
,
5933 &spr_read_generic
, &spr_write_generic
,
5934 POWERPC970_HID5_INIT
);
5935 /* XXX : not implemented */
5936 spr_register(env
, SPR_L2CR
, "L2CR",
5937 SPR_NOACCESS
, SPR_NOACCESS
,
5938 &spr_read_generic
, &spr_write_generic
,
5940 /* Memory management */
5941 /* XXX: not correct */
5943 /* XXX : not implemented */
5944 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
5945 SPR_NOACCESS
, SPR_NOACCESS
,
5946 &spr_read_generic
, SPR_NOACCESS
,
5947 0x00000000); /* TOFIX */
5948 /* XXX : not implemented */
5949 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
5950 SPR_NOACCESS
, SPR_NOACCESS
,
5951 &spr_read_generic
, &spr_write_generic
,
5952 0x00000000); /* TOFIX */
5953 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
5954 SPR_NOACCESS
, SPR_NOACCESS
,
5955 &spr_read_hior
, &spr_write_hior
,
5957 #if !defined(CONFIG_USER_ONLY)
5961 env
->dcache_line_size
= 128;
5962 env
->icache_line_size
= 128;
5963 /* Allocate hardware IRQ controller */
5964 ppc970_irq_init(env
);
5965 /* Can't find information on what this should be on reset. This
5966 * value is the one used by 74xx processors. */
5967 vscr_init(env
, 0x00010000);
5970 /* PowerPC 970FX (aka G5) */
5971 #define POWERPC_INSNS_970FX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
5972 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
5973 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
5974 PPC_FLOAT_STFIWX | \
5975 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
5976 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
5977 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
5978 PPC_64B | PPC_ALTIVEC | \
5979 PPC_SEGMENT_64B | PPC_SLBI)
5980 #define POWERPC_MSRM_970FX (0x800000000204FF36ULL)
5981 #define POWERPC_MMU_970FX (POWERPC_MMU_64B)
5982 #define POWERPC_EXCP_970FX (POWERPC_EXCP_970)
5983 #define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970)
5984 #define POWERPC_BFDM_970FX (bfd_mach_ppc64)
5985 #define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
5986 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
5987 POWERPC_FLAG_BUS_CLK)
5989 static int check_pow_970FX (CPUPPCState
*env
)
5991 if (env
->spr
[SPR_HID0
] & 0x00600000)
5997 static void init_proc_970FX (CPUPPCState
*env
)
5999 gen_spr_ne_601(env
);
6003 /* Hardware implementation registers */
6004 /* XXX : not implemented */
6005 spr_register(env
, SPR_HID0
, "HID0",
6006 SPR_NOACCESS
, SPR_NOACCESS
,
6007 &spr_read_generic
, &spr_write_clear
,
6009 /* XXX : not implemented */
6010 spr_register(env
, SPR_HID1
, "HID1",
6011 SPR_NOACCESS
, SPR_NOACCESS
,
6012 &spr_read_generic
, &spr_write_generic
,
6014 /* XXX : not implemented */
6015 spr_register(env
, SPR_750FX_HID2
, "HID2",
6016 SPR_NOACCESS
, SPR_NOACCESS
,
6017 &spr_read_generic
, &spr_write_generic
,
6019 /* XXX : not implemented */
6020 spr_register(env
, SPR_970_HID5
, "HID5",
6021 SPR_NOACCESS
, SPR_NOACCESS
,
6022 &spr_read_generic
, &spr_write_generic
,
6023 POWERPC970_HID5_INIT
);
6024 /* XXX : not implemented */
6025 spr_register(env
, SPR_L2CR
, "L2CR",
6026 SPR_NOACCESS
, SPR_NOACCESS
,
6027 &spr_read_generic
, &spr_write_generic
,
6029 /* Memory management */
6030 /* XXX: not correct */
6032 /* XXX : not implemented */
6033 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6034 SPR_NOACCESS
, SPR_NOACCESS
,
6035 &spr_read_generic
, SPR_NOACCESS
,
6036 0x00000000); /* TOFIX */
6037 /* XXX : not implemented */
6038 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6039 SPR_NOACCESS
, SPR_NOACCESS
,
6040 &spr_read_generic
, &spr_write_generic
,
6041 0x00000000); /* TOFIX */
6042 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6043 SPR_NOACCESS
, SPR_NOACCESS
,
6044 &spr_read_hior
, &spr_write_hior
,
6046 #if !defined(CONFIG_USER_ONLY)
6050 env
->dcache_line_size
= 128;
6051 env
->icache_line_size
= 128;
6052 /* Allocate hardware IRQ controller */
6053 ppc970_irq_init(env
);
6054 /* Can't find information on what this should be on reset. This
6055 * value is the one used by 74xx processors. */
6056 vscr_init(env
, 0x00010000);
6059 /* PowerPC 970 GX */
6060 #define POWERPC_INSNS_970GX (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6061 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6062 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6063 PPC_FLOAT_STFIWX | \
6064 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6065 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6066 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6067 PPC_64B | PPC_ALTIVEC | \
6068 PPC_SEGMENT_64B | PPC_SLBI)
6069 #define POWERPC_MSRM_970GX (0x800000000204FF36ULL)
6070 #define POWERPC_MMU_970GX (POWERPC_MMU_64B)
6071 #define POWERPC_EXCP_970GX (POWERPC_EXCP_970)
6072 #define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970)
6073 #define POWERPC_BFDM_970GX (bfd_mach_ppc64)
6074 #define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6075 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6076 POWERPC_FLAG_BUS_CLK)
6078 static int check_pow_970GX (CPUPPCState
*env
)
6080 if (env
->spr
[SPR_HID0
] & 0x00600000)
6086 static void init_proc_970GX (CPUPPCState
*env
)
6088 gen_spr_ne_601(env
);
6092 /* Hardware implementation registers */
6093 /* XXX : not implemented */
6094 spr_register(env
, SPR_HID0
, "HID0",
6095 SPR_NOACCESS
, SPR_NOACCESS
,
6096 &spr_read_generic
, &spr_write_clear
,
6098 /* XXX : not implemented */
6099 spr_register(env
, SPR_HID1
, "HID1",
6100 SPR_NOACCESS
, SPR_NOACCESS
,
6101 &spr_read_generic
, &spr_write_generic
,
6103 /* XXX : not implemented */
6104 spr_register(env
, SPR_750FX_HID2
, "HID2",
6105 SPR_NOACCESS
, SPR_NOACCESS
,
6106 &spr_read_generic
, &spr_write_generic
,
6108 /* XXX : not implemented */
6109 spr_register(env
, SPR_970_HID5
, "HID5",
6110 SPR_NOACCESS
, SPR_NOACCESS
,
6111 &spr_read_generic
, &spr_write_generic
,
6112 POWERPC970_HID5_INIT
);
6113 /* XXX : not implemented */
6114 spr_register(env
, SPR_L2CR
, "L2CR",
6115 SPR_NOACCESS
, SPR_NOACCESS
,
6116 &spr_read_generic
, &spr_write_generic
,
6118 /* Memory management */
6119 /* XXX: not correct */
6121 /* XXX : not implemented */
6122 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6123 SPR_NOACCESS
, SPR_NOACCESS
,
6124 &spr_read_generic
, SPR_NOACCESS
,
6125 0x00000000); /* TOFIX */
6126 /* XXX : not implemented */
6127 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6128 SPR_NOACCESS
, SPR_NOACCESS
,
6129 &spr_read_generic
, &spr_write_generic
,
6130 0x00000000); /* TOFIX */
6131 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6132 SPR_NOACCESS
, SPR_NOACCESS
,
6133 &spr_read_hior
, &spr_write_hior
,
6135 #if !defined(CONFIG_USER_ONLY)
6139 env
->dcache_line_size
= 128;
6140 env
->icache_line_size
= 128;
6141 /* Allocate hardware IRQ controller */
6142 ppc970_irq_init(env
);
6143 /* Can't find information on what this should be on reset. This
6144 * value is the one used by 74xx processors. */
6145 vscr_init(env
, 0x00010000);
6148 /* PowerPC 970 MP */
6149 #define POWERPC_INSNS_970MP (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6150 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6151 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6152 PPC_FLOAT_STFIWX | \
6153 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZT | \
6154 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6155 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6156 PPC_64B | PPC_ALTIVEC | \
6157 PPC_SEGMENT_64B | PPC_SLBI)
6158 #define POWERPC_MSRM_970MP (0x900000000204FF36ULL)
6159 #define POWERPC_MMU_970MP (POWERPC_MMU_64B)
6160 #define POWERPC_EXCP_970MP (POWERPC_EXCP_970)
6161 #define POWERPC_INPUT_970MP (PPC_FLAGS_INPUT_970)
6162 #define POWERPC_BFDM_970MP (bfd_mach_ppc64)
6163 #define POWERPC_FLAG_970MP (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \
6164 POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \
6165 POWERPC_FLAG_BUS_CLK)
6167 static int check_pow_970MP (CPUPPCState
*env
)
6169 if (env
->spr
[SPR_HID0
] & 0x01C00000)
6175 static void init_proc_970MP (CPUPPCState
*env
)
6177 gen_spr_ne_601(env
);
6181 /* Hardware implementation registers */
6182 /* XXX : not implemented */
6183 spr_register(env
, SPR_HID0
, "HID0",
6184 SPR_NOACCESS
, SPR_NOACCESS
,
6185 &spr_read_generic
, &spr_write_clear
,
6187 /* XXX : not implemented */
6188 spr_register(env
, SPR_HID1
, "HID1",
6189 SPR_NOACCESS
, SPR_NOACCESS
,
6190 &spr_read_generic
, &spr_write_generic
,
6192 /* XXX : not implemented */
6193 spr_register(env
, SPR_750FX_HID2
, "HID2",
6194 SPR_NOACCESS
, SPR_NOACCESS
,
6195 &spr_read_generic
, &spr_write_generic
,
6197 /* XXX : not implemented */
6198 spr_register(env
, SPR_970_HID5
, "HID5",
6199 SPR_NOACCESS
, SPR_NOACCESS
,
6200 &spr_read_generic
, &spr_write_generic
,
6201 POWERPC970_HID5_INIT
);
6202 /* XXX : not implemented */
6203 spr_register(env
, SPR_L2CR
, "L2CR",
6204 SPR_NOACCESS
, SPR_NOACCESS
,
6205 &spr_read_generic
, &spr_write_generic
,
6207 /* Memory management */
6208 /* XXX: not correct */
6210 /* XXX : not implemented */
6211 spr_register(env
, SPR_MMUCFG
, "MMUCFG",
6212 SPR_NOACCESS
, SPR_NOACCESS
,
6213 &spr_read_generic
, SPR_NOACCESS
,
6214 0x00000000); /* TOFIX */
6215 /* XXX : not implemented */
6216 spr_register(env
, SPR_MMUCSR0
, "MMUCSR0",
6217 SPR_NOACCESS
, SPR_NOACCESS
,
6218 &spr_read_generic
, &spr_write_generic
,
6219 0x00000000); /* TOFIX */
6220 spr_register(env
, SPR_HIOR
, "SPR_HIOR",
6221 SPR_NOACCESS
, SPR_NOACCESS
,
6222 &spr_read_hior
, &spr_write_hior
,
6224 #if !defined(CONFIG_USER_ONLY)
6228 env
->dcache_line_size
= 128;
6229 env
->icache_line_size
= 128;
6230 /* Allocate hardware IRQ controller */
6231 ppc970_irq_init(env
);
6232 /* Can't find information on what this should be on reset. This
6233 * value is the one used by 74xx processors. */
6234 vscr_init(env
, 0x00010000);
6238 #define POWERPC_INSNS_620 (PPC_INSNS_BASE | PPC_STRING | PPC_MFTB | \
6239 PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES | \
6240 PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \
6241 PPC_FLOAT_STFIWX | \
6242 PPC_CACHE | PPC_CACHE_ICBI | PPC_CACHE_DCBZ | \
6243 PPC_MEM_SYNC | PPC_MEM_EIEIO | \
6244 PPC_MEM_TLBIE | PPC_MEM_TLBSYNC | \
6245 PPC_SEGMENT | PPC_EXTERN | \
6247 #define POWERPC_MSRM_620 (0x800000000005FF77ULL)
6248 //#define POWERPC_MMU_620 (POWERPC_MMU_620)
6249 #define POWERPC_EXCP_620 (POWERPC_EXCP_970)
6250 #define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_6xx)
6251 #define POWERPC_BFDM_620 (bfd_mach_ppc64)
6252 #define POWERPC_FLAG_620 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \
6253 POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK)
6254 #define check_pow_620 check_pow_nocheck /* Check this */
6256 __attribute__ (( unused
))
6257 static void init_proc_620 (CPUPPCState
*env
)
6259 gen_spr_ne_601(env
);
6263 /* Hardware implementation registers */
6264 /* XXX : not implemented */
6265 spr_register(env
, SPR_HID0
, "HID0",
6266 SPR_NOACCESS
, SPR_NOACCESS
,
6267 &spr_read_generic
, &spr_write_generic
,
6269 /* Memory management */
6272 env
->dcache_line_size
= 64;
6273 env
->icache_line_size
= 64;
6274 /* Allocate hardware IRQ controller */
6275 ppc6xx_irq_init(env
);
6277 #endif /* defined (TARGET_PPC64) */
6279 /* Default 32 bits PowerPC target will be 604 */
6280 #define CPU_POWERPC_PPC32 CPU_POWERPC_604
6281 #define POWERPC_INSNS_PPC32 POWERPC_INSNS_604
6282 #define POWERPC_MSRM_PPC32 POWERPC_MSRM_604
6283 #define POWERPC_MMU_PPC32 POWERPC_MMU_604
6284 #define POWERPC_EXCP_PPC32 POWERPC_EXCP_604
6285 #define POWERPC_INPUT_PPC32 POWERPC_INPUT_604
6286 #define POWERPC_BFDM_PPC32 POWERPC_BFDM_604
6287 #define POWERPC_FLAG_PPC32 POWERPC_FLAG_604
6288 #define check_pow_PPC32 check_pow_604
6289 #define init_proc_PPC32 init_proc_604
6291 /* Default 64 bits PowerPC target will be 970 FX */
6292 #define CPU_POWERPC_PPC64 CPU_POWERPC_970FX
6293 #define POWERPC_INSNS_PPC64 POWERPC_INSNS_970FX
6294 #define POWERPC_MSRM_PPC64 POWERPC_MSRM_970FX
6295 #define POWERPC_MMU_PPC64 POWERPC_MMU_970FX
6296 #define POWERPC_EXCP_PPC64 POWERPC_EXCP_970FX
6297 #define POWERPC_INPUT_PPC64 POWERPC_INPUT_970FX
6298 #define POWERPC_BFDM_PPC64 POWERPC_BFDM_970FX
6299 #define POWERPC_FLAG_PPC64 POWERPC_FLAG_970FX
6300 #define check_pow_PPC64 check_pow_970FX
6301 #define init_proc_PPC64 init_proc_970FX
6303 /* Default PowerPC target will be PowerPC 32 */
6304 #if defined (TARGET_PPC64) && 0 // XXX: TODO
6305 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC64
6306 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC64
6307 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC64
6308 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC64
6309 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC64
6310 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC64
6311 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC64
6312 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC64
6313 #define check_pow_DEFAULT check_pow_PPC64
6314 #define init_proc_DEFAULT init_proc_PPC64
6316 #define CPU_POWERPC_DEFAULT CPU_POWERPC_PPC32
6317 #define POWERPC_INSNS_DEFAULT POWERPC_INSNS_PPC32
6318 #define POWERPC_MSRM_DEFAULT POWERPC_MSRM_PPC32
6319 #define POWERPC_MMU_DEFAULT POWERPC_MMU_PPC32
6320 #define POWERPC_EXCP_DEFAULT POWERPC_EXCP_PPC32
6321 #define POWERPC_INPUT_DEFAULT POWERPC_INPUT_PPC32
6322 #define POWERPC_BFDM_DEFAULT POWERPC_BFDM_PPC32
6323 #define POWERPC_FLAG_DEFAULT POWERPC_FLAG_PPC32
6324 #define check_pow_DEFAULT check_pow_PPC32
6325 #define init_proc_DEFAULT init_proc_PPC32
6328 /*****************************************************************************/
6329 /* PVR definitions for most known PowerPC */
6331 /* PowerPC 401 family */
6332 /* Generic PowerPC 401 */
6333 #define CPU_POWERPC_401 CPU_POWERPC_401G2
6334 /* PowerPC 401 cores */
6335 CPU_POWERPC_401A1
= 0x00210000,
6336 CPU_POWERPC_401B2
= 0x00220000,
6338 CPU_POWERPC_401B3
= xxx
,
6340 CPU_POWERPC_401C2
= 0x00230000,
6341 CPU_POWERPC_401D2
= 0x00240000,
6342 CPU_POWERPC_401E2
= 0x00250000,
6343 CPU_POWERPC_401F2
= 0x00260000,
6344 CPU_POWERPC_401G2
= 0x00270000,
6345 /* PowerPC 401 microcontrolers */
6347 CPU_POWERPC_401GF
= xxx
,
6349 #define CPU_POWERPC_IOP480 CPU_POWERPC_401B2
6350 /* IBM Processor for Network Resources */
6351 CPU_POWERPC_COBRA
= 0x10100000, /* XXX: 405 ? */
6353 CPU_POWERPC_XIPCHIP
= xxx
,
6355 /* PowerPC 403 family */
6356 /* Generic PowerPC 403 */
6357 #define CPU_POWERPC_403 CPU_POWERPC_403GC
6358 /* PowerPC 403 microcontrollers */
6359 CPU_POWERPC_403GA
= 0x00200011,
6360 CPU_POWERPC_403GB
= 0x00200100,
6361 CPU_POWERPC_403GC
= 0x00200200,
6362 CPU_POWERPC_403GCX
= 0x00201400,
6364 CPU_POWERPC_403GP
= xxx
,
6366 /* PowerPC 405 family */
6367 /* Generic PowerPC 405 */
6368 #define CPU_POWERPC_405 CPU_POWERPC_405D4
6369 /* PowerPC 405 cores */
6371 CPU_POWERPC_405A3
= xxx
,
6374 CPU_POWERPC_405A4
= xxx
,
6377 CPU_POWERPC_405B3
= xxx
,
6380 CPU_POWERPC_405B4
= xxx
,
6383 CPU_POWERPC_405C3
= xxx
,
6386 CPU_POWERPC_405C4
= xxx
,
6388 CPU_POWERPC_405D2
= 0x20010000,
6390 CPU_POWERPC_405D3
= xxx
,
6392 CPU_POWERPC_405D4
= 0x41810000,
6394 CPU_POWERPC_405D5
= xxx
,
6397 CPU_POWERPC_405E4
= xxx
,
6400 CPU_POWERPC_405F4
= xxx
,
6403 CPU_POWERPC_405F5
= xxx
,
6406 CPU_POWERPC_405F6
= xxx
,
6408 /* PowerPC 405 microcontrolers */
6409 /* XXX: missing 0x200108a0 */
6410 #define CPU_POWERPC_405CR CPU_POWERPC_405CRc
6411 CPU_POWERPC_405CRa
= 0x40110041,
6412 CPU_POWERPC_405CRb
= 0x401100C5,
6413 CPU_POWERPC_405CRc
= 0x40110145,
6414 CPU_POWERPC_405EP
= 0x51210950,
6416 CPU_POWERPC_405EXr
= xxx
,
6418 CPU_POWERPC_405EZ
= 0x41511460, /* 0x51210950 ? */
6420 CPU_POWERPC_405FX
= xxx
,
6422 #define CPU_POWERPC_405GP CPU_POWERPC_405GPd
6423 CPU_POWERPC_405GPa
= 0x40110000,
6424 CPU_POWERPC_405GPb
= 0x40110040,
6425 CPU_POWERPC_405GPc
= 0x40110082,
6426 CPU_POWERPC_405GPd
= 0x401100C4,
6427 #define CPU_POWERPC_405GPe CPU_POWERPC_405CRc
6428 CPU_POWERPC_405GPR
= 0x50910951,
6430 CPU_POWERPC_405H
= xxx
,
6433 CPU_POWERPC_405L
= xxx
,
6435 CPU_POWERPC_405LP
= 0x41F10000,
6437 CPU_POWERPC_405PM
= xxx
,
6440 CPU_POWERPC_405PS
= xxx
,
6443 CPU_POWERPC_405S
= xxx
,
6445 /* IBM network processors */
6446 CPU_POWERPC_NPE405H
= 0x414100C0,
6447 CPU_POWERPC_NPE405H2
= 0x41410140,
6448 CPU_POWERPC_NPE405L
= 0x416100C0,
6449 CPU_POWERPC_NPE4GS3
= 0x40B10000,
6451 CPU_POWERPC_NPCxx1
= xxx
,
6454 CPU_POWERPC_NPR161
= xxx
,
6457 CPU_POWERPC_LC77700
= xxx
,
6459 /* IBM STBxxx (PowerPC 401/403/405 core based microcontrollers) */
6461 CPU_POWERPC_STB01000
= xxx
,
6464 CPU_POWERPC_STB01010
= xxx
,
6467 CPU_POWERPC_STB0210
= xxx
, /* 401B3 */
6469 CPU_POWERPC_STB03
= 0x40310000, /* 0x40130000 ? */
6471 CPU_POWERPC_STB043
= xxx
,
6474 CPU_POWERPC_STB045
= xxx
,
6476 CPU_POWERPC_STB04
= 0x41810000,
6477 CPU_POWERPC_STB25
= 0x51510950,
6479 CPU_POWERPC_STB130
= xxx
,
6482 CPU_POWERPC_X2VP4
= 0x20010820,
6483 #define CPU_POWERPC_X2VP7 CPU_POWERPC_X2VP4
6484 CPU_POWERPC_X2VP20
= 0x20010860,
6485 #define CPU_POWERPC_X2VP50 CPU_POWERPC_X2VP20
6487 CPU_POWERPC_ZL10310
= xxx
,
6490 CPU_POWERPC_ZL10311
= xxx
,
6493 CPU_POWERPC_ZL10320
= xxx
,
6496 CPU_POWERPC_ZL10321
= xxx
,
6498 /* PowerPC 440 family */
6499 /* Generic PowerPC 440 */
6500 #define CPU_POWERPC_440 CPU_POWERPC_440GXf
6501 /* PowerPC 440 cores */
6503 CPU_POWERPC_440A4
= xxx
,
6506 CPU_POWERPC_440A5
= xxx
,
6509 CPU_POWERPC_440B4
= xxx
,
6512 CPU_POWERPC_440F5
= xxx
,
6515 CPU_POWERPC_440G5
= xxx
,
6518 CPU_POWERPC_440H4
= xxx
,
6521 CPU_POWERPC_440H6
= xxx
,
6523 /* PowerPC 440 microcontrolers */
6524 #define CPU_POWERPC_440EP CPU_POWERPC_440EPb
6525 CPU_POWERPC_440EPa
= 0x42221850,
6526 CPU_POWERPC_440EPb
= 0x422218D3,
6527 #define CPU_POWERPC_440GP CPU_POWERPC_440GPc
6528 CPU_POWERPC_440GPb
= 0x40120440,
6529 CPU_POWERPC_440GPc
= 0x40120481,
6530 #define CPU_POWERPC_440GR CPU_POWERPC_440GRa
6531 #define CPU_POWERPC_440GRa CPU_POWERPC_440EPb
6532 CPU_POWERPC_440GRX
= 0x200008D0,
6533 #define CPU_POWERPC_440EPX CPU_POWERPC_440GRX
6534 #define CPU_POWERPC_440GX CPU_POWERPC_440GXf
6535 CPU_POWERPC_440GXa
= 0x51B21850,
6536 CPU_POWERPC_440GXb
= 0x51B21851,
6537 CPU_POWERPC_440GXc
= 0x51B21892,
6538 CPU_POWERPC_440GXf
= 0x51B21894,
6540 CPU_POWERPC_440S
= xxx
,
6542 CPU_POWERPC_440SP
= 0x53221850,
6543 CPU_POWERPC_440SP2
= 0x53221891,
6544 CPU_POWERPC_440SPE
= 0x53421890,
6545 /* PowerPC 460 family */
6547 /* Generic PowerPC 464 */
6548 #define CPU_POWERPC_464 CPU_POWERPC_464H90
6550 /* PowerPC 464 microcontrolers */
6552 CPU_POWERPC_464H90
= xxx
,
6555 CPU_POWERPC_464H90FP
= xxx
,
6557 /* Freescale embedded PowerPC cores */
6558 /* PowerPC MPC 5xx cores (aka RCPU) */
6559 CPU_POWERPC_MPC5xx
= 0x00020020,
6560 #define CPU_POWERPC_MGT560 CPU_POWERPC_MPC5xx
6561 #define CPU_POWERPC_MPC509 CPU_POWERPC_MPC5xx
6562 #define CPU_POWERPC_MPC533 CPU_POWERPC_MPC5xx
6563 #define CPU_POWERPC_MPC534 CPU_POWERPC_MPC5xx
6564 #define CPU_POWERPC_MPC555 CPU_POWERPC_MPC5xx
6565 #define CPU_POWERPC_MPC556 CPU_POWERPC_MPC5xx
6566 #define CPU_POWERPC_MPC560 CPU_POWERPC_MPC5xx
6567 #define CPU_POWERPC_MPC561 CPU_POWERPC_MPC5xx
6568 #define CPU_POWERPC_MPC562 CPU_POWERPC_MPC5xx
6569 #define CPU_POWERPC_MPC563 CPU_POWERPC_MPC5xx
6570 #define CPU_POWERPC_MPC564 CPU_POWERPC_MPC5xx
6571 #define CPU_POWERPC_MPC565 CPU_POWERPC_MPC5xx
6572 #define CPU_POWERPC_MPC566 CPU_POWERPC_MPC5xx
6573 /* PowerPC MPC 8xx cores (aka PowerQUICC) */
6574 CPU_POWERPC_MPC8xx
= 0x00500000,
6575 #define CPU_POWERPC_MGT823 CPU_POWERPC_MPC8xx
6576 #define CPU_POWERPC_MPC821 CPU_POWERPC_MPC8xx
6577 #define CPU_POWERPC_MPC823 CPU_POWERPC_MPC8xx
6578 #define CPU_POWERPC_MPC850 CPU_POWERPC_MPC8xx
6579 #define CPU_POWERPC_MPC852T CPU_POWERPC_MPC8xx
6580 #define CPU_POWERPC_MPC855T CPU_POWERPC_MPC8xx
6581 #define CPU_POWERPC_MPC857 CPU_POWERPC_MPC8xx
6582 #define CPU_POWERPC_MPC859 CPU_POWERPC_MPC8xx
6583 #define CPU_POWERPC_MPC860 CPU_POWERPC_MPC8xx
6584 #define CPU_POWERPC_MPC862 CPU_POWERPC_MPC8xx
6585 #define CPU_POWERPC_MPC866 CPU_POWERPC_MPC8xx
6586 #define CPU_POWERPC_MPC870 CPU_POWERPC_MPC8xx
6587 #define CPU_POWERPC_MPC875 CPU_POWERPC_MPC8xx
6588 #define CPU_POWERPC_MPC880 CPU_POWERPC_MPC8xx
6589 #define CPU_POWERPC_MPC885 CPU_POWERPC_MPC8xx
6590 /* G2 cores (aka PowerQUICC-II) */
6591 CPU_POWERPC_G2
= 0x00810011,
6592 CPU_POWERPC_G2H4
= 0x80811010,
6593 CPU_POWERPC_G2gp
= 0x80821010,
6594 CPU_POWERPC_G2ls
= 0x90810010,
6595 CPU_POWERPC_MPC603
= 0x00810100,
6596 CPU_POWERPC_G2_HIP3
= 0x00810101,
6597 CPU_POWERPC_G2_HIP4
= 0x80811014,
6598 /* G2_LE core (aka PowerQUICC-II) */
6599 CPU_POWERPC_G2LE
= 0x80820010,
6600 CPU_POWERPC_G2LEgp
= 0x80822010,
6601 CPU_POWERPC_G2LEls
= 0xA0822010,
6602 CPU_POWERPC_G2LEgp1
= 0x80822011,
6603 CPU_POWERPC_G2LEgp3
= 0x80822013,
6604 /* MPC52xx microcontrollers */
6605 /* XXX: MPC 5121 ? */
6606 #define CPU_POWERPC_MPC52xx CPU_POWERPC_MPC5200
6607 #define CPU_POWERPC_MPC5200 CPU_POWERPC_MPC5200_v12
6608 #define CPU_POWERPC_MPC5200_v10 CPU_POWERPC_G2LEgp1
6609 #define CPU_POWERPC_MPC5200_v11 CPU_POWERPC_G2LEgp1
6610 #define CPU_POWERPC_MPC5200_v12 CPU_POWERPC_G2LEgp1
6611 #define CPU_POWERPC_MPC5200B CPU_POWERPC_MPC5200B_v21
6612 #define CPU_POWERPC_MPC5200B_v20 CPU_POWERPC_G2LEgp1
6613 #define CPU_POWERPC_MPC5200B_v21 CPU_POWERPC_G2LEgp1
6614 /* MPC82xx microcontrollers */
6615 #define CPU_POWERPC_MPC82xx CPU_POWERPC_MPC8280
6616 #define CPU_POWERPC_MPC8240 CPU_POWERPC_MPC603
6617 #define CPU_POWERPC_MPC8241 CPU_POWERPC_G2_HIP4
6618 #define CPU_POWERPC_MPC8245 CPU_POWERPC_G2_HIP4
6619 #define CPU_POWERPC_MPC8247 CPU_POWERPC_G2LEgp3
6620 #define CPU_POWERPC_MPC8248 CPU_POWERPC_G2LEgp3
6621 #define CPU_POWERPC_MPC8250 CPU_POWERPC_MPC8250_HiP4
6622 #define CPU_POWERPC_MPC8250_HiP3 CPU_POWERPC_G2_HIP3
6623 #define CPU_POWERPC_MPC8250_HiP4 CPU_POWERPC_G2_HIP4
6624 #define CPU_POWERPC_MPC8255 CPU_POWERPC_MPC8255_HiP4
6625 #define CPU_POWERPC_MPC8255_HiP3 CPU_POWERPC_G2_HIP3
6626 #define CPU_POWERPC_MPC8255_HiP4 CPU_POWERPC_G2_HIP4
6627 #define CPU_POWERPC_MPC8260 CPU_POWERPC_MPC8260_HiP4
6628 #define CPU_POWERPC_MPC8260_HiP3 CPU_POWERPC_G2_HIP3
6629 #define CPU_POWERPC_MPC8260_HiP4 CPU_POWERPC_G2_HIP4
6630 #define CPU_POWERPC_MPC8264 CPU_POWERPC_MPC8264_HiP4
6631 #define CPU_POWERPC_MPC8264_HiP3 CPU_POWERPC_G2_HIP3
6632 #define CPU_POWERPC_MPC8264_HiP4 CPU_POWERPC_G2_HIP4
6633 #define CPU_POWERPC_MPC8265 CPU_POWERPC_MPC8265_HiP4
6634 #define CPU_POWERPC_MPC8265_HiP3 CPU_POWERPC_G2_HIP3
6635 #define CPU_POWERPC_MPC8265_HiP4 CPU_POWERPC_G2_HIP4
6636 #define CPU_POWERPC_MPC8266 CPU_POWERPC_MPC8266_HiP4
6637 #define CPU_POWERPC_MPC8266_HiP3 CPU_POWERPC_G2_HIP3
6638 #define CPU_POWERPC_MPC8266_HiP4 CPU_POWERPC_G2_HIP4
6639 #define CPU_POWERPC_MPC8270 CPU_POWERPC_G2LEgp3
6640 #define CPU_POWERPC_MPC8271 CPU_POWERPC_G2LEgp3
6641 #define CPU_POWERPC_MPC8272 CPU_POWERPC_G2LEgp3
6642 #define CPU_POWERPC_MPC8275 CPU_POWERPC_G2LEgp3
6643 #define CPU_POWERPC_MPC8280 CPU_POWERPC_G2LEgp3
6646 #define CPU_POWERPC_e200 CPU_POWERPC_e200z6
6648 CPU_POWERPC_e200z0
= xxx
,
6651 CPU_POWERPC_e200z1
= xxx
,
6654 CPU_POWERPC_e200z3
= 0x81120000,
6656 CPU_POWERPC_e200z5
= 0x81000000,
6657 CPU_POWERPC_e200z6
= 0x81120000,
6658 /* MPC55xx microcontrollers */
6659 #define CPU_POWERPC_MPC55xx CPU_POWERPC_MPC5567
6661 #define CPU_POWERPC_MPC5514E CPU_POWERPC_MPC5514E_v1
6662 #define CPU_POWERPC_MPC5514E_v0 CPU_POWERPC_e200z0
6663 #define CPU_POWERPC_MPC5514E_v1 CPU_POWERPC_e200z1
6664 #define CPU_POWERPC_MPC5514G CPU_POWERPC_MPC5514G_v1
6665 #define CPU_POWERPC_MPC5514G_v0 CPU_POWERPC_e200z0
6666 #define CPU_POWERPC_MPC5514G_v1 CPU_POWERPC_e200z1
6667 #define CPU_POWERPC_MPC5515S CPU_POWERPC_e200z1
6668 #define CPU_POWERPC_MPC5516E CPU_POWERPC_MPC5516E_v1
6669 #define CPU_POWERPC_MPC5516E_v0 CPU_POWERPC_e200z0
6670 #define CPU_POWERPC_MPC5516E_v1 CPU_POWERPC_e200z1
6671 #define CPU_POWERPC_MPC5516G CPU_POWERPC_MPC5516G_v1
6672 #define CPU_POWERPC_MPC5516G_v0 CPU_POWERPC_e200z0
6673 #define CPU_POWERPC_MPC5516G_v1 CPU_POWERPC_e200z1
6674 #define CPU_POWERPC_MPC5516S CPU_POWERPC_e200z1
6677 #define CPU_POWERPC_MPC5533 CPU_POWERPC_e200z3
6678 #define CPU_POWERPC_MPC5534 CPU_POWERPC_e200z3
6680 #define CPU_POWERPC_MPC5553 CPU_POWERPC_e200z6
6681 #define CPU_POWERPC_MPC5554 CPU_POWERPC_e200z6
6682 #define CPU_POWERPC_MPC5561 CPU_POWERPC_e200z6
6683 #define CPU_POWERPC_MPC5565 CPU_POWERPC_e200z6
6684 #define CPU_POWERPC_MPC5566 CPU_POWERPC_e200z6
6685 #define CPU_POWERPC_MPC5567 CPU_POWERPC_e200z6
6688 #define CPU_POWERPC_e300 CPU_POWERPC_e300c3
6689 CPU_POWERPC_e300c1
= 0x00830010,
6690 CPU_POWERPC_e300c2
= 0x00840010,
6691 CPU_POWERPC_e300c3
= 0x00850010,
6692 CPU_POWERPC_e300c4
= 0x00860010,
6693 /* MPC83xx microcontrollers */
6694 #define CPU_POWERPC_MPC8313 CPU_POWERPC_e300c3
6695 #define CPU_POWERPC_MPC8313E CPU_POWERPC_e300c3
6696 #define CPU_POWERPC_MPC8314 CPU_POWERPC_e300c3
6697 #define CPU_POWERPC_MPC8314E CPU_POWERPC_e300c3
6698 #define CPU_POWERPC_MPC8315 CPU_POWERPC_e300c3
6699 #define CPU_POWERPC_MPC8315E CPU_POWERPC_e300c3
6700 #define CPU_POWERPC_MPC8321 CPU_POWERPC_e300c2
6701 #define CPU_POWERPC_MPC8321E CPU_POWERPC_e300c2
6702 #define CPU_POWERPC_MPC8323 CPU_POWERPC_e300c2
6703 #define CPU_POWERPC_MPC8323E CPU_POWERPC_e300c2
6704 #define CPU_POWERPC_MPC8343A CPU_POWERPC_e300c1
6705 #define CPU_POWERPC_MPC8343EA CPU_POWERPC_e300c1
6706 #define CPU_POWERPC_MPC8347A CPU_POWERPC_e300c1
6707 #define CPU_POWERPC_MPC8347AT CPU_POWERPC_e300c1
6708 #define CPU_POWERPC_MPC8347AP CPU_POWERPC_e300c1
6709 #define CPU_POWERPC_MPC8347EA CPU_POWERPC_e300c1
6710 #define CPU_POWERPC_MPC8347EAT CPU_POWERPC_e300c1
6711 #define CPU_POWERPC_MPC8347EAP CPU_POWERPC_e300c1
6712 #define CPU_POWERPC_MPC8349 CPU_POWERPC_e300c1
6713 #define CPU_POWERPC_MPC8349A CPU_POWERPC_e300c1
6714 #define CPU_POWERPC_MPC8349E CPU_POWERPC_e300c1
6715 #define CPU_POWERPC_MPC8349EA CPU_POWERPC_e300c1
6716 #define CPU_POWERPC_MPC8358E CPU_POWERPC_e300c1
6717 #define CPU_POWERPC_MPC8360E CPU_POWERPC_e300c1
6718 #define CPU_POWERPC_MPC8377 CPU_POWERPC_e300c4
6719 #define CPU_POWERPC_MPC8377E CPU_POWERPC_e300c4
6720 #define CPU_POWERPC_MPC8378 CPU_POWERPC_e300c4
6721 #define CPU_POWERPC_MPC8378E CPU_POWERPC_e300c4
6722 #define CPU_POWERPC_MPC8379 CPU_POWERPC_e300c4
6723 #define CPU_POWERPC_MPC8379E CPU_POWERPC_e300c4
6726 #define CPU_POWERPC_e500 CPU_POWERPC_e500v2_v22
6727 #define CPU_POWERPC_e500v1 CPU_POWERPC_e500v1_v20
6728 #define CPU_POWERPC_e500v2 CPU_POWERPC_e500v2_v22
6729 CPU_POWERPC_e500v1_v10
= 0x80200010,
6730 CPU_POWERPC_e500v1_v20
= 0x80200020,
6731 CPU_POWERPC_e500v2_v10
= 0x80210010,
6732 CPU_POWERPC_e500v2_v11
= 0x80210011,
6733 CPU_POWERPC_e500v2_v20
= 0x80210020,
6734 CPU_POWERPC_e500v2_v21
= 0x80210021,
6735 CPU_POWERPC_e500v2_v22
= 0x80210022,
6736 CPU_POWERPC_e500v2_v30
= 0x80210030,
6737 /* MPC85xx microcontrollers */
6738 #define CPU_POWERPC_MPC8533 CPU_POWERPC_MPC8533_v11
6739 #define CPU_POWERPC_MPC8533_v10 CPU_POWERPC_e500v2_v21
6740 #define CPU_POWERPC_MPC8533_v11 CPU_POWERPC_e500v2_v22
6741 #define CPU_POWERPC_MPC8533E CPU_POWERPC_MPC8533E_v11
6742 #define CPU_POWERPC_MPC8533E_v10 CPU_POWERPC_e500v2_v21
6743 #define CPU_POWERPC_MPC8533E_v11 CPU_POWERPC_e500v2_v22
6744 #define CPU_POWERPC_MPC8540 CPU_POWERPC_MPC8540_v21
6745 #define CPU_POWERPC_MPC8540_v10 CPU_POWERPC_e500v1_v10
6746 #define CPU_POWERPC_MPC8540_v20 CPU_POWERPC_e500v1_v20
6747 #define CPU_POWERPC_MPC8540_v21 CPU_POWERPC_e500v1_v20
6748 #define CPU_POWERPC_MPC8541 CPU_POWERPC_MPC8541_v11
6749 #define CPU_POWERPC_MPC8541_v10 CPU_POWERPC_e500v1_v20
6750 #define CPU_POWERPC_MPC8541_v11 CPU_POWERPC_e500v1_v20
6751 #define CPU_POWERPC_MPC8541E CPU_POWERPC_MPC8541E_v11
6752 #define CPU_POWERPC_MPC8541E_v10 CPU_POWERPC_e500v1_v20
6753 #define CPU_POWERPC_MPC8541E_v11 CPU_POWERPC_e500v1_v20
6754 #define CPU_POWERPC_MPC8543 CPU_POWERPC_MPC8543_v21
6755 #define CPU_POWERPC_MPC8543_v10 CPU_POWERPC_e500v2_v10
6756 #define CPU_POWERPC_MPC8543_v11 CPU_POWERPC_e500v2_v11
6757 #define CPU_POWERPC_MPC8543_v20 CPU_POWERPC_e500v2_v20
6758 #define CPU_POWERPC_MPC8543_v21 CPU_POWERPC_e500v2_v21
6759 #define CPU_POWERPC_MPC8543E CPU_POWERPC_MPC8543E_v21
6760 #define CPU_POWERPC_MPC8543E_v10 CPU_POWERPC_e500v2_v10
6761 #define CPU_POWERPC_MPC8543E_v11 CPU_POWERPC_e500v2_v11
6762 #define CPU_POWERPC_MPC8543E_v20 CPU_POWERPC_e500v2_v20
6763 #define CPU_POWERPC_MPC8543E_v21 CPU_POWERPC_e500v2_v21
6764 #define CPU_POWERPC_MPC8544 CPU_POWERPC_MPC8544_v11
6765 #define CPU_POWERPC_MPC8544_v10 CPU_POWERPC_e500v2_v21
6766 #define CPU_POWERPC_MPC8544_v11 CPU_POWERPC_e500v2_v22
6767 #define CPU_POWERPC_MPC8544E_v11 CPU_POWERPC_e500v2_v22
6768 #define CPU_POWERPC_MPC8544E CPU_POWERPC_MPC8544E_v11
6769 #define CPU_POWERPC_MPC8544E_v10 CPU_POWERPC_e500v2_v21
6770 #define CPU_POWERPC_MPC8545 CPU_POWERPC_MPC8545_v21
6771 #define CPU_POWERPC_MPC8545_v10 CPU_POWERPC_e500v2_v10
6772 #define CPU_POWERPC_MPC8545_v20 CPU_POWERPC_e500v2_v20
6773 #define CPU_POWERPC_MPC8545_v21 CPU_POWERPC_e500v2_v21
6774 #define CPU_POWERPC_MPC8545E CPU_POWERPC_MPC8545E_v21
6775 #define CPU_POWERPC_MPC8545E_v10 CPU_POWERPC_e500v2_v10
6776 #define CPU_POWERPC_MPC8545E_v20 CPU_POWERPC_e500v2_v20
6777 #define CPU_POWERPC_MPC8545E_v21 CPU_POWERPC_e500v2_v21
6778 #define CPU_POWERPC_MPC8547E CPU_POWERPC_MPC8545E_v21
6779 #define CPU_POWERPC_MPC8547E_v10 CPU_POWERPC_e500v2_v10
6780 #define CPU_POWERPC_MPC8547E_v20 CPU_POWERPC_e500v2_v20
6781 #define CPU_POWERPC_MPC8547E_v21 CPU_POWERPC_e500v2_v21
6782 #define CPU_POWERPC_MPC8548 CPU_POWERPC_MPC8548_v21
6783 #define CPU_POWERPC_MPC8548_v10 CPU_POWERPC_e500v2_v10
6784 #define CPU_POWERPC_MPC8548_v11 CPU_POWERPC_e500v2_v11
6785 #define CPU_POWERPC_MPC8548_v20 CPU_POWERPC_e500v2_v20
6786 #define CPU_POWERPC_MPC8548_v21 CPU_POWERPC_e500v2_v21
6787 #define CPU_POWERPC_MPC8548E CPU_POWERPC_MPC8548E_v21
6788 #define CPU_POWERPC_MPC8548E_v10 CPU_POWERPC_e500v2_v10
6789 #define CPU_POWERPC_MPC8548E_v11 CPU_POWERPC_e500v2_v11
6790 #define CPU_POWERPC_MPC8548E_v20 CPU_POWERPC_e500v2_v20
6791 #define CPU_POWERPC_MPC8548E_v21 CPU_POWERPC_e500v2_v21
6792 #define CPU_POWERPC_MPC8555 CPU_POWERPC_MPC8555_v11
6793 #define CPU_POWERPC_MPC8555_v10 CPU_POWERPC_e500v2_v10
6794 #define CPU_POWERPC_MPC8555_v11 CPU_POWERPC_e500v2_v11
6795 #define CPU_POWERPC_MPC8555E CPU_POWERPC_MPC8555E_v11
6796 #define CPU_POWERPC_MPC8555E_v10 CPU_POWERPC_e500v2_v10
6797 #define CPU_POWERPC_MPC8555E_v11 CPU_POWERPC_e500v2_v11
6798 #define CPU_POWERPC_MPC8560 CPU_POWERPC_MPC8560_v21
6799 #define CPU_POWERPC_MPC8560_v10 CPU_POWERPC_e500v2_v10
6800 #define CPU_POWERPC_MPC8560_v20 CPU_POWERPC_e500v2_v20
6801 #define CPU_POWERPC_MPC8560_v21 CPU_POWERPC_e500v2_v21
6802 #define CPU_POWERPC_MPC8567 CPU_POWERPC_e500v2_v22
6803 #define CPU_POWERPC_MPC8567E CPU_POWERPC_e500v2_v22
6804 #define CPU_POWERPC_MPC8568 CPU_POWERPC_e500v2_v22
6805 #define CPU_POWERPC_MPC8568E CPU_POWERPC_e500v2_v22
6806 #define CPU_POWERPC_MPC8572 CPU_POWERPC_e500v2_v30
6807 #define CPU_POWERPC_MPC8572E CPU_POWERPC_e500v2_v30
6810 CPU_POWERPC_e600
= 0x80040010,
6811 /* MPC86xx microcontrollers */
6812 #define CPU_POWERPC_MPC8610 CPU_POWERPC_e600
6813 #define CPU_POWERPC_MPC8641 CPU_POWERPC_e600
6814 #define CPU_POWERPC_MPC8641D CPU_POWERPC_e600
6815 /* PowerPC 6xx cores */
6816 #define CPU_POWERPC_601 CPU_POWERPC_601_v2
6817 CPU_POWERPC_601_v0
= 0x00010001,
6818 CPU_POWERPC_601_v1
= 0x00010001,
6819 #define CPU_POWERPC_601v CPU_POWERPC_601_v2
6820 CPU_POWERPC_601_v2
= 0x00010002,
6821 CPU_POWERPC_602
= 0x00050100,
6822 CPU_POWERPC_603
= 0x00030100,
6823 #define CPU_POWERPC_603E CPU_POWERPC_603E_v41
6824 CPU_POWERPC_603E_v11
= 0x00060101,
6825 CPU_POWERPC_603E_v12
= 0x00060102,
6826 CPU_POWERPC_603E_v13
= 0x00060103,
6827 CPU_POWERPC_603E_v14
= 0x00060104,
6828 CPU_POWERPC_603E_v22
= 0x00060202,
6829 CPU_POWERPC_603E_v3
= 0x00060300,
6830 CPU_POWERPC_603E_v4
= 0x00060400,
6831 CPU_POWERPC_603E_v41
= 0x00060401,
6832 CPU_POWERPC_603E7t
= 0x00071201,
6833 CPU_POWERPC_603E7v
= 0x00070100,
6834 CPU_POWERPC_603E7v1
= 0x00070101,
6835 CPU_POWERPC_603E7v2
= 0x00070201,
6836 CPU_POWERPC_603E7
= 0x00070200,
6837 CPU_POWERPC_603P
= 0x00070000,
6838 #define CPU_POWERPC_603R CPU_POWERPC_603E7t
6839 /* XXX: missing 0x00040303 (604) */
6840 CPU_POWERPC_604
= 0x00040103,
6841 #define CPU_POWERPC_604E CPU_POWERPC_604E_v24
6842 /* XXX: missing 0x00091203 */
6843 /* XXX: missing 0x00092110 */
6844 /* XXX: missing 0x00092120 */
6845 CPU_POWERPC_604E_v10
= 0x00090100,
6846 CPU_POWERPC_604E_v22
= 0x00090202,
6847 CPU_POWERPC_604E_v24
= 0x00090204,
6848 /* XXX: missing 0x000a0100 */
6849 /* XXX: missing 0x00093102 */
6850 CPU_POWERPC_604R
= 0x000a0101,
6852 CPU_POWERPC_604EV
= xxx
, /* XXX: same as 604R ? */
6854 /* PowerPC 740/750 cores (aka G3) */
6855 /* XXX: missing 0x00084202 */
6856 #define CPU_POWERPC_7x0 CPU_POWERPC_7x0_v31
6857 CPU_POWERPC_7x0_v10
= 0x00080100,
6858 CPU_POWERPC_7x0_v20
= 0x00080200,
6859 CPU_POWERPC_7x0_v21
= 0x00080201,
6860 CPU_POWERPC_7x0_v22
= 0x00080202,
6861 CPU_POWERPC_7x0_v30
= 0x00080300,
6862 CPU_POWERPC_7x0_v31
= 0x00080301,
6863 CPU_POWERPC_740E
= 0x00080100,
6864 CPU_POWERPC_750E
= 0x00080200,
6865 CPU_POWERPC_7x0P
= 0x10080000,
6866 /* XXX: missing 0x00087010 (CL ?) */
6867 #define CPU_POWERPC_750CL CPU_POWERPC_750CL_v20
6868 CPU_POWERPC_750CL_v10
= 0x00087200,
6869 CPU_POWERPC_750CL_v20
= 0x00087210, /* aka rev E */
6870 #define CPU_POWERPC_750CX CPU_POWERPC_750CX_v22
6871 CPU_POWERPC_750CX_v10
= 0x00082100,
6872 CPU_POWERPC_750CX_v20
= 0x00082200,
6873 CPU_POWERPC_750CX_v21
= 0x00082201,
6874 CPU_POWERPC_750CX_v22
= 0x00082202,
6875 #define CPU_POWERPC_750CXE CPU_POWERPC_750CXE_v31b
6876 CPU_POWERPC_750CXE_v21
= 0x00082211,
6877 CPU_POWERPC_750CXE_v22
= 0x00082212,
6878 CPU_POWERPC_750CXE_v23
= 0x00082213,
6879 CPU_POWERPC_750CXE_v24
= 0x00082214,
6880 CPU_POWERPC_750CXE_v24b
= 0x00083214,
6881 CPU_POWERPC_750CXE_v30
= 0x00082310,
6882 CPU_POWERPC_750CXE_v31
= 0x00082311,
6883 CPU_POWERPC_750CXE_v31b
= 0x00083311,
6884 CPU_POWERPC_750CXR
= 0x00083410,
6885 CPU_POWERPC_750FL
= 0x70000203,
6886 #define CPU_POWERPC_750FX CPU_POWERPC_750FX_v23
6887 CPU_POWERPC_750FX_v10
= 0x70000100,
6888 CPU_POWERPC_750FX_v20
= 0x70000200,
6889 CPU_POWERPC_750FX_v21
= 0x70000201,
6890 CPU_POWERPC_750FX_v22
= 0x70000202,
6891 CPU_POWERPC_750FX_v23
= 0x70000203,
6892 CPU_POWERPC_750GL
= 0x70020102,
6893 #define CPU_POWERPC_750GX CPU_POWERPC_750GX_v12
6894 CPU_POWERPC_750GX_v10
= 0x70020100,
6895 CPU_POWERPC_750GX_v11
= 0x70020101,
6896 CPU_POWERPC_750GX_v12
= 0x70020102,
6897 #define CPU_POWERPC_750L CPU_POWERPC_750L_v32 /* Aka LoneStar */
6898 CPU_POWERPC_750L_v20
= 0x00088200,
6899 CPU_POWERPC_750L_v21
= 0x00088201,
6900 CPU_POWERPC_750L_v22
= 0x00088202,
6901 CPU_POWERPC_750L_v30
= 0x00088300,
6902 CPU_POWERPC_750L_v32
= 0x00088302,
6903 /* PowerPC 745/755 cores */
6904 #define CPU_POWERPC_7x5 CPU_POWERPC_7x5_v28
6905 CPU_POWERPC_7x5_v10
= 0x00083100,
6906 CPU_POWERPC_7x5_v11
= 0x00083101,
6907 CPU_POWERPC_7x5_v20
= 0x00083200,
6908 CPU_POWERPC_7x5_v21
= 0x00083201,
6909 CPU_POWERPC_7x5_v22
= 0x00083202, /* aka D */
6910 CPU_POWERPC_7x5_v23
= 0x00083203, /* aka E */
6911 CPU_POWERPC_7x5_v24
= 0x00083204,
6912 CPU_POWERPC_7x5_v25
= 0x00083205,
6913 CPU_POWERPC_7x5_v26
= 0x00083206,
6914 CPU_POWERPC_7x5_v27
= 0x00083207,
6915 CPU_POWERPC_7x5_v28
= 0x00083208,
6917 CPU_POWERPC_7x5P
= xxx
,
6919 /* PowerPC 74xx cores (aka G4) */
6920 /* XXX: missing 0x000C1101 */
6921 #define CPU_POWERPC_7400 CPU_POWERPC_7400_v29
6922 CPU_POWERPC_7400_v10
= 0x000C0100,
6923 CPU_POWERPC_7400_v11
= 0x000C0101,
6924 CPU_POWERPC_7400_v20
= 0x000C0200,
6925 CPU_POWERPC_7400_v21
= 0x000C0201,
6926 CPU_POWERPC_7400_v22
= 0x000C0202,
6927 CPU_POWERPC_7400_v26
= 0x000C0206,
6928 CPU_POWERPC_7400_v27
= 0x000C0207,
6929 CPU_POWERPC_7400_v28
= 0x000C0208,
6930 CPU_POWERPC_7400_v29
= 0x000C0209,
6931 #define CPU_POWERPC_7410 CPU_POWERPC_7410_v14
6932 CPU_POWERPC_7410_v10
= 0x800C1100,
6933 CPU_POWERPC_7410_v11
= 0x800C1101,
6934 CPU_POWERPC_7410_v12
= 0x800C1102, /* aka C */
6935 CPU_POWERPC_7410_v13
= 0x800C1103, /* aka D */
6936 CPU_POWERPC_7410_v14
= 0x800C1104, /* aka E */
6937 #define CPU_POWERPC_7448 CPU_POWERPC_7448_v21
6938 CPU_POWERPC_7448_v10
= 0x80040100,
6939 CPU_POWERPC_7448_v11
= 0x80040101,
6940 CPU_POWERPC_7448_v20
= 0x80040200,
6941 CPU_POWERPC_7448_v21
= 0x80040201,
6942 #define CPU_POWERPC_7450 CPU_POWERPC_7450_v21
6943 CPU_POWERPC_7450_v10
= 0x80000100,
6944 CPU_POWERPC_7450_v11
= 0x80000101,
6945 CPU_POWERPC_7450_v12
= 0x80000102,
6946 CPU_POWERPC_7450_v20
= 0x80000200, /* aka A, B, C, D: 2.04 */
6947 CPU_POWERPC_7450_v21
= 0x80000201, /* aka E */
6948 #define CPU_POWERPC_74x1 CPU_POWERPC_74x1_v23
6949 CPU_POWERPC_74x1_v23
= 0x80000203, /* aka G: 2.3 */
6950 /* XXX: this entry might be a bug in some documentation */
6951 CPU_POWERPC_74x1_v210
= 0x80000210, /* aka G: 2.3 ? */
6952 #define CPU_POWERPC_74x5 CPU_POWERPC_74x5_v32
6953 CPU_POWERPC_74x5_v10
= 0x80010100,
6954 /* XXX: missing 0x80010200 */
6955 CPU_POWERPC_74x5_v21
= 0x80010201, /* aka C: 2.1 */
6956 CPU_POWERPC_74x5_v32
= 0x80010302,
6957 CPU_POWERPC_74x5_v33
= 0x80010303, /* aka F: 3.3 */
6958 CPU_POWERPC_74x5_v34
= 0x80010304, /* aka G: 3.4 */
6959 #define CPU_POWERPC_74x7 CPU_POWERPC_74x7_v12
6960 CPU_POWERPC_74x7_v10
= 0x80020100, /* aka A: 1.0 */
6961 CPU_POWERPC_74x7_v11
= 0x80020101, /* aka B: 1.1 */
6962 CPU_POWERPC_74x7_v12
= 0x80020102, /* aka C: 1.2 */
6963 #define CPU_POWERPC_74x7A CPU_POWERPC_74x7A_v12
6964 CPU_POWERPC_74x7A_v10
= 0x80030100, /* aka A: 1.0 */
6965 CPU_POWERPC_74x7A_v11
= 0x80030101, /* aka B: 1.1 */
6966 CPU_POWERPC_74x7A_v12
= 0x80030102, /* aka C: 1.2 */
6967 /* 64 bits PowerPC */
6968 #if defined(TARGET_PPC64)
6969 CPU_POWERPC_620
= 0x00140000,
6970 CPU_POWERPC_630
= 0x00400000,
6971 CPU_POWERPC_631
= 0x00410104,
6972 CPU_POWERPC_POWER4
= 0x00350000,
6973 CPU_POWERPC_POWER4P
= 0x00380000,
6974 /* XXX: missing 0x003A0201 */
6975 CPU_POWERPC_POWER5
= 0x003A0203,
6976 #define CPU_POWERPC_POWER5GR CPU_POWERPC_POWER5
6977 CPU_POWERPC_POWER5P
= 0x003B0000,
6978 #define CPU_POWERPC_POWER5GS CPU_POWERPC_POWER5P
6979 CPU_POWERPC_POWER6
= 0x003E0000,
6980 CPU_POWERPC_POWER6_5
= 0x0F000001, /* POWER6 in POWER5 mode */
6981 CPU_POWERPC_POWER6A
= 0x0F000002,
6982 CPU_POWERPC_970
= 0x00390202,
6983 #define CPU_POWERPC_970FX CPU_POWERPC_970FX_v31
6984 CPU_POWERPC_970FX_v10
= 0x00391100,
6985 CPU_POWERPC_970FX_v20
= 0x003C0200,
6986 CPU_POWERPC_970FX_v21
= 0x003C0201,
6987 CPU_POWERPC_970FX_v30
= 0x003C0300,
6988 CPU_POWERPC_970FX_v31
= 0x003C0301,
6989 CPU_POWERPC_970GX
= 0x00450000,
6990 #define CPU_POWERPC_970MP CPU_POWERPC_970MP_v11
6991 CPU_POWERPC_970MP_v10
= 0x00440100,
6992 CPU_POWERPC_970MP_v11
= 0x00440101,
6993 #define CPU_POWERPC_CELL CPU_POWERPC_CELL_v32
6994 CPU_POWERPC_CELL_v10
= 0x00700100,
6995 CPU_POWERPC_CELL_v20
= 0x00700400,
6996 CPU_POWERPC_CELL_v30
= 0x00700500,
6997 CPU_POWERPC_CELL_v31
= 0x00700501,
6998 #define CPU_POWERPC_CELL_v32 CPU_POWERPC_CELL_v31
6999 CPU_POWERPC_RS64
= 0x00330000,
7000 CPU_POWERPC_RS64II
= 0x00340000,
7001 CPU_POWERPC_RS64III
= 0x00360000,
7002 CPU_POWERPC_RS64IV
= 0x00370000,
7003 #endif /* defined(TARGET_PPC64) */
7004 /* Original POWER */
7005 /* XXX: should be POWER (RIOS), RSC3308, RSC4608,
7006 * POWER2 (RIOS2) & RSC2 (P2SC) here
7009 CPU_POWER
= xxx
, /* 0x20000 ? 0x30000 for RSC ? */
7012 CPU_POWER2
= xxx
, /* 0x40000 ? */
7015 CPU_POWERPC_PA6T
= 0x00900000,
7018 /* System version register (used on MPC 8xxx) */
7020 POWERPC_SVR_NONE
= 0x00000000,
7021 #define POWERPC_SVR_52xx POWERPC_SVR_5200
7022 #define POWERPC_SVR_5200 POWERPC_SVR_5200_v12
7023 POWERPC_SVR_5200_v10
= 0x80110010,
7024 POWERPC_SVR_5200_v11
= 0x80110011,
7025 POWERPC_SVR_5200_v12
= 0x80110012,
7026 #define POWERPC_SVR_5200B POWERPC_SVR_5200B_v21
7027 POWERPC_SVR_5200B_v20
= 0x80110020,
7028 POWERPC_SVR_5200B_v21
= 0x80110021,
7029 #define POWERPC_SVR_55xx POWERPC_SVR_5567
7031 POWERPC_SVR_5533
= xxx
,
7034 POWERPC_SVR_5534
= xxx
,
7037 POWERPC_SVR_5553
= xxx
,
7040 POWERPC_SVR_5554
= xxx
,
7043 POWERPC_SVR_5561
= xxx
,
7046 POWERPC_SVR_5565
= xxx
,
7049 POWERPC_SVR_5566
= xxx
,
7052 POWERPC_SVR_5567
= xxx
,
7055 POWERPC_SVR_8313
= xxx
,
7058 POWERPC_SVR_8313E
= xxx
,
7061 POWERPC_SVR_8314
= xxx
,
7064 POWERPC_SVR_8314E
= xxx
,
7067 POWERPC_SVR_8315
= xxx
,
7070 POWERPC_SVR_8315E
= xxx
,
7073 POWERPC_SVR_8321
= xxx
,
7076 POWERPC_SVR_8321E
= xxx
,
7079 POWERPC_SVR_8323
= xxx
,
7082 POWERPC_SVR_8323E
= xxx
,
7084 POWERPC_SVR_8343A
= 0x80570030,
7085 POWERPC_SVR_8343EA
= 0x80560030,
7086 #define POWERPC_SVR_8347A POWERPC_SVR_8347AT
7087 POWERPC_SVR_8347AP
= 0x80550030, /* PBGA package */
7088 POWERPC_SVR_8347AT
= 0x80530030, /* TBGA package */
7089 #define POWERPC_SVR_8347EA POWERPC_SVR_8347EAT
7090 POWERPC_SVR_8347EAP
= 0x80540030, /* PBGA package */
7091 POWERPC_SVR_8347EAT
= 0x80520030, /* TBGA package */
7092 POWERPC_SVR_8349
= 0x80510010,
7093 POWERPC_SVR_8349A
= 0x80510030,
7094 POWERPC_SVR_8349E
= 0x80500010,
7095 POWERPC_SVR_8349EA
= 0x80500030,
7097 POWERPC_SVR_8358E
= xxx
,
7100 POWERPC_SVR_8360E
= xxx
,
7102 #define POWERPC_SVR_E500 0x40000000
7103 POWERPC_SVR_8377
= 0x80C70010 | POWERPC_SVR_E500
,
7104 POWERPC_SVR_8377E
= 0x80C60010 | POWERPC_SVR_E500
,
7105 POWERPC_SVR_8378
= 0x80C50010 | POWERPC_SVR_E500
,
7106 POWERPC_SVR_8378E
= 0x80C40010 | POWERPC_SVR_E500
,
7107 POWERPC_SVR_8379
= 0x80C30010 | POWERPC_SVR_E500
,
7108 POWERPC_SVR_8379E
= 0x80C00010 | POWERPC_SVR_E500
,
7109 #define POWERPC_SVR_8533 POWERPC_SVR_8533_v11
7110 POWERPC_SVR_8533_v10
= 0x80340010 | POWERPC_SVR_E500
,
7111 POWERPC_SVR_8533_v11
= 0x80340011 | POWERPC_SVR_E500
,
7112 #define POWERPC_SVR_8533E POWERPC_SVR_8533E_v11
7113 POWERPC_SVR_8533E_v10
= 0x803C0010 | POWERPC_SVR_E500
,
7114 POWERPC_SVR_8533E_v11
= 0x803C0011 | POWERPC_SVR_E500
,
7115 #define POWERPC_SVR_8540 POWERPC_SVR_8540_v21
7116 POWERPC_SVR_8540_v10
= 0x80300010 | POWERPC_SVR_E500
,
7117 POWERPC_SVR_8540_v20
= 0x80300020 | POWERPC_SVR_E500
,
7118 POWERPC_SVR_8540_v21
= 0x80300021 | POWERPC_SVR_E500
,
7119 #define POWERPC_SVR_8541 POWERPC_SVR_8541_v11
7120 POWERPC_SVR_8541_v10
= 0x80720010 | POWERPC_SVR_E500
,
7121 POWERPC_SVR_8541_v11
= 0x80720011 | POWERPC_SVR_E500
,
7122 #define POWERPC_SVR_8541E POWERPC_SVR_8541E_v11
7123 POWERPC_SVR_8541E_v10
= 0x807A0010 | POWERPC_SVR_E500
,
7124 POWERPC_SVR_8541E_v11
= 0x807A0011 | POWERPC_SVR_E500
,
7125 #define POWERPC_SVR_8543 POWERPC_SVR_8543_v21
7126 POWERPC_SVR_8543_v10
= 0x80320010 | POWERPC_SVR_E500
,
7127 POWERPC_SVR_8543_v11
= 0x80320011 | POWERPC_SVR_E500
,
7128 POWERPC_SVR_8543_v20
= 0x80320020 | POWERPC_SVR_E500
,
7129 POWERPC_SVR_8543_v21
= 0x80320021 | POWERPC_SVR_E500
,
7130 #define POWERPC_SVR_8543E POWERPC_SVR_8543E_v21
7131 POWERPC_SVR_8543E_v10
= 0x803A0010 | POWERPC_SVR_E500
,
7132 POWERPC_SVR_8543E_v11
= 0x803A0011 | POWERPC_SVR_E500
,
7133 POWERPC_SVR_8543E_v20
= 0x803A0020 | POWERPC_SVR_E500
,
7134 POWERPC_SVR_8543E_v21
= 0x803A0021 | POWERPC_SVR_E500
,
7135 #define POWERPC_SVR_8544 POWERPC_SVR_8544_v11
7136 POWERPC_SVR_8544_v10
= 0x80340110 | POWERPC_SVR_E500
,
7137 POWERPC_SVR_8544_v11
= 0x80340111 | POWERPC_SVR_E500
,
7138 #define POWERPC_SVR_8544E POWERPC_SVR_8544E_v11
7139 POWERPC_SVR_8544E_v10
= 0x803C0110 | POWERPC_SVR_E500
,
7140 POWERPC_SVR_8544E_v11
= 0x803C0111 | POWERPC_SVR_E500
,
7141 #define POWERPC_SVR_8545 POWERPC_SVR_8545_v21
7142 POWERPC_SVR_8545_v20
= 0x80310220 | POWERPC_SVR_E500
,
7143 POWERPC_SVR_8545_v21
= 0x80310221 | POWERPC_SVR_E500
,
7144 #define POWERPC_SVR_8545E POWERPC_SVR_8545E_v21
7145 POWERPC_SVR_8545E_v20
= 0x80390220 | POWERPC_SVR_E500
,
7146 POWERPC_SVR_8545E_v21
= 0x80390221 | POWERPC_SVR_E500
,
7147 #define POWERPC_SVR_8547E POWERPC_SVR_8547E_v21
7148 POWERPC_SVR_8547E_v20
= 0x80390120 | POWERPC_SVR_E500
,
7149 POWERPC_SVR_8547E_v21
= 0x80390121 | POWERPC_SVR_E500
,
7150 #define POWERPC_SVR_8548 POWERPC_SVR_8548_v21
7151 POWERPC_SVR_8548_v10
= 0x80310010 | POWERPC_SVR_E500
,
7152 POWERPC_SVR_8548_v11
= 0x80310011 | POWERPC_SVR_E500
,
7153 POWERPC_SVR_8548_v20
= 0x80310020 | POWERPC_SVR_E500
,
7154 POWERPC_SVR_8548_v21
= 0x80310021 | POWERPC_SVR_E500
,
7155 #define POWERPC_SVR_8548E POWERPC_SVR_8548E_v21
7156 POWERPC_SVR_8548E_v10
= 0x80390010 | POWERPC_SVR_E500
,
7157 POWERPC_SVR_8548E_v11
= 0x80390011 | POWERPC_SVR_E500
,
7158 POWERPC_SVR_8548E_v20
= 0x80390020 | POWERPC_SVR_E500
,
7159 POWERPC_SVR_8548E_v21
= 0x80390021 | POWERPC_SVR_E500
,
7160 #define POWERPC_SVR_8555 POWERPC_SVR_8555_v11
7161 POWERPC_SVR_8555_v10
= 0x80710010 | POWERPC_SVR_E500
,
7162 POWERPC_SVR_8555_v11
= 0x80710011 | POWERPC_SVR_E500
,
7163 #define POWERPC_SVR_8555E POWERPC_SVR_8555_v11
7164 POWERPC_SVR_8555E_v10
= 0x80790010 | POWERPC_SVR_E500
,
7165 POWERPC_SVR_8555E_v11
= 0x80790011 | POWERPC_SVR_E500
,
7166 #define POWERPC_SVR_8560 POWERPC_SVR_8560_v21
7167 POWERPC_SVR_8560_v10
= 0x80700010 | POWERPC_SVR_E500
,
7168 POWERPC_SVR_8560_v20
= 0x80700020 | POWERPC_SVR_E500
,
7169 POWERPC_SVR_8560_v21
= 0x80700021 | POWERPC_SVR_E500
,
7170 POWERPC_SVR_8567
= 0x80750111 | POWERPC_SVR_E500
,
7171 POWERPC_SVR_8567E
= 0x807D0111 | POWERPC_SVR_E500
,
7172 POWERPC_SVR_8568
= 0x80750011 | POWERPC_SVR_E500
,
7173 POWERPC_SVR_8568E
= 0x807D0011 | POWERPC_SVR_E500
,
7174 POWERPC_SVR_8572
= 0x80E00010 | POWERPC_SVR_E500
,
7175 POWERPC_SVR_8572E
= 0x80E80010 | POWERPC_SVR_E500
,
7177 POWERPC_SVR_8610
= xxx
,
7179 POWERPC_SVR_8641
= 0x80900021,
7180 POWERPC_SVR_8641D
= 0x80900121,
7183 /*****************************************************************************/
7184 /* PowerPC CPU definitions */
7185 #define POWERPC_DEF_SVR(_name, _pvr, _svr, _type) \
7190 .insns_flags = glue(POWERPC_INSNS_,_type), \
7191 .msr_mask = glue(POWERPC_MSRM_,_type), \
7192 .mmu_model = glue(POWERPC_MMU_,_type), \
7193 .excp_model = glue(POWERPC_EXCP_,_type), \
7194 .bus_model = glue(POWERPC_INPUT_,_type), \
7195 .bfd_mach = glue(POWERPC_BFDM_,_type), \
7196 .flags = glue(POWERPC_FLAG_,_type), \
7197 .init_proc = &glue(init_proc_,_type), \
7198 .check_pow = &glue(check_pow_,_type), \
7200 #define POWERPC_DEF(_name, _pvr, _type) \
7201 POWERPC_DEF_SVR(_name, _pvr, POWERPC_SVR_NONE, _type)
7203 static const ppc_def_t ppc_defs
[] = {
7204 /* Embedded PowerPC */
7205 /* PowerPC 401 family */
7206 /* Generic PowerPC 401 */
7207 POWERPC_DEF("401", CPU_POWERPC_401
, 401),
7208 /* PowerPC 401 cores */
7210 POWERPC_DEF("401A1", CPU_POWERPC_401A1
, 401),
7212 POWERPC_DEF("401B2", CPU_POWERPC_401B2
, 401x2
),
7215 POWERPC_DEF("401B3", CPU_POWERPC_401B3
, 401x3
),
7218 POWERPC_DEF("401C2", CPU_POWERPC_401C2
, 401x2
),
7220 POWERPC_DEF("401D2", CPU_POWERPC_401D2
, 401x2
),
7222 POWERPC_DEF("401E2", CPU_POWERPC_401E2
, 401x2
),
7224 POWERPC_DEF("401F2", CPU_POWERPC_401F2
, 401x2
),
7226 /* XXX: to be checked */
7227 POWERPC_DEF("401G2", CPU_POWERPC_401G2
, 401x2
),
7228 /* PowerPC 401 microcontrolers */
7231 POWERPC_DEF("401GF", CPU_POWERPC_401GF
, 401),
7233 /* IOP480 (401 microcontroler) */
7234 POWERPC_DEF("IOP480", CPU_POWERPC_IOP480
, IOP480
),
7235 /* IBM Processor for Network Resources */
7236 POWERPC_DEF("Cobra", CPU_POWERPC_COBRA
, 401),
7238 POWERPC_DEF("Xipchip", CPU_POWERPC_XIPCHIP
, 401),
7240 /* PowerPC 403 family */
7241 /* Generic PowerPC 403 */
7242 POWERPC_DEF("403", CPU_POWERPC_403
, 403),
7243 /* PowerPC 403 microcontrolers */
7244 /* PowerPC 403 GA */
7245 POWERPC_DEF("403GA", CPU_POWERPC_403GA
, 403),
7246 /* PowerPC 403 GB */
7247 POWERPC_DEF("403GB", CPU_POWERPC_403GB
, 403),
7248 /* PowerPC 403 GC */
7249 POWERPC_DEF("403GC", CPU_POWERPC_403GC
, 403),
7250 /* PowerPC 403 GCX */
7251 POWERPC_DEF("403GCX", CPU_POWERPC_403GCX
, 403GCX
),
7253 /* PowerPC 403 GP */
7254 POWERPC_DEF("403GP", CPU_POWERPC_403GP
, 403),
7256 /* PowerPC 405 family */
7257 /* Generic PowerPC 405 */
7258 POWERPC_DEF("405", CPU_POWERPC_405
, 405),
7259 /* PowerPC 405 cores */
7261 /* PowerPC 405 A3 */
7262 POWERPC_DEF("405A3", CPU_POWERPC_405A3
, 405),
7265 /* PowerPC 405 A4 */
7266 POWERPC_DEF("405A4", CPU_POWERPC_405A4
, 405),
7269 /* PowerPC 405 B3 */
7270 POWERPC_DEF("405B3", CPU_POWERPC_405B3
, 405),
7273 /* PowerPC 405 B4 */
7274 POWERPC_DEF("405B4", CPU_POWERPC_405B4
, 405),
7277 /* PowerPC 405 C3 */
7278 POWERPC_DEF("405C3", CPU_POWERPC_405C3
, 405),
7281 /* PowerPC 405 C4 */
7282 POWERPC_DEF("405C4", CPU_POWERPC_405C4
, 405),
7284 /* PowerPC 405 D2 */
7285 POWERPC_DEF("405D2", CPU_POWERPC_405D2
, 405),
7287 /* PowerPC 405 D3 */
7288 POWERPC_DEF("405D3", CPU_POWERPC_405D3
, 405),
7290 /* PowerPC 405 D4 */
7291 POWERPC_DEF("405D4", CPU_POWERPC_405D4
, 405),
7293 /* PowerPC 405 D5 */
7294 POWERPC_DEF("405D5", CPU_POWERPC_405D5
, 405),
7297 /* PowerPC 405 E4 */
7298 POWERPC_DEF("405E4", CPU_POWERPC_405E4
, 405),
7301 /* PowerPC 405 F4 */
7302 POWERPC_DEF("405F4", CPU_POWERPC_405F4
, 405),
7305 /* PowerPC 405 F5 */
7306 POWERPC_DEF("405F5", CPU_POWERPC_405F5
, 405),
7309 /* PowerPC 405 F6 */
7310 POWERPC_DEF("405F6", CPU_POWERPC_405F6
, 405),
7312 /* PowerPC 405 microcontrolers */
7313 /* PowerPC 405 CR */
7314 POWERPC_DEF("405CR", CPU_POWERPC_405CR
, 405),
7315 /* PowerPC 405 CRa */
7316 POWERPC_DEF("405CRa", CPU_POWERPC_405CRa
, 405),
7317 /* PowerPC 405 CRb */
7318 POWERPC_DEF("405CRb", CPU_POWERPC_405CRb
, 405),
7319 /* PowerPC 405 CRc */
7320 POWERPC_DEF("405CRc", CPU_POWERPC_405CRc
, 405),
7321 /* PowerPC 405 EP */
7322 POWERPC_DEF("405EP", CPU_POWERPC_405EP
, 405),
7324 /* PowerPC 405 EXr */
7325 POWERPC_DEF("405EXr", CPU_POWERPC_405EXr
, 405),
7327 /* PowerPC 405 EZ */
7328 POWERPC_DEF("405EZ", CPU_POWERPC_405EZ
, 405),
7330 /* PowerPC 405 FX */
7331 POWERPC_DEF("405FX", CPU_POWERPC_405FX
, 405),
7333 /* PowerPC 405 GP */
7334 POWERPC_DEF("405GP", CPU_POWERPC_405GP
, 405),
7335 /* PowerPC 405 GPa */
7336 POWERPC_DEF("405GPa", CPU_POWERPC_405GPa
, 405),
7337 /* PowerPC 405 GPb */
7338 POWERPC_DEF("405GPb", CPU_POWERPC_405GPb
, 405),
7339 /* PowerPC 405 GPc */
7340 POWERPC_DEF("405GPc", CPU_POWERPC_405GPc
, 405),
7341 /* PowerPC 405 GPd */
7342 POWERPC_DEF("405GPd", CPU_POWERPC_405GPd
, 405),
7343 /* PowerPC 405 GPe */
7344 POWERPC_DEF("405GPe", CPU_POWERPC_405GPe
, 405),
7345 /* PowerPC 405 GPR */
7346 POWERPC_DEF("405GPR", CPU_POWERPC_405GPR
, 405),
7349 POWERPC_DEF("405H", CPU_POWERPC_405H
, 405),
7353 POWERPC_DEF("405L", CPU_POWERPC_405L
, 405),
7355 /* PowerPC 405 LP */
7356 POWERPC_DEF("405LP", CPU_POWERPC_405LP
, 405),
7358 /* PowerPC 405 PM */
7359 POWERPC_DEF("405PM", CPU_POWERPC_405PM
, 405),
7362 /* PowerPC 405 PS */
7363 POWERPC_DEF("405PS", CPU_POWERPC_405PS
, 405),
7367 POWERPC_DEF("405S", CPU_POWERPC_405S
, 405),
7370 POWERPC_DEF("Npe405H", CPU_POWERPC_NPE405H
, 405),
7372 POWERPC_DEF("Npe405H2", CPU_POWERPC_NPE405H2
, 405),
7374 POWERPC_DEF("Npe405L", CPU_POWERPC_NPE405L
, 405),
7376 POWERPC_DEF("Npe4GS3", CPU_POWERPC_NPE4GS3
, 405),
7378 POWERPC_DEF("Npcxx1", CPU_POWERPC_NPCxx1
, 405),
7381 POWERPC_DEF("Npr161", CPU_POWERPC_NPR161
, 405),
7384 /* PowerPC LC77700 (Sanyo) */
7385 POWERPC_DEF("LC77700", CPU_POWERPC_LC77700
, 405),
7387 /* PowerPC 401/403/405 based set-top-box microcontrolers */
7390 POWERPC_DEF("STB01000", CPU_POWERPC_STB01000
, 401x2
),
7394 POWERPC_DEF("STB01010", CPU_POWERPC_STB01010
, 401x2
),
7398 POWERPC_DEF("STB0210", CPU_POWERPC_STB0210
, 401x3
),
7401 POWERPC_DEF("STB03", CPU_POWERPC_STB03
, 405),
7404 POWERPC_DEF("STB043", CPU_POWERPC_STB043
, 405),
7408 POWERPC_DEF("STB045", CPU_POWERPC_STB045
, 405),
7411 POWERPC_DEF("STB04", CPU_POWERPC_STB04
, 405),
7413 POWERPC_DEF("STB25", CPU_POWERPC_STB25
, 405),
7416 POWERPC_DEF("STB130", CPU_POWERPC_STB130
, 405),
7418 /* Xilinx PowerPC 405 cores */
7419 POWERPC_DEF("x2vp4", CPU_POWERPC_X2VP4
, 405),
7420 POWERPC_DEF("x2vp7", CPU_POWERPC_X2VP7
, 405),
7421 POWERPC_DEF("x2vp20", CPU_POWERPC_X2VP20
, 405),
7422 POWERPC_DEF("x2vp50", CPU_POWERPC_X2VP50
, 405),
7424 /* Zarlink ZL10310 */
7425 POWERPC_DEF("zl10310", CPU_POWERPC_ZL10310
, 405),
7428 /* Zarlink ZL10311 */
7429 POWERPC_DEF("zl10311", CPU_POWERPC_ZL10311
, 405),
7432 /* Zarlink ZL10320 */
7433 POWERPC_DEF("zl10320", CPU_POWERPC_ZL10320
, 405),
7436 /* Zarlink ZL10321 */
7437 POWERPC_DEF("zl10321", CPU_POWERPC_ZL10321
, 405),
7439 /* PowerPC 440 family */
7440 #if defined(TODO_USER_ONLY)
7441 /* Generic PowerPC 440 */
7442 POWERPC_DEF("440", CPU_POWERPC_440
, 440GP
),
7444 /* PowerPC 440 cores */
7446 /* PowerPC 440 A4 */
7447 POWERPC_DEF("440A4", CPU_POWERPC_440A4
, 440x4
),
7450 /* PowerPC 440 A5 */
7451 POWERPC_DEF("440A5", CPU_POWERPC_440A5
, 440x5
),
7454 /* PowerPC 440 B4 */
7455 POWERPC_DEF("440B4", CPU_POWERPC_440B4
, 440x4
),
7458 /* PowerPC 440 G4 */
7459 POWERPC_DEF("440G4", CPU_POWERPC_440G4
, 440x4
),
7462 /* PowerPC 440 F5 */
7463 POWERPC_DEF("440F5", CPU_POWERPC_440F5
, 440x5
),
7466 /* PowerPC 440 G5 */
7467 POWERPC_DEF("440G5", CPU_POWERPC_440G5
, 440x5
),
7471 POWERPC_DEF("440H4", CPU_POWERPC_440H4
, 440x4
),
7475 POWERPC_DEF("440H6", CPU_POWERPC_440H6
, 440Gx5
),
7477 /* PowerPC 440 microcontrolers */
7478 #if defined(TODO_USER_ONLY)
7479 /* PowerPC 440 EP */
7480 POWERPC_DEF("440EP", CPU_POWERPC_440EP
, 440EP
),
7482 #if defined(TODO_USER_ONLY)
7483 /* PowerPC 440 EPa */
7484 POWERPC_DEF("440EPa", CPU_POWERPC_440EPa
, 440EP
),
7486 #if defined(TODO_USER_ONLY)
7487 /* PowerPC 440 EPb */
7488 POWERPC_DEF("440EPb", CPU_POWERPC_440EPb
, 440EP
),
7490 #if defined(TODO_USER_ONLY)
7491 /* PowerPC 440 EPX */
7492 POWERPC_DEF("440EPX", CPU_POWERPC_440EPX
, 440EP
),
7494 #if defined(TODO_USER_ONLY)
7495 /* PowerPC 440 GP */
7496 POWERPC_DEF("440GP", CPU_POWERPC_440GP
, 440GP
),
7498 #if defined(TODO_USER_ONLY)
7499 /* PowerPC 440 GPb */
7500 POWERPC_DEF("440GPb", CPU_POWERPC_440GPb
, 440GP
),
7502 #if defined(TODO_USER_ONLY)
7503 /* PowerPC 440 GPc */
7504 POWERPC_DEF("440GPc", CPU_POWERPC_440GPc
, 440GP
),
7506 #if defined(TODO_USER_ONLY)
7507 /* PowerPC 440 GR */
7508 POWERPC_DEF("440GR", CPU_POWERPC_440GR
, 440x5
),
7510 #if defined(TODO_USER_ONLY)
7511 /* PowerPC 440 GRa */
7512 POWERPC_DEF("440GRa", CPU_POWERPC_440GRa
, 440x5
),
7514 #if defined(TODO_USER_ONLY)
7515 /* PowerPC 440 GRX */
7516 POWERPC_DEF("440GRX", CPU_POWERPC_440GRX
, 440x5
),
7518 #if defined(TODO_USER_ONLY)
7519 /* PowerPC 440 GX */
7520 POWERPC_DEF("440GX", CPU_POWERPC_440GX
, 440EP
),
7522 #if defined(TODO_USER_ONLY)
7523 /* PowerPC 440 GXa */
7524 POWERPC_DEF("440GXa", CPU_POWERPC_440GXa
, 440EP
),
7526 #if defined(TODO_USER_ONLY)
7527 /* PowerPC 440 GXb */
7528 POWERPC_DEF("440GXb", CPU_POWERPC_440GXb
, 440EP
),
7530 #if defined(TODO_USER_ONLY)
7531 /* PowerPC 440 GXc */
7532 POWERPC_DEF("440GXc", CPU_POWERPC_440GXc
, 440EP
),
7534 #if defined(TODO_USER_ONLY)
7535 /* PowerPC 440 GXf */
7536 POWERPC_DEF("440GXf", CPU_POWERPC_440GXf
, 440EP
),
7540 POWERPC_DEF("440S", CPU_POWERPC_440S
, 440),
7542 #if defined(TODO_USER_ONLY)
7543 /* PowerPC 440 SP */
7544 POWERPC_DEF("440SP", CPU_POWERPC_440SP
, 440EP
),
7546 #if defined(TODO_USER_ONLY)
7547 /* PowerPC 440 SP2 */
7548 POWERPC_DEF("440SP2", CPU_POWERPC_440SP2
, 440EP
),
7550 #if defined(TODO_USER_ONLY)
7551 /* PowerPC 440 SPE */
7552 POWERPC_DEF("440SPE", CPU_POWERPC_440SPE
, 440EP
),
7554 /* PowerPC 460 family */
7556 /* Generic PowerPC 464 */
7557 POWERPC_DEF("464", CPU_POWERPC_464
, 460),
7559 /* PowerPC 464 microcontrolers */
7561 /* PowerPC 464H90 */
7562 POWERPC_DEF("464H90", CPU_POWERPC_464H90
, 460),
7565 /* PowerPC 464H90F */
7566 POWERPC_DEF("464H90F", CPU_POWERPC_464H90F
, 460F
),
7568 /* Freescale embedded PowerPC cores */
7569 /* MPC5xx family (aka RCPU) */
7570 #if defined(TODO_USER_ONLY)
7571 /* Generic MPC5xx core */
7572 POWERPC_DEF("MPC5xx", CPU_POWERPC_MPC5xx
, MPC5xx
),
7574 #if defined(TODO_USER_ONLY)
7575 /* Codename for MPC5xx core */
7576 POWERPC_DEF("RCPU", CPU_POWERPC_MPC5xx
, MPC5xx
),
7578 /* MPC5xx microcontrollers */
7579 #if defined(TODO_USER_ONLY)
7581 POWERPC_DEF("MGT560", CPU_POWERPC_MGT560
, MPC5xx
),
7583 #if defined(TODO_USER_ONLY)
7585 POWERPC_DEF("MPC509", CPU_POWERPC_MPC509
, MPC5xx
),
7587 #if defined(TODO_USER_ONLY)
7589 POWERPC_DEF("MPC533", CPU_POWERPC_MPC533
, MPC5xx
),
7591 #if defined(TODO_USER_ONLY)
7593 POWERPC_DEF("MPC534", CPU_POWERPC_MPC534
, MPC5xx
),
7595 #if defined(TODO_USER_ONLY)
7597 POWERPC_DEF("MPC555", CPU_POWERPC_MPC555
, MPC5xx
),
7599 #if defined(TODO_USER_ONLY)
7601 POWERPC_DEF("MPC556", CPU_POWERPC_MPC556
, MPC5xx
),
7603 #if defined(TODO_USER_ONLY)
7605 POWERPC_DEF("MPC560", CPU_POWERPC_MPC560
, MPC5xx
),
7607 #if defined(TODO_USER_ONLY)
7609 POWERPC_DEF("MPC561", CPU_POWERPC_MPC561
, MPC5xx
),
7611 #if defined(TODO_USER_ONLY)
7613 POWERPC_DEF("MPC562", CPU_POWERPC_MPC562
, MPC5xx
),
7615 #if defined(TODO_USER_ONLY)
7617 POWERPC_DEF("MPC563", CPU_POWERPC_MPC563
, MPC5xx
),
7619 #if defined(TODO_USER_ONLY)
7621 POWERPC_DEF("MPC564", CPU_POWERPC_MPC564
, MPC5xx
),
7623 #if defined(TODO_USER_ONLY)
7625 POWERPC_DEF("MPC565", CPU_POWERPC_MPC565
, MPC5xx
),
7627 #if defined(TODO_USER_ONLY)
7629 POWERPC_DEF("MPC566", CPU_POWERPC_MPC566
, MPC5xx
),
7631 /* MPC8xx family (aka PowerQUICC) */
7632 #if defined(TODO_USER_ONLY)
7633 /* Generic MPC8xx core */
7634 POWERPC_DEF("MPC8xx", CPU_POWERPC_MPC8xx
, MPC8xx
),
7636 #if defined(TODO_USER_ONLY)
7637 /* Codename for MPC8xx core */
7638 POWERPC_DEF("PowerQUICC", CPU_POWERPC_MPC8xx
, MPC8xx
),
7640 /* MPC8xx microcontrollers */
7641 #if defined(TODO_USER_ONLY)
7643 POWERPC_DEF("MGT823", CPU_POWERPC_MGT823
, MPC8xx
),
7645 #if defined(TODO_USER_ONLY)
7647 POWERPC_DEF("MPC821", CPU_POWERPC_MPC821
, MPC8xx
),
7649 #if defined(TODO_USER_ONLY)
7651 POWERPC_DEF("MPC823", CPU_POWERPC_MPC823
, MPC8xx
),
7653 #if defined(TODO_USER_ONLY)
7655 POWERPC_DEF("MPC850", CPU_POWERPC_MPC850
, MPC8xx
),
7657 #if defined(TODO_USER_ONLY)
7659 POWERPC_DEF("MPC852T", CPU_POWERPC_MPC852T
, MPC8xx
),
7661 #if defined(TODO_USER_ONLY)
7663 POWERPC_DEF("MPC855T", CPU_POWERPC_MPC855T
, MPC8xx
),
7665 #if defined(TODO_USER_ONLY)
7667 POWERPC_DEF("MPC857", CPU_POWERPC_MPC857
, MPC8xx
),
7669 #if defined(TODO_USER_ONLY)
7671 POWERPC_DEF("MPC859", CPU_POWERPC_MPC859
, MPC8xx
),
7673 #if defined(TODO_USER_ONLY)
7675 POWERPC_DEF("MPC860", CPU_POWERPC_MPC860
, MPC8xx
),
7677 #if defined(TODO_USER_ONLY)
7679 POWERPC_DEF("MPC862", CPU_POWERPC_MPC862
, MPC8xx
),
7681 #if defined(TODO_USER_ONLY)
7683 POWERPC_DEF("MPC866", CPU_POWERPC_MPC866
, MPC8xx
),
7685 #if defined(TODO_USER_ONLY)
7687 POWERPC_DEF("MPC870", CPU_POWERPC_MPC870
, MPC8xx
),
7689 #if defined(TODO_USER_ONLY)
7691 POWERPC_DEF("MPC875", CPU_POWERPC_MPC875
, MPC8xx
),
7693 #if defined(TODO_USER_ONLY)
7695 POWERPC_DEF("MPC880", CPU_POWERPC_MPC880
, MPC8xx
),
7697 #if defined(TODO_USER_ONLY)
7699 POWERPC_DEF("MPC885", CPU_POWERPC_MPC885
, MPC8xx
),
7701 /* MPC82xx family (aka PowerQUICC-II) */
7702 /* Generic MPC52xx core */
7703 POWERPC_DEF_SVR("MPC52xx",
7704 CPU_POWERPC_MPC52xx
, POWERPC_SVR_52xx
, G2LE
),
7705 /* Generic MPC82xx core */
7706 POWERPC_DEF("MPC82xx", CPU_POWERPC_MPC82xx
, G2
),
7707 /* Codename for MPC82xx */
7708 POWERPC_DEF("PowerQUICC-II", CPU_POWERPC_MPC82xx
, G2
),
7709 /* PowerPC G2 core */
7710 POWERPC_DEF("G2", CPU_POWERPC_G2
, G2
),
7711 /* PowerPC G2 H4 core */
7712 POWERPC_DEF("G2H4", CPU_POWERPC_G2H4
, G2
),
7713 /* PowerPC G2 GP core */
7714 POWERPC_DEF("G2GP", CPU_POWERPC_G2gp
, G2
),
7715 /* PowerPC G2 LS core */
7716 POWERPC_DEF("G2LS", CPU_POWERPC_G2ls
, G2
),
7717 /* PowerPC G2 HiP3 core */
7718 POWERPC_DEF("G2HiP3", CPU_POWERPC_G2_HIP3
, G2
),
7719 /* PowerPC G2 HiP4 core */
7720 POWERPC_DEF("G2HiP4", CPU_POWERPC_G2_HIP4
, G2
),
7721 /* PowerPC MPC603 core */
7722 POWERPC_DEF("MPC603", CPU_POWERPC_MPC603
, 603E
),
7723 /* PowerPC G2le core (same as G2 plus little-endian mode support) */
7724 POWERPC_DEF("G2le", CPU_POWERPC_G2LE
, G2LE
),
7725 /* PowerPC G2LE GP core */
7726 POWERPC_DEF("G2leGP", CPU_POWERPC_G2LEgp
, G2LE
),
7727 /* PowerPC G2LE LS core */
7728 POWERPC_DEF("G2leLS", CPU_POWERPC_G2LEls
, G2LE
),
7729 /* PowerPC G2LE GP1 core */
7730 POWERPC_DEF("G2leGP1", CPU_POWERPC_G2LEgp1
, G2LE
),
7731 /* PowerPC G2LE GP3 core */
7732 POWERPC_DEF("G2leGP3", CPU_POWERPC_G2LEgp1
, G2LE
),
7733 /* PowerPC MPC603 microcontrollers */
7735 POWERPC_DEF("MPC8240", CPU_POWERPC_MPC8240
, 603E
),
7736 /* PowerPC G2 microcontrollers */
7739 POWERPC_DEF_SVR("MPC5121",
7740 CPU_POWERPC_MPC5121
, POWERPC_SVR_5121
, G2LE
),
7743 POWERPC_DEF_SVR("MPC5200",
7744 CPU_POWERPC_MPC5200
, POWERPC_SVR_5200
, G2LE
),
7746 POWERPC_DEF_SVR("MPC5200_v10",
7747 CPU_POWERPC_MPC5200_v10
, POWERPC_SVR_5200_v10
, G2LE
),
7749 POWERPC_DEF_SVR("MPC5200_v11",
7750 CPU_POWERPC_MPC5200_v11
, POWERPC_SVR_5200_v11
, G2LE
),
7752 POWERPC_DEF_SVR("MPC5200_v12",
7753 CPU_POWERPC_MPC5200_v12
, POWERPC_SVR_5200_v12
, G2LE
),
7755 POWERPC_DEF_SVR("MPC5200B",
7756 CPU_POWERPC_MPC5200B
, POWERPC_SVR_5200B
, G2LE
),
7758 POWERPC_DEF_SVR("MPC5200B_v20",
7759 CPU_POWERPC_MPC5200B_v20
, POWERPC_SVR_5200B_v20
, G2LE
),
7761 POWERPC_DEF_SVR("MPC5200B_v21",
7762 CPU_POWERPC_MPC5200B_v21
, POWERPC_SVR_5200B_v21
, G2LE
),
7764 POWERPC_DEF("MPC8241", CPU_POWERPC_MPC8241
, G2
),
7766 POWERPC_DEF("MPC8245", CPU_POWERPC_MPC8245
, G2
),
7768 POWERPC_DEF("MPC8247", CPU_POWERPC_MPC8247
, G2LE
),
7770 POWERPC_DEF("MPC8248", CPU_POWERPC_MPC8248
, G2LE
),
7772 POWERPC_DEF("MPC8250", CPU_POWERPC_MPC8250
, G2
),
7774 POWERPC_DEF("MPC8250_HiP3", CPU_POWERPC_MPC8250_HiP3
, G2
),
7776 POWERPC_DEF("MPC8250_HiP4", CPU_POWERPC_MPC8250_HiP4
, G2
),
7778 POWERPC_DEF("MPC8255", CPU_POWERPC_MPC8255
, G2
),
7780 POWERPC_DEF("MPC8255_HiP3", CPU_POWERPC_MPC8255_HiP3
, G2
),
7782 POWERPC_DEF("MPC8255_HiP4", CPU_POWERPC_MPC8255_HiP4
, G2
),
7784 POWERPC_DEF("MPC8260", CPU_POWERPC_MPC8260
, G2
),
7786 POWERPC_DEF("MPC8260_HiP3", CPU_POWERPC_MPC8260_HiP3
, G2
),
7788 POWERPC_DEF("MPC8260_HiP4", CPU_POWERPC_MPC8260_HiP4
, G2
),
7790 POWERPC_DEF("MPC8264", CPU_POWERPC_MPC8264
, G2
),
7792 POWERPC_DEF("MPC8264_HiP3", CPU_POWERPC_MPC8264_HiP3
, G2
),
7794 POWERPC_DEF("MPC8264_HiP4", CPU_POWERPC_MPC8264_HiP4
, G2
),
7796 POWERPC_DEF("MPC8265", CPU_POWERPC_MPC8265
, G2
),
7798 POWERPC_DEF("MPC8265_HiP3", CPU_POWERPC_MPC8265_HiP3
, G2
),
7800 POWERPC_DEF("MPC8265_HiP4", CPU_POWERPC_MPC8265_HiP4
, G2
),
7802 POWERPC_DEF("MPC8266", CPU_POWERPC_MPC8266
, G2
),
7804 POWERPC_DEF("MPC8266_HiP3", CPU_POWERPC_MPC8266_HiP3
, G2
),
7806 POWERPC_DEF("MPC8266_HiP4", CPU_POWERPC_MPC8266_HiP4
, G2
),
7808 POWERPC_DEF("MPC8270", CPU_POWERPC_MPC8270
, G2LE
),
7810 POWERPC_DEF("MPC8271", CPU_POWERPC_MPC8271
, G2LE
),
7812 POWERPC_DEF("MPC8272", CPU_POWERPC_MPC8272
, G2LE
),
7814 POWERPC_DEF("MPC8275", CPU_POWERPC_MPC8275
, G2LE
),
7816 POWERPC_DEF("MPC8280", CPU_POWERPC_MPC8280
, G2LE
),
7818 /* Generic PowerPC e200 core */
7819 POWERPC_DEF("e200", CPU_POWERPC_e200
, e200
),
7820 /* Generic MPC55xx core */
7822 POWERPC_DEF_SVR("MPC55xx",
7823 CPU_POWERPC_MPC55xx
, POWERPC_SVR_55xx
, e200
),
7826 /* PowerPC e200z0 core */
7827 POWERPC_DEF("e200z0", CPU_POWERPC_e200z0
, e200
),
7830 /* PowerPC e200z1 core */
7831 POWERPC_DEF("e200z1", CPU_POWERPC_e200z1
, e200
),
7834 /* PowerPC e200z3 core */
7835 POWERPC_DEF("e200z3", CPU_POWERPC_e200z3
, e200
),
7837 /* PowerPC e200z5 core */
7838 POWERPC_DEF("e200z5", CPU_POWERPC_e200z5
, e200
),
7839 /* PowerPC e200z6 core */
7840 POWERPC_DEF("e200z6", CPU_POWERPC_e200z6
, e200
),
7841 /* PowerPC e200 microcontrollers */
7844 POWERPC_DEF_SVR("MPC5514E",
7845 CPU_POWERPC_MPC5514E
, POWERPC_SVR_5514E
, e200
),
7849 POWERPC_DEF_SVR("MPC5514E_v0",
7850 CPU_POWERPC_MPC5514E_v0
, POWERPC_SVR_5514E_v0
, e200
),
7854 POWERPC_DEF_SVR("MPC5514E_v1",
7855 CPU_POWERPC_MPC5514E_v1
, POWERPC_SVR_5514E_v1
, e200
),
7859 POWERPC_DEF_SVR("MPC5514G",
7860 CPU_POWERPC_MPC5514G
, POWERPC_SVR_5514G
, e200
),
7864 POWERPC_DEF_SVR("MPC5514G_v0",
7865 CPU_POWERPC_MPC5514G_v0
, POWERPC_SVR_5514G_v0
, e200
),
7869 POWERPC_DEF_SVR("MPC5514G_v1",
7870 CPU_POWERPC_MPC5514G_v1
, POWERPC_SVR_5514G_v1
, e200
),
7874 POWERPC_DEF_SVR("MPC5515S",
7875 CPU_POWERPC_MPC5515S
, POWERPC_SVR_5515S
, e200
),
7879 POWERPC_DEF_SVR("MPC5516E",
7880 CPU_POWERPC_MPC5516E
, POWERPC_SVR_5516E
, e200
),
7884 POWERPC_DEF_SVR("MPC5516E_v0",
7885 CPU_POWERPC_MPC5516E_v0
, POWERPC_SVR_5516E_v0
, e200
),
7889 POWERPC_DEF_SVR("MPC5516E_v1",
7890 CPU_POWERPC_MPC5516E_v1
, POWERPC_SVR_5516E_v1
, e200
),
7894 POWERPC_DEF_SVR("MPC5516G",
7895 CPU_POWERPC_MPC5516G
, POWERPC_SVR_5516G
, e200
),
7899 POWERPC_DEF_SVR("MPC5516G_v0",
7900 CPU_POWERPC_MPC5516G_v0
, POWERPC_SVR_5516G_v0
, e200
),
7904 POWERPC_DEF_SVR("MPC5516G_v1",
7905 CPU_POWERPC_MPC5516G_v1
, POWERPC_SVR_5516G_v1
, e200
),
7909 POWERPC_DEF_SVR("MPC5516S",
7910 CPU_POWERPC_MPC5516S
, POWERPC_SVR_5516S
, e200
),
7914 POWERPC_DEF_SVR("MPC5533",
7915 CPU_POWERPC_MPC5533
, POWERPC_SVR_5533
, e200
),
7919 POWERPC_DEF_SVR("MPC5534",
7920 CPU_POWERPC_MPC5534
, POWERPC_SVR_5534
, e200
),
7924 POWERPC_DEF_SVR("MPC5553",
7925 CPU_POWERPC_MPC5553
, POWERPC_SVR_5553
, e200
),
7929 POWERPC_DEF_SVR("MPC5554",
7930 CPU_POWERPC_MPC5554
, POWERPC_SVR_5554
, e200
),
7934 POWERPC_DEF_SVR("MPC5561",
7935 CPU_POWERPC_MPC5561
, POWERPC_SVR_5561
, e200
),
7939 POWERPC_DEF_SVR("MPC5565",
7940 CPU_POWERPC_MPC5565
, POWERPC_SVR_5565
, e200
),
7944 POWERPC_DEF_SVR("MPC5566",
7945 CPU_POWERPC_MPC5566
, POWERPC_SVR_5566
, e200
),
7949 POWERPC_DEF_SVR("MPC5567",
7950 CPU_POWERPC_MPC5567
, POWERPC_SVR_5567
, e200
),
7953 /* Generic PowerPC e300 core */
7954 POWERPC_DEF("e300", CPU_POWERPC_e300
, e300
),
7955 /* PowerPC e300c1 core */
7956 POWERPC_DEF("e300c1", CPU_POWERPC_e300c1
, e300
),
7957 /* PowerPC e300c2 core */
7958 POWERPC_DEF("e300c2", CPU_POWERPC_e300c2
, e300
),
7959 /* PowerPC e300c3 core */
7960 POWERPC_DEF("e300c3", CPU_POWERPC_e300c3
, e300
),
7961 /* PowerPC e300c4 core */
7962 POWERPC_DEF("e300c4", CPU_POWERPC_e300c4
, e300
),
7963 /* PowerPC e300 microcontrollers */
7966 POWERPC_DEF_SVR("MPC8313",
7967 CPU_POWERPC_MPC8313
, POWERPC_SVR_8313
, e300
),
7971 POWERPC_DEF_SVR("MPC8313E",
7972 CPU_POWERPC_MPC8313E
, POWERPC_SVR_8313E
, e300
),
7976 POWERPC_DEF_SVR("MPC8314",
7977 CPU_POWERPC_MPC8314
, POWERPC_SVR_8314
, e300
),
7981 POWERPC_DEF_SVR("MPC8314E",
7982 CPU_POWERPC_MPC8314E
, POWERPC_SVR_8314E
, e300
),
7986 POWERPC_DEF_SVR("MPC8315",
7987 CPU_POWERPC_MPC8315
, POWERPC_SVR_8315
, e300
),
7991 POWERPC_DEF_SVR("MPC8315E",
7992 CPU_POWERPC_MPC8315E
, POWERPC_SVR_8315E
, e300
),
7996 POWERPC_DEF_SVR("MPC8321",
7997 CPU_POWERPC_MPC8321
, POWERPC_SVR_8321
, e300
),
8001 POWERPC_DEF_SVR("MPC8321E",
8002 CPU_POWERPC_MPC8321E
, POWERPC_SVR_8321E
, e300
),
8006 POWERPC_DEF_SVR("MPC8323",
8007 CPU_POWERPC_MPC8323
, POWERPC_SVR_8323
, e300
),
8011 POWERPC_DEF_SVR("MPC8323E",
8012 CPU_POWERPC_MPC8323E
, POWERPC_SVR_8323E
, e300
),
8015 POWERPC_DEF_SVR("MPC8343A",
8016 CPU_POWERPC_MPC8343A
, POWERPC_SVR_8343A
, e300
),
8018 POWERPC_DEF_SVR("MPC8343EA",
8019 CPU_POWERPC_MPC8343EA
, POWERPC_SVR_8343EA
, e300
),
8021 POWERPC_DEF_SVR("MPC8347A",
8022 CPU_POWERPC_MPC8347A
, POWERPC_SVR_8347A
, e300
),
8024 POWERPC_DEF_SVR("MPC8347AT",
8025 CPU_POWERPC_MPC8347AT
, POWERPC_SVR_8347AT
, e300
),
8027 POWERPC_DEF_SVR("MPC8347AP",
8028 CPU_POWERPC_MPC8347AP
, POWERPC_SVR_8347AP
, e300
),
8030 POWERPC_DEF_SVR("MPC8347EA",
8031 CPU_POWERPC_MPC8347EA
, POWERPC_SVR_8347EA
, e300
),
8033 POWERPC_DEF_SVR("MPC8347EAT",
8034 CPU_POWERPC_MPC8347EAT
, POWERPC_SVR_8347EAT
, e300
),
8036 POWERPC_DEF_SVR("MPC8347EAP",
8037 CPU_POWERPC_MPC8347EAP
, POWERPC_SVR_8347EAP
, e300
),
8039 POWERPC_DEF_SVR("MPC8349",
8040 CPU_POWERPC_MPC8349
, POWERPC_SVR_8349
, e300
),
8042 POWERPC_DEF_SVR("MPC8349A",
8043 CPU_POWERPC_MPC8349A
, POWERPC_SVR_8349A
, e300
),
8045 POWERPC_DEF_SVR("MPC8349E",
8046 CPU_POWERPC_MPC8349E
, POWERPC_SVR_8349E
, e300
),
8048 POWERPC_DEF_SVR("MPC8349EA",
8049 CPU_POWERPC_MPC8349EA
, POWERPC_SVR_8349EA
, e300
),
8052 POWERPC_DEF_SVR("MPC8358E",
8053 CPU_POWERPC_MPC8358E
, POWERPC_SVR_8358E
, e300
),
8057 POWERPC_DEF_SVR("MPC8360E",
8058 CPU_POWERPC_MPC8360E
, POWERPC_SVR_8360E
, e300
),
8061 POWERPC_DEF_SVR("MPC8377",
8062 CPU_POWERPC_MPC8377
, POWERPC_SVR_8377
, e300
),
8064 POWERPC_DEF_SVR("MPC8377E",
8065 CPU_POWERPC_MPC8377E
, POWERPC_SVR_8377E
, e300
),
8067 POWERPC_DEF_SVR("MPC8378",
8068 CPU_POWERPC_MPC8378
, POWERPC_SVR_8378
, e300
),
8070 POWERPC_DEF_SVR("MPC8378E",
8071 CPU_POWERPC_MPC8378E
, POWERPC_SVR_8378E
, e300
),
8073 POWERPC_DEF_SVR("MPC8379",
8074 CPU_POWERPC_MPC8379
, POWERPC_SVR_8379
, e300
),
8076 POWERPC_DEF_SVR("MPC8379E",
8077 CPU_POWERPC_MPC8379E
, POWERPC_SVR_8379E
, e300
),
8079 /* PowerPC e500 core */
8080 POWERPC_DEF("e500", CPU_POWERPC_e500v2_v22
, e500v2
),
8081 /* PowerPC e500v1 core */
8082 POWERPC_DEF("e500v1", CPU_POWERPC_e500v1
, e500v1
),
8083 /* PowerPC e500 v1.0 core */
8084 POWERPC_DEF("e500_v10", CPU_POWERPC_e500v1_v10
, e500v1
),
8085 /* PowerPC e500 v2.0 core */
8086 POWERPC_DEF("e500_v20", CPU_POWERPC_e500v1_v20
, e500v1
),
8087 /* PowerPC e500v2 core */
8088 POWERPC_DEF("e500v2", CPU_POWERPC_e500v2
, e500v2
),
8089 /* PowerPC e500v2 v1.0 core */
8090 POWERPC_DEF("e500v2_v10", CPU_POWERPC_e500v2_v10
, e500v2
),
8091 /* PowerPC e500v2 v2.0 core */
8092 POWERPC_DEF("e500v2_v20", CPU_POWERPC_e500v2_v20
, e500v2
),
8093 /* PowerPC e500v2 v2.1 core */
8094 POWERPC_DEF("e500v2_v21", CPU_POWERPC_e500v2_v21
, e500v2
),
8095 /* PowerPC e500v2 v2.2 core */
8096 POWERPC_DEF("e500v2_v22", CPU_POWERPC_e500v2_v22
, e500v2
),
8097 /* PowerPC e500v2 v3.0 core */
8098 POWERPC_DEF("e500v2_v30", CPU_POWERPC_e500v2_v30
, e500v2
),
8099 /* PowerPC e500 microcontrollers */
8101 POWERPC_DEF_SVR("MPC8533",
8102 CPU_POWERPC_MPC8533
, POWERPC_SVR_8533
, e500v2
),
8104 POWERPC_DEF_SVR("MPC8533_v10",
8105 CPU_POWERPC_MPC8533_v10
, POWERPC_SVR_8533_v10
, e500v2
),
8107 POWERPC_DEF_SVR("MPC8533_v11",
8108 CPU_POWERPC_MPC8533_v11
, POWERPC_SVR_8533_v11
, e500v2
),
8110 POWERPC_DEF_SVR("MPC8533E",
8111 CPU_POWERPC_MPC8533E
, POWERPC_SVR_8533E
, e500v2
),
8113 POWERPC_DEF_SVR("MPC8533E_v10",
8114 CPU_POWERPC_MPC8533E_v10
, POWERPC_SVR_8533E_v10
, e500v2
),
8115 POWERPC_DEF_SVR("MPC8533E_v11",
8116 CPU_POWERPC_MPC8533E_v11
, POWERPC_SVR_8533E_v11
, e500v2
),
8118 POWERPC_DEF_SVR("MPC8540",
8119 CPU_POWERPC_MPC8540
, POWERPC_SVR_8540
, e500v1
),
8121 POWERPC_DEF_SVR("MPC8540_v10",
8122 CPU_POWERPC_MPC8540_v10
, POWERPC_SVR_8540_v10
, e500v1
),
8124 POWERPC_DEF_SVR("MPC8540_v20",
8125 CPU_POWERPC_MPC8540_v20
, POWERPC_SVR_8540_v20
, e500v1
),
8127 POWERPC_DEF_SVR("MPC8540_v21",
8128 CPU_POWERPC_MPC8540_v21
, POWERPC_SVR_8540_v21
, e500v1
),
8130 POWERPC_DEF_SVR("MPC8541",
8131 CPU_POWERPC_MPC8541
, POWERPC_SVR_8541
, e500v1
),
8133 POWERPC_DEF_SVR("MPC8541_v10",
8134 CPU_POWERPC_MPC8541_v10
, POWERPC_SVR_8541_v10
, e500v1
),
8136 POWERPC_DEF_SVR("MPC8541_v11",
8137 CPU_POWERPC_MPC8541_v11
, POWERPC_SVR_8541_v11
, e500v1
),
8139 POWERPC_DEF_SVR("MPC8541E",
8140 CPU_POWERPC_MPC8541E
, POWERPC_SVR_8541E
, e500v1
),
8142 POWERPC_DEF_SVR("MPC8541E_v10",
8143 CPU_POWERPC_MPC8541E_v10
, POWERPC_SVR_8541E_v10
, e500v1
),
8145 POWERPC_DEF_SVR("MPC8541E_v11",
8146 CPU_POWERPC_MPC8541E_v11
, POWERPC_SVR_8541E_v11
, e500v1
),
8148 POWERPC_DEF_SVR("MPC8543",
8149 CPU_POWERPC_MPC8543
, POWERPC_SVR_8543
, e500v2
),
8151 POWERPC_DEF_SVR("MPC8543_v10",
8152 CPU_POWERPC_MPC8543_v10
, POWERPC_SVR_8543_v10
, e500v2
),
8154 POWERPC_DEF_SVR("MPC8543_v11",
8155 CPU_POWERPC_MPC8543_v11
, POWERPC_SVR_8543_v11
, e500v2
),
8157 POWERPC_DEF_SVR("MPC8543_v20",
8158 CPU_POWERPC_MPC8543_v20
, POWERPC_SVR_8543_v20
, e500v2
),
8160 POWERPC_DEF_SVR("MPC8543_v21",
8161 CPU_POWERPC_MPC8543_v21
, POWERPC_SVR_8543_v21
, e500v2
),
8163 POWERPC_DEF_SVR("MPC8543E",
8164 CPU_POWERPC_MPC8543E
, POWERPC_SVR_8543E
, e500v2
),
8166 POWERPC_DEF_SVR("MPC8543E_v10",
8167 CPU_POWERPC_MPC8543E_v10
, POWERPC_SVR_8543E_v10
, e500v2
),
8169 POWERPC_DEF_SVR("MPC8543E_v11",
8170 CPU_POWERPC_MPC8543E_v11
, POWERPC_SVR_8543E_v11
, e500v2
),
8172 POWERPC_DEF_SVR("MPC8543E_v20",
8173 CPU_POWERPC_MPC8543E_v20
, POWERPC_SVR_8543E_v20
, e500v2
),
8175 POWERPC_DEF_SVR("MPC8543E_v21",
8176 CPU_POWERPC_MPC8543E_v21
, POWERPC_SVR_8543E_v21
, e500v2
),
8178 POWERPC_DEF_SVR("MPC8544",
8179 CPU_POWERPC_MPC8544
, POWERPC_SVR_8544
, e500v2
),
8181 POWERPC_DEF_SVR("MPC8544_v10",
8182 CPU_POWERPC_MPC8544_v10
, POWERPC_SVR_8544_v10
, e500v2
),
8184 POWERPC_DEF_SVR("MPC8544_v11",
8185 CPU_POWERPC_MPC8544_v11
, POWERPC_SVR_8544_v11
, e500v2
),
8187 POWERPC_DEF_SVR("MPC8544E",
8188 CPU_POWERPC_MPC8544E
, POWERPC_SVR_8544E
, e500v2
),
8190 POWERPC_DEF_SVR("MPC8544E_v10",
8191 CPU_POWERPC_MPC8544E_v10
, POWERPC_SVR_8544E_v10
, e500v2
),
8193 POWERPC_DEF_SVR("MPC8544E_v11",
8194 CPU_POWERPC_MPC8544E_v11
, POWERPC_SVR_8544E_v11
, e500v2
),
8196 POWERPC_DEF_SVR("MPC8545",
8197 CPU_POWERPC_MPC8545
, POWERPC_SVR_8545
, e500v2
),
8199 POWERPC_DEF_SVR("MPC8545_v20",
8200 CPU_POWERPC_MPC8545_v20
, POWERPC_SVR_8545_v20
, e500v2
),
8202 POWERPC_DEF_SVR("MPC8545_v21",
8203 CPU_POWERPC_MPC8545_v21
, POWERPC_SVR_8545_v21
, e500v2
),
8205 POWERPC_DEF_SVR("MPC8545E",
8206 CPU_POWERPC_MPC8545E
, POWERPC_SVR_8545E
, e500v2
),
8208 POWERPC_DEF_SVR("MPC8545E_v20",
8209 CPU_POWERPC_MPC8545E_v20
, POWERPC_SVR_8545E_v20
, e500v2
),
8211 POWERPC_DEF_SVR("MPC8545E_v21",
8212 CPU_POWERPC_MPC8545E_v21
, POWERPC_SVR_8545E_v21
, e500v2
),
8214 POWERPC_DEF_SVR("MPC8547E",
8215 CPU_POWERPC_MPC8547E
, POWERPC_SVR_8547E
, e500v2
),
8217 POWERPC_DEF_SVR("MPC8547E_v20",
8218 CPU_POWERPC_MPC8547E_v20
, POWERPC_SVR_8547E_v20
, e500v2
),
8220 POWERPC_DEF_SVR("MPC8547E_v21",
8221 CPU_POWERPC_MPC8547E_v21
, POWERPC_SVR_8547E_v21
, e500v2
),
8223 POWERPC_DEF_SVR("MPC8548",
8224 CPU_POWERPC_MPC8548
, POWERPC_SVR_8548
, e500v2
),
8226 POWERPC_DEF_SVR("MPC8548_v10",
8227 CPU_POWERPC_MPC8548_v10
, POWERPC_SVR_8548_v10
, e500v2
),
8229 POWERPC_DEF_SVR("MPC8548_v11",
8230 CPU_POWERPC_MPC8548_v11
, POWERPC_SVR_8548_v11
, e500v2
),
8232 POWERPC_DEF_SVR("MPC8548_v20",
8233 CPU_POWERPC_MPC8548_v20
, POWERPC_SVR_8548_v20
, e500v2
),
8235 POWERPC_DEF_SVR("MPC8548_v21",
8236 CPU_POWERPC_MPC8548_v21
, POWERPC_SVR_8548_v21
, e500v2
),
8238 POWERPC_DEF_SVR("MPC8548E",
8239 CPU_POWERPC_MPC8548E
, POWERPC_SVR_8548E
, e500v2
),
8241 POWERPC_DEF_SVR("MPC8548E_v10",
8242 CPU_POWERPC_MPC8548E_v10
, POWERPC_SVR_8548E_v10
, e500v2
),
8244 POWERPC_DEF_SVR("MPC8548E_v11",
8245 CPU_POWERPC_MPC8548E_v11
, POWERPC_SVR_8548E_v11
, e500v2
),
8247 POWERPC_DEF_SVR("MPC8548E_v20",
8248 CPU_POWERPC_MPC8548E_v20
, POWERPC_SVR_8548E_v20
, e500v2
),
8250 POWERPC_DEF_SVR("MPC8548E_v21",
8251 CPU_POWERPC_MPC8548E_v21
, POWERPC_SVR_8548E_v21
, e500v2
),
8253 POWERPC_DEF_SVR("MPC8555",
8254 CPU_POWERPC_MPC8555
, POWERPC_SVR_8555
, e500v2
),
8256 POWERPC_DEF_SVR("MPC8555_v10",
8257 CPU_POWERPC_MPC8555_v10
, POWERPC_SVR_8555_v10
, e500v2
),
8259 POWERPC_DEF_SVR("MPC8555_v11",
8260 CPU_POWERPC_MPC8555_v11
, POWERPC_SVR_8555_v11
, e500v2
),
8262 POWERPC_DEF_SVR("MPC8555E",
8263 CPU_POWERPC_MPC8555E
, POWERPC_SVR_8555E
, e500v2
),
8265 POWERPC_DEF_SVR("MPC8555E_v10",
8266 CPU_POWERPC_MPC8555E_v10
, POWERPC_SVR_8555E_v10
, e500v2
),
8268 POWERPC_DEF_SVR("MPC8555E_v11",
8269 CPU_POWERPC_MPC8555E_v11
, POWERPC_SVR_8555E_v11
, e500v2
),
8271 POWERPC_DEF_SVR("MPC8560",
8272 CPU_POWERPC_MPC8560
, POWERPC_SVR_8560
, e500v2
),
8274 POWERPC_DEF_SVR("MPC8560_v10",
8275 CPU_POWERPC_MPC8560_v10
, POWERPC_SVR_8560_v10
, e500v2
),
8277 POWERPC_DEF_SVR("MPC8560_v20",
8278 CPU_POWERPC_MPC8560_v20
, POWERPC_SVR_8560_v20
, e500v2
),
8280 POWERPC_DEF_SVR("MPC8560_v21",
8281 CPU_POWERPC_MPC8560_v21
, POWERPC_SVR_8560_v21
, e500v2
),
8283 POWERPC_DEF_SVR("MPC8567",
8284 CPU_POWERPC_MPC8567
, POWERPC_SVR_8567
, e500v2
),
8286 POWERPC_DEF_SVR("MPC8567E",
8287 CPU_POWERPC_MPC8567E
, POWERPC_SVR_8567E
, e500v2
),
8289 POWERPC_DEF_SVR("MPC8568",
8290 CPU_POWERPC_MPC8568
, POWERPC_SVR_8568
, e500v2
),
8292 POWERPC_DEF_SVR("MPC8568E",
8293 CPU_POWERPC_MPC8568E
, POWERPC_SVR_8568E
, e500v2
),
8295 POWERPC_DEF_SVR("MPC8572",
8296 CPU_POWERPC_MPC8572
, POWERPC_SVR_8572
, e500v2
),
8298 POWERPC_DEF_SVR("MPC8572E",
8299 CPU_POWERPC_MPC8572E
, POWERPC_SVR_8572E
, e500v2
),
8301 /* PowerPC e600 core */
8302 POWERPC_DEF("e600", CPU_POWERPC_e600
, 7400),
8303 /* PowerPC e600 microcontrollers */
8306 POWERPC_DEF_SVR("MPC8610",
8307 CPU_POWERPC_MPC8610
, POWERPC_SVR_8610
, 7400),
8310 POWERPC_DEF_SVR("MPC8641",
8311 CPU_POWERPC_MPC8641
, POWERPC_SVR_8641
, 7400),
8313 POWERPC_DEF_SVR("MPC8641D",
8314 CPU_POWERPC_MPC8641D
, POWERPC_SVR_8641D
, 7400),
8315 /* 32 bits "classic" PowerPC */
8316 /* PowerPC 6xx family */
8318 POWERPC_DEF("601", CPU_POWERPC_601
, 601v
),
8320 POWERPC_DEF("601_v0", CPU_POWERPC_601_v0
, 601),
8322 POWERPC_DEF("601_v1", CPU_POWERPC_601_v1
, 601),
8324 POWERPC_DEF("601v", CPU_POWERPC_601v
, 601v
),
8326 POWERPC_DEF("601_v2", CPU_POWERPC_601_v2
, 601v
),
8328 POWERPC_DEF("602", CPU_POWERPC_602
, 602),
8330 POWERPC_DEF("603", CPU_POWERPC_603
, 603),
8331 /* Code name for PowerPC 603 */
8332 POWERPC_DEF("Vanilla", CPU_POWERPC_603
, 603),
8333 /* PowerPC 603e (aka PID6) */
8334 POWERPC_DEF("603e", CPU_POWERPC_603E
, 603E
),
8335 /* Code name for PowerPC 603e */
8336 POWERPC_DEF("Stretch", CPU_POWERPC_603E
, 603E
),
8337 /* PowerPC 603e v1.1 */
8338 POWERPC_DEF("603e_v1.1", CPU_POWERPC_603E_v11
, 603E
),
8339 /* PowerPC 603e v1.2 */
8340 POWERPC_DEF("603e_v1.2", CPU_POWERPC_603E_v12
, 603E
),
8341 /* PowerPC 603e v1.3 */
8342 POWERPC_DEF("603e_v1.3", CPU_POWERPC_603E_v13
, 603E
),
8343 /* PowerPC 603e v1.4 */
8344 POWERPC_DEF("603e_v1.4", CPU_POWERPC_603E_v14
, 603E
),
8345 /* PowerPC 603e v2.2 */
8346 POWERPC_DEF("603e_v2.2", CPU_POWERPC_603E_v22
, 603E
),
8347 /* PowerPC 603e v3 */
8348 POWERPC_DEF("603e_v3", CPU_POWERPC_603E_v3
, 603E
),
8349 /* PowerPC 603e v4 */
8350 POWERPC_DEF("603e_v4", CPU_POWERPC_603E_v4
, 603E
),
8351 /* PowerPC 603e v4.1 */
8352 POWERPC_DEF("603e_v4.1", CPU_POWERPC_603E_v41
, 603E
),
8353 /* PowerPC 603e (aka PID7) */
8354 POWERPC_DEF("603e7", CPU_POWERPC_603E7
, 603E
),
8355 /* PowerPC 603e7t */
8356 POWERPC_DEF("603e7t", CPU_POWERPC_603E7t
, 603E
),
8357 /* PowerPC 603e7v */
8358 POWERPC_DEF("603e7v", CPU_POWERPC_603E7v
, 603E
),
8359 /* Code name for PowerPC 603ev */
8360 POWERPC_DEF("Vaillant", CPU_POWERPC_603E7v
, 603E
),
8361 /* PowerPC 603e7v1 */
8362 POWERPC_DEF("603e7v1", CPU_POWERPC_603E7v1
, 603E
),
8363 /* PowerPC 603e7v2 */
8364 POWERPC_DEF("603e7v2", CPU_POWERPC_603E7v2
, 603E
),
8365 /* PowerPC 603p (aka PID7v) */
8366 POWERPC_DEF("603p", CPU_POWERPC_603P
, 603E
),
8367 /* PowerPC 603r (aka PID7t) */
8368 POWERPC_DEF("603r", CPU_POWERPC_603R
, 603E
),
8369 /* Code name for PowerPC 603r */
8370 POWERPC_DEF("Goldeneye", CPU_POWERPC_603R
, 603E
),
8372 POWERPC_DEF("604", CPU_POWERPC_604
, 604),
8373 /* PowerPC 604e (aka PID9) */
8374 POWERPC_DEF("604e", CPU_POWERPC_604E
, 604E
),
8375 /* Code name for PowerPC 604e */
8376 POWERPC_DEF("Sirocco", CPU_POWERPC_604E
, 604E
),
8377 /* PowerPC 604e v1.0 */
8378 POWERPC_DEF("604e_v1.0", CPU_POWERPC_604E_v10
, 604E
),
8379 /* PowerPC 604e v2.2 */
8380 POWERPC_DEF("604e_v2.2", CPU_POWERPC_604E_v22
, 604E
),
8381 /* PowerPC 604e v2.4 */
8382 POWERPC_DEF("604e_v2.4", CPU_POWERPC_604E_v24
, 604E
),
8383 /* PowerPC 604r (aka PIDA) */
8384 POWERPC_DEF("604r", CPU_POWERPC_604R
, 604E
),
8385 /* Code name for PowerPC 604r */
8386 POWERPC_DEF("Mach5", CPU_POWERPC_604R
, 604E
),
8389 POWERPC_DEF("604ev", CPU_POWERPC_604EV
, 604E
),
8391 /* PowerPC 7xx family */
8392 /* Generic PowerPC 740 (G3) */
8393 POWERPC_DEF("740", CPU_POWERPC_7x0
, 740),
8394 /* Code name for PowerPC 740 */
8395 POWERPC_DEF("Arthur", CPU_POWERPC_7x0
, 740),
8396 /* Generic PowerPC 750 (G3) */
8397 POWERPC_DEF("750", CPU_POWERPC_7x0
, 750),
8398 /* Code name for PowerPC 750 */
8399 POWERPC_DEF("Typhoon", CPU_POWERPC_7x0
, 750),
8400 /* PowerPC 740/750 is also known as G3 */
8401 POWERPC_DEF("G3", CPU_POWERPC_7x0
, 750),
8402 /* PowerPC 740 v1.0 (G3) */
8403 POWERPC_DEF("740_v1.0", CPU_POWERPC_7x0_v10
, 740),
8404 /* PowerPC 750 v1.0 (G3) */
8405 POWERPC_DEF("750_v1.0", CPU_POWERPC_7x0_v10
, 750),
8406 /* PowerPC 740 v2.0 (G3) */
8407 POWERPC_DEF("740_v2.0", CPU_POWERPC_7x0_v20
, 740),
8408 /* PowerPC 750 v2.0 (G3) */
8409 POWERPC_DEF("750_v2.0", CPU_POWERPC_7x0_v20
, 750),
8410 /* PowerPC 740 v2.1 (G3) */
8411 POWERPC_DEF("740_v2.1", CPU_POWERPC_7x0_v21
, 740),
8412 /* PowerPC 750 v2.1 (G3) */
8413 POWERPC_DEF("750_v2.1", CPU_POWERPC_7x0_v21
, 750),
8414 /* PowerPC 740 v2.2 (G3) */
8415 POWERPC_DEF("740_v2.2", CPU_POWERPC_7x0_v22
, 740),
8416 /* PowerPC 750 v2.2 (G3) */
8417 POWERPC_DEF("750_v2.2", CPU_POWERPC_7x0_v22
, 750),
8418 /* PowerPC 740 v3.0 (G3) */
8419 POWERPC_DEF("740_v3.0", CPU_POWERPC_7x0_v30
, 740),
8420 /* PowerPC 750 v3.0 (G3) */
8421 POWERPC_DEF("750_v3.0", CPU_POWERPC_7x0_v30
, 750),
8422 /* PowerPC 740 v3.1 (G3) */
8423 POWERPC_DEF("740_v3.1", CPU_POWERPC_7x0_v31
, 740),
8424 /* PowerPC 750 v3.1 (G3) */
8425 POWERPC_DEF("750_v3.1", CPU_POWERPC_7x0_v31
, 750),
8426 /* PowerPC 740E (G3) */
8427 POWERPC_DEF("740e", CPU_POWERPC_740E
, 740),
8428 /* PowerPC 750E (G3) */
8429 POWERPC_DEF("750e", CPU_POWERPC_750E
, 750),
8430 /* PowerPC 740P (G3) */
8431 POWERPC_DEF("740p", CPU_POWERPC_7x0P
, 740),
8432 /* PowerPC 750P (G3) */
8433 POWERPC_DEF("750p", CPU_POWERPC_7x0P
, 750),
8434 /* Code name for PowerPC 740P/750P (G3) */
8435 POWERPC_DEF("Conan/Doyle", CPU_POWERPC_7x0P
, 750),
8436 /* PowerPC 750CL (G3 embedded) */
8437 POWERPC_DEF("750cl", CPU_POWERPC_750CL
, 750cl
),
8438 /* PowerPC 750CL v1.0 */
8439 POWERPC_DEF("750cl_v1.0", CPU_POWERPC_750CL_v10
, 750cl
),
8440 /* PowerPC 750CL v2.0 */
8441 POWERPC_DEF("750cl_v2.0", CPU_POWERPC_750CL_v20
, 750cl
),
8442 /* PowerPC 750CX (G3 embedded) */
8443 POWERPC_DEF("750cx", CPU_POWERPC_750CX
, 750cx
),
8444 /* PowerPC 750CX v1.0 (G3 embedded) */
8445 POWERPC_DEF("750cx_v1.0", CPU_POWERPC_750CX_v10
, 750cx
),
8446 /* PowerPC 750CX v2.1 (G3 embedded) */
8447 POWERPC_DEF("750cx_v2.0", CPU_POWERPC_750CX_v20
, 750cx
),
8448 /* PowerPC 750CX v2.1 (G3 embedded) */
8449 POWERPC_DEF("750cx_v2.1", CPU_POWERPC_750CX_v21
, 750cx
),
8450 /* PowerPC 750CX v2.2 (G3 embedded) */
8451 POWERPC_DEF("750cx_v2.2", CPU_POWERPC_750CX_v22
, 750cx
),
8452 /* PowerPC 750CXe (G3 embedded) */
8453 POWERPC_DEF("750cxe", CPU_POWERPC_750CXE
, 750cx
),
8454 /* PowerPC 750CXe v2.1 (G3 embedded) */
8455 POWERPC_DEF("750cxe_v2.1", CPU_POWERPC_750CXE_v21
, 750cx
),
8456 /* PowerPC 750CXe v2.2 (G3 embedded) */
8457 POWERPC_DEF("750cxe_v2.2", CPU_POWERPC_750CXE_v22
, 750cx
),
8458 /* PowerPC 750CXe v2.3 (G3 embedded) */
8459 POWERPC_DEF("750cxe_v2.3", CPU_POWERPC_750CXE_v23
, 750cx
),
8460 /* PowerPC 750CXe v2.4 (G3 embedded) */
8461 POWERPC_DEF("750cxe_v2.4", CPU_POWERPC_750CXE_v24
, 750cx
),
8462 /* PowerPC 750CXe v2.4b (G3 embedded) */
8463 POWERPC_DEF("750cxe_v2.4b", CPU_POWERPC_750CXE_v24b
, 750cx
),
8464 /* PowerPC 750CXe v3.0 (G3 embedded) */
8465 POWERPC_DEF("750cxe_v3.0", CPU_POWERPC_750CXE_v30
, 750cx
),
8466 /* PowerPC 750CXe v3.1 (G3 embedded) */
8467 POWERPC_DEF("750cxe_v3.1", CPU_POWERPC_750CXE_v31
, 750cx
),
8468 /* PowerPC 750CXe v3.1b (G3 embedded) */
8469 POWERPC_DEF("750cxe_v3.1b", CPU_POWERPC_750CXE_v31b
, 750cx
),
8470 /* PowerPC 750CXr (G3 embedded) */
8471 POWERPC_DEF("750cxr", CPU_POWERPC_750CXR
, 750cx
),
8472 /* PowerPC 750FL (G3 embedded) */
8473 POWERPC_DEF("750fl", CPU_POWERPC_750FL
, 750fx
),
8474 /* PowerPC 750FX (G3 embedded) */
8475 POWERPC_DEF("750fx", CPU_POWERPC_750FX
, 750fx
),
8476 /* PowerPC 750FX v1.0 (G3 embedded) */
8477 POWERPC_DEF("750fx_v1.0", CPU_POWERPC_750FX_v10
, 750fx
),
8478 /* PowerPC 750FX v2.0 (G3 embedded) */
8479 POWERPC_DEF("750fx_v2.0", CPU_POWERPC_750FX_v20
, 750fx
),
8480 /* PowerPC 750FX v2.1 (G3 embedded) */
8481 POWERPC_DEF("750fx_v2.1", CPU_POWERPC_750FX_v21
, 750fx
),
8482 /* PowerPC 750FX v2.2 (G3 embedded) */
8483 POWERPC_DEF("750fx_v2.2", CPU_POWERPC_750FX_v22
, 750fx
),
8484 /* PowerPC 750FX v2.3 (G3 embedded) */
8485 POWERPC_DEF("750fx_v2.3", CPU_POWERPC_750FX_v23
, 750fx
),
8486 /* PowerPC 750GL (G3 embedded) */
8487 POWERPC_DEF("750gl", CPU_POWERPC_750GL
, 750gx
),
8488 /* PowerPC 750GX (G3 embedded) */
8489 POWERPC_DEF("750gx", CPU_POWERPC_750GX
, 750gx
),
8490 /* PowerPC 750GX v1.0 (G3 embedded) */
8491 POWERPC_DEF("750gx_v1.0", CPU_POWERPC_750GX_v10
, 750gx
),
8492 /* PowerPC 750GX v1.1 (G3 embedded) */
8493 POWERPC_DEF("750gx_v1.1", CPU_POWERPC_750GX_v11
, 750gx
),
8494 /* PowerPC 750GX v1.2 (G3 embedded) */
8495 POWERPC_DEF("750gx_v1.2", CPU_POWERPC_750GX_v12
, 750gx
),
8496 /* PowerPC 750L (G3 embedded) */
8497 POWERPC_DEF("750l", CPU_POWERPC_750L
, 750),
8498 /* Code name for PowerPC 750L (G3 embedded) */
8499 POWERPC_DEF("LoneStar", CPU_POWERPC_750L
, 750),
8500 /* PowerPC 750L v2.0 (G3 embedded) */
8501 POWERPC_DEF("750l_v2.0", CPU_POWERPC_750L_v20
, 750),
8502 /* PowerPC 750L v2.1 (G3 embedded) */
8503 POWERPC_DEF("750l_v2.1", CPU_POWERPC_750L_v21
, 750),
8504 /* PowerPC 750L v2.2 (G3 embedded) */
8505 POWERPC_DEF("750l_v2.2", CPU_POWERPC_750L_v22
, 750),
8506 /* PowerPC 750L v3.0 (G3 embedded) */
8507 POWERPC_DEF("750l_v3.0", CPU_POWERPC_750L_v30
, 750),
8508 /* PowerPC 750L v3.2 (G3 embedded) */
8509 POWERPC_DEF("750l_v3.2", CPU_POWERPC_750L_v32
, 750),
8510 /* Generic PowerPC 745 */
8511 POWERPC_DEF("745", CPU_POWERPC_7x5
, 745),
8512 /* Generic PowerPC 755 */
8513 POWERPC_DEF("755", CPU_POWERPC_7x5
, 755),
8514 /* Code name for PowerPC 745/755 */
8515 POWERPC_DEF("Goldfinger", CPU_POWERPC_7x5
, 755),
8516 /* PowerPC 745 v1.0 */
8517 POWERPC_DEF("745_v1.0", CPU_POWERPC_7x5_v10
, 745),
8518 /* PowerPC 755 v1.0 */
8519 POWERPC_DEF("755_v1.0", CPU_POWERPC_7x5_v10
, 755),
8520 /* PowerPC 745 v1.1 */
8521 POWERPC_DEF("745_v1.1", CPU_POWERPC_7x5_v11
, 745),
8522 /* PowerPC 755 v1.1 */
8523 POWERPC_DEF("755_v1.1", CPU_POWERPC_7x5_v11
, 755),
8524 /* PowerPC 745 v2.0 */
8525 POWERPC_DEF("745_v2.0", CPU_POWERPC_7x5_v20
, 745),
8526 /* PowerPC 755 v2.0 */
8527 POWERPC_DEF("755_v2.0", CPU_POWERPC_7x5_v20
, 755),
8528 /* PowerPC 745 v2.1 */
8529 POWERPC_DEF("745_v2.1", CPU_POWERPC_7x5_v21
, 745),
8530 /* PowerPC 755 v2.1 */
8531 POWERPC_DEF("755_v2.1", CPU_POWERPC_7x5_v21
, 755),
8532 /* PowerPC 745 v2.2 */
8533 POWERPC_DEF("745_v2.2", CPU_POWERPC_7x5_v22
, 745),
8534 /* PowerPC 755 v2.2 */
8535 POWERPC_DEF("755_v2.2", CPU_POWERPC_7x5_v22
, 755),
8536 /* PowerPC 745 v2.3 */
8537 POWERPC_DEF("745_v2.3", CPU_POWERPC_7x5_v23
, 745),
8538 /* PowerPC 755 v2.3 */
8539 POWERPC_DEF("755_v2.3", CPU_POWERPC_7x5_v23
, 755),
8540 /* PowerPC 745 v2.4 */
8541 POWERPC_DEF("745_v2.4", CPU_POWERPC_7x5_v24
, 745),
8542 /* PowerPC 755 v2.4 */
8543 POWERPC_DEF("755_v2.4", CPU_POWERPC_7x5_v24
, 755),
8544 /* PowerPC 745 v2.5 */
8545 POWERPC_DEF("745_v2.5", CPU_POWERPC_7x5_v25
, 745),
8546 /* PowerPC 755 v2.5 */
8547 POWERPC_DEF("755_v2.5", CPU_POWERPC_7x5_v25
, 755),
8548 /* PowerPC 745 v2.6 */
8549 POWERPC_DEF("745_v2.6", CPU_POWERPC_7x5_v26
, 745),
8550 /* PowerPC 755 v2.6 */
8551 POWERPC_DEF("755_v2.6", CPU_POWERPC_7x5_v26
, 755),
8552 /* PowerPC 745 v2.7 */
8553 POWERPC_DEF("745_v2.7", CPU_POWERPC_7x5_v27
, 745),
8554 /* PowerPC 755 v2.7 */
8555 POWERPC_DEF("755_v2.7", CPU_POWERPC_7x5_v27
, 755),
8556 /* PowerPC 745 v2.8 */
8557 POWERPC_DEF("745_v2.8", CPU_POWERPC_7x5_v28
, 745),
8558 /* PowerPC 755 v2.8 */
8559 POWERPC_DEF("755_v2.8", CPU_POWERPC_7x5_v28
, 755),
8561 /* PowerPC 745P (G3) */
8562 POWERPC_DEF("745p", CPU_POWERPC_7x5P
, 745),
8563 /* PowerPC 755P (G3) */
8564 POWERPC_DEF("755p", CPU_POWERPC_7x5P
, 755),
8566 /* PowerPC 74xx family */
8567 /* PowerPC 7400 (G4) */
8568 POWERPC_DEF("7400", CPU_POWERPC_7400
, 7400),
8569 /* Code name for PowerPC 7400 */
8570 POWERPC_DEF("Max", CPU_POWERPC_7400
, 7400),
8571 /* PowerPC 74xx is also well known as G4 */
8572 POWERPC_DEF("G4", CPU_POWERPC_7400
, 7400),
8573 /* PowerPC 7400 v1.0 (G4) */
8574 POWERPC_DEF("7400_v1.0", CPU_POWERPC_7400_v10
, 7400),
8575 /* PowerPC 7400 v1.1 (G4) */
8576 POWERPC_DEF("7400_v1.1", CPU_POWERPC_7400_v11
, 7400),
8577 /* PowerPC 7400 v2.0 (G4) */
8578 POWERPC_DEF("7400_v2.0", CPU_POWERPC_7400_v20
, 7400),
8579 /* PowerPC 7400 v2.1 (G4) */
8580 POWERPC_DEF("7400_v2.1", CPU_POWERPC_7400_v21
, 7400),
8581 /* PowerPC 7400 v2.2 (G4) */
8582 POWERPC_DEF("7400_v2.2", CPU_POWERPC_7400_v22
, 7400),
8583 /* PowerPC 7400 v2.6 (G4) */
8584 POWERPC_DEF("7400_v2.6", CPU_POWERPC_7400_v26
, 7400),
8585 /* PowerPC 7400 v2.7 (G4) */
8586 POWERPC_DEF("7400_v2.7", CPU_POWERPC_7400_v27
, 7400),
8587 /* PowerPC 7400 v2.8 (G4) */
8588 POWERPC_DEF("7400_v2.8", CPU_POWERPC_7400_v28
, 7400),
8589 /* PowerPC 7400 v2.9 (G4) */
8590 POWERPC_DEF("7400_v2.9", CPU_POWERPC_7400_v29
, 7400),
8591 /* PowerPC 7410 (G4) */
8592 POWERPC_DEF("7410", CPU_POWERPC_7410
, 7410),
8593 /* Code name for PowerPC 7410 */
8594 POWERPC_DEF("Nitro", CPU_POWERPC_7410
, 7410),
8595 /* PowerPC 7410 v1.0 (G4) */
8596 POWERPC_DEF("7410_v1.0", CPU_POWERPC_7410_v10
, 7410),
8597 /* PowerPC 7410 v1.1 (G4) */
8598 POWERPC_DEF("7410_v1.1", CPU_POWERPC_7410_v11
, 7410),
8599 /* PowerPC 7410 v1.2 (G4) */
8600 POWERPC_DEF("7410_v1.2", CPU_POWERPC_7410_v12
, 7410),
8601 /* PowerPC 7410 v1.3 (G4) */
8602 POWERPC_DEF("7410_v1.3", CPU_POWERPC_7410_v13
, 7410),
8603 /* PowerPC 7410 v1.4 (G4) */
8604 POWERPC_DEF("7410_v1.4", CPU_POWERPC_7410_v14
, 7410),
8605 /* PowerPC 7448 (G4) */
8606 POWERPC_DEF("7448", CPU_POWERPC_7448
, 7400),
8607 /* PowerPC 7448 v1.0 (G4) */
8608 POWERPC_DEF("7448_v1.0", CPU_POWERPC_7448_v10
, 7400),
8609 /* PowerPC 7448 v1.1 (G4) */
8610 POWERPC_DEF("7448_v1.1", CPU_POWERPC_7448_v11
, 7400),
8611 /* PowerPC 7448 v2.0 (G4) */
8612 POWERPC_DEF("7448_v2.0", CPU_POWERPC_7448_v20
, 7400),
8613 /* PowerPC 7448 v2.1 (G4) */
8614 POWERPC_DEF("7448_v2.1", CPU_POWERPC_7448_v21
, 7400),
8615 /* PowerPC 7450 (G4) */
8616 POWERPC_DEF("7450", CPU_POWERPC_7450
, 7450),
8617 /* Code name for PowerPC 7450 */
8618 POWERPC_DEF("Vger", CPU_POWERPC_7450
, 7450),
8619 /* PowerPC 7450 v1.0 (G4) */
8620 POWERPC_DEF("7450_v1.0", CPU_POWERPC_7450_v10
, 7450),
8621 /* PowerPC 7450 v1.1 (G4) */
8622 POWERPC_DEF("7450_v1.1", CPU_POWERPC_7450_v11
, 7450),
8623 /* PowerPC 7450 v1.2 (G4) */
8624 POWERPC_DEF("7450_v1.2", CPU_POWERPC_7450_v12
, 7450),
8625 /* PowerPC 7450 v2.0 (G4) */
8626 POWERPC_DEF("7450_v2.0", CPU_POWERPC_7450_v20
, 7450),
8627 /* PowerPC 7450 v2.1 (G4) */
8628 POWERPC_DEF("7450_v2.1", CPU_POWERPC_7450_v21
, 7450),
8629 /* PowerPC 7441 (G4) */
8630 POWERPC_DEF("7441", CPU_POWERPC_74x1
, 7440),
8631 /* PowerPC 7451 (G4) */
8632 POWERPC_DEF("7451", CPU_POWERPC_74x1
, 7450),
8633 /* PowerPC 7441 v2.1 (G4) */
8634 POWERPC_DEF("7441_v2.1", CPU_POWERPC_7450_v21
, 7440),
8635 /* PowerPC 7441 v2.3 (G4) */
8636 POWERPC_DEF("7441_v2.3", CPU_POWERPC_74x1_v23
, 7440),
8637 /* PowerPC 7451 v2.3 (G4) */
8638 POWERPC_DEF("7451_v2.3", CPU_POWERPC_74x1_v23
, 7450),
8639 /* PowerPC 7441 v2.10 (G4) */
8640 POWERPC_DEF("7441_v2.10", CPU_POWERPC_74x1_v210
, 7440),
8641 /* PowerPC 7451 v2.10 (G4) */
8642 POWERPC_DEF("7451_v2.10", CPU_POWERPC_74x1_v210
, 7450),
8643 /* PowerPC 7445 (G4) */
8644 POWERPC_DEF("7445", CPU_POWERPC_74x5
, 7445),
8645 /* PowerPC 7455 (G4) */
8646 POWERPC_DEF("7455", CPU_POWERPC_74x5
, 7455),
8647 /* Code name for PowerPC 7445/7455 */
8648 POWERPC_DEF("Apollo6", CPU_POWERPC_74x5
, 7455),
8649 /* PowerPC 7445 v1.0 (G4) */
8650 POWERPC_DEF("7445_v1.0", CPU_POWERPC_74x5_v10
, 7445),
8651 /* PowerPC 7455 v1.0 (G4) */
8652 POWERPC_DEF("7455_v1.0", CPU_POWERPC_74x5_v10
, 7455),
8653 /* PowerPC 7445 v2.1 (G4) */
8654 POWERPC_DEF("7445_v2.1", CPU_POWERPC_74x5_v21
, 7445),
8655 /* PowerPC 7455 v2.1 (G4) */
8656 POWERPC_DEF("7455_v2.1", CPU_POWERPC_74x5_v21
, 7455),
8657 /* PowerPC 7445 v3.2 (G4) */
8658 POWERPC_DEF("7445_v3.2", CPU_POWERPC_74x5_v32
, 7445),
8659 /* PowerPC 7455 v3.2 (G4) */
8660 POWERPC_DEF("7455_v3.2", CPU_POWERPC_74x5_v32
, 7455),
8661 /* PowerPC 7445 v3.3 (G4) */
8662 POWERPC_DEF("7445_v3.3", CPU_POWERPC_74x5_v33
, 7445),
8663 /* PowerPC 7455 v3.3 (G4) */
8664 POWERPC_DEF("7455_v3.3", CPU_POWERPC_74x5_v33
, 7455),
8665 /* PowerPC 7445 v3.4 (G4) */
8666 POWERPC_DEF("7445_v3.4", CPU_POWERPC_74x5_v34
, 7445),
8667 /* PowerPC 7455 v3.4 (G4) */
8668 POWERPC_DEF("7455_v3.4", CPU_POWERPC_74x5_v34
, 7455),
8669 /* PowerPC 7447 (G4) */
8670 POWERPC_DEF("7447", CPU_POWERPC_74x7
, 7445),
8671 /* PowerPC 7457 (G4) */
8672 POWERPC_DEF("7457", CPU_POWERPC_74x7
, 7455),
8673 /* Code name for PowerPC 7447/7457 */
8674 POWERPC_DEF("Apollo7", CPU_POWERPC_74x7
, 7455),
8675 /* PowerPC 7447 v1.0 (G4) */
8676 POWERPC_DEF("7447_v1.0", CPU_POWERPC_74x7_v10
, 7445),
8677 /* PowerPC 7457 v1.0 (G4) */
8678 POWERPC_DEF("7457_v1.0", CPU_POWERPC_74x7_v10
, 7455),
8679 /* PowerPC 7447 v1.1 (G4) */
8680 POWERPC_DEF("7447_v1.1", CPU_POWERPC_74x7_v11
, 7445),
8681 /* PowerPC 7457 v1.1 (G4) */
8682 POWERPC_DEF("7457_v1.1", CPU_POWERPC_74x7_v11
, 7455),
8683 /* PowerPC 7457 v1.2 (G4) */
8684 POWERPC_DEF("7457_v1.2", CPU_POWERPC_74x7_v12
, 7455),
8685 /* PowerPC 7447A (G4) */
8686 POWERPC_DEF("7447A", CPU_POWERPC_74x7A
, 7445),
8687 /* PowerPC 7457A (G4) */
8688 POWERPC_DEF("7457A", CPU_POWERPC_74x7A
, 7455),
8689 /* PowerPC 7447A v1.0 (G4) */
8690 POWERPC_DEF("7447A_v1.0", CPU_POWERPC_74x7A_v10
, 7445),
8691 /* PowerPC 7457A v1.0 (G4) */
8692 POWERPC_DEF("7457A_v1.0", CPU_POWERPC_74x7A_v10
, 7455),
8693 /* Code name for PowerPC 7447A/7457A */
8694 POWERPC_DEF("Apollo7PM", CPU_POWERPC_74x7A_v10
, 7455),
8695 /* PowerPC 7447A v1.1 (G4) */
8696 POWERPC_DEF("7447A_v1.1", CPU_POWERPC_74x7A_v11
, 7445),
8697 /* PowerPC 7457A v1.1 (G4) */
8698 POWERPC_DEF("7457A_v1.1", CPU_POWERPC_74x7A_v11
, 7455),
8699 /* PowerPC 7447A v1.2 (G4) */
8700 POWERPC_DEF("7447A_v1.2", CPU_POWERPC_74x7A_v12
, 7445),
8701 /* PowerPC 7457A v1.2 (G4) */
8702 POWERPC_DEF("7457A_v1.2", CPU_POWERPC_74x7A_v12
, 7455),
8703 /* 64 bits PowerPC */
8704 #if defined (TARGET_PPC64)
8706 POWERPC_DEF("620", CPU_POWERPC_620
, 620),
8707 /* Code name for PowerPC 620 */
8708 POWERPC_DEF("Trident", CPU_POWERPC_620
, 620),
8710 /* PowerPC 630 (POWER3) */
8711 POWERPC_DEF("630", CPU_POWERPC_630
, 630),
8712 POWERPC_DEF("POWER3", CPU_POWERPC_630
, 630),
8713 /* Code names for POWER3 */
8714 POWERPC_DEF("Boxer", CPU_POWERPC_630
, 630),
8715 POWERPC_DEF("Dino", CPU_POWERPC_630
, 630),
8718 /* PowerPC 631 (Power 3+) */
8719 POWERPC_DEF("631", CPU_POWERPC_631
, 631),
8720 POWERPC_DEF("POWER3+", CPU_POWERPC_631
, 631),
8724 POWERPC_DEF("POWER4", CPU_POWERPC_POWER4
, POWER4
),
8728 POWERPC_DEF("POWER4+", CPU_POWERPC_POWER4P
, POWER4P
),
8732 POWERPC_DEF("POWER5", CPU_POWERPC_POWER5
, POWER5
),
8734 POWERPC_DEF("POWER5gr", CPU_POWERPC_POWER5GR
, POWER5
),
8738 POWERPC_DEF("POWER5+", CPU_POWERPC_POWER5P
, POWER5P
),
8740 POWERPC_DEF("POWER5gs", CPU_POWERPC_POWER5GS
, POWER5P
),
8744 POWERPC_DEF("POWER6", CPU_POWERPC_POWER6
, POWER6
),
8745 /* POWER6 running in POWER5 mode */
8746 POWERPC_DEF("POWER6_5", CPU_POWERPC_POWER6_5
, POWER5
),
8748 POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A
, POWER6
),
8751 POWERPC_DEF("970", CPU_POWERPC_970
, 970),
8752 /* PowerPC 970FX (G5) */
8753 POWERPC_DEF("970fx", CPU_POWERPC_970FX
, 970FX
),
8754 /* PowerPC 970FX v1.0 (G5) */
8755 POWERPC_DEF("970fx_v1.0", CPU_POWERPC_970FX_v10
, 970FX
),
8756 /* PowerPC 970FX v2.0 (G5) */
8757 POWERPC_DEF("970fx_v2.0", CPU_POWERPC_970FX_v20
, 970FX
),
8758 /* PowerPC 970FX v2.1 (G5) */
8759 POWERPC_DEF("970fx_v2.1", CPU_POWERPC_970FX_v21
, 970FX
),
8760 /* PowerPC 970FX v3.0 (G5) */
8761 POWERPC_DEF("970fx_v3.0", CPU_POWERPC_970FX_v30
, 970FX
),
8762 /* PowerPC 970FX v3.1 (G5) */
8763 POWERPC_DEF("970fx_v3.1", CPU_POWERPC_970FX_v31
, 970FX
),
8764 /* PowerPC 970GX (G5) */
8765 POWERPC_DEF("970gx", CPU_POWERPC_970GX
, 970GX
),
8767 POWERPC_DEF("970mp", CPU_POWERPC_970MP
, 970MP
),
8768 /* PowerPC 970MP v1.0 */
8769 POWERPC_DEF("970mp_v1.0", CPU_POWERPC_970MP_v10
, 970MP
),
8770 /* PowerPC 970MP v1.1 */
8771 POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11
, 970MP
),
8774 POWERPC_DEF("Cell", CPU_POWERPC_CELL
, 970),
8777 /* PowerPC Cell v1.0 */
8778 POWERPC_DEF("Cell_v1.0", CPU_POWERPC_CELL_v10
, 970),
8781 /* PowerPC Cell v2.0 */
8782 POWERPC_DEF("Cell_v2.0", CPU_POWERPC_CELL_v20
, 970),
8785 /* PowerPC Cell v3.0 */
8786 POWERPC_DEF("Cell_v3.0", CPU_POWERPC_CELL_v30
, 970),
8789 /* PowerPC Cell v3.1 */
8790 POWERPC_DEF("Cell_v3.1", CPU_POWERPC_CELL_v31
, 970),
8793 /* PowerPC Cell v3.2 */
8794 POWERPC_DEF("Cell_v3.2", CPU_POWERPC_CELL_v32
, 970),
8797 /* RS64 (Apache/A35) */
8798 /* This one seems to support the whole POWER2 instruction set
8799 * and the PowerPC 64 one.
8801 /* What about A10 & A30 ? */
8802 POWERPC_DEF("RS64", CPU_POWERPC_RS64
, RS64
),
8803 POWERPC_DEF("Apache", CPU_POWERPC_RS64
, RS64
),
8804 POWERPC_DEF("A35", CPU_POWERPC_RS64
, RS64
),
8807 /* RS64-II (NorthStar/A50) */
8808 POWERPC_DEF("RS64-II", CPU_POWERPC_RS64II
, RS64
),
8809 POWERPC_DEF("NorthStar", CPU_POWERPC_RS64II
, RS64
),
8810 POWERPC_DEF("A50", CPU_POWERPC_RS64II
, RS64
),
8813 /* RS64-III (Pulsar) */
8814 POWERPC_DEF("RS64-III", CPU_POWERPC_RS64III
, RS64
),
8815 POWERPC_DEF("Pulsar", CPU_POWERPC_RS64III
, RS64
),
8818 /* RS64-IV (IceStar/IStar/SStar) */
8819 POWERPC_DEF("RS64-IV", CPU_POWERPC_RS64IV
, RS64
),
8820 POWERPC_DEF("IceStar", CPU_POWERPC_RS64IV
, RS64
),
8821 POWERPC_DEF("IStar", CPU_POWERPC_RS64IV
, RS64
),
8822 POWERPC_DEF("SStar", CPU_POWERPC_RS64IV
, RS64
),
8824 #endif /* defined (TARGET_PPC64) */
8827 /* Original POWER */
8828 POWERPC_DEF("POWER", CPU_POWERPC_POWER
, POWER
),
8829 POWERPC_DEF("RIOS", CPU_POWERPC_POWER
, POWER
),
8830 POWERPC_DEF("RSC", CPU_POWERPC_POWER
, POWER
),
8831 POWERPC_DEF("RSC3308", CPU_POWERPC_POWER
, POWER
),
8832 POWERPC_DEF("RSC4608", CPU_POWERPC_POWER
, POWER
),
8836 POWERPC_DEF("POWER2", CPU_POWERPC_POWER2
, POWER
),
8837 POWERPC_DEF("RSC2", CPU_POWERPC_POWER2
, POWER
),
8838 POWERPC_DEF("P2SC", CPU_POWERPC_POWER2
, POWER
),
8843 POWERPC_DEF("PA6T", CPU_POWERPC_PA6T
, PA6T
),
8845 /* Generic PowerPCs */
8846 #if defined (TARGET_PPC64)
8847 POWERPC_DEF("ppc64", CPU_POWERPC_PPC64
, PPC64
),
8849 POWERPC_DEF("ppc32", CPU_POWERPC_PPC32
, PPC32
),
8850 POWERPC_DEF("ppc", CPU_POWERPC_DEFAULT
, DEFAULT
),
8852 POWERPC_DEF("default", CPU_POWERPC_DEFAULT
, DEFAULT
),
8855 /*****************************************************************************/
8856 /* Generic CPU instanciation routine */
8857 static void init_ppc_proc (CPUPPCState
*env
, const ppc_def_t
*def
)
8859 #if !defined(CONFIG_USER_ONLY)
8862 env
->irq_inputs
= NULL
;
8863 /* Set all exception vectors to an invalid address */
8864 for (i
= 0; i
< POWERPC_EXCP_NB
; i
++)
8865 env
->excp_vectors
[i
] = (target_ulong
)(-1ULL);
8866 env
->excp_prefix
= 0x00000000;
8867 env
->ivor_mask
= 0x00000000;
8868 env
->ivpr_mask
= 0x00000000;
8869 /* Default MMU definitions */
8874 /* Register SPR common to all PowerPC implementations */
8875 gen_spr_generic(env
);
8876 spr_register(env
, SPR_PVR
, "PVR",
8877 SPR_NOACCESS
, SPR_NOACCESS
,
8878 &spr_read_generic
, SPR_NOACCESS
,
8880 /* Register SVR if it's defined to anything else than POWERPC_SVR_NONE */
8881 if (def
->svr
!= POWERPC_SVR_NONE
) {
8882 if (def
->svr
& POWERPC_SVR_E500
) {
8883 spr_register(env
, SPR_E500_SVR
, "SVR",
8884 SPR_NOACCESS
, SPR_NOACCESS
,
8885 &spr_read_generic
, SPR_NOACCESS
,
8886 def
->svr
& ~POWERPC_SVR_E500
);
8888 spr_register(env
, SPR_SVR
, "SVR",
8889 SPR_NOACCESS
, SPR_NOACCESS
,
8890 &spr_read_generic
, SPR_NOACCESS
,
8894 /* PowerPC implementation specific initialisations (SPRs, timers, ...) */
8895 (*def
->init_proc
)(env
);
8896 /* MSR bits & flags consistency checks */
8897 if (env
->msr_mask
& (1 << 25)) {
8898 switch (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
8899 case POWERPC_FLAG_SPE
:
8900 case POWERPC_FLAG_VRE
:
8903 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8904 "Should define POWERPC_FLAG_SPE or POWERPC_FLAG_VRE\n");
8907 } else if (env
->flags
& (POWERPC_FLAG_SPE
| POWERPC_FLAG_VRE
)) {
8908 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8909 "Should not define POWERPC_FLAG_SPE nor POWERPC_FLAG_VRE\n");
8912 if (env
->msr_mask
& (1 << 17)) {
8913 switch (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
8914 case POWERPC_FLAG_TGPR
:
8915 case POWERPC_FLAG_CE
:
8918 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8919 "Should define POWERPC_FLAG_TGPR or POWERPC_FLAG_CE\n");
8922 } else if (env
->flags
& (POWERPC_FLAG_TGPR
| POWERPC_FLAG_CE
)) {
8923 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8924 "Should not define POWERPC_FLAG_TGPR nor POWERPC_FLAG_CE\n");
8927 if (env
->msr_mask
& (1 << 10)) {
8928 switch (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
8929 POWERPC_FLAG_UBLE
)) {
8930 case POWERPC_FLAG_SE
:
8931 case POWERPC_FLAG_DWE
:
8932 case POWERPC_FLAG_UBLE
:
8935 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8936 "Should define POWERPC_FLAG_SE or POWERPC_FLAG_DWE or "
8937 "POWERPC_FLAG_UBLE\n");
8940 } else if (env
->flags
& (POWERPC_FLAG_SE
| POWERPC_FLAG_DWE
|
8941 POWERPC_FLAG_UBLE
)) {
8942 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8943 "Should not define POWERPC_FLAG_SE nor POWERPC_FLAG_DWE nor "
8944 "POWERPC_FLAG_UBLE\n");
8947 if (env
->msr_mask
& (1 << 9)) {
8948 switch (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
8949 case POWERPC_FLAG_BE
:
8950 case POWERPC_FLAG_DE
:
8953 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8954 "Should define POWERPC_FLAG_BE or POWERPC_FLAG_DE\n");
8957 } else if (env
->flags
& (POWERPC_FLAG_BE
| POWERPC_FLAG_DE
)) {
8958 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8959 "Should not define POWERPC_FLAG_BE nor POWERPC_FLAG_DE\n");
8962 if (env
->msr_mask
& (1 << 2)) {
8963 switch (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
8964 case POWERPC_FLAG_PX
:
8965 case POWERPC_FLAG_PMM
:
8968 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8969 "Should define POWERPC_FLAG_PX or POWERPC_FLAG_PMM\n");
8972 } else if (env
->flags
& (POWERPC_FLAG_PX
| POWERPC_FLAG_PMM
)) {
8973 fprintf(stderr
, "PowerPC MSR definition inconsistency\n"
8974 "Should not define POWERPC_FLAG_PX nor POWERPC_FLAG_PMM\n");
8977 if ((env
->flags
& (POWERPC_FLAG_RTC_CLK
| POWERPC_FLAG_BUS_CLK
)) == 0) {
8978 fprintf(stderr
, "PowerPC flags inconsistency\n"
8979 "Should define the time-base and decrementer clock source\n");
8982 /* Allocate TLBs buffer when needed */
8983 #if !defined(CONFIG_USER_ONLY)
8984 if (env
->nb_tlb
!= 0) {
8985 int nb_tlb
= env
->nb_tlb
;
8986 if (env
->id_tlbs
!= 0)
8988 env
->tlb
= qemu_mallocz(nb_tlb
* sizeof(ppc_tlb_t
));
8989 /* Pre-compute some useful values */
8990 env
->tlb_per_way
= env
->nb_tlb
/ env
->nb_ways
;
8992 if (env
->irq_inputs
== NULL
) {
8993 fprintf(stderr
, "WARNING: no internal IRQ controller registered.\n"
8994 " Attempt Qemu to crash very soon !\n");
8997 if (env
->check_pow
== NULL
) {
8998 fprintf(stderr
, "WARNING: no power management check handler "
9000 " Attempt Qemu to crash very soon !\n");
9004 #if defined(PPC_DUMP_CPU)
9005 static void dump_ppc_sprs (CPUPPCState
*env
)
9008 #if !defined(CONFIG_USER_ONLY)
9014 printf("Special purpose registers:\n");
9015 for (i
= 0; i
< 32; i
++) {
9016 for (j
= 0; j
< 32; j
++) {
9018 spr
= &env
->spr_cb
[n
];
9019 uw
= spr
->uea_write
!= NULL
&& spr
->uea_write
!= SPR_NOACCESS
;
9020 ur
= spr
->uea_read
!= NULL
&& spr
->uea_read
!= SPR_NOACCESS
;
9021 #if !defined(CONFIG_USER_ONLY)
9022 sw
= spr
->oea_write
!= NULL
&& spr
->oea_write
!= SPR_NOACCESS
;
9023 sr
= spr
->oea_read
!= NULL
&& spr
->oea_read
!= SPR_NOACCESS
;
9024 if (sw
|| sr
|| uw
|| ur
) {
9025 printf("SPR: %4d (%03x) %-8s s%c%c u%c%c\n",
9026 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9027 sw
? 'w' : '-', sr
? 'r' : '-',
9028 uw
? 'w' : '-', ur
? 'r' : '-');
9032 printf("SPR: %4d (%03x) %-8s u%c%c\n",
9033 (i
<< 5) | j
, (i
<< 5) | j
, spr
->name
,
9034 uw
? 'w' : '-', ur
? 'r' : '-');
9044 /*****************************************************************************/
9050 PPC_DIRECT
= 0, /* Opcode routine */
9051 PPC_INDIRECT
= 1, /* Indirect opcode table */
9054 static inline int is_indirect_opcode (void *handler
)
9056 return ((unsigned long)handler
& 0x03) == PPC_INDIRECT
;
9059 static inline opc_handler_t
**ind_table(void *handler
)
9061 return (opc_handler_t
**)((unsigned long)handler
& ~3);
9064 /* Instruction table creation */
9065 /* Opcodes tables creation */
9066 static void fill_new_table (opc_handler_t
**table
, int len
)
9070 for (i
= 0; i
< len
; i
++)
9071 table
[i
] = &invalid_handler
;
9074 static int create_new_table (opc_handler_t
**table
, unsigned char idx
)
9076 opc_handler_t
**tmp
;
9078 tmp
= malloc(0x20 * sizeof(opc_handler_t
));
9079 fill_new_table(tmp
, 0x20);
9080 table
[idx
] = (opc_handler_t
*)((unsigned long)tmp
| PPC_INDIRECT
);
9085 static int insert_in_table (opc_handler_t
**table
, unsigned char idx
,
9086 opc_handler_t
*handler
)
9088 if (table
[idx
] != &invalid_handler
)
9090 table
[idx
] = handler
;
9095 static int register_direct_insn (opc_handler_t
**ppc_opcodes
,
9096 unsigned char idx
, opc_handler_t
*handler
)
9098 if (insert_in_table(ppc_opcodes
, idx
, handler
) < 0) {
9099 printf("*** ERROR: opcode %02x already assigned in main "
9100 "opcode table\n", idx
);
9101 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9102 printf(" Registered handler '%s' - new handler '%s'\n",
9103 ppc_opcodes
[idx
]->oname
, handler
->oname
);
9111 static int register_ind_in_table (opc_handler_t
**table
,
9112 unsigned char idx1
, unsigned char idx2
,
9113 opc_handler_t
*handler
)
9115 if (table
[idx1
] == &invalid_handler
) {
9116 if (create_new_table(table
, idx1
) < 0) {
9117 printf("*** ERROR: unable to create indirect table "
9118 "idx=%02x\n", idx1
);
9122 if (!is_indirect_opcode(table
[idx1
])) {
9123 printf("*** ERROR: idx %02x already assigned to a direct "
9125 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9126 printf(" Registered handler '%s' - new handler '%s'\n",
9127 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9132 if (handler
!= NULL
&&
9133 insert_in_table(ind_table(table
[idx1
]), idx2
, handler
) < 0) {
9134 printf("*** ERROR: opcode %02x already assigned in "
9135 "opcode table %02x\n", idx2
, idx1
);
9136 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
9137 printf(" Registered handler '%s' - new handler '%s'\n",
9138 ind_table(table
[idx1
])[idx2
]->oname
, handler
->oname
);
9146 static int register_ind_insn (opc_handler_t
**ppc_opcodes
,
9147 unsigned char idx1
, unsigned char idx2
,
9148 opc_handler_t
*handler
)
9152 ret
= register_ind_in_table(ppc_opcodes
, idx1
, idx2
, handler
);
9157 static int register_dblind_insn (opc_handler_t
**ppc_opcodes
,
9158 unsigned char idx1
, unsigned char idx2
,
9159 unsigned char idx3
, opc_handler_t
*handler
)
9161 if (register_ind_in_table(ppc_opcodes
, idx1
, idx2
, NULL
) < 0) {
9162 printf("*** ERROR: unable to join indirect table idx "
9163 "[%02x-%02x]\n", idx1
, idx2
);
9166 if (register_ind_in_table(ind_table(ppc_opcodes
[idx1
]), idx2
, idx3
,
9168 printf("*** ERROR: unable to insert opcode "
9169 "[%02x-%02x-%02x]\n", idx1
, idx2
, idx3
);
9176 static int register_insn (opc_handler_t
**ppc_opcodes
, opcode_t
*insn
)
9178 if (insn
->opc2
!= 0xFF) {
9179 if (insn
->opc3
!= 0xFF) {
9180 if (register_dblind_insn(ppc_opcodes
, insn
->opc1
, insn
->opc2
,
9181 insn
->opc3
, &insn
->handler
) < 0)
9184 if (register_ind_insn(ppc_opcodes
, insn
->opc1
,
9185 insn
->opc2
, &insn
->handler
) < 0)
9189 if (register_direct_insn(ppc_opcodes
, insn
->opc1
, &insn
->handler
) < 0)
9196 static int test_opcode_table (opc_handler_t
**table
, int len
)
9200 for (i
= 0, count
= 0; i
< len
; i
++) {
9201 /* Consistency fixup */
9202 if (table
[i
] == NULL
)
9203 table
[i
] = &invalid_handler
;
9204 if (table
[i
] != &invalid_handler
) {
9205 if (is_indirect_opcode(table
[i
])) {
9206 tmp
= test_opcode_table(ind_table(table
[i
]), 0x20);
9209 table
[i
] = &invalid_handler
;
9222 static void fix_opcode_tables (opc_handler_t
**ppc_opcodes
)
9224 if (test_opcode_table(ppc_opcodes
, 0x40) == 0)
9225 printf("*** WARNING: no opcode defined !\n");
9228 /*****************************************************************************/
9229 static int create_ppc_opcodes (CPUPPCState
*env
, const ppc_def_t
*def
)
9231 opcode_t
*opc
, *start
, *end
;
9233 fill_new_table(env
->opcodes
, 0x40);
9234 if (&opc_start
< &opc_end
) {
9241 for (opc
= start
+ 1; opc
!= end
; opc
++) {
9242 if ((opc
->handler
.type
& def
->insns_flags
) != 0) {
9243 if (register_insn(env
->opcodes
, opc
) < 0) {
9244 printf("*** ERROR initializing PowerPC instruction "
9245 "0x%02x 0x%02x 0x%02x\n", opc
->opc1
, opc
->opc2
,
9251 fix_opcode_tables(env
->opcodes
);
9258 #if defined(PPC_DUMP_CPU)
9259 static void dump_ppc_insns (CPUPPCState
*env
)
9261 opc_handler_t
**table
, *handler
;
9263 uint8_t opc1
, opc2
, opc3
;
9265 printf("Instructions set:\n");
9266 /* opc1 is 6 bits long */
9267 for (opc1
= 0x00; opc1
< 0x40; opc1
++) {
9268 table
= env
->opcodes
;
9269 handler
= table
[opc1
];
9270 if (is_indirect_opcode(handler
)) {
9271 /* opc2 is 5 bits long */
9272 for (opc2
= 0; opc2
< 0x20; opc2
++) {
9273 table
= env
->opcodes
;
9274 handler
= env
->opcodes
[opc1
];
9275 table
= ind_table(handler
);
9276 handler
= table
[opc2
];
9277 if (is_indirect_opcode(handler
)) {
9278 table
= ind_table(handler
);
9279 /* opc3 is 5 bits long */
9280 for (opc3
= 0; opc3
< 0x20; opc3
++) {
9281 handler
= table
[opc3
];
9282 if (handler
->handler
!= &gen_invalid
) {
9283 /* Special hack to properly dump SPE insns */
9284 p
= strchr(handler
->oname
, '_');
9286 printf("INSN: %02x %02x %02x (%02d %04d) : "
9288 opc1
, opc2
, opc3
, opc1
,
9293 if ((p
- handler
->oname
) != strlen(q
) ||
9294 memcmp(handler
->oname
, q
, strlen(q
)) != 0) {
9295 /* First instruction */
9296 printf("INSN: %02x %02x %02x (%02d %04d) : "
9298 opc1
, opc2
<< 1, opc3
, opc1
,
9299 (opc3
<< 6) | (opc2
<< 1),
9300 (int)(p
- handler
->oname
),
9303 if (strcmp(p
+ 1, q
) != 0) {
9304 /* Second instruction */
9305 printf("INSN: %02x %02x %02x (%02d %04d) : "
9307 opc1
, (opc2
<< 1) | 1, opc3
, opc1
,
9308 (opc3
<< 6) | (opc2
<< 1) | 1,
9315 if (handler
->handler
!= &gen_invalid
) {
9316 printf("INSN: %02x %02x -- (%02d %04d) : %s\n",
9317 opc1
, opc2
, opc1
, opc2
, handler
->oname
);
9322 if (handler
->handler
!= &gen_invalid
) {
9323 printf("INSN: %02x -- -- (%02d ----) : %s\n",
9324 opc1
, opc1
, handler
->oname
);
9331 static int gdb_get_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9334 stfq_p(mem_buf
, env
->fpr
[n
]);
9338 /* FPSCR not implemented */
9339 memset(mem_buf
, 0, 4);
9345 static int gdb_set_float_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9348 env
->fpr
[n
] = ldfq_p(mem_buf
);
9352 /* FPSCR not implemented */
9358 static int gdb_get_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9361 #ifdef WORDS_BIGENDIAN
9362 stq_p(mem_buf
, env
->avr
[n
].u64
[0]);
9363 stq_p(mem_buf
+8, env
->avr
[n
].u64
[1]);
9365 stq_p(mem_buf
, env
->avr
[n
].u64
[1]);
9366 stq_p(mem_buf
+8, env
->avr
[n
].u64
[0]);
9371 stl_p(mem_buf
, env
->vscr
);
9375 stl_p(mem_buf
, (uint32_t)env
->spr
[SPR_VRSAVE
]);
9381 static int gdb_set_avr_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9384 #ifdef WORDS_BIGENDIAN
9385 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
);
9386 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
+8);
9388 env
->avr
[n
].u64
[1] = ldq_p(mem_buf
);
9389 env
->avr
[n
].u64
[0] = ldq_p(mem_buf
+8);
9394 env
->vscr
= ldl_p(mem_buf
);
9398 env
->spr
[SPR_VRSAVE
] = (target_ulong
)ldl_p(mem_buf
);
9404 static int gdb_get_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9407 #if defined(TARGET_PPC64)
9408 stl_p(mem_buf
, env
->gpr
[n
] >> 32);
9410 stl_p(mem_buf
, env
->gprh
[n
]);
9415 stq_p(mem_buf
, env
->spe_acc
);
9419 /* SPEFSCR not implemented */
9420 memset(mem_buf
, 0, 4);
9426 static int gdb_set_spe_reg(CPUState
*env
, uint8_t *mem_buf
, int n
)
9429 #if defined(TARGET_PPC64)
9430 target_ulong lo
= (uint32_t)env
->gpr
[n
];
9431 target_ulong hi
= (target_ulong
)ldl_p(mem_buf
) << 32;
9432 env
->gpr
[n
] = lo
| hi
;
9434 env
->gprh
[n
] = ldl_p(mem_buf
);
9439 env
->spe_acc
= ldq_p(mem_buf
);
9443 /* SPEFSCR not implemented */
9449 int cpu_ppc_register_internal (CPUPPCState
*env
, const ppc_def_t
*def
)
9451 env
->msr_mask
= def
->msr_mask
;
9452 env
->mmu_model
= def
->mmu_model
;
9453 env
->excp_model
= def
->excp_model
;
9454 env
->bus_model
= def
->bus_model
;
9455 env
->flags
= def
->flags
;
9456 env
->bfd_mach
= def
->bfd_mach
;
9457 env
->check_pow
= def
->check_pow
;
9458 if (create_ppc_opcodes(env
, def
) < 0)
9460 init_ppc_proc(env
, def
);
9462 if (def
->insns_flags
& PPC_FLOAT
) {
9463 gdb_register_coprocessor(env
, gdb_get_float_reg
, gdb_set_float_reg
,
9464 33, "power-fpu.xml", 0);
9466 if (def
->insns_flags
& PPC_ALTIVEC
) {
9467 gdb_register_coprocessor(env
, gdb_get_avr_reg
, gdb_set_avr_reg
,
9468 34, "power-altivec.xml", 0);
9470 if (def
->insns_flags
& PPC_SPE
) {
9471 gdb_register_coprocessor(env
, gdb_get_spe_reg
, gdb_set_spe_reg
,
9472 34, "power-spe.xml", 0);
9475 #if defined(PPC_DUMP_CPU)
9477 const char *mmu_model
, *excp_model
, *bus_model
;
9478 switch (env
->mmu_model
) {
9479 case POWERPC_MMU_32B
:
9480 mmu_model
= "PowerPC 32";
9482 case POWERPC_MMU_SOFT_6xx
:
9483 mmu_model
= "PowerPC 6xx/7xx with software driven TLBs";
9485 case POWERPC_MMU_SOFT_74xx
:
9486 mmu_model
= "PowerPC 74xx with software driven TLBs";
9488 case POWERPC_MMU_SOFT_4xx
:
9489 mmu_model
= "PowerPC 4xx with software driven TLBs";
9491 case POWERPC_MMU_SOFT_4xx_Z
:
9492 mmu_model
= "PowerPC 4xx with software driven TLBs "
9493 "and zones protections";
9495 case POWERPC_MMU_REAL
:
9496 mmu_model
= "PowerPC real mode only";
9498 case POWERPC_MMU_MPC8xx
:
9499 mmu_model
= "PowerPC MPC8xx";
9501 case POWERPC_MMU_BOOKE
:
9502 mmu_model
= "PowerPC BookE";
9504 case POWERPC_MMU_BOOKE_FSL
:
9505 mmu_model
= "PowerPC BookE FSL";
9507 case POWERPC_MMU_601
:
9508 mmu_model
= "PowerPC 601";
9510 #if defined (TARGET_PPC64)
9511 case POWERPC_MMU_64B
:
9512 mmu_model
= "PowerPC 64";
9514 case POWERPC_MMU_620
:
9515 mmu_model
= "PowerPC 620";
9519 mmu_model
= "Unknown or invalid";
9522 switch (env
->excp_model
) {
9523 case POWERPC_EXCP_STD
:
9524 excp_model
= "PowerPC";
9526 case POWERPC_EXCP_40x
:
9527 excp_model
= "PowerPC 40x";
9529 case POWERPC_EXCP_601
:
9530 excp_model
= "PowerPC 601";
9532 case POWERPC_EXCP_602
:
9533 excp_model
= "PowerPC 602";
9535 case POWERPC_EXCP_603
:
9536 excp_model
= "PowerPC 603";
9538 case POWERPC_EXCP_603E
:
9539 excp_model
= "PowerPC 603e";
9541 case POWERPC_EXCP_604
:
9542 excp_model
= "PowerPC 604";
9544 case POWERPC_EXCP_7x0
:
9545 excp_model
= "PowerPC 740/750";
9547 case POWERPC_EXCP_7x5
:
9548 excp_model
= "PowerPC 745/755";
9550 case POWERPC_EXCP_74xx
:
9551 excp_model
= "PowerPC 74xx";
9553 case POWERPC_EXCP_BOOKE
:
9554 excp_model
= "PowerPC BookE";
9556 #if defined (TARGET_PPC64)
9557 case POWERPC_EXCP_970
:
9558 excp_model
= "PowerPC 970";
9562 excp_model
= "Unknown or invalid";
9565 switch (env
->bus_model
) {
9566 case PPC_FLAGS_INPUT_6xx
:
9567 bus_model
= "PowerPC 6xx";
9569 case PPC_FLAGS_INPUT_BookE
:
9570 bus_model
= "PowerPC BookE";
9572 case PPC_FLAGS_INPUT_405
:
9573 bus_model
= "PowerPC 405";
9575 case PPC_FLAGS_INPUT_401
:
9576 bus_model
= "PowerPC 401/403";
9578 case PPC_FLAGS_INPUT_RCPU
:
9579 bus_model
= "RCPU / MPC8xx";
9581 #if defined (TARGET_PPC64)
9582 case PPC_FLAGS_INPUT_970
:
9583 bus_model
= "PowerPC 970";
9587 bus_model
= "Unknown or invalid";
9590 printf("PowerPC %-12s : PVR %08x MSR %016" PRIx64
"\n"
9591 " MMU model : %s\n",
9592 def
->name
, def
->pvr
, def
->msr_mask
, mmu_model
);
9593 #if !defined(CONFIG_USER_ONLY)
9594 if (env
->tlb
!= NULL
) {
9595 printf(" %d %s TLB in %d ways\n",
9596 env
->nb_tlb
, env
->id_tlbs
? "splitted" : "merged",
9600 printf(" Exceptions model : %s\n"
9601 " Bus model : %s\n",
9602 excp_model
, bus_model
);
9603 printf(" MSR features :\n");
9604 if (env
->flags
& POWERPC_FLAG_SPE
)
9605 printf(" signal processing engine enable"
9607 else if (env
->flags
& POWERPC_FLAG_VRE
)
9608 printf(" vector processor enable\n");
9609 if (env
->flags
& POWERPC_FLAG_TGPR
)
9610 printf(" temporary GPRs\n");
9611 else if (env
->flags
& POWERPC_FLAG_CE
)
9612 printf(" critical input enable\n");
9613 if (env
->flags
& POWERPC_FLAG_SE
)
9614 printf(" single-step trace mode\n");
9615 else if (env
->flags
& POWERPC_FLAG_DWE
)
9616 printf(" debug wait enable\n");
9617 else if (env
->flags
& POWERPC_FLAG_UBLE
)
9618 printf(" user BTB lock enable\n");
9619 if (env
->flags
& POWERPC_FLAG_BE
)
9620 printf(" branch-step trace mode\n");
9621 else if (env
->flags
& POWERPC_FLAG_DE
)
9622 printf(" debug interrupt enable\n");
9623 if (env
->flags
& POWERPC_FLAG_PX
)
9624 printf(" inclusive protection\n");
9625 else if (env
->flags
& POWERPC_FLAG_PMM
)
9626 printf(" performance monitor mark\n");
9627 if (env
->flags
== POWERPC_FLAG_NONE
)
9629 printf(" Time-base/decrementer clock source: %s\n",
9630 env
->flags
& POWERPC_FLAG_RTC_CLK
? "RTC clock" : "bus clock");
9632 dump_ppc_insns(env
);
9640 static const ppc_def_t
*ppc_find_by_pvr (uint32_t pvr
)
9642 const ppc_def_t
*ret
;
9644 int i
, best
, match
, best_match
, max
;
9647 max
= ARRAY_SIZE(ppc_defs
);
9649 pvr_rev
= pvr
& 0xFFFF;
9650 /* We want all specified bits to match */
9651 best_match
= 32 - ctz32(pvr_rev
);
9652 for (i
= 0; i
< max
; i
++) {
9653 /* We check that the 16 higher bits are the same to ensure the CPU
9654 * model will be the choosen one.
9656 if (((pvr
^ ppc_defs
[i
].pvr
) >> 16) == 0) {
9657 /* We want as much as possible of the low-level 16 bits
9658 * to be the same but we allow inexact matches.
9660 match
= clz32(pvr_rev
^ (ppc_defs
[i
].pvr
& 0xFFFF));
9661 /* We check '>=' instead of '>' because the PPC_defs table
9662 * is ordered by increasing revision.
9663 * Then, we will match the higher revision compatible
9664 * with the requested PVR
9666 if (match
>= best_match
) {
9673 ret
= &ppc_defs
[best
];
9680 const ppc_def_t
*cpu_ppc_find_by_name (const char *name
)
9682 const ppc_def_t
*ret
;
9686 /* Check if the given name is a PVR */
9688 if (len
== 10 && name
[0] == '0' && name
[1] == 'x') {
9691 } else if (len
== 8) {
9694 for (i
= 0; i
< 8; i
++) {
9695 if (!qemu_isxdigit(*p
++))
9699 return ppc_find_by_pvr(strtoul(name
, NULL
, 16));
9702 max
= ARRAY_SIZE(ppc_defs
);
9703 for (i
= 0; i
< max
; i
++) {
9704 if (strcasecmp(name
, ppc_defs
[i
].name
) == 0) {
9713 void ppc_cpu_list (FILE *f
, int (*cpu_fprintf
)(FILE *f
, const char *fmt
, ...))
9717 max
= ARRAY_SIZE(ppc_defs
);
9718 for (i
= 0; i
< max
; i
++) {
9719 (*cpu_fprintf
)(f
, "PowerPC %-16s PVR %08x\n",
9720 ppc_defs
[i
].name
, ppc_defs
[i
].pvr
);