public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH edk2-platforms WIP 0/5] Provide EHCI or XHCI USB controller
@ 2023-10-13 12:28 Marcin Juszkiewicz
  2023-10-13 12:28 ` [edk2-devel] [PATCH edk2-platforms WIP 1/5] SbsaQemu: introduce macro to compare platform version Marcin Juszkiewicz
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Marcin Juszkiewicz @ 2023-10-13 12:28 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Jeremy Linton

Platform version 0.3 introduced XHCI USB controller instead of EHCI one.
But we did it in a way that there is no in-EDK2 check for platform
version (XHCI is always given).

This behaviour works with Linux as it complains about being unable to
initialize EHCI and goes on. Free/Net/Open BSD systems hang in such
situation.

So two solutions came to my mind:

1. rewrite DSDT generation into C
2. provide EHCI/XHCI in SSDT table instead of DSDT

This changeset is my attempt for the second solution. Idea is to have
both EHCI and XHCI as ASL code and then use
LocateAndInstallAcpiFromFvConfitional() function to choose which one
should be provided (based on PlatformVersion being less than 0.3 for
EHCI).

This does not work as LocateAndInstallAcpiFromFvConfitional() only sees
DBG2 and FACP tables. There was one or two moments when it saw all
generated ones so I assume some kind of race condition.

Any ideas what I did wrong? All patches are work-in-progress.

---
Marcin Juszkiewicz (5):
      SbsaQemu: introduce macro to compare platform version
      WIP: SbsaQemu: rename USB controller variables to be generic
      SbsaQemu: move XHCI to SSDT
      SbsaQemu: add EHCI to SSDT
      WIP: try to enable/disable proper USB controller

 Silicon/Qemu/SbsaQemu/SbsaQemu.dec                  |   4 +-
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc                 |   6 +-
 Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf     |   6 +-
 .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf     |   3 +
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf     |   4 +-
 .../IndustryStandard/SbsaQemuPlatformVersion.h      |  25 ++++
 .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c       |  62 +++++++++
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c       |   4 +-
 Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl           | 116 -----------------
 Silicon/Qemu/SbsaQemu/AcpiTables/Ehci.asl           | 132 ++++++++++++++++++++
 Silicon/Qemu/SbsaQemu/AcpiTables/Xhci.asl           | 132 ++++++++++++++++++++
 11 files changed, 368 insertions(+), 126 deletions(-)
---
base-commit: 06f6274d56422084281886fad447ab117fd0e487
change-id: 20231013-ehci-xhci-fix-c529356a7a8f

Best regards,
-- 
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109586): https://edk2.groups.io/g/devel/message/109586
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-13 17:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox