hw/isa/lpc_ich9: Connect PM stuff to LPC internally

Make TYPE_ICH9_LPC_DEVICE more self-contained by moving the call to
ich9_lpc_pm_init() from board code to its realize function. In order
to propagate x86_machine_is_smm_enabled(), introduce an "smm-enabled"
property like we have in piix4.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230213173033.98762-8-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Bernhard Beschow 2023-02-13 18:30:28 +01:00 committed by Philippe Mathieu-Daudé
parent ecf403cbb8
commit 20fe3af24f
5 changed files with 11 additions and 18 deletions

View file

@ -64,7 +64,7 @@ typedef struct ICH9LPCPMRegs {
uint8_t disable_s3;
uint8_t disable_s4;
uint8_t s4_val;
uint8_t smm_enabled;
bool smm_enabled;
bool smm_compat;
bool enable_tco;
TCOIORegs tco_regs;
@ -72,9 +72,7 @@ typedef struct ICH9LPCPMRegs {
#define ACPI_PM_PROP_TCO_ENABLED "enable_tco"
void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
bool smm_enabled,
qemu_irq sci_irq);
void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq);
void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base);
extern const VMStateDescription vmstate_ich9_pm;