qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device


From: Gerd Hoffmann
Subject: Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device
Date: Wed, 8 Apr 2020 14:59:28 +0200

  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]