pcihp.c (d45a5270d075ea589f0b0ddcf963a5fea1f500ac) pcihp.c (caf108bc587908f7608729f39639dccdfa53010b)
1/*
2 * QEMU<->ACPI BIOS PCI hotplug interface
3 *
4 * QEMU supports PCI hotplug via ACPI. This module
5 * implements the interface between QEMU and the ACPI BIOS.
6 * Interface specification - see docs/specs/acpi_pci_hotplug.txt
7 *
8 * Copyright (c) 2013, Red Hat Inc, Michael S. Tsirkin (mst@redhat.com)

--- 23 unchanged lines hidden (view full) ---

32#include "hw/pci/pci_bridge.h"
33#include "hw/acpi/acpi.h"
34#include "hw/pci/pci_bus.h"
35#include "migration/vmstate.h"
36#include "qapi/error.h"
37#include "qom/qom-qobject.h"
38#include "trace.h"
39
1/*
2 * QEMU<->ACPI BIOS PCI hotplug interface
3 *
4 * QEMU supports PCI hotplug via ACPI. This module
5 * implements the interface between QEMU and the ACPI BIOS.
6 * Interface specification - see docs/specs/acpi_pci_hotplug.txt
7 *
8 * Copyright (c) 2013, Red Hat Inc, Michael S. Tsirkin (mst@redhat.com)

--- 23 unchanged lines hidden (view full) ---

32#include "hw/pci/pci_bridge.h"
33#include "hw/acpi/acpi.h"
34#include "hw/pci/pci_bus.h"
35#include "migration/vmstate.h"
36#include "qapi/error.h"
37#include "qom/qom-qobject.h"
38#include "trace.h"
39
40#define ACPI_PCIHP_ADDR 0xae00
41#define ACPI_PCIHP_SIZE 0x0018
42#define PCI_UP_BASE 0x0000
43#define PCI_DOWN_BASE 0x0004
44#define PCI_EJ_BASE 0x0008
45#define PCI_RMV_BASE 0x000c
46#define PCI_SEL_BASE 0x0010
47#define PCI_AIDX_BASE 0x0014
48

--- 434 unchanged lines hidden (view full) ---

483 .endianness = DEVICE_LITTLE_ENDIAN,
484 .valid = {
485 .min_access_size = 4,
486 .max_access_size = 4,
487 },
488};
489
490void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
40#define ACPI_PCIHP_SIZE 0x0018
41#define PCI_UP_BASE 0x0000
42#define PCI_DOWN_BASE 0x0004
43#define PCI_EJ_BASE 0x0008
44#define PCI_RMV_BASE 0x000c
45#define PCI_SEL_BASE 0x0010
46#define PCI_AIDX_BASE 0x0014
47

--- 434 unchanged lines hidden (view full) ---

482 .endianness = DEVICE_LITTLE_ENDIAN,
483 .valid = {
484 .min_access_size = 4,
485 .max_access_size = 4,
486 },
487};
488
489void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
491 MemoryRegion *address_space_io, bool bridges_enabled)
490 MemoryRegion *address_space_io, bool bridges_enabled,
491 uint16_t io_base)
492{
493 s->io_len = ACPI_PCIHP_SIZE;
492{
493 s->io_len = ACPI_PCIHP_SIZE;
494 s->io_base = ACPI_PCIHP_ADDR;
494 s->io_base = io_base;
495
496 s->root = root_bus;
497 s->legacy_piix = !bridges_enabled;
498
499 memory_region_init_io(&s->io, owner, &acpi_pcihp_io_ops, s,
500 "acpi-pci-hotplug", s->io_len);
501 memory_region_add_subregion(address_space_io, s->io_base, &s->io);
502

--- 22 unchanged lines hidden ---
495
496 s->root = root_bus;
497 s->legacy_piix = !bridges_enabled;
498
499 memory_region_init_io(&s->io, owner, &acpi_pcihp_io_ops, s,
500 "acpi-pci-hotplug", s->io_len);
501 memory_region_add_subregion(address_space_io, s->io_base, &s->io);
502

--- 22 unchanged lines hidden ---