diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-12 21:24:29 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-12 21:24:29 +0000 |
commit | 24be5ae3a075319a57477fd03b1bdfb74f7f4d05 (patch) | |
tree | 0bd8269b3cdf144095d879e68d387f4774dfddcf /target-ppc | |
parent | 2e719ba3476fcf1c7c74649d9e16f486eb8c02fc (diff) |
Add PowerPC 405 input pins (IRQ, resets, ...) model.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2654 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/cpu.h | 35 | ||||
-rw-r--r-- | target-ppc/translate_init.c | 10 |
2 files changed, 34 insertions, 11 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 2a2c4409d3..4b67f1a25c 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1315,15 +1315,34 @@ enum { /* Input pins definitions */ enum { /* 6xx bus input pins */ - PPC_INPUT_HRESET = 0, - PPC_INPUT_SRESET = 1, - PPC_INPUT_CKSTP_IN = 2, - PPC_INPUT_MCP = 3, - PPC_INPUT_SMI = 4, - PPC_INPUT_INT = 5, + PPC6xx_INPUT_HRESET = 0, + PPC6xx_INPUT_SRESET = 1, + PPC6xx_INPUT_CKSTP_IN = 2, + PPC6xx_INPUT_MCP = 3, + PPC6xx_INPUT_SMI = 4, + PPC6xx_INPUT_INT = 5, +}; + +enum { /* Embedded PowerPC input pins */ - PPC_INPUT_CINT = 6, - PPC_INPUT_NB, + PPCBookE_INPUT_HRESET = 0, + PPCBookE_INPUT_SRESET = 1, + PPCBookE_INPUT_CKSTP_IN = 2, + PPCBookE_INPUT_MCP = 3, + PPCBookE_INPUT_SMI = 4, + PPCBookE_INPUT_INT = 5, + PPCBookE_INPUT_CINT = 6, +}; + +enum { + /* PowerPC 405 input pins */ + PPC405_INPUT_RESET_CORE = 0, + PPC405_INPUT_RESET_CHIP = 1, + PPC405_INPUT_RESET_SYS = 2, + PPC405_INPUT_CINT = 3, + PPC405_INPUT_INT = 4, + PPC405_INPUT_HALT = 5, + PPC405_INPUT_DEBUG = 6, }; /* Hardware exceptions definitions */ diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 805c897248..72e577dc27 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -45,6 +45,7 @@ static inline void glue(glue(ppc, name),_irq_init) (CPUPPCState *env) \ #define PPC_IRQ_INIT_FN(name) \ void glue(glue(ppc, name),_irq_init) (CPUPPCState *env); #endif +PPC_IRQ_INIT_FN(405); PPC_IRQ_INIT_FN(6xx); /* Generic callbacks: @@ -1909,7 +1910,8 @@ static void init_ppc_proc (CPUPPCState *env, ppc_def_t *def) env->nb_tlb = 64; env->nb_ways = 1; env->id_tlbs = 0; - /* XXX: TODO: allocate internal IRQ controller */ + /* Allocate hardware IRQ controller */ + ppc405_irq_init(env); break; case CPU_PPC_NPE405H: /* NPe405 H family */ @@ -1924,7 +1926,8 @@ static void init_ppc_proc (CPUPPCState *env, ppc_def_t *def) env->nb_tlb = 64; env->nb_ways = 1; env->id_tlbs = 0; - /* XXX: TODO: allocate internal IRQ controller */ + /* Allocate hardware IRQ controller */ + ppc405_irq_init(env); break; #if defined (TODO) @@ -1956,7 +1959,8 @@ static void init_ppc_proc (CPUPPCState *env, ppc_def_t *def) env->nb_tlb = 64; env->nb_ways = 1; env->id_tlbs = 0; - /* XXX: TODO: allocate internal IRQ controller */ + /* Allocate hardware IRQ controller */ + ppc405_irq_init(env); break; case CPU_PPC_440EP: /* 440 EP family */ |