From e3845e7c47cc3eaf35305c9c0f9d55ca3840b49b Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 29 Apr 2015 15:20:15 +0200 Subject: hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core The acpi_pm1_cnt_init() core function is responsible for setting up the register block that will ultimately react to S3 and S4 requests (see acpi_pm1_cnt_write()). It makes sense to advertise this configuration to the guest firmware via an easy to parse fw_cfg file (ACPI is too complex for firmware to parse), and indeed PIIX4 does that. However, since acpi_pm1_cnt_init() is not specific to PIIX4, neither should be the fw_cfg file. This patch makes "etc/system-states" appear on all chipsets modified in the previous patch, not just PIIX4 (assuming they have fw_cfg at all). RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696 Cc: Amit Shah Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Aurelien Jarno Cc: Leon Alrae Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Laszlo Ersek --- hw/acpi/piix4.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'hw/acpi/piix4.c') diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 01b304a582..13895ad584 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -525,14 +525,6 @@ I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, qdev_init_nofail(dev); - if (fw_cfg) { - uint8_t suspend[6] = {128, 0, 0, 129, 128, 128}; - suspend[3] = 1 | ((!s->disable_s3) << 7); - suspend[4] = s->s4_val | ((!s->disable_s4) << 7); - - fw_cfg_add_file(fw_cfg, "etc/system-states", g_memdup(suspend, 6), 6); - } - return s->smb.smbus; } -- cgit v1.2.1