Commit 4018bae91649e8e38e371dc00cb5ac8f9e40089e
1 parent
26553115
New PowerPC CPU flag to define the decrementer and time-base source clock.
Use it to properly initialize the clock for the PreP target. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3701 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
90 additions
and
53 deletions
hw/ppc_prep.c
| @@ -564,8 +564,13 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, | @@ -564,8 +564,13 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, | ||
| 564 | fprintf(stderr, "Unable to find PowerPC CPU definition\n"); | 564 | fprintf(stderr, "Unable to find PowerPC CPU definition\n"); |
| 565 | exit(1); | 565 | exit(1); |
| 566 | } | 566 | } |
| 567 | - /* Set time-base frequency to 100 Mhz */ | ||
| 568 | - cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); | 567 | + if (env->flags & POWERPC_FLAG_RTC_CLK) { |
| 568 | + /* POWER / PowerPC 601 RTC clock frequency is 7.8125 MHz */ | ||
| 569 | + cpu_ppc_tb_init(env, 7812500UL); | ||
| 570 | + } else { | ||
| 571 | + /* Set time-base frequency to 100 Mhz */ | ||
| 572 | + cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); | ||
| 573 | + } | ||
| 569 | qemu_register_reset(&cpu_ppc_reset, env); | 574 | qemu_register_reset(&cpu_ppc_reset, env); |
| 570 | register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); | 575 | register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
| 571 | envs[i] = env; | 576 | envs[i] = env; |
target-ppc/cpu.h
| @@ -441,23 +441,27 @@ union ppc_tlb_t { | @@ -441,23 +441,27 @@ union ppc_tlb_t { | ||
| 441 | #endif | 441 | #endif |
| 442 | 442 | ||
| 443 | enum { | 443 | enum { |
| 444 | - POWERPC_FLAG_NONE = 0x00000000, | 444 | + POWERPC_FLAG_NONE = 0x00000000, |
| 445 | /* Flag for MSR bit 25 signification (VRE/SPE) */ | 445 | /* Flag for MSR bit 25 signification (VRE/SPE) */ |
| 446 | - POWERPC_FLAG_SPE = 0x00000001, | ||
| 447 | - POWERPC_FLAG_VRE = 0x00000002, | 446 | + POWERPC_FLAG_SPE = 0x00000001, |
| 447 | + POWERPC_FLAG_VRE = 0x00000002, | ||
| 448 | /* Flag for MSR bit 17 signification (TGPR/CE) */ | 448 | /* Flag for MSR bit 17 signification (TGPR/CE) */ |
| 449 | - POWERPC_FLAG_TGPR = 0x00000004, | ||
| 450 | - POWERPC_FLAG_CE = 0x00000008, | 449 | + POWERPC_FLAG_TGPR = 0x00000004, |
| 450 | + POWERPC_FLAG_CE = 0x00000008, | ||
| 451 | /* Flag for MSR bit 10 signification (SE/DWE/UBLE) */ | 451 | /* Flag for MSR bit 10 signification (SE/DWE/UBLE) */ |
| 452 | - POWERPC_FLAG_SE = 0x00000010, | ||
| 453 | - POWERPC_FLAG_DWE = 0x00000020, | ||
| 454 | - POWERPC_FLAG_UBLE = 0x00000040, | 452 | + POWERPC_FLAG_SE = 0x00000010, |
| 453 | + POWERPC_FLAG_DWE = 0x00000020, | ||
| 454 | + POWERPC_FLAG_UBLE = 0x00000040, | ||
| 455 | /* Flag for MSR bit 9 signification (BE/DE) */ | 455 | /* Flag for MSR bit 9 signification (BE/DE) */ |
| 456 | - POWERPC_FLAG_BE = 0x00000080, | ||
| 457 | - POWERPC_FLAG_DE = 0x00000100, | 456 | + POWERPC_FLAG_BE = 0x00000080, |
| 457 | + POWERPC_FLAG_DE = 0x00000100, | ||
| 458 | /* Flag for MSR bit 2 signification (PX/PMM) */ | 458 | /* Flag for MSR bit 2 signification (PX/PMM) */ |
| 459 | - POWERPC_FLAG_PX = 0x00000200, | ||
| 460 | - POWERPC_FLAG_PMM = 0x00000400, | 459 | + POWERPC_FLAG_PX = 0x00000200, |
| 460 | + POWERPC_FLAG_PMM = 0x00000400, | ||
| 461 | + /* Flag for special features */ | ||
| 462 | + /* Decrementer clock: RTC clock (POWER, 601) or bus clock */ | ||
| 463 | + POWERPC_FLAG_RTC_CLK = 0x00010000, | ||
| 464 | + POWERPC_FLAG_BUS_CLK = 0x00020000, | ||
| 461 | }; | 465 | }; |
| 462 | 466 | ||
| 463 | /*****************************************************************************/ | 467 | /*****************************************************************************/ |
target-ppc/translate_init.c
| @@ -3000,7 +3000,8 @@ static int check_pow_hid0 (CPUPPCState *env) | @@ -3000,7 +3000,8 @@ static int check_pow_hid0 (CPUPPCState *env) | ||
| 3000 | #define POWERPC_EXCP_401 (POWERPC_EXCP_40x) | 3000 | #define POWERPC_EXCP_401 (POWERPC_EXCP_40x) |
| 3001 | #define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401) | 3001 | #define POWERPC_INPUT_401 (PPC_FLAGS_INPUT_401) |
| 3002 | #define POWERPC_BFDM_401 (bfd_mach_ppc_403) | 3002 | #define POWERPC_BFDM_401 (bfd_mach_ppc_403) |
| 3003 | -#define POWERPC_FLAG_401 (POWERPC_FLAG_CE | POWERPC_FLAG_DE) | 3003 | +#define POWERPC_FLAG_401 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \ |
| 3004 | + POWERPC_FLAG_BUS_CLK) | ||
| 3004 | #define check_pow_401 check_pow_nocheck | 3005 | #define check_pow_401 check_pow_nocheck |
| 3005 | 3006 | ||
| 3006 | static void init_proc_401 (CPUPPCState *env) | 3007 | static void init_proc_401 (CPUPPCState *env) |
| @@ -3026,7 +3027,8 @@ static void init_proc_401 (CPUPPCState *env) | @@ -3026,7 +3027,8 @@ static void init_proc_401 (CPUPPCState *env) | ||
| 3026 | #define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x) | 3027 | #define POWERPC_EXCP_401x2 (POWERPC_EXCP_40x) |
| 3027 | #define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401) | 3028 | #define POWERPC_INPUT_401x2 (PPC_FLAGS_INPUT_401) |
| 3028 | #define POWERPC_BFDM_401x2 (bfd_mach_ppc_403) | 3029 | #define POWERPC_BFDM_401x2 (bfd_mach_ppc_403) |
| 3029 | -#define POWERPC_FLAG_401x2 (POWERPC_FLAG_CE | POWERPC_FLAG_DE) | 3030 | +#define POWERPC_FLAG_401x2 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \ |
| 3031 | + POWERPC_FLAG_BUS_CLK) | ||
| 3030 | #define check_pow_401x2 check_pow_nocheck | 3032 | #define check_pow_401x2 check_pow_nocheck |
| 3031 | 3033 | ||
| 3032 | static void init_proc_401x2 (CPUPPCState *env) | 3034 | static void init_proc_401x2 (CPUPPCState *env) |
| @@ -3059,7 +3061,8 @@ static void init_proc_401x2 (CPUPPCState *env) | @@ -3059,7 +3061,8 @@ static void init_proc_401x2 (CPUPPCState *env) | ||
| 3059 | #define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x) | 3061 | #define POWERPC_EXCP_401x3 (POWERPC_EXCP_40x) |
| 3060 | #define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401) | 3062 | #define POWERPC_INPUT_401x3 (PPC_FLAGS_INPUT_401) |
| 3061 | #define POWERPC_BFDM_401x3 (bfd_mach_ppc_403) | 3063 | #define POWERPC_BFDM_401x3 (bfd_mach_ppc_403) |
| 3062 | -#define POWERPC_FLAG_401x3 (POWERPC_FLAG_CE | POWERPC_FLAG_DE) | 3064 | +#define POWERPC_FLAG_401x3 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \ |
| 3065 | + POWERPC_FLAG_BUS_CLK) | ||
| 3063 | #define check_pow_401x3 check_pow_nocheck | 3066 | #define check_pow_401x3 check_pow_nocheck |
| 3064 | 3067 | ||
| 3065 | __attribute__ (( unused )) | 3068 | __attribute__ (( unused )) |
| @@ -3088,7 +3091,8 @@ static void init_proc_401x3 (CPUPPCState *env) | @@ -3088,7 +3091,8 @@ static void init_proc_401x3 (CPUPPCState *env) | ||
| 3088 | #define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x) | 3091 | #define POWERPC_EXCP_IOP480 (POWERPC_EXCP_40x) |
| 3089 | #define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401) | 3092 | #define POWERPC_INPUT_IOP480 (PPC_FLAGS_INPUT_401) |
| 3090 | #define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403) | 3093 | #define POWERPC_BFDM_IOP480 (bfd_mach_ppc_403) |
| 3091 | -#define POWERPC_FLAG_IOP480 (POWERPC_FLAG_CE | POWERPC_FLAG_DE) | 3094 | +#define POWERPC_FLAG_IOP480 (POWERPC_FLAG_CE | POWERPC_FLAG_DE | \ |
| 3095 | + POWERPC_FLAG_BUS_CLK) | ||
| 3092 | #define check_pow_IOP480 check_pow_nocheck | 3096 | #define check_pow_IOP480 check_pow_nocheck |
| 3093 | 3097 | ||
| 3094 | static void init_proc_IOP480 (CPUPPCState *env) | 3098 | static void init_proc_IOP480 (CPUPPCState *env) |
| @@ -3119,7 +3123,8 @@ static void init_proc_IOP480 (CPUPPCState *env) | @@ -3119,7 +3123,8 @@ static void init_proc_IOP480 (CPUPPCState *env) | ||
| 3119 | #define POWERPC_EXCP_403 (POWERPC_EXCP_40x) | 3123 | #define POWERPC_EXCP_403 (POWERPC_EXCP_40x) |
| 3120 | #define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401) | 3124 | #define POWERPC_INPUT_403 (PPC_FLAGS_INPUT_401) |
| 3121 | #define POWERPC_BFDM_403 (bfd_mach_ppc_403) | 3125 | #define POWERPC_BFDM_403 (bfd_mach_ppc_403) |
| 3122 | -#define POWERPC_FLAG_403 (POWERPC_FLAG_CE | POWERPC_FLAG_PX) | 3126 | +#define POWERPC_FLAG_403 (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \ |
| 3127 | + POWERPC_FLAG_BUS_CLK) | ||
| 3123 | #define check_pow_403 check_pow_nocheck | 3128 | #define check_pow_403 check_pow_nocheck |
| 3124 | 3129 | ||
| 3125 | static void init_proc_403 (CPUPPCState *env) | 3130 | static void init_proc_403 (CPUPPCState *env) |
| @@ -3149,7 +3154,8 @@ static void init_proc_403 (CPUPPCState *env) | @@ -3149,7 +3154,8 @@ static void init_proc_403 (CPUPPCState *env) | ||
| 3149 | #define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x) | 3154 | #define POWERPC_EXCP_403GCX (POWERPC_EXCP_40x) |
| 3150 | #define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401) | 3155 | #define POWERPC_INPUT_403GCX (PPC_FLAGS_INPUT_401) |
| 3151 | #define POWERPC_BFDM_403GCX (bfd_mach_ppc_403) | 3156 | #define POWERPC_BFDM_403GCX (bfd_mach_ppc_403) |
| 3152 | -#define POWERPC_FLAG_403GCX (POWERPC_FLAG_CE | POWERPC_FLAG_PX) | 3157 | +#define POWERPC_FLAG_403GCX (POWERPC_FLAG_CE | POWERPC_FLAG_PX | \ |
| 3158 | + POWERPC_FLAG_BUS_CLK) | ||
| 3153 | #define check_pow_403GCX check_pow_nocheck | 3159 | #define check_pow_403GCX check_pow_nocheck |
| 3154 | 3160 | ||
| 3155 | static void init_proc_403GCX (CPUPPCState *env) | 3161 | static void init_proc_403GCX (CPUPPCState *env) |
| @@ -3196,7 +3202,7 @@ static void init_proc_403GCX (CPUPPCState *env) | @@ -3196,7 +3202,7 @@ static void init_proc_403GCX (CPUPPCState *env) | ||
| 3196 | #define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405) | 3202 | #define POWERPC_INPUT_405 (PPC_FLAGS_INPUT_405) |
| 3197 | #define POWERPC_BFDM_405 (bfd_mach_ppc_403) | 3203 | #define POWERPC_BFDM_405 (bfd_mach_ppc_403) |
| 3198 | #define POWERPC_FLAG_405 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3204 | #define POWERPC_FLAG_405 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3199 | - POWERPC_FLAG_DE) | 3205 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3200 | #define check_pow_405 check_pow_nocheck | 3206 | #define check_pow_405 check_pow_nocheck |
| 3201 | 3207 | ||
| 3202 | static void init_proc_405 (CPUPPCState *env) | 3208 | static void init_proc_405 (CPUPPCState *env) |
| @@ -3240,7 +3246,7 @@ static void init_proc_405 (CPUPPCState *env) | @@ -3240,7 +3246,7 @@ static void init_proc_405 (CPUPPCState *env) | ||
| 3240 | #define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE) | 3246 | #define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE) |
| 3241 | #define POWERPC_BFDM_440EP (bfd_mach_ppc_403) | 3247 | #define POWERPC_BFDM_440EP (bfd_mach_ppc_403) |
| 3242 | #define POWERPC_FLAG_440EP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3248 | #define POWERPC_FLAG_440EP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3243 | - POWERPC_FLAG_DE) | 3249 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3244 | #define check_pow_440EP check_pow_nocheck | 3250 | #define check_pow_440EP check_pow_nocheck |
| 3245 | 3251 | ||
| 3246 | __attribute__ (( unused )) | 3252 | __attribute__ (( unused )) |
| @@ -3318,7 +3324,7 @@ static void init_proc_440EP (CPUPPCState *env) | @@ -3318,7 +3324,7 @@ static void init_proc_440EP (CPUPPCState *env) | ||
| 3318 | #define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE) | 3324 | #define POWERPC_INPUT_440GP (PPC_FLAGS_INPUT_BookE) |
| 3319 | #define POWERPC_BFDM_440GP (bfd_mach_ppc_403) | 3325 | #define POWERPC_BFDM_440GP (bfd_mach_ppc_403) |
| 3320 | #define POWERPC_FLAG_440GP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3326 | #define POWERPC_FLAG_440GP (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3321 | - POWERPC_FLAG_DE) | 3327 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3322 | #define check_pow_440GP check_pow_nocheck | 3328 | #define check_pow_440GP check_pow_nocheck |
| 3323 | 3329 | ||
| 3324 | __attribute__ (( unused )) | 3330 | __attribute__ (( unused )) |
| @@ -3377,7 +3383,7 @@ static void init_proc_440GP (CPUPPCState *env) | @@ -3377,7 +3383,7 @@ static void init_proc_440GP (CPUPPCState *env) | ||
| 3377 | #define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE) | 3383 | #define POWERPC_INPUT_440x4 (PPC_FLAGS_INPUT_BookE) |
| 3378 | #define POWERPC_BFDM_440x4 (bfd_mach_ppc_403) | 3384 | #define POWERPC_BFDM_440x4 (bfd_mach_ppc_403) |
| 3379 | #define POWERPC_FLAG_440x4 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3385 | #define POWERPC_FLAG_440x4 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3380 | - POWERPC_FLAG_DE) | 3386 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3381 | #define check_pow_440x4 check_pow_nocheck | 3387 | #define check_pow_440x4 check_pow_nocheck |
| 3382 | 3388 | ||
| 3383 | __attribute__ (( unused )) | 3389 | __attribute__ (( unused )) |
| @@ -3436,7 +3442,7 @@ static void init_proc_440x4 (CPUPPCState *env) | @@ -3436,7 +3442,7 @@ static void init_proc_440x4 (CPUPPCState *env) | ||
| 3436 | #define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE) | 3442 | #define POWERPC_INPUT_440x5 (PPC_FLAGS_INPUT_BookE) |
| 3437 | #define POWERPC_BFDM_440x5 (bfd_mach_ppc_403) | 3443 | #define POWERPC_BFDM_440x5 (bfd_mach_ppc_403) |
| 3438 | #define POWERPC_FLAG_440x5 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3444 | #define POWERPC_FLAG_440x5 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3439 | - POWERPC_FLAG_DE) | 3445 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3440 | #define check_pow_440x5 check_pow_nocheck | 3446 | #define check_pow_440x5 check_pow_nocheck |
| 3441 | 3447 | ||
| 3442 | __attribute__ (( unused )) | 3448 | __attribute__ (( unused )) |
| @@ -3514,7 +3520,7 @@ static void init_proc_440x5 (CPUPPCState *env) | @@ -3514,7 +3520,7 @@ static void init_proc_440x5 (CPUPPCState *env) | ||
| 3514 | #define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE) | 3520 | #define POWERPC_INPUT_460 (PPC_FLAGS_INPUT_BookE) |
| 3515 | #define POWERPC_BFDM_460 (bfd_mach_ppc_403) | 3521 | #define POWERPC_BFDM_460 (bfd_mach_ppc_403) |
| 3516 | #define POWERPC_FLAG_460 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3522 | #define POWERPC_FLAG_460 (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3517 | - POWERPC_FLAG_DE) | 3523 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3518 | #define check_pow_460 check_pow_nocheck | 3524 | #define check_pow_460 check_pow_nocheck |
| 3519 | 3525 | ||
| 3520 | __attribute__ (( unused )) | 3526 | __attribute__ (( unused )) |
| @@ -3600,7 +3606,7 @@ static void init_proc_460 (CPUPPCState *env) | @@ -3600,7 +3606,7 @@ static void init_proc_460 (CPUPPCState *env) | ||
| 3600 | #define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE) | 3606 | #define POWERPC_INPUT_460F (PPC_FLAGS_INPUT_BookE) |
| 3601 | #define POWERPC_BFDM_460F (bfd_mach_ppc_403) | 3607 | #define POWERPC_BFDM_460F (bfd_mach_ppc_403) |
| 3602 | #define POWERPC_FLAG_460F (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ | 3608 | #define POWERPC_FLAG_460F (POWERPC_FLAG_CE | POWERPC_FLAG_DWE | \ |
| 3603 | - POWERPC_FLAG_DE) | 3609 | + POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK) |
| 3604 | #define check_pow_460F check_pow_nocheck | 3610 | #define check_pow_460F check_pow_nocheck |
| 3605 | 3611 | ||
| 3606 | __attribute__ (( unused )) | 3612 | __attribute__ (( unused )) |
| @@ -3681,7 +3687,8 @@ static void init_proc_460F (CPUPPCState *env) | @@ -3681,7 +3687,8 @@ static void init_proc_460F (CPUPPCState *env) | ||
| 3681 | #define POWERPC_EXCP_MPC5xx (POWERPC_EXCP_603) | 3687 | #define POWERPC_EXCP_MPC5xx (POWERPC_EXCP_603) |
| 3682 | #define POWERPC_INPUT_MPC5xx (PPC_FLAGS_INPUT_RCPU) | 3688 | #define POWERPC_INPUT_MPC5xx (PPC_FLAGS_INPUT_RCPU) |
| 3683 | #define POWERPC_BFDM_MPC5xx (bfd_mach_ppc_505) | 3689 | #define POWERPC_BFDM_MPC5xx (bfd_mach_ppc_505) |
| 3684 | -#define POWERPC_FLAG_MPC5xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE) | 3690 | +#define POWERPC_FLAG_MPC5xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 3691 | + POWERPC_FLAG_BUS_CLK) | ||
| 3685 | #define check_pow_MPC5xx check_pow_none | 3692 | #define check_pow_MPC5xx check_pow_none |
| 3686 | 3693 | ||
| 3687 | __attribute__ (( unused )) | 3694 | __attribute__ (( unused )) |
| @@ -3706,7 +3713,8 @@ static void init_proc_MPC5xx (CPUPPCState *env) | @@ -3706,7 +3713,8 @@ static void init_proc_MPC5xx (CPUPPCState *env) | ||
| 3706 | #define POWERPC_EXCP_MPC8xx (POWERPC_EXCP_603) | 3713 | #define POWERPC_EXCP_MPC8xx (POWERPC_EXCP_603) |
| 3707 | #define POWERPC_INPUT_MPC8xx (PPC_FLAGS_INPUT_RCPU) | 3714 | #define POWERPC_INPUT_MPC8xx (PPC_FLAGS_INPUT_RCPU) |
| 3708 | #define POWERPC_BFDM_MPC8xx (bfd_mach_ppc_860) | 3715 | #define POWERPC_BFDM_MPC8xx (bfd_mach_ppc_860) |
| 3709 | -#define POWERPC_FLAG_MPC8xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE) | 3716 | +#define POWERPC_FLAG_MPC8xx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 3717 | + POWERPC_FLAG_BUS_CLK) | ||
| 3710 | #define check_pow_MPC8xx check_pow_none | 3718 | #define check_pow_MPC8xx check_pow_none |
| 3711 | 3719 | ||
| 3712 | __attribute__ (( unused )) | 3720 | __attribute__ (( unused )) |
| @@ -3731,7 +3739,7 @@ static void init_proc_MPC8xx (CPUPPCState *env) | @@ -3731,7 +3739,7 @@ static void init_proc_MPC8xx (CPUPPCState *env) | ||
| 3731 | #define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx) | 3739 | #define POWERPC_INPUT_G2 (PPC_FLAGS_INPUT_6xx) |
| 3732 | #define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e) | 3740 | #define POWERPC_BFDM_G2 (bfd_mach_ppc_ec603e) |
| 3733 | #define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 3741 | #define POWERPC_FLAG_G2 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 3734 | - POWERPC_FLAG_BE) | 3742 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 3735 | #define check_pow_G2 check_pow_hid0 | 3743 | #define check_pow_G2 check_pow_hid0 |
| 3736 | 3744 | ||
| 3737 | static void init_proc_G2 (CPUPPCState *env) | 3745 | static void init_proc_G2 (CPUPPCState *env) |
| @@ -3776,7 +3784,7 @@ static void init_proc_G2 (CPUPPCState *env) | @@ -3776,7 +3784,7 @@ static void init_proc_G2 (CPUPPCState *env) | ||
| 3776 | #define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx) | 3784 | #define POWERPC_INPUT_G2LE (PPC_FLAGS_INPUT_6xx) |
| 3777 | #define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e) | 3785 | #define POWERPC_BFDM_G2LE (bfd_mach_ppc_ec603e) |
| 3778 | #define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 3786 | #define POWERPC_FLAG_G2LE (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 3779 | - POWERPC_FLAG_BE) | 3787 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 3780 | #define check_pow_G2LE check_pow_hid0 | 3788 | #define check_pow_G2LE check_pow_hid0 |
| 3781 | 3789 | ||
| 3782 | static void init_proc_G2LE (CPUPPCState *env) | 3790 | static void init_proc_G2LE (CPUPPCState *env) |
| @@ -3834,7 +3842,8 @@ static void init_proc_G2LE (CPUPPCState *env) | @@ -3834,7 +3842,8 @@ static void init_proc_G2LE (CPUPPCState *env) | ||
| 3834 | #define POWERPC_INPUT_e200 (PPC_FLAGS_INPUT_BookE) | 3842 | #define POWERPC_INPUT_e200 (PPC_FLAGS_INPUT_BookE) |
| 3835 | #define POWERPC_BFDM_e200 (bfd_mach_ppc_860) | 3843 | #define POWERPC_BFDM_e200 (bfd_mach_ppc_860) |
| 3836 | #define POWERPC_FLAG_e200 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \ | 3844 | #define POWERPC_FLAG_e200 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \ |
| 3837 | - POWERPC_FLAG_UBLE | POWERPC_FLAG_DE) | 3845 | + POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \ |
| 3846 | + POWERPC_FLAG_BUS_CLK) | ||
| 3838 | #define check_pow_e200 check_pow_hid0 | 3847 | #define check_pow_e200 check_pow_hid0 |
| 3839 | 3848 | ||
| 3840 | __attribute__ (( unused )) | 3849 | __attribute__ (( unused )) |
| @@ -3947,7 +3956,7 @@ static void init_proc_e200 (CPUPPCState *env) | @@ -3947,7 +3956,7 @@ static void init_proc_e200 (CPUPPCState *env) | ||
| 3947 | #define POWERPC_INPUT_e300 (PPC_FLAGS_INPUT_6xx) | 3956 | #define POWERPC_INPUT_e300 (PPC_FLAGS_INPUT_6xx) |
| 3948 | #define POWERPC_BFDM_e300 (bfd_mach_ppc_603) | 3957 | #define POWERPC_BFDM_e300 (bfd_mach_ppc_603) |
| 3949 | #define POWERPC_FLAG_e300 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 3958 | #define POWERPC_FLAG_e300 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 3950 | - POWERPC_FLAG_BE) | 3959 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 3951 | #define check_pow_e300 check_pow_hid0 | 3960 | #define check_pow_e300 check_pow_hid0 |
| 3952 | 3961 | ||
| 3953 | __attribute__ (( unused )) | 3962 | __attribute__ (( unused )) |
| @@ -3990,7 +3999,8 @@ static void init_proc_e300 (CPUPPCState *env) | @@ -3990,7 +3999,8 @@ static void init_proc_e300 (CPUPPCState *env) | ||
| 3990 | #define POWERPC_INPUT_e500 (PPC_FLAGS_INPUT_BookE) | 3999 | #define POWERPC_INPUT_e500 (PPC_FLAGS_INPUT_BookE) |
| 3991 | #define POWERPC_BFDM_e500 (bfd_mach_ppc_860) | 4000 | #define POWERPC_BFDM_e500 (bfd_mach_ppc_860) |
| 3992 | #define POWERPC_FLAG_e500 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \ | 4001 | #define POWERPC_FLAG_e500 (POWERPC_FLAG_SPE | POWERPC_FLAG_CE | \ |
| 3993 | - POWERPC_FLAG_UBLE | POWERPC_FLAG_DE) | 4002 | + POWERPC_FLAG_UBLE | POWERPC_FLAG_DE | \ |
| 4003 | + POWERPC_FLAG_BUS_CLK) | ||
| 3994 | #define check_pow_e500 check_pow_hid0 | 4004 | #define check_pow_e500 check_pow_hid0 |
| 3995 | 4005 | ||
| 3996 | __attribute__ (( unused )) | 4006 | __attribute__ (( unused )) |
| @@ -4125,7 +4135,7 @@ static void init_proc_e500 (CPUPPCState *env) | @@ -4125,7 +4135,7 @@ static void init_proc_e500 (CPUPPCState *env) | ||
| 4125 | //#define POWERPC_EXCP_601 (POWERPC_EXCP_601) | 4135 | //#define POWERPC_EXCP_601 (POWERPC_EXCP_601) |
| 4126 | #define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx) | 4136 | #define POWERPC_INPUT_601 (PPC_FLAGS_INPUT_6xx) |
| 4127 | #define POWERPC_BFDM_601 (bfd_mach_ppc_601) | 4137 | #define POWERPC_BFDM_601 (bfd_mach_ppc_601) |
| 4128 | -#define POWERPC_FLAG_601 (POWERPC_FLAG_SE) | 4138 | +#define POWERPC_FLAG_601 (POWERPC_FLAG_SE | POWERPC_FLAG_RTC_CLK) |
| 4129 | #define check_pow_601 check_pow_none | 4139 | #define check_pow_601 check_pow_none |
| 4130 | 4140 | ||
| 4131 | static void init_proc_601 (CPUPPCState *env) | 4141 | static void init_proc_601 (CPUPPCState *env) |
| @@ -4183,7 +4193,7 @@ static void init_proc_601 (CPUPPCState *env) | @@ -4183,7 +4193,7 @@ static void init_proc_601 (CPUPPCState *env) | ||
| 4183 | #define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx) | 4193 | #define POWERPC_INPUT_602 (PPC_FLAGS_INPUT_6xx) |
| 4184 | #define POWERPC_BFDM_602 (bfd_mach_ppc_602) | 4194 | #define POWERPC_BFDM_602 (bfd_mach_ppc_602) |
| 4185 | #define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 4195 | #define POWERPC_FLAG_602 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 4186 | - POWERPC_FLAG_BE) | 4196 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 4187 | #define check_pow_602 check_pow_hid0 | 4197 | #define check_pow_602 check_pow_hid0 |
| 4188 | 4198 | ||
| 4189 | static void init_proc_602 (CPUPPCState *env) | 4199 | static void init_proc_602 (CPUPPCState *env) |
| @@ -4221,7 +4231,7 @@ static void init_proc_602 (CPUPPCState *env) | @@ -4221,7 +4231,7 @@ static void init_proc_602 (CPUPPCState *env) | ||
| 4221 | #define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx) | 4231 | #define POWERPC_INPUT_603 (PPC_FLAGS_INPUT_6xx) |
| 4222 | #define POWERPC_BFDM_603 (bfd_mach_ppc_603) | 4232 | #define POWERPC_BFDM_603 (bfd_mach_ppc_603) |
| 4223 | #define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 4233 | #define POWERPC_FLAG_603 (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 4224 | - POWERPC_FLAG_BE) | 4234 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 4225 | #define check_pow_603 check_pow_hid0 | 4235 | #define check_pow_603 check_pow_hid0 |
| 4226 | 4236 | ||
| 4227 | static void init_proc_603 (CPUPPCState *env) | 4237 | static void init_proc_603 (CPUPPCState *env) |
| @@ -4259,7 +4269,7 @@ static void init_proc_603 (CPUPPCState *env) | @@ -4259,7 +4269,7 @@ static void init_proc_603 (CPUPPCState *env) | ||
| 4259 | #define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx) | 4269 | #define POWERPC_INPUT_603E (PPC_FLAGS_INPUT_6xx) |
| 4260 | #define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e) | 4270 | #define POWERPC_BFDM_603E (bfd_mach_ppc_ec603e) |
| 4261 | #define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ | 4271 | #define POWERPC_FLAG_603E (POWERPC_FLAG_TGPR | POWERPC_FLAG_SE | \ |
| 4262 | - POWERPC_FLAG_BE) | 4272 | + POWERPC_FLAG_BE | POWERPC_FLAG_BUS_CLK) |
| 4263 | #define check_pow_603E check_pow_hid0 | 4273 | #define check_pow_603E check_pow_hid0 |
| 4264 | 4274 | ||
| 4265 | static void init_proc_603E (CPUPPCState *env) | 4275 | static void init_proc_603E (CPUPPCState *env) |
| @@ -4302,7 +4312,7 @@ static void init_proc_603E (CPUPPCState *env) | @@ -4302,7 +4312,7 @@ static void init_proc_603E (CPUPPCState *env) | ||
| 4302 | #define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx) | 4312 | #define POWERPC_INPUT_604 (PPC_FLAGS_INPUT_6xx) |
| 4303 | #define POWERPC_BFDM_604 (bfd_mach_ppc_604) | 4313 | #define POWERPC_BFDM_604 (bfd_mach_ppc_604) |
| 4304 | #define POWERPC_FLAG_604 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ | 4314 | #define POWERPC_FLAG_604 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 4305 | - POWERPC_FLAG_PMM) | 4315 | + POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK) |
| 4306 | #define check_pow_604 check_pow_nocheck | 4316 | #define check_pow_604 check_pow_nocheck |
| 4307 | 4317 | ||
| 4308 | static void init_proc_604 (CPUPPCState *env) | 4318 | static void init_proc_604 (CPUPPCState *env) |
| @@ -4339,7 +4349,7 @@ static void init_proc_604 (CPUPPCState *env) | @@ -4339,7 +4349,7 @@ static void init_proc_604 (CPUPPCState *env) | ||
| 4339 | #define POWERPC_INPUT_7x0 (PPC_FLAGS_INPUT_6xx) | 4349 | #define POWERPC_INPUT_7x0 (PPC_FLAGS_INPUT_6xx) |
| 4340 | #define POWERPC_BFDM_7x0 (bfd_mach_ppc_750) | 4350 | #define POWERPC_BFDM_7x0 (bfd_mach_ppc_750) |
| 4341 | #define POWERPC_FLAG_7x0 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ | 4351 | #define POWERPC_FLAG_7x0 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 4342 | - POWERPC_FLAG_PMM) | 4352 | + POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK) |
| 4343 | #define check_pow_7x0 check_pow_hid0 | 4353 | #define check_pow_7x0 check_pow_hid0 |
| 4344 | 4354 | ||
| 4345 | static void init_proc_7x0 (CPUPPCState *env) | 4355 | static void init_proc_7x0 (CPUPPCState *env) |
| @@ -4378,7 +4388,7 @@ static void init_proc_7x0 (CPUPPCState *env) | @@ -4378,7 +4388,7 @@ static void init_proc_7x0 (CPUPPCState *env) | ||
| 4378 | #define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx) | 4388 | #define POWERPC_INPUT_750fx (PPC_FLAGS_INPUT_6xx) |
| 4379 | #define POWERPC_BFDM_750fx (bfd_mach_ppc_750) | 4389 | #define POWERPC_BFDM_750fx (bfd_mach_ppc_750) |
| 4380 | #define POWERPC_FLAG_750fx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ | 4390 | #define POWERPC_FLAG_750fx (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 4381 | - POWERPC_FLAG_PMM) | 4391 | + POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK) |
| 4382 | #define check_pow_750fx check_pow_hid0 | 4392 | #define check_pow_750fx check_pow_hid0 |
| 4383 | 4393 | ||
| 4384 | static void init_proc_750fx (CPUPPCState *env) | 4394 | static void init_proc_750fx (CPUPPCState *env) |
| @@ -4424,7 +4434,7 @@ static void init_proc_750fx (CPUPPCState *env) | @@ -4424,7 +4434,7 @@ static void init_proc_750fx (CPUPPCState *env) | ||
| 4424 | #define POWERPC_INPUT_7x5 (PPC_FLAGS_INPUT_6xx) | 4434 | #define POWERPC_INPUT_7x5 (PPC_FLAGS_INPUT_6xx) |
| 4425 | #define POWERPC_BFDM_7x5 (bfd_mach_ppc_750) | 4435 | #define POWERPC_BFDM_7x5 (bfd_mach_ppc_750) |
| 4426 | #define POWERPC_FLAG_7x5 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ | 4436 | #define POWERPC_FLAG_7x5 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 4427 | - POWERPC_FLAG_PMM) | 4437 | + POWERPC_FLAG_PMM | POWERPC_FLAG_BUS_CLK) |
| 4428 | #define check_pow_7x5 check_pow_hid0 | 4438 | #define check_pow_7x5 check_pow_hid0 |
| 4429 | 4439 | ||
| 4430 | static void init_proc_7x5 (CPUPPCState *env) | 4440 | static void init_proc_7x5 (CPUPPCState *env) |
| @@ -4485,7 +4495,8 @@ static void init_proc_7x5 (CPUPPCState *env) | @@ -4485,7 +4495,8 @@ static void init_proc_7x5 (CPUPPCState *env) | ||
| 4485 | #define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx) | 4495 | #define POWERPC_INPUT_7400 (PPC_FLAGS_INPUT_6xx) |
| 4486 | #define POWERPC_BFDM_7400 (bfd_mach_ppc_7400) | 4496 | #define POWERPC_BFDM_7400 (bfd_mach_ppc_7400) |
| 4487 | #define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4497 | #define POWERPC_FLAG_7400 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4488 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4498 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4499 | + POWERPC_FLAG_BUS_CLK) | ||
| 4489 | #define check_pow_7400 check_pow_hid0 | 4500 | #define check_pow_7400 check_pow_hid0 |
| 4490 | 4501 | ||
| 4491 | static void init_proc_7400 (CPUPPCState *env) | 4502 | static void init_proc_7400 (CPUPPCState *env) |
| @@ -4517,7 +4528,8 @@ static void init_proc_7400 (CPUPPCState *env) | @@ -4517,7 +4528,8 @@ static void init_proc_7400 (CPUPPCState *env) | ||
| 4517 | #define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx) | 4528 | #define POWERPC_INPUT_7410 (PPC_FLAGS_INPUT_6xx) |
| 4518 | #define POWERPC_BFDM_7410 (bfd_mach_ppc_7400) | 4529 | #define POWERPC_BFDM_7410 (bfd_mach_ppc_7400) |
| 4519 | #define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4530 | #define POWERPC_FLAG_7410 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4520 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4531 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4532 | + POWERPC_FLAG_BUS_CLK) | ||
| 4521 | #define check_pow_7410 check_pow_hid0 | 4533 | #define check_pow_7410 check_pow_hid0 |
| 4522 | 4534 | ||
| 4523 | static void init_proc_7410 (CPUPPCState *env) | 4535 | static void init_proc_7410 (CPUPPCState *env) |
| @@ -4561,7 +4573,8 @@ static void init_proc_7410 (CPUPPCState *env) | @@ -4561,7 +4573,8 @@ static void init_proc_7410 (CPUPPCState *env) | ||
| 4561 | #define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx) | 4573 | #define POWERPC_INPUT_7440 (PPC_FLAGS_INPUT_6xx) |
| 4562 | #define POWERPC_BFDM_7440 (bfd_mach_ppc_7400) | 4574 | #define POWERPC_BFDM_7440 (bfd_mach_ppc_7400) |
| 4563 | #define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4575 | #define POWERPC_FLAG_7440 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4564 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4576 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4577 | + POWERPC_FLAG_BUS_CLK) | ||
| 4565 | #define check_pow_7440 check_pow_hid0 | 4578 | #define check_pow_7440 check_pow_hid0 |
| 4566 | 4579 | ||
| 4567 | __attribute__ (( unused )) | 4580 | __attribute__ (( unused )) |
| @@ -4632,7 +4645,8 @@ static void init_proc_7440 (CPUPPCState *env) | @@ -4632,7 +4645,8 @@ static void init_proc_7440 (CPUPPCState *env) | ||
| 4632 | #define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx) | 4645 | #define POWERPC_INPUT_7450 (PPC_FLAGS_INPUT_6xx) |
| 4633 | #define POWERPC_BFDM_7450 (bfd_mach_ppc_7400) | 4646 | #define POWERPC_BFDM_7450 (bfd_mach_ppc_7400) |
| 4634 | #define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4647 | #define POWERPC_FLAG_7450 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4635 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4648 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4649 | + POWERPC_FLAG_BUS_CLK) | ||
| 4636 | #define check_pow_7450 check_pow_hid0 | 4650 | #define check_pow_7450 check_pow_hid0 |
| 4637 | 4651 | ||
| 4638 | __attribute__ (( unused )) | 4652 | __attribute__ (( unused )) |
| @@ -4705,7 +4719,8 @@ static void init_proc_7450 (CPUPPCState *env) | @@ -4705,7 +4719,8 @@ static void init_proc_7450 (CPUPPCState *env) | ||
| 4705 | #define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx) | 4719 | #define POWERPC_INPUT_7445 (PPC_FLAGS_INPUT_6xx) |
| 4706 | #define POWERPC_BFDM_7445 (bfd_mach_ppc_7400) | 4720 | #define POWERPC_BFDM_7445 (bfd_mach_ppc_7400) |
| 4707 | #define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4721 | #define POWERPC_FLAG_7445 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4708 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4722 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4723 | + POWERPC_FLAG_BUS_CLK) | ||
| 4709 | #define check_pow_7445 check_pow_hid0 | 4724 | #define check_pow_7445 check_pow_hid0 |
| 4710 | 4725 | ||
| 4711 | __attribute__ (( unused )) | 4726 | __attribute__ (( unused )) |
| @@ -4810,7 +4825,8 @@ static void init_proc_7445 (CPUPPCState *env) | @@ -4810,7 +4825,8 @@ static void init_proc_7445 (CPUPPCState *env) | ||
| 4810 | #define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx) | 4825 | #define POWERPC_INPUT_7455 (PPC_FLAGS_INPUT_6xx) |
| 4811 | #define POWERPC_BFDM_7455 (bfd_mach_ppc_7400) | 4826 | #define POWERPC_BFDM_7455 (bfd_mach_ppc_7400) |
| 4812 | #define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4827 | #define POWERPC_FLAG_7455 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4813 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4828 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4829 | + POWERPC_FLAG_BUS_CLK) | ||
| 4814 | #define check_pow_7455 check_pow_hid0 | 4830 | #define check_pow_7455 check_pow_hid0 |
| 4815 | 4831 | ||
| 4816 | __attribute__ (( unused )) | 4832 | __attribute__ (( unused )) |
| @@ -4922,7 +4938,8 @@ static void init_proc_7455 (CPUPPCState *env) | @@ -4922,7 +4938,8 @@ static void init_proc_7455 (CPUPPCState *env) | ||
| 4922 | #define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970) | 4938 | #define POWERPC_INPUT_970 (PPC_FLAGS_INPUT_970) |
| 4923 | #define POWERPC_BFDM_970 (bfd_mach_ppc64) | 4939 | #define POWERPC_BFDM_970 (bfd_mach_ppc64) |
| 4924 | #define POWERPC_FLAG_970 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 4940 | #define POWERPC_FLAG_970 (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 4925 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 4941 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 4942 | + POWERPC_FLAG_BUS_CLK) | ||
| 4926 | 4943 | ||
| 4927 | #if defined(CONFIG_USER_ONLY) | 4944 | #if defined(CONFIG_USER_ONLY) |
| 4928 | #define POWERPC970_HID5_INIT 0x00000080 | 4945 | #define POWERPC970_HID5_INIT 0x00000080 |
| @@ -5002,7 +5019,8 @@ static void init_proc_970 (CPUPPCState *env) | @@ -5002,7 +5019,8 @@ static void init_proc_970 (CPUPPCState *env) | ||
| 5002 | #define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970) | 5019 | #define POWERPC_INPUT_970FX (PPC_FLAGS_INPUT_970) |
| 5003 | #define POWERPC_BFDM_970FX (bfd_mach_ppc64) | 5020 | #define POWERPC_BFDM_970FX (bfd_mach_ppc64) |
| 5004 | #define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 5021 | #define POWERPC_FLAG_970FX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 5005 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 5022 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 5023 | + POWERPC_FLAG_BUS_CLK) | ||
| 5006 | 5024 | ||
| 5007 | static int check_pow_970FX (CPUPPCState *env) | 5025 | static int check_pow_970FX (CPUPPCState *env) |
| 5008 | { | 5026 | { |
| @@ -5076,7 +5094,8 @@ static void init_proc_970FX (CPUPPCState *env) | @@ -5076,7 +5094,8 @@ static void init_proc_970FX (CPUPPCState *env) | ||
| 5076 | #define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970) | 5094 | #define POWERPC_INPUT_970GX (PPC_FLAGS_INPUT_970) |
| 5077 | #define POWERPC_BFDM_970GX (bfd_mach_ppc64) | 5095 | #define POWERPC_BFDM_970GX (bfd_mach_ppc64) |
| 5078 | #define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 5096 | #define POWERPC_FLAG_970GX (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 5079 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 5097 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 5098 | + POWERPC_FLAG_BUS_CLK) | ||
| 5080 | 5099 | ||
| 5081 | static int check_pow_970GX (CPUPPCState *env) | 5100 | static int check_pow_970GX (CPUPPCState *env) |
| 5082 | { | 5101 | { |
| @@ -5150,7 +5169,8 @@ static void init_proc_970GX (CPUPPCState *env) | @@ -5150,7 +5169,8 @@ static void init_proc_970GX (CPUPPCState *env) | ||
| 5150 | #define POWERPC_INPUT_970MP (PPC_FLAGS_INPUT_970) | 5169 | #define POWERPC_INPUT_970MP (PPC_FLAGS_INPUT_970) |
| 5151 | #define POWERPC_BFDM_970MP (bfd_mach_ppc64) | 5170 | #define POWERPC_BFDM_970MP (bfd_mach_ppc64) |
| 5152 | #define POWERPC_FLAG_970MP (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ | 5171 | #define POWERPC_FLAG_970MP (POWERPC_FLAG_VRE | POWERPC_FLAG_SE | \ |
| 5153 | - POWERPC_FLAG_BE | POWERPC_FLAG_PMM) | 5172 | + POWERPC_FLAG_BE | POWERPC_FLAG_PMM | \ |
| 5173 | + POWERPC_FLAG_BUS_CLK) | ||
| 5154 | 5174 | ||
| 5155 | static int check_pow_970MP (CPUPPCState *env) | 5175 | static int check_pow_970MP (CPUPPCState *env) |
| 5156 | { | 5176 | { |
| @@ -5222,7 +5242,8 @@ static void init_proc_970MP (CPUPPCState *env) | @@ -5222,7 +5242,8 @@ static void init_proc_970MP (CPUPPCState *env) | ||
| 5222 | #define POWERPC_EXCP_620 (POWERPC_EXCP_970) | 5242 | #define POWERPC_EXCP_620 (POWERPC_EXCP_970) |
| 5223 | #define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_6xx) | 5243 | #define POWERPC_INPUT_620 (PPC_FLAGS_INPUT_6xx) |
| 5224 | #define POWERPC_BFDM_620 (bfd_mach_ppc64) | 5244 | #define POWERPC_BFDM_620 (bfd_mach_ppc64) |
| 5225 | -#define POWERPC_FLAG_620 (POWERPC_FLAG_SE | POWERPC_FLAG_BE) | 5245 | +#define POWERPC_FLAG_620 (POWERPC_FLAG_SE | POWERPC_FLAG_BE | \ |
| 5246 | + POWERPC_FLAG_BUS_CLK) | ||
| 5226 | #define check_pow_620 check_pow_nocheck /* Check this */ | 5247 | #define check_pow_620 check_pow_nocheck /* Check this */ |
| 5227 | 5248 | ||
| 5228 | __attribute__ (( unused )) | 5249 | __attribute__ (( unused )) |
| @@ -7883,6 +7904,11 @@ static void init_ppc_proc (CPUPPCState *env, const ppc_def_t *def) | @@ -7883,6 +7904,11 @@ static void init_ppc_proc (CPUPPCState *env, const ppc_def_t *def) | ||
| 7883 | "Should not define POWERPC_FLAG_PX nor POWERPC_FLAG_PMM\n"); | 7904 | "Should not define POWERPC_FLAG_PX nor POWERPC_FLAG_PMM\n"); |
| 7884 | exit(1); | 7905 | exit(1); |
| 7885 | } | 7906 | } |
| 7907 | + if ((env->flags & (POWERPC_FLAG_RTC_CLK | POWERPC_FLAG_BUS_CLK)) == 0) { | ||
| 7908 | + fprintf(stderr, "PowerPC flags inconsistency\n" | ||
| 7909 | + "Should define the time-base and decrementer clock source\n"); | ||
| 7910 | + exit(1); | ||
| 7911 | + } | ||
| 7886 | /* Allocate TLBs buffer when needed */ | 7912 | /* Allocate TLBs buffer when needed */ |
| 7887 | #if !defined(CONFIG_USER_ONLY) | 7913 | #if !defined(CONFIG_USER_ONLY) |
| 7888 | if (env->nb_tlb != 0) { | 7914 | if (env->nb_tlb != 0) { |
| @@ -8399,6 +8425,8 @@ int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def) | @@ -8399,6 +8425,8 @@ int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def) | ||
| 8399 | printf(" performance monitor mark\n"); | 8425 | printf(" performance monitor mark\n"); |
| 8400 | if (env->flags == POWERPC_FLAG_NONE) | 8426 | if (env->flags == POWERPC_FLAG_NONE) |
| 8401 | printf(" none\n"); | 8427 | printf(" none\n"); |
| 8428 | + printf(" Time-base/decrementer clock source: %s\n", | ||
| 8429 | + env->flags & POWERPC_FLAG_RTC_CLK ? "RTC clock" : "bus clock"); | ||
| 8402 | } | 8430 | } |
| 8403 | dump_ppc_insns(env); | 8431 | dump_ppc_insns(env); |
| 8404 | dump_ppc_sprs(env); | 8432 | dump_ppc_sprs(env); |