On 02/07/13 18:48, Jordan Justen wrote:
> On Thu, Jan 24, 2013 at 4:32 AM, Laszlo Ersek <ler...@redhat.com> wrote:
>> Such packages should be more compatible with AML parsers in practice:
>>
>>   /*
>>    * Intel ACPI Component Architecture
>>    * AML Disassembler version 20090123
>>    *
>>    * Disassembly of SSDT.aml, Thu Jan 24 13:23:26 2013
>>    *
>>    *
>>    * Original Table Header:
>>    *     Signature        "SSDT"
>>    *     Length           0x00000057 (87)
>>    *     Revision         0x01
>>    *     Checksum         0x9D
>>    *     OEM ID           "REDHAT"
>>    *     OEM Table ID     "OVMF    "
>>    *     OEM Revision     0x00000001 (1)
>>    *     Compiler ID      "INTL"
>>    *     Compiler Version 0x20090123 (537461027)
>>    */
>>   DefinitionBlock ("SSDT.aml", "SSDT", 1, "REDHAT", "OVMF    ", 0x00000001)
>>   {
>>       OperationRegion (FWDT, SystemMemory, 0xDFB66F98, 0x00000030)
>>       Name (\_S3, Package (0x04)
>>       {
>>           0x01,
>>           0x00,
>>           0x00,
>>           0x00
>>       })
>>       Name (\_S4, Package (0x04)
>>       {
>>           0x02,
>>           0x00,
>>           0x00,
>>           0x00
>>       })
>>   }
>>
>> Testing:
>> - Checked dmesg in an F18 guest, then selected hibernate and verified the
>>   requested suspend type with a qemu debug patch. The above AML
>>   disassembly also originates from the F18 guest (acpidump + iasld -d).
>> - Hibernated a Windows 8 Consumer Preview (Build 8250) guest, confirmed
>>   requested suspend type with the same qemu debug patch.
> 
> The motivation for this change doesn't seem clear to me from the commit 
> message.
> 
> Cleanup? Fixes hibernate for a few or all operating systems?

Sorry for not having been clear enough. This patch changes how the same
meaning is encoded in AML.

The ACPI 5.0 spec describes the required package format for _Sx states
in "7.3.4 System \_Sx states":

    All system states supported by the system must provide a package
    containing the DWORD value of the following format in the static
    Definition Block. [...]

Then the spec explains the meaning of each of the four bytes.

When I exported the packages as required the spec ("package with one
DWORD element"), it broke a number of ACPI parsers (very likely, copies
of various versions of the same ACPICA parser). The parse error has
different consequences; under Linux it triggers verbose error messages &
no support for entering _Sx states; on OpenBSD 5.2 it causes a kernel crash.

The reason for the parse error is that the ports of the ACPICA parser in
question do not actually accept the ACPI 5.0 mandated "package with
single DWORD element". They accept / require historical practice
instead, which is "package with at least two Integer elements".

The patch basically aims at bug compatibility with said parsers.

(

I did post a fix for ACPICA so that it accepts both the "legacy format"
and the spec-conformant format:

- blurb: http://lists.acpica.org/pipermail/devel/2012-December/000405.html

- patch:
http://lists.acpica.org/pipermail/devel/attachments/20121220/50519d70/attachment.ksh

Ultimately the maintainer implemented
<https://github.com/otcshare/acpica/commit/5869690a>.

But we still need this patch for older guests that don't have (a port
of) this ACPICA commit.

)

Laszlo

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to