public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io, Gerd Hoffmann <kraxel@redhat.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jeremy Linton <jeremy.linton@arm.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms WIP 0/5] Provide EHCI or XHCI USB controller
Date: Fri, 13 Oct 2023 19:29:31 +0200	[thread overview]
Message-ID: <7f3f36ac-2e7c-4861-885f-6bed69fff1db@linaro.org> (raw)
In-Reply-To: <178DADF696DC483E.8679@groups.io>

W dniu 13.10.2023 o 15:31, Marcin Juszkiewicz via groups.io pisze:
> W dniu 13.10.2023 o 15:24, Gerd Hoffmann pisze:
> 
>>> So two solutions came to my mind:
>>>
>>> 1. rewrite DSDT generation into C
>>
>> You might want have a look at DynamicTablesPkg/ for that
> 
> Wasn't is involving using ConfigurationManager? Or maybe I just had 
> wrong assumption after reading code.

>>> 2. provide EHCI/XHCI in SSDT table instead of DSDT
>>
>> Should work, except that I'd suggest to worry about xhci only.
>> ehci never actually worked anyway, so why advertise it to the OS in the
>> first place?
> 
> Good point.

Got rid of EHCI at all. On >= 0.3 XHCI is created, otherwise there is no 
USB controller in DSDT.

>> 3. Add a _STA AML function to the XHCI DSDT description, which is able
>> to figure whenever XHCI is present.
>>
>> We had that in qemu years ago, before switching to full DSDT generation,
>> where the _STA functions checked some bit in PCI config space of the ISA
>> bridge to figure whenever specific isa devices (floppy, serial/parallel
>> port) are present or not.

> Will look.

Our XHCI is on sysbus so checking PCI_config is not an option.


4. Add variable in ASL + check in _STA for it. And alter that variable 
from C code once DSDT is done. Kind of what Ampere does in 
JadePkg/**/AcpiDsdt.c file.


I am also thinking of going back to 2nd version and handle it on 
ExitBootServicesEvent event (again: Ampere/JadePkg). All ACPI tables 
should be ready at that moment...



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109607): https://edk2.groups.io/g/devel/message/109607
Mute This Topic: https://groups.io/mt/101938735/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      parent reply	other threads:[~2023-10-13 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 12:28 [edk2-devel] [PATCH edk2-platforms WIP 0/5] Provide EHCI or XHCI USB controller Marcin Juszkiewicz
2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 1/5] SbsaQemu: introduce macro to compare platform version Marcin Juszkiewicz
2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 2/5] WIP: SbsaQemu: rename USB controller variables to be generic Marcin Juszkiewicz
2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 3/5] SbsaQemu: move XHCI to SSDT Marcin Juszkiewicz
2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 4/5] SbsaQemu: add EHCI " Marcin Juszkiewicz
2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 5/5] WIP: try to enable/disable proper USB controller Marcin Juszkiewicz
2023-10-13 13:24 ` [edk2-devel] [PATCH edk2-platforms WIP 0/5] Provide EHCI or XHCI " Gerd Hoffmann
2023-10-13 13:31   ` Marcin Juszkiewicz
     [not found]   ` <178DADF696DC483E.8679@groups.io>
2023-10-13 17:29     ` Marcin Juszkiewicz [this message]

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-list 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=7f3f36ac-2e7c-4861-885f-6bed69fff1db@linaro.org \
    --to=devel@edk2.groups.io \
    /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