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.juszkiew...@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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to