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: Cameron Esfahani
Subject: Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device
Date: Wed, 08 Apr 2020 13:28:47 -0700

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
address@hidden

"The cake is a lie."

Common wisdom



> On Apr 8, 2020, at 5:59 AM, Gerd Hoffmann <address@hidden> 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
> 
> 




reply via email to

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