lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131202162938.GA11241@srcf.ucam.org>
Date:	Mon, 2 Dec 2013 16:29:39 +0000
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	Andreas Noever <andreas.noever@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/12] Thunderbolt hotplug support for Apple hardware
 (testers needed)

On Fri, Nov 29, 2013 at 02:35:37AM +0100, Andreas Noever wrote:> 
> There are still a number of limitations:
>  (1) The system must be booted with acpi_osi=Darwin. Otherwise ACPI will cut
> power to the controller.
>  (2) After suspend the controller is gone. I think that ACPI thinks that we are
> Windows and cuts power, even with acpi_osi=Darwin.

There's a few ACPI methods involved here. The first is DTLK, which is 
called by the firmware on resume. It'll cut power to the chip. So, you 
need to be able to power it back up. However, you only want to power it 
up if there's a device connected. The XRIL method will return 1 if 
there's a device connected and 0 otherwise. If there's a device 
connected, call XRPE with an argument of 1 to power it back up.

That works fine if there's no hotplugging involved, but there is so 
things get a little more complicated. Apple provide an out of band 
mechanism for receiving notifications on the device. Call the _GPE 
method and install a gpe handler for the value that you get back. This 
will be called on every device plug or unplug (possibly just plug? It's 
been a while since I tested). Call XRIL to confirm that there's a device 
attached and then call XRPE to power it up.

At least, that's my recollection. There's also the SXIO, SXIL, SXLV and 
SXFP methods that provide some kind of power management, but I'm not 
sure how those fit in.

If you want to confirm that you're supposed to be using these methods, 
call _DSM on the device with a UUID of 
C6B7B5A0-1813-1C44-B0C9-FE695EAF949B (see DTGP in the DSDT), arg1 of 1, 
arg2 of 0. If it's an Apple you'll get back return value of 1 and a 
buffer containing the string "power-save". If it's not an Apple, or if 
the device doesn't support power saving, you'll get back a zero or an 
error that the method wasn't found.


-- 
Matthew Garrett | mjg59@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ