From: Al Stone <ahs3@redhat.com>
To: Adam Goode <agoode@google.com>, linux-acpi@vger.kernel.org
Subject: Re: Registering a device driver before _INI?
Date: Wed, 13 May 2015 13:07:36 -0600 [thread overview]
Message-ID: <5553A0F8.8000505@redhat.com> (raw)
In-Reply-To: <CAOf41NnAjRG-2H=h8pUDBPQs2pePH4GNY0+XNnC+iXiRf30srA@mail.gmail.com>
On 05/13/2015 10:25 AM, Adam Goode wrote:
> The Macmini7,1 addresses SystemCMOS memory in _INI methods. Currently,
> this fails since _INI is called before the acpi_cmos_rtc_space_handler
> is registered.
>
> I proposed registering a default handler on the ACPICA list, but was
> told that because the device has a _HID it should require a device
> driver.
>
> So, is it possible to register a device driver before _INI is called?
> Otherwise, Thunderbolt doesn't get initialized properly on this
> hardware.
I take it from the question that the _INI methods are using the predefined
SystemCMOS OperationRegion, correct? Are the _INI methods invoking _REG
before trying to access that region? Looking at the spec, the _INI methods
must first call _REG to see if SystemCMOS is available for use (see section
6.5.1), and there is no requirement that SystemCMOS must be available for
use by _INI (see 6.5.4). So, if I think about this from the spec point of
view, it sounds like the _INI methods are non-compliant. From the kernel
perspective, the SystemCMOS region is created at a reasonable time and is
available when it is required to be.
It seems to me that the correct answer is that there should indeed be a device
driver connected to the _HID, but that it gets invoked just like any other
driver, and has as part of its probe an invocation of some method to access
the necessary items in the SystemCMOS (maybe add the method in an SSDT loaded
at run-time?). One could also hack around this by moving where in the kernel
the SystemCMOS region gets created to some place before the _INI functions are
invoked, but that feels klunky to me to handle firmware that may not be correct.
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------
next prev parent reply other threads:[~2015-05-13 19:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 16:25 Registering a device driver before _INI? Adam Goode
2015-05-13 19:07 ` Al Stone [this message]
2015-05-13 22:14 ` Rafael J. Wysocki
2015-05-14 12:36 ` Adam Goode
2015-05-14 17:47 ` Al Stone
2015-05-15 16:55 ` Adam Goode
2015-05-15 22:50 ` Rafael J. Wysocki
2015-05-15 22:58 ` Al Stone
2015-05-15 23:29 ` Rafael J. Wysocki
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=5553A0F8.8000505@redhat.com \
--to=ahs3@redhat.com \
--cc=agoode@google.com \
--cc=linux-acpi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox