On 2018-09-09 21:01, Mark Kettenis wrote:
From: =?UTF-8?Q?Eric_Aug=C3=A9?= <[email protected]>
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/
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
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?
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.
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?
if not?
Thanks,
Eric.
On Sat, Sep 8, 2018 at 11:09 AM Mark Kettenis
<[email protected]> wrote:
>
> > Date: Sat, 8 Sep 2018 02:31:12 +0200 (CEST)
> > From: [email protected]
>
> > 154320 Aug 13 01:25:32 klamboe /bsd: ACPIEC: got gpe
> > 154321 Aug 13 01:25:32 klamboe /bsd: GPE block: 10 40 c0
> > 154322 Aug 13 01:25:32 klamboe /bsd: queue gpe: 16
> > 154323 Aug 13 01:25:32 klamboe /bsd: handle gpe: 16
> > 154324 Aug 13 01:25:32 klamboe /bsd: ACPIEC: got gpe
> > 154325 Aug 13 01:25:36 klamboe /bsd: GPE block: 60 02 46
> > 154326 Aug 13 01:25:36 klamboe /bsd: queue gpe: 61
> > 154327 Aug 13 01:25:36 klamboe /bsd: handle gpe: 61
> > 154328 Aug 13 01:25:36 klamboe /bsd: handling GPE 61
> > 154329 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_GPE._L61 f7c5e
> > 154330 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_GPE._L61 f7c5e
> > 154331 Aug 13 01:25:36 klamboe /bsd: --== Eval Method [\\_GPE._L61, 0 args]
to t ==--
> > 154332 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_GPE._L61:Method
> > 154333 Aug 13 01:25:36 klamboe /bsd: parsename: \\_SB_.PCI0.RP09.VDID 5
> > 154334 Aug 13 01:25:36 klamboe /bsd: read 02 00000000 0020
[\\_SB_.PCI0.RP09.PXCS]
> > 154335 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0.RP09._ADR f7cf6
> > 154336 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0.RP09._ADR f7cf6
> > 154337 Aug 13 01:25:36 klamboe /bsd: --== Eval Method
[\\_SB_.PCI0.RP09._ADR, 0 args] to t ==--
> > 154338 Aug 13 01:25:36 klamboe /bsd: ===== Stack
\\_SB_.PCI0.RP09._ADR:Method
> > 154339 Aug 13 01:25:36 klamboe /bsd: parsename: \\RPA9 5
> > 154340 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154341 Aug 13 01:25:36 klamboe /bsd: aml_evalexpr: LNotEqual 1d0000 0 =
ffffffffffffffff
> > 154342 Aug 13 01:25:36 klamboe /bsd: quick: 7e03 [LNotEqual] alloc return
integer = 0xffffffffffffffff
> > 154343 Aug 13 01:25:36 klamboe /bsd: parse-if @ 7e01
> > 154344 Aug 13 01:25:36 klamboe /bsd: parsename: \\RPA9 5
> > 154345 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154346 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154347 Aug 13 01:25:36 klamboe /bsd: --==Finished evaluating method:
\\_SB_.PCI0.RP09._ADR t
> > 154348 Aug 13 01:25:36 klamboe /bsd: 0xffff800001024008 cnt:01 stk:00
integer: 1d0000
> > 154349 Aug 13 01:25:36 klamboe /bsd: ===== Stack
\\_SB_.PCI0.RP09._ADR:Method
> > 154350 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0._BBN f7cf6
> > 154351 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0._BBN f7cf6
> > 154352 Aug 13 01:25:36 klamboe /bsd: --== Eval Method [\\_SB_.PCI0._BBN, 0
args] to t ==--
> > 154353 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.PCI0._BBN:Method
> > 154354 Aug 13 01:25:36 klamboe /bsd: parsename: \\_SB_.BN00 8
> > 154355 Aug 13 01:25:36 klamboe /bsd: parsename: \\_SB_.BN00 8
> > 154356 Aug 13 01:25:36 klamboe /bsd: --== Eval Method [\\_SB_.BN00, 0 args]
to t ==--
> > 154357 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.BN00:Method
> > 154358 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.BN00:Method
> > 154359 Aug 13 01:25:36 klamboe /bsd: --==Finished evaluating method:
\\_SB_.BN00 t
> > 154360 Aug 13 01:25:36 klamboe /bsd: 0xffff8000010edc88 cnt:01 stk:00
integer: 0
> > 154361 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.BN00:Method
> > 154362 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.BN00:Method
> > 154363 Aug 13 01:25:36 klamboe /bsd: --==Finished evaluating method:
\\_SB_.PCI0._BBN t
> > 154364 Aug 13 01:25:36 klamboe /bsd: 0xffff8000010edd88 cnt:01 stk:00
integer: 0
> > 154365 Aug 13 01:25:36 klamboe /bsd: ===== Stack \\_SB_.PCI0._BBN:Method
> > 154366 Aug 13 01:25:36 klamboe /bsd: aml_evalexpr: LNotEqual 9d188086
ffffffff = ffffffffffffffff
> > 154367 Aug 13 01:25:36 klamboe /bsd: quick: 175a3 [LNotEqual] alloc return
integer = 0xffffffffffffffff
> > 154368 Aug 13 01:25:36 klamboe /bsd: parsename: \\_SB_.PCI0.RP09.HPSX 5
> > 154369 Aug 13 01:25:36 klamboe /bsd: read 02 000000df 0001
[\\_SB_.PCI0.RP09.PXCS]
> > 154370 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0.RP09._ADR f7d3e
> > 154371 Aug 13 01:25:36 klamboe /bsd: EVALNODE: \\_SB_.PCI0.RP09._ADR f7d3e
> > 154372 Aug 13 01:25:36 klamboe /bsd: --== Eval Method
[\\_SB_.PCI0.RP09._ADR, 0 args] to t ==--
> > 154373 Aug 13 01:25:36 klamboe /bsd: ===== Stack
\\_SB_.PCI0.RP09._ADR:Method
> > 154374 Aug 13 01:25:36 klamboe /bsd: parsename: \\RPA9 5
> > 154375 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154376 Aug 13 01:25:36 klamboe /bsd: aml_evalexpr: LNotEqual 1d0000 0 =
ffffffffffffffff
> > 154377 Aug 13 01:25:36 klamboe /bsd: quick: 7e03 [LNotEqual] alloc return
integer = 0xffffffffffffffff
> > 154378 Aug 13 01:25:36 klamboe /bsd: parse-if @ 7e01
> > 154379 Aug 13 01:25:36 klamboe /bsd: parsename: \\RPA9 5
> > 154380 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154381 Aug 13 01:25:36 klamboe /bsd: read 00 4ff5f03c 0020 [\\PNVA]
> > 154382 Aug 13 01:25:36 klamboe /bsd: --==Finished evaluating method:
\\_SB_.PCI0.RP09._ADR t
> > ...
> > I can provide the rest of it, if necessary.
>
> Please do.
--000000000000fae59c057558ba3e
Content-Type: text/plain; charset=us-ascii
X-Former-Content-Type: application/octet-stream;
name="isolated_event.txt.bz2"
X-Former-Content-Disposition: attachment;
filename="isolated_event.txt.bz2"
Content-Transfer-Encoding: 7bit
X-Former-Content-Transfer-Encoding: base64
Content-ID: <f_jlt84maz0>
X-Attachment-Id: f_jlt84maz0
[file:/home/kettenis/detached/isolated_event.txt_0001.bz2]
--000000000000fae59c057558ba3e--