mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS
PIIX_NUM_PIC_IRQS is assumed to be the same as ISA_NUM_IRQS, otherwise inconsistencies can occur. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20231007123843.127151-5-shentey@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
8b6cf5128e
commit
32f29b26ff
2 changed files with 6 additions and 7 deletions
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
#define PIIX_RCR_IOPORT 0xcf9
|
||||
|
||||
#define PIIX_NUM_PIC_IRQS 16 /* i8259 * 2 */
|
||||
#define PIIX_NUM_PIRQS 4ULL /* PIRQ[A-D] */
|
||||
|
||||
struct PIIXState {
|
||||
|
@ -39,10 +38,10 @@ struct PIIXState {
|
|||
* So one PIC level is tracked by PIIX_NUM_PIRQS bits.
|
||||
*
|
||||
* PIRQ is mapped to PIC pins, we track it by
|
||||
* PIIX_NUM_PIRQS * PIIX_NUM_PIC_IRQS = 64 bits with
|
||||
* PIIX_NUM_PIRQS * ISA_NUM_IRQS = 64 bits with
|
||||
* pic_irq * PIIX_NUM_PIRQS + pirq
|
||||
*/
|
||||
#if PIIX_NUM_PIC_IRQS * PIIX_NUM_PIRQS > 64
|
||||
#if ISA_NUM_IRQS * PIIX_NUM_PIRQS > 64
|
||||
#error "unable to encode pic state in 64bit in pic_levels."
|
||||
#endif
|
||||
uint64_t pic_levels;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue