mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 11:23:43 +08:00
Add missing definition for number of input pins for the PowerPC 970 bus.
Use proper INPUT_NB definitions to allocate PowerPC input pins structure, fixing a buffer overflow in the 6xx bus case. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3659 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
5e692ecdbf
commit
7b62a95504
6
hw/ppc.c
6
hw/ppc.c
@ -172,7 +172,8 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level)
|
||||
|
||||
void ppc6xx_irq_init (CPUState *env)
|
||||
{
|
||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, env, 6);
|
||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, env,
|
||||
PPC6xx_INPUT_NB);
|
||||
}
|
||||
|
||||
#if defined(TARGET_PPC64)
|
||||
@ -295,7 +296,8 @@ static void ppc970_set_irq (void *opaque, int pin, int level)
|
||||
|
||||
void ppc970_irq_init (CPUState *env)
|
||||
{
|
||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, env, 7);
|
||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, env,
|
||||
PPC970_INPUT_NB);
|
||||
}
|
||||
#endif /* defined(TARGET_PPC64) */
|
||||
|
||||
|
@ -1249,6 +1249,7 @@ enum {
|
||||
PPC970_INPUT_MCP = 4,
|
||||
PPC970_INPUT_INT = 5,
|
||||
PPC970_INPUT_THINT = 6,
|
||||
PPC970_INPUT_NB,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user