# HG changeset patch
# User chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 27bef4f3c1d37f97b7093e473630ed4a62356489
# Parent 404277b96e2747cf9a7fa52cf163fdecb97714ae
[qemu] Move acpi to devfn 2, so that it matches the fadt.
Based on feedback from: Wang, Winston L <winston.l.wang@xxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
tools/firmware/acpi/acpi_fadt.h | 3 +--
tools/ioemu/hw/pc.c | 13 +++++--------
tools/ioemu/hw/piix4acpi.c | 4 ++--
tools/ioemu/vl.h | 3 +++
4 files changed, 11 insertions(+), 12 deletions(-)
diff -r 404277b96e27 -r 27bef4f3c1d3 tools/firmware/acpi/acpi_fadt.h
--- a/tools/firmware/acpi/acpi_fadt.h Wed Aug 09 20:08:20 2006 +0100
+++ b/tools/firmware/acpi/acpi_fadt.h Wed Aug 09 21:33:59 2006 +0100
@@ -59,8 +59,7 @@
#define ACPI_PM1A_EVT_BLK_ADDRESS_SPACE_ID ACPI_SYSTEM_IO
#define ACPI_PM1A_EVT_BLK_BIT_WIDTH 0x20
#define ACPI_PM1A_EVT_BLK_BIT_OFFSET 0x00
-//#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c010
-#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c040
+#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c010
//
// PM1B Event Register Block Generic Address Information
diff -r 404277b96e27 -r 27bef4f3c1d3 tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c Wed Aug 09 20:08:20 2006 +0100
+++ b/tools/ioemu/hw/pc.c Wed Aug 09 21:33:59 2006 +0100
@@ -572,9 +572,6 @@ static int parallel_io[MAX_PARALLEL_PORT
static int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
static int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 };
-/* PIIX4 acpi pci configuration space, func 3 */
-extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
-
#ifdef HAS_AUDIO
static void audio_init (PCIBus *pci_bus)
{
@@ -877,13 +874,13 @@ static void pc_init1(uint64_t ram_size,
cmos_init(ram_size, boot_device, bs_table, timeoffset);
- if (pci_enabled && usb_enabled) {
- usb_uhci_init(pci_bus, piix3_devfn + 2);
- }
-
/* using PIIX4 acpi model */
if (pci_enabled && acpi_enabled)
- pci_piix4_acpi_init(pci_bus, piix3_devfn + (usb_enabled ? 3 : 2));
+ pci_piix4_acpi_init(pci_bus, piix3_devfn + 2);
+
+ if (pci_enabled && usb_enabled) {
+ usb_uhci_init(pci_bus, piix3_devfn + (acpi_enabled ? 3 : 2));
+ }
#ifndef CONFIG_DM
if (pci_enabled && acpi_enabled) {
diff -r 404277b96e27 -r 27bef4f3c1d3 tools/ioemu/hw/piix4acpi.c
--- a/tools/ioemu/hw/piix4acpi.c Wed Aug 09 20:08:20 2006 +0100
+++ b/tools/ioemu/hw/piix4acpi.c Wed Aug 09 21:33:59 2006 +0100
@@ -374,13 +374,13 @@ static void acpi_map(PCIDevice *pci_dev,
register_ioport_read(addr + 8, 4, 4, acpiPm1Timer_readl, d);
}
-/* PIIX4 acpi pci configuration space, func 3 */
+/* PIIX4 acpi pci configuration space, func 2 */
void pci_piix4_acpi_init(PCIBus *bus, int devfn)
{
PCIAcpiState *d;
uint8_t *pci_conf;
- /* register a function devfn of PIIX4 */
+ /* register a function 2 of PIIX4 */
d = (PCIAcpiState *)pci_register_device(
bus, "PIIX4 ACPI", sizeof(PCIAcpiState),
devfn, NULL, NULL);
diff -r 404277b96e27 -r 27bef4f3c1d3 tools/ioemu/vl.h
--- a/tools/ioemu/vl.h Wed Aug 09 20:08:20 2006 +0100
+++ b/tools/ioemu/vl.h Wed Aug 09 21:33:59 2006 +0100
@@ -925,6 +925,9 @@ void piix4_pm_init(PCIBus *bus, int devf
void piix4_pm_init(PCIBus *bus, int devfn);
void acpi_bios_init(void);
+/* piix4acpi.c */
+extern void pci_piix4_acpi_init(PCIBus *bus, int devfn);
+
/* pc.c */
extern QEMUMachine pc_machine;
extern QEMUMachine isapc_machine;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|