acpi: rtc: use a single crs range
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 15 May 2020 15:04:08 +0000 (17:04 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jun 2020 16:46:45 +0000 (12:46 -0400)
Use a single io range for _CRS instead of two,
following what real hardware does.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200515150421.25479-4-kraxel@redhat.com>

hw/rtc/mc146818rtc.c

index fe05a4488e43d4c0488d449223c7c66841c2892b..1e9fa0f33fed9c95f7c8965d1fd2bcbbcb0db13d 100644 (file)
@@ -1013,12 +1013,14 @@ static void rtc_build_aml(ISADevice *isadev, Aml *scope)
     Aml *dev;
     Aml *crs;
 
+    /*
+     * Reserving 8 io ports here, following what physical hardware
+     * does, even though qemu only responds to the first two ports.
+     */
     crs = aml_resource_template();
     aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE, RTC_ISA_BASE,
-                           0x10, 0x02));
+                           0x01, 0x08));
     aml_append(crs, aml_irq_no_flags(RTC_ISA_IRQ));
-    aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE + 2, RTC_ISA_BASE + 2,
-                           0x02, 0x06));
 
     dev = aml_device("RTC");
     aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00")));