#include "misc.h"
Go to the source code of this file.
Classes | |
struct | ppc_cpu_type_def |
struct | ppc_cpu |
Macros | |
#define | MODE_PPC 0 |
#define | MODE_POWER 1 |
#define | PPC_NOFP 1 |
#define | PPC_601 2 |
#define | PPC_603 4 |
#define | PPC_NO_DEC 8 /* No DEC (decrementer) SPR */ |
#define | PPC_CPU_TYPE_DEFS |
#define | PPC_NGPRS 32 |
#define | PPC_NFPRS 32 |
#define | PPC_NVRS 32 |
#define | PPC_N_TGPRS 4 |
#define | PPC_N_IC_ARGS 3 |
#define | PPC_INSTR_ALIGNMENT_SHIFT 2 |
#define | PPC_IC_ENTRIES_SHIFT 10 |
#define | PPC_IC_ENTRIES_PER_PAGE (1 << PPC_IC_ENTRIES_SHIFT) |
#define | PPC_PC_TO_IC_ENTRY(a) |
#define | PPC_ADDR_TO_PAGENR(a) |
#define | PPC_L2N 17 |
#define | PPC_L3N 18 |
#define | PPC_MAX_VPH_TLB_ENTRIES 128 |
#define | PPC_MSR_SF (1ULL << 63) /* Sixty-Four-Bit Mode */ |
#define | PPC_MSR_HV (1ULL << 60) /* Hypervisor */ |
#define | PPC_MSR_VEC (1 << 25) /* Altivec Enable */ |
#define | PPC_MSR_TGPR (1 << 17) /* Temporary gpr0..3 */ |
#define | PPC_MSR_ILE (1 << 16) /* Interrupt Little-Endian Mode */ |
#define | PPC_MSR_EE (1 << 15) /* External Interrupt Enable */ |
#define | PPC_MSR_PR (1 << 14) /* Problem/Privilege State */ |
#define | PPC_MSR_FP (1 << 13) /* Floating-Point Available */ |
#define | PPC_MSR_ME (1 << 12) /* Machine Check Interrupt Enable */ |
#define | PPC_MSR_FE0 (1 << 11) /* Floating-Point Exception Mode 0 */ |
#define | PPC_MSR_SE (1 << 10) /* Single-Step Trace Enable */ |
#define | PPC_MSR_BE (1 << 9) /* Branch Trace Enable */ |
#define | PPC_MSR_FE1 (1 << 8) /* Floating-Point Exception Mode 1 */ |
#define | PPC_MSR_IP (1 << 6) /* Vector Table at 0xfff00000 */ |
#define | PPC_MSR_IR (1 << 5) /* Instruction Relocate */ |
#define | PPC_MSR_DR (1 << 4) /* Data Relocate */ |
#define | PPC_MSR_PMM (1 << 2) /* Performance Monitor Mark */ |
#define | PPC_MSR_RI (1 << 1) /* Recoverable Interrupt */ |
#define | PPC_MSR_LE (1) /* Little-Endian Mode */ |
#define | PPC_FPSCR_FX (1 << 31) /* Exception summary */ |
#define | PPC_FPSCR_FEX (1 << 30) /* Enabled Exception summary */ |
#define | PPC_FPSCR_VX (1 << 29) /* Invalid Operation summary */ |
#define | PPC_FPSCR_VXNAN (1 << 24) |
#define | PPC_FPSCR_FPCC 0x0000f000 |
#define | PPC_FPSCR_FPCC_SHIFT 12 |
#define | PPC_FPSCR_FL (1 << 15) /* Less than */ |
#define | PPC_FPSCR_FG (1 << 14) /* Greater than */ |
#define | PPC_FPSCR_FE (1 << 13) /* Equal or Zero */ |
#define | PPC_FPSCR_FU (1 << 12) /* Unordered or NaN */ |
#define | PPC_EXCEPTION_DSI 0x3 /* Data Storage Interrupt */ |
#define | PPC_EXCEPTION_ISI 0x4 /* Instruction Storage Interrupt */ |
#define | PPC_EXCEPTION_EI 0x5 /* External interrupt */ |
#define | PPC_EXCEPTION_FPU 0x8 /* Floating-Point unavailable */ |
#define | PPC_EXCEPTION_DEC 0x9 /* Decrementer */ |
#define | PPC_EXCEPTION_SC 0xc /* Syscall */ |
#define | PPC_XER_SO (1UL << 31) /* Summary Overflow */ |
#define | PPC_XER_OV (1 << 30) /* Overflow */ |
#define | PPC_XER_CA (1 << 29) /* Carry */ |
Functions | |
int | ppc_run_instr (struct cpu *cpu) |
int | ppc32_run_instr (struct cpu *cpu) |
void | ppc_exception (struct cpu *cpu, int exception_nr) |
void | ppc_update_translation_table (struct cpu *cpu, uint64_t vaddr_page, unsigned char *host_page, int writeflag, uint64_t paddr_page) |
void | ppc32_update_translation_table (struct cpu *cpu, uint64_t vaddr_page, unsigned char *host_page, int writeflag, uint64_t paddr_page) |
void | ppc_invalidate_translation_caches (struct cpu *cpu, uint64_t, int) |
void | ppc32_invalidate_translation_caches (struct cpu *cpu, uint64_t, int) |
void | ppc_invalidate_code_translation (struct cpu *cpu, uint64_t, int) |
void | ppc32_invalidate_code_translation (struct cpu *cpu, uint64_t, int) |
void | ppc_init_64bit_dummy_tables (struct cpu *cpu) |
int | ppc_memory_rw (struct cpu *cpu, struct memory *mem, uint64_t vaddr, unsigned char *data, size_t len, int writeflag, int cache_flags) |
int | ppc_cpu_family_init (struct cpu_family *) |
int | ppc_translate_v2p (struct cpu *cpu, uint64_t vaddr, uint64_t *return_addr, int flags) |
#define PPC_ADDR_TO_PAGENR | ( | a | ) |
#define PPC_CPU_TYPE_DEFS |
#define PPC_EXCEPTION_DSI 0x3 /* Data Storage Interrupt */ |
#define PPC_EXCEPTION_FPU 0x8 /* Floating-Point unavailable */ |
#define PPC_EXCEPTION_ISI 0x4 /* Instruction Storage Interrupt */ |
#define PPC_FPSCR_FEX (1 << 30) /* Enabled Exception summary */ |
#define PPC_FPSCR_VX (1 << 29) /* Invalid Operation summary */ |
#define PPC_IC_ENTRIES_PER_PAGE (1 << PPC_IC_ENTRIES_SHIFT) |
#define PPC_MSR_EE (1 << 15) /* External Interrupt Enable */ |
#define PPC_MSR_FE0 (1 << 11) /* Floating-Point Exception Mode 0 */ |
#define PPC_MSR_FE1 (1 << 8) /* Floating-Point Exception Mode 1 */ |
#define PPC_MSR_FP (1 << 13) /* Floating-Point Available */ |
#define PPC_MSR_ILE (1 << 16) /* Interrupt Little-Endian Mode */ |
#define PPC_MSR_IP (1 << 6) /* Vector Table at 0xfff00000 */ |
#define PPC_MSR_ME (1 << 12) /* Machine Check Interrupt Enable */ |
#define PPC_MSR_PMM (1 << 2) /* Performance Monitor Mark */ |
#define PPC_MSR_PR (1 << 14) /* Problem/Privilege State */ |
#define PPC_MSR_SE (1 << 10) /* Single-Step Trace Enable */ |
#define PPC_PC_TO_IC_ENTRY | ( | a | ) |
void ppc32_invalidate_code_translation | ( | struct cpu * | cpu, |
uint64_t | , | ||
int | |||
) |
void ppc32_invalidate_translation_caches | ( | struct cpu * | cpu, |
uint64_t | , | ||
int | |||
) |
int ppc32_run_instr | ( | struct cpu * | cpu | ) |
void ppc32_update_translation_table | ( | struct cpu * | cpu, |
uint64_t | vaddr_page, | ||
unsigned char * | host_page, | ||
int | writeflag, | ||
uint64_t | paddr_page | ||
) |
int ppc_cpu_family_init | ( | struct cpu_family * | ) |
void ppc_exception | ( | struct cpu * | cpu, |
int | exception_nr | ||
) |
Definition at line 352 of file cpu_ppc.cc.
References cpu::cd, ppc_cpu::cr, fatal(), cpu::is_32bit, ppc_cpu::msr, cpu::pc, cpu::ppc, ppc32_pc_to_pointers(), PPC_MSR_EE, PPC_MSR_IP, PPC_MSR_PR, PPC_MSR_RI, ppc_pc_to_pointers(), quiet_mode, ppc_cpu::spr, SPR_SRR0, and SPR_SRR1.
Referenced by reg_access_msr(), and X().
void ppc_init_64bit_dummy_tables | ( | struct cpu * | cpu | ) |
void ppc_invalidate_code_translation | ( | struct cpu * | cpu, |
uint64_t | , | ||
int | |||
) |
void ppc_invalidate_translation_caches | ( | struct cpu * | cpu, |
uint64_t | , | ||
int | |||
) |
int ppc_memory_rw | ( | struct cpu * | cpu, |
struct memory * | mem, | ||
uint64_t | vaddr, | ||
unsigned char * | data, | ||
size_t | len, | ||
int | writeflag, | ||
int | cache_flags | ||
) |
int ppc_run_instr | ( | struct cpu * | cpu | ) |
int ppc_translate_v2p | ( | struct cpu * | cpu, |
uint64_t | vaddr, | ||
uint64_t * | return_addr, | ||
int | flags | ||
) |
Definition at line 215 of file memory_ppc.cc.
References ppc_cpu::bits, cpu::cd, ppc_cpu::cpu_type, fatal(), FLAG_INSTR, FLAG_WRITEFLAG, ppc_cpu_type_def::flags, instr, cpu::ppc, PPC_601, ppc_bat(), PPC_MSR_DR, PPC_MSR_IR, PPC_MSR_PR, and reg_access_msr().
void ppc_update_translation_table | ( | struct cpu * | cpu, |
uint64_t | vaddr_page, | ||
unsigned char * | host_page, | ||
int | writeflag, | ||
uint64_t | paddr_page | ||
) |