[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 09/12] ich9: enable pm registers when there i
From: |
Chao Peng |
Subject: |
[Qemu-devel] [RFC PATCH v2 09/12] ich9: enable pm registers when there is no firmware |
Date: |
Thu, 25 Aug 2016 06:15:02 -0400 |
Signed-off-by: Chao Peng <address@hidden>
---
hw/isa/lpc_ich9.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 10d1ee8..28e9911 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -484,6 +484,9 @@ static void ich9_lpc_reset(DeviceState *qdev)
{
PCIDevice *d = PCI_DEVICE(qdev);
ICH9LPCState *lpc = ICH9_LPC_DEVICE(d);
+ PCMachineState *pcms = PC_MACHINE(qdev_get_machine());
+ uint32_t pm_base = ICH9_LPC_PMBASE_DEFAULT;
+ uint8_t lpc_ctlr = ICH9_LPC_ACPI_CTRL_DEFAULT;
uint32_t rcba_old = pci_get_long(d->config + ICH9_LPC_RCBA);
int i;
@@ -495,9 +498,14 @@ static void ich9_lpc_reset(DeviceState *qdev)
pci_set_byte(d->config + ICH9_LPC_PIRQE_ROUT + i,
ICH9_LPC_PIRQ_ROUT_DEFAULT);
}
- pci_set_byte(d->config + ICH9_LPC_ACPI_CTRL, ICH9_LPC_ACPI_CTRL_DEFAULT);
- pci_set_long(d->config + ICH9_LPC_PMBASE, ICH9_LPC_PMBASE_DEFAULT);
+ if (!pcms->fw_cfg) {
+ lpc_ctlr = ICH9_LPC_ACPI_CTRL_ACPI_EN;
+ pm_base = 0x600 | ICH9_LPC_PMBASE_RTE;
+ }
+
+ pci_set_byte(d->config + ICH9_LPC_ACPI_CTRL, lpc_ctlr);
+ pci_set_long(d->config + ICH9_LPC_PMBASE, pm_base);
pci_set_long(d->config + ICH9_LPC_RCBA, ICH9_LPC_RCBA_DEFAULT);
ich9_cc_reset(lpc);
--
1.8.3.1
- [Qemu-devel] [RFC PATCH v2 01/12] pc: make smbus configurable, (continued)
- [Qemu-devel] [RFC PATCH v2 01/12] pc: make smbus configurable, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 03/12] pc: make pic configurable, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 02/12] pc: make sata configurable, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 05/12] acpi: build static _PRT, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 04/12] pc: make pit configurable, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 06/12] acpi: expose data structurs and functions of BIOS linker loader, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 07/12] acpi: expose acpi_checksum(), Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 10/12] q35: initialize MMCFG base when there is no firmware, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 08/12] acpi: patch guest ACPI when there is no firmware, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 09/12] ich9: enable pm registers when there is no firmware,
Chao Peng <=
- [Qemu-devel] [RFC PATCH v2 11/12] pc: support direct loading protected/long mode kernel, Chao Peng, 2016/08/25
- [Qemu-devel] [RFC PATCH v2 12/12] pc: skip firmware, Chao Peng, 2016/08/25