[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v14 7/9] ARM: ACPI: Add GPIO notification type f
From: |
gengdongjiu |
Subject: |
Re: [Qemu-devel] [PATCH v14 7/9] ARM: ACPI: Add GPIO notification type for hardware RAS error |
Date: |
Thu, 4 Jan 2018 12:55:44 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 2018/1/3 21:36, Igor Mammedov wrote:
> On Wed, 3 Jan 2018 11:48:30 +0800
> gengdongjiu <address@hidden> wrote:
>
>> On 2017/12/28 22:53, Igor Mammedov wrote:
>>> On Thu, 28 Dec 2017 13:54:16 +0800
>>> Dongjiu Geng <address@hidden> wrote:
> [...]
>>>> +static void acpi_dsdt_add_error_device(Aml *scope)
>>>> +{
>>>> + Aml *dev = aml_device(ACPI_HARDWARE_ERROR_DEVICE);
>>>> + Aml *method;
>>>> +
>>>> + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C33")));
>>>> + aml_append(dev, aml_name_decl("_UID", aml_int(0)));
>>>> +
>>>> + method = aml_method("_STA", 0, AML_NOTSERIALIZED);
>>>> + aml_append(method, aml_return(aml_int(0x0f)));
>>> no need for dummy _STA method, device is assumed to be present if there is
>>> no _STA
>> Igor,
>> do you mean remove above two line code as shown in [1]?
>> I dump the DSDT table in my host Ubuntu PC for the error device (PNP0C33),
>> it has the _STA, as shown in [2].
>> do we not want to add the _STA for guest?
>>
>> [1]
>> + method = aml_method("_STA", 0, AML_NOTSERIALIZED);
>> + aml_append(method, aml_return(aml_int(0x0f)));
> compared to host, yours method does nothing,
> read ACPI6.2 "6.3.7 _STA (Status)" one more time
Thanks for the pointing out.
yes, you are right. As the spec statement[1], Device is assumed to be present
if there is no _STA.
[1]:
ACPI6.2 "6.3.7 _STA (Status), Return Value Information"
If a device object (including the processor object) does not have an _STA
object, then OSPM
assumes that all of the above bits are set (i.e., the device is present,
enabled, shown in the UI,
and functioning).
>
>> [2]:
>> Device (WERR)
>> {
>> Name (_HID, EisaId ("PNP0C33")) // _HID: Hardware ID
>> Method (_STA, 0, NotSerialized) // _STA: Status
>> {
>> If (LGreaterEqual (OSYS, 0x07D9))
>> {
>> Return (0x0F)
>> }
>> Else
>> {
>> Return (Zero)
>> }
>> }
>> }
>>>
>>>> + aml_append(dev, method);
>>>> + aml_append(scope, dev);
>>>> +}
>>>> +
> [...]
>
>
> .
>