From 927766c7d34275ecf586020cc5305e377cc4af10 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 20 Aug 2014 21:58:12 +0200 Subject: pc: reserve more memory for ACPI for new machine types commit 868270f23d8db2cce83e4f082fe75e8625a5fbf9 acpi-build: tweak acpi migration limits broke kernel loading with -kernel/-initrd: it doubled the size of ACPI tables but did not reserve enough memory. As a result, issues on boot and halt are observed. Fix this up by doubling reserved memory for new machine types. Cc: qemu-stable@nongnu.org Reported-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 0fca9e3..a39cb42 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -176,6 +176,8 @@ void pc_acpi_init(const char *default_dsdt); PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size, ram_addr_t above_4g_mem_size); +void pc_set_legacy_acpi_data_size(void); + #define PCI_HOST_PROP_PCI_HOLE_START "pci-hole-start" #define PCI_HOST_PROP_PCI_HOLE_END "pci-hole-end" #define PCI_HOST_PROP_PCI_HOLE64_START "pci-hole64-start" -- cgit v1.1 From 711b20b479aa96e26324371f10aff514681ea24c Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 11 Aug 2014 16:33:36 -0400 Subject: Add ACPI tables for TPM Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec here: http://www.trustedcomputinggroup.org/files/static_page_files/DCD4188E-1A4B-B294-D050A155FB6F7385/TCG_ACPIGeneralSpecification_PublicReview.pdf This patch has Michael Tsirkin's patches folded in. Signed-off-by: Stefan Berger Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin --- include/hw/acpi/tpm.h | 29 +++++++++++++++++++++++++++++ include/sysemu/tpm.h | 7 +++++++ 2 files changed, 36 insertions(+) create mode 100644 include/hw/acpi/tpm.h (limited to 'include') diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h new file mode 100644 index 0000000..792fcbf --- /dev/null +++ b/include/hw/acpi/tpm.h @@ -0,0 +1,29 @@ +/* + * tpm.h - TPM ACPI definitions + * + * Copyright (C) 2014 IBM Corporation + * + * Authors: + * Stefan Berger + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + * Implementation of the TIS interface according to specs found at + * http://www.trustedcomputinggroup.org + * + */ +#ifndef HW_ACPI_TPM_H +#define HW_ACPI_TPM_H + +#define TPM_TIS_ADDR_BASE 0xFED40000 +#define TPM_TIS_ADDR_SIZE 0x5000 + +#define TPM_TIS_IRQ 5 + +#define TPM_LOG_AREA_MINIMUM_SIZE (64 * 1024) + +#define TPM_TCPA_ACPI_CLASS_CLIENT 0 +#define TPM_TCPA_ACPI_CLASS_SERVER 1 + +#endif /* HW_ACPI_TPM_H */ diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 13febdd..9b81ce9 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -20,4 +20,11 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg); int tpm_init(void); void tpm_cleanup(void); +#define TYPE_TPM_TIS "tpm-tis" + +static inline bool tpm_find(void) +{ + return object_resolve_path_type("", TYPE_TPM_TIS, NULL); +} + #endif /* QEMU_TPM_H */ -- cgit v1.1 From 821be9dbb220389eaa6857705e1df9e64888138f Mon Sep 17 00:00:00 2001 From: Knut Omang Date: Sun, 24 Aug 2014 15:32:18 +0200 Subject: pcie: Rename the pcie_cap_ari_* functions to pcie_cap_arifwd_* Rename helper functions to make a clearer distinction between the PCIe capability/control register feature ARI forwarding and a device that supports the ARI feature via an ARI extended PCIe capability. Signed-off-by: Knut Omang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 7fe81f3..d139d58 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -103,9 +103,10 @@ void pcie_cap_flr_init(PCIDevice *dev); void pcie_cap_flr_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len); -void pcie_cap_ari_init(PCIDevice *dev); -void pcie_cap_ari_reset(PCIDevice *dev); -bool pcie_cap_is_ari_enabled(const PCIDevice *dev); +/* ARI forwarding capability and control */ +void pcie_cap_arifwd_init(PCIDevice *dev); +void pcie_cap_arifwd_reset(PCIDevice *dev); +bool pcie_cap_is_arifwd_enabled(const PCIDevice *dev); /* PCI express extended capability helper functions */ uint16_t pcie_find_capability(PCIDevice *dev, uint16_t cap_id); -- cgit v1.1