Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for SSDTs #174

Open
AlexDanDuna opened this issue Sep 6, 2022 · 1 comment
Open

Improve documentation for SSDTs #174

AlexDanDuna opened this issue Sep 6, 2022 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@AlexDanDuna
Copy link

AlexDanDuna commented Sep 6, 2022

I really hope this is not too much to ask as I know you are doing us all a favor by sharing this, @tylernguyen , but would it be possible to add a few more explanations as to what the SSDTs XHC1, XHC2, SSDT-TB3, along with each of the TB-DSB* actually do? More precisely, what do you mean by fixing USB 3.1 (associated with the TB-DSBs) and fixing USB power management (XHC1)?

I am mainly interested in them because I would like to know how I could adapt them for an X1 Yoga Gen3.

@tylernguyen tylernguyen added enhancement New feature or request question Further information is requested labels Sep 12, 2022
@tylernguyen
Copy link
Owner

tylernguyen commented Sep 13, 2022

@PhantomR

I can update the docs with a basic explaination. But the majority of what is done is already explained here: https://osy.gitbook.io/hac-mini-guide/details/thunderbolt-3-fix

You'll have to be familiar with reading ASL source code and understanding it. The majority of the patch is just enumerating the controller. See https://github.com/tylernguyen/x1c6-hackintosh/blob/main/ACPI/Disassembled%20ACPI/BIOS-v1.43/SSDT-7-TbtTypeC.dsl for the way it's originally enumerated.

The other part of the patch is just USB mapping.

You'll occasionally see debug hooks in the patch, these are in there during the patch process in order to determine the specific event when they happen.

If you want to adapt the patch to your machine:

  1. Dump your orignal full ACPI, specfically look for something similar to SSDT-7-TbtTypeC
  2. Map your USB, but do so via ACPI hotpatch instead of a kext.
  3. Use OpenCore Debug, and the other debug kexts from Acidanthera in conjunction with https://github.com/tylernguyen/x1c6-hackintosh/blob/main/patches/Debug%20Patches/SSDT-HOOKS.dsl and https://github.com/tylernguyen/x1c6-hackintosh/blob/main/patches/Debug%20Patches/SSDT-Debug.dsl in order to determine Thunderbolt/USB events for your machine.
  4. From there, it's just a matter of trial and error. This is where the resources from https://osy.gitbook.io/hac-mini-guide/details/thunderbolt-3-fix help when writing the patch for a vanilla BIOS.

NOTE that the way the patches are done here:
SSDT-XHC1.dsl is for USB 2 and USB 3 mapping/patching.
SSDT-TB-DSB2-XHC2.dsl is for USB3.1 mapping and patching
SSDT-TB-DSB* are just there to initiate/enumerate the controller.

EDIT: You'll need an understanding of ASL source to read/write patches. See https://acpica.org/sites/acpica/files/asl_tutorial_v20190625.pdf for a tutorial/ref of ASL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants