All of lore.kernel.org
 help / color / mirror / Atom feed
To: devel@acpica.org
Subject: Re: [Devel] Why are empty packages invalid for predefined ACPI objects?
Date: Mon, 08 Nov 2010 10:54:15 +0100	[thread overview]
Message-ID: <4CD7C8C7.7060500@gmail.com> (raw)
In-Reply-To: 4911F71203A09E4D9981D27F9D830858BC4F53A1@orsmsx503.amr.corp.intel.com

[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]

On 11/08/2010 05:23, Moore, Robert wrote:
> I'd have to go through the spec, but thinking about it, I'm not sure that
> any predefined name allows an empty package. All the definitions are
> either 1) Fixed length package, or 2) Variable length package that is
> defined as "one or more..."

The practical example that triggered this question is the method _DOD
(ACPI 4.0a, Appendix B, p. 698). For this method, the return value is:

     "A package containing a variable-length list of Integers, each of
      which contains the 32-bit device attribute of a child device".

As far as I can see, the specification does not require the list to be
non-empty.


On some laptop (see report [1]), the BIOS declares a device as follows:

              Device (VID2)
              {
                  Name (_ADR, 0x00020001)
                  Method (_DOS, 1, NotSerialized)
                  {
                  }


                  Method (_DOD, 0, NotSerialized)
                  {
                      Return (Package (0x00) {})
                  }
              }

The device may appear useless since _DOS does nothing and _DOD returns an
empty package. But VID2 is notified in the rest of the BIOS ASL. Maybe
the methods _DOS and _DOD under VID2 are there to identify VID2 as a display
adapter device?

On this laptop, the _DOD method triggers an ACPICA warning

ACPI Warning for \_SB_.PCI0.VID2._DOD: Return Package has no elements
(empty) (20100528/nspredef-572)

but, since VID2 conforms to the spec (afaics), is this warning really
deserved?

Best regards,

Grégoire

[1] http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44042

             reply	other threads:[~2010-11-08  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08  9:54  [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-08 21:10 [Devel] Why are empty packages invalid for predefined ACPI objects? Moore, Robert
2010-11-08  4:23 Moore, Robert
2010-11-08  4:12 Moore, Robert
2010-11-06 15:23 

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD7C8C7.7060500@gmail.com \
    --to=devel@acpica.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.