I'm curious why there's two ranges as well. In our branch of QEMU, I've had to modify this RTC creation code to have only one range instead of two ranges.
Traditionally Macs have had one range for RTC and we have incompatibility with a two ranges. If you could change it to one range without losing any compatibility, you'd get my thumbs up. Cameron Esfahani di...@apple.com "The cake is a lie." Common wisdom > On Apr 8, 2020, at 5:59 AM, Gerd Hoffmann <kra...@redhat.com> wrote: > > Hi, > >>>>>>> + crs = aml_resource_template(); >>>>>>> + aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, 0x02)); >> maybe replace magic 0x0070 with macro >> RTC_BASE_ADDR > > Yes, that sounds better. > >>>>>>> + aml_append(crs, aml_irq_no_flags(8)); >>>>>>> + aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06)); >> >> one more comment, is this last io record correct? >> (looking at realize it maps only 2 bytes at 0x70) > > No idea, I've just moved around the code. > > Good question though. Also why this splitted in two ranges the first > place. Looking at physical hardware (my workstation) I see this: > > Device (RTC) > { > Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */) // _HID: > Hardware ID > Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings > { > IO (Decode16, > 0x0070, // Range Minimum > 0x0070, // Range Maximum > 0x01, // Alignment > 0x08, // Length > ) > IRQNoFlags () > {8} > }) > } > > Clues anyone? > > thanks, > Gerd > >