diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-22 11:34:38 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-22 11:34:39 +0100 |
commit | 84e3d0725b06bdf8c6985788caa7776d6b7353ce (patch) | |
tree | e4b273590132a034fe693debb52e7037bb7730f2 /hw/i386/acpi-build.c | |
parent | db7a99cdc1d0f4d8cbf7c41ce9e570dce04f0a11 (diff) | |
parent | 269c20b2bbd2aa8531e0cdc741fb166f290d7a2b (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-06-09-v2' into staging
QAPI patches for 2017-06-09
# gpg: Signature made Tue 20 Jun 2017 13:31:39 BST
# gpg: using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2017-06-09-v2: (41 commits)
tests/qdict: check more get_try_int() cases
console: use get_uint() for "head" property
i386/cpu: use get_uint() for "min-level"/"min-xlevel" properties
numa: use get_uint() for "size" property
pnv-core: use get_uint() for "core-pir" property
pvpanic: use get_uint() for "ioport" property
auxbus: use get_uint() for "addr" property
arm: use get_uint() for "mp-affinity" property
xen: use get_uint() for "max-ram-below-4g" property
pc: use get_uint() for "hpet-intcap" property
pc: use get_uint() for "apic-id" property
pc: use get_uint() for "iobase" property
acpi: use get_uint() for "pci-hole*" properties
acpi: use get_uint() for various acpi properties
acpi: use get_uint() for "acpi-pcihp-io*" properties
platform-bus: use get_uint() for "addr" property
bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"
aspeed: use {set, get}_uint() for "ram-size" property
pcihp: use get_uint() for "bsel" property
pc-dimm: make "size" property uint64
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ce74c84460..0b8bc62b99 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -57,7 +57,6 @@ #include "hw/acpi/aml-build.h" -#include "qapi/qmp/qint.h" #include "qom/qom-qobject.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" @@ -137,9 +136,9 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) obj = piix; pm->cpu_hp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE; pm->pcihp_io_base = - object_property_get_int(obj, ACPI_PCIHP_IO_BASE_PROP, NULL); + object_property_get_uint(obj, ACPI_PCIHP_IO_BASE_PROP, NULL); pm->pcihp_io_len = - object_property_get_int(obj, ACPI_PCIHP_IO_LEN_PROP, NULL); + object_property_get_uint(obj, ACPI_PCIHP_IO_LEN_PROP, NULL); } if (lpc) { obj = lpc; @@ -150,41 +149,42 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) /* Fill in optional s3/s4 related properties */ o = object_property_get_qobject(obj, ACPI_PM_PROP_S3_DISABLED, NULL); if (o) { - pm->s3_disabled = qint_get_int(qobject_to_qint(o)); + pm->s3_disabled = qnum_get_uint(qobject_to_qnum(o)); } else { pm->s3_disabled = false; } qobject_decref(o); o = object_property_get_qobject(obj, ACPI_PM_PROP_S4_DISABLED, NULL); if (o) { - pm->s4_disabled = qint_get_int(qobject_to_qint(o)); + pm->s4_disabled = qnum_get_uint(qobject_to_qnum(o)); } else { pm->s4_disabled = false; } qobject_decref(o); o = object_property_get_qobject(obj, ACPI_PM_PROP_S4_VAL, NULL); if (o) { - pm->s4_val = qint_get_int(qobject_to_qint(o)); + pm->s4_val = qnum_get_uint(qobject_to_qnum(o)); } else { pm->s4_val = false; } qobject_decref(o); /* Fill in mandatory properties */ - pm->sci_int = object_property_get_int(obj, ACPI_PM_PROP_SCI_INT, NULL); - - pm->acpi_enable_cmd = object_property_get_int(obj, - ACPI_PM_PROP_ACPI_ENABLE_CMD, - NULL); - pm->acpi_disable_cmd = object_property_get_int(obj, - ACPI_PM_PROP_ACPI_DISABLE_CMD, - NULL); - pm->io_base = object_property_get_int(obj, ACPI_PM_PROP_PM_IO_BASE, - NULL); - pm->gpe0_blk = object_property_get_int(obj, ACPI_PM_PROP_GPE0_BLK, + pm->sci_int = object_property_get_uint(obj, ACPI_PM_PROP_SCI_INT, NULL); + + pm->acpi_enable_cmd = object_property_get_uint(obj, + ACPI_PM_PROP_ACPI_ENABLE_CMD, + NULL); + pm->acpi_disable_cmd = + object_property_get_uint(obj, + ACPI_PM_PROP_ACPI_DISABLE_CMD, + NULL); + pm->io_base = object_property_get_uint(obj, ACPI_PM_PROP_PM_IO_BASE, NULL); - pm->gpe0_blk_len = object_property_get_int(obj, ACPI_PM_PROP_GPE0_BLK_LEN, - NULL); + pm->gpe0_blk = object_property_get_uint(obj, ACPI_PM_PROP_GPE0_BLK, + NULL); + pm->gpe0_blk_len = object_property_get_uint(obj, ACPI_PM_PROP_GPE0_BLK_LEN, + NULL); pm->pcihp_bridge_en = object_property_get_bool(obj, "acpi-pci-hotplug-with-bridge-support", NULL); @@ -237,19 +237,19 @@ static void acpi_get_pci_holes(Range *hole, Range *hole64) g_assert(pci_host); range_set_bounds1(hole, - object_property_get_int(pci_host, - PCI_HOST_PROP_PCI_HOLE_START, - NULL), - object_property_get_int(pci_host, - PCI_HOST_PROP_PCI_HOLE_END, - NULL)); + object_property_get_uint(pci_host, + PCI_HOST_PROP_PCI_HOLE_START, + NULL), + object_property_get_uint(pci_host, + PCI_HOST_PROP_PCI_HOLE_END, + NULL)); range_set_bounds1(hole64, - object_property_get_int(pci_host, - PCI_HOST_PROP_PCI_HOLE64_START, - NULL), - object_property_get_int(pci_host, - PCI_HOST_PROP_PCI_HOLE64_END, - NULL)); + object_property_get_uint(pci_host, + PCI_HOST_PROP_PCI_HOLE64_START, + NULL), + object_property_get_uint(pci_host, + PCI_HOST_PROP_PCI_HOLE64_END, + NULL)); } #define ACPI_PORT_SMI_CMD 0x00b2 /* TODO: this is APM_CNT_IOPORT */ @@ -529,7 +529,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, bsel = object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL, NULL); if (bsel) { - int64_t bsel_val = qint_get_int(qobject_to_qint(bsel)); + uint64_t bsel_val = qnum_get_uint(qobject_to_qnum(bsel)); aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val))); notify_method = aml_method("DVNT", 2, AML_NOTSERIALIZED); @@ -639,7 +639,8 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, /* If bus supports hotplug select it and notify about local events */ if (bsel) { - int64_t bsel_val = qint_get_int(qobject_to_qint(bsel)); + uint64_t bsel_val = qnum_get_uint(qobject_to_qnum(bsel)); + aml_append(method, aml_store(aml_int(bsel_val), aml_name("BNUM"))); aml_append(method, aml_call2("DVNT", aml_name("PCIU"), aml_int(1) /* Device Check */) @@ -2614,12 +2615,12 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg) if (!o) { return false; } - mcfg->mcfg_base = qint_get_int(qobject_to_qint(o)); + mcfg->mcfg_base = qnum_get_uint(qobject_to_qnum(o)); qobject_decref(o); o = object_property_get_qobject(pci_host, PCIE_HOST_MCFG_SIZE, NULL); assert(o); - mcfg->mcfg_size = qint_get_int(qobject_to_qint(o)); + mcfg->mcfg_size = qnum_get_uint(qobject_to_qnum(o)); qobject_decref(o); return true; } |