Revision 4441a287
b/hw/acpi_piix4.c | ||
---|---|---|
38 | 38 |
#define PCI_BASE 0xae00 |
39 | 39 |
#define PCI_EJ_BASE 0xae08 |
40 | 40 |
|
41 |
#define PIIX4_PCI_HOTPLUG_STATUS 2 |
|
42 |
|
|
41 | 43 |
struct gpe_regs { |
42 | 44 |
uint16_t sts; /* status */ |
43 | 45 |
uint16_t en; /* enabled */ |
... | ... | |
596 | 598 |
|
597 | 599 |
static void enable_device(PIIX4PMState *s, int slot) |
598 | 600 |
{ |
599 |
s->gpe.sts |= 2;
|
|
601 |
s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS;
|
|
600 | 602 |
s->pci0_status.up |= (1 << slot); |
601 | 603 |
} |
602 | 604 |
|
603 | 605 |
static void disable_device(PIIX4PMState *s, int slot) |
604 | 606 |
{ |
605 |
s->gpe.sts |= 2;
|
|
607 |
s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS;
|
|
606 | 608 |
s->pci0_status.down |= (1 << slot); |
607 | 609 |
} |
608 | 610 |
|
Also available in: Unified diff