> Date: Mon, 10 Sep 2018 16:24:23 +0200
> From: e...@xs4all.nl
> 
> On 2018-09-09 21:01, Mark Kettenis wrote:
> >> From: =?UTF-8?Q?Eric_Aug=C3=A9?= <e...@unix4fun.net>
> >> Date: Sat, 8 Sep 2018 11:26:48 +0200
> >> 
> >> ok.
> >> hth,
> >> Eric.
> > 
> > Thanks,
> > 
> > It looks like the hardware is in some sort of BIOS-assisted hotplug
> > mode.  The AML for the _L61 event fiddles with some hotplug related
> > registers on the PCIe port that is used for Thunderbolt.  Under
> 
> Ok, now discovering that "BIOS-assisted hotplug", more blur..
> I just see a guy ranting about Intel decision to notify through GPIO 
> instead of native pci event, guess I need some more time to understand 
> the whole picture (any docs appreciated).
> cf:
> https://www.reddit.com/r/thinkpad/comments/7wgh9c/x1_yoga_3rd_new_thunderbolt_controllers_jhl7540/dv8z5kc/

Unfortunately Intel doesn't release any meaningful documentation on
Thunderbolt.

> > certain conditions it will also notify the driver.  That doesn't seem
> > to happen for this event though.  It wouldn't help though since
> > OpenBSD doesn't support BIOS-assiested hotplug.  Instead we support
> > native PCIe hotplug.  It looks like the hardware has to be switched
> > into native PCIe mode by using a magic _OSC call.
> 
> _OSC? this method in DSDT?
> Method (_OSC, 4, Serialized)  // _OSC: Operating System Capabilities

Right.

> Is it documented somewhere? (probably a naive question..)
> Do you hope that the "magic" call with switch the delivery of hotplug 
> event through PCI instead of that ACPI stuff?

The specific _OSC in question is documented in the "PCI Firmware
Specification Revision 3.0" (and later versions of that document.
Unfortunately the hardware vendors make you pay several thousands of
dollars for access to that document.  But sometimes Google is your
friend...

The generic principle of the _OSC interface is documented in the ACPI
specification.

> Guess I need more kernel src reading to grasp the whole PCI 
> enumeration/driver loading process as it is not clear yet (any docs 
> appreciated).
> and continue my candid exploration/investigation in hope for more clues 
> and understanding.

The important bits are in dev/pci/ppb.c

> so if _OSC call works, nothing else is to change, the hotplug event will 
> go through another "path" (already handled) instead of ACPI GPE, 
> correct?

That's the theory...

Reply via email to