Formatting cleanup

This commit is contained in:
Mykola Grymalyuk
2020-04-04 18:40:46 -06:00
parent c8440166fd
commit 3187c06553
3 changed files with 32 additions and 18 deletions

View File

@@ -1,9 +1,24 @@
# Compiling and decompiling ACPI Tables
See [General Troubleshooting](https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/troubleshooting/troubleshooting) if you have dumping/compiling errors
* [macOS Compiling and Decompiling](/Manual/compile.md#macos)
* [Windows Compiling and Decompiling](/Manual/compile.md#windows)
* [Linux Compiling and Decompiling](/Manual/compile.md#linux)
## macOS
So compiling DSDTs and SSDTs are quite easy with macOS, all you need is [MaciASL](https://github.com/acidanthera/MaciASL/releases). To compile, just `File -> SaveAs -> ACPI Machine Language Binary(.AML)`, decompiling is just opening the file in MaciASL.
For those who prefer the command line, grab [iasl-stable](https://github.com/acidanthera/MaciASL/blob/master/Dist/iasl-stable) and run the following:
```text
path/to/iasl.exe path/to/DSDT.aml
```
* If compiled .aml file is provided, a decompiled .dsl file will be given and vice versa.
![](https://cdn.discordapp.com/attachments/683011276938543134/695854856681816144/Screen_Shot_2020-04-03_at_10.38.18_PM.png)
## Windows
Compiling and decompiling on windows is fairly simple though, you will need [iasl.exe](https://acpica.org/sites/acpica/files/iasl-win-20180105.zip) and Command Prompt:
@@ -14,7 +29,7 @@ path/to/iasl.exe path/to/DSDT.aml
![](https://i.imgur.com/IY7HMof.png)
If compiled .aml file is provided, a decompiled .dsl file will be given and vice versa.
* If compiled .aml file is provided, a decompiled .dsl file will be given and vice versa.
## Linux
@@ -24,7 +39,4 @@ Compiling and decompiling with Linux is just as simple, you will need a special
path/to/iasl path/to/DSDT.aml
```
If compiled .aml file is provided, a decompiled .dsl file will be given and vice versa.
See [General Troubleshooting](https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/troubleshooting/troubleshooting) if you have dumping/compiling errors
* If compiled .aml file is provided, a decompiled .dsl file will be given and vice versa.

View File

@@ -2,27 +2,28 @@
## A quick explainer on ACPI and how to make SSDTs
So what are DSDTs and SSDTs? Well, these are tables present in your firmware that outline hardware devices like USB controllers, CPU threads, embedded controllers, system clocks and such. A DSDT(Differentiated System Description Table) can be seen as the body holding most of the info with smaller bits of info being passed by the SSDT(Secondary System Description Table)
So what are DSDTs and SSDTs? Well, these are tables present in your firmware that outline hardware devices like USB controllers, CPU threads, embedded controllers, system clocks and such. A DSDT(Differentiated System Description Table) can be seen as the body holding most of the info with smaller bits of info being passed by the SSDT(Secondary System Description Table). You can think of the DSDT as the building blueprints with SSDTs being sticky notes outlining extra details to the project
> So why do we care about these tables?
macOS can be very picky about the devices present in the DSDT and so our job is to correct it. The main devices that need to be corrected for macOS to work properly:
* Embedded controllers(EC)
* All semi-modern intel machines have an EC exposed in their DSDT, with many AMD systems also having it exposed. These controllers are not compatible with macOS so then need to be hidden from macOS and replaced with a dummy EC when running macOS Catalina. With laptops, we still need these ECs so we rename them into what macOS would expect ECs to look like
* All semi-modern intel machines have an EC exposed in their DSDT, with many AMD systems also having it exposed. These controllers are not compatible with macOS so then need to be hidden from macOS and replaced with a dummy EC when running macOS Catalina.
* With laptops, we still need these ECs so we rename them into what macOS would expect ECs to look like
* Plugin type
* This is used to enable native CPU power management on **Intel** Haswell and newer CPUs, the SSDT will connect to the first thread of the CPU. Not meant for AMD
* This allows XCPM to allowing us native CPU power management on **Intel** Haswell and newer CPUs, the SSDT will connect to the first thread of the CPU. Not meant for AMD
* AWAC system clock.
* This applies to all 300 series motherboards including Z370 boards, the specific issue is that newer boards ship with AWAC clock enabled. This is a problem because macOS cannot communicate with AWAC clocks, so this requires us to either force on the Legacy RTC clock or if unavailable create a fake one for macOS to play with
* This applies to all 300 series motherboards including many Z370 boards, the specific issue is that newer boards ship with AWAC clock enabled. This is a problem because macOS cannot communicate with AWAC clocks, so this requires us to either force on the legacy RTC clock or if unavailable create a fake one for macOS to play with
* NVRAM SSDT
* True 300 series motherboards(non-Z370) don't declare the FW chip as MMIO in ACPI and so XNU ignores the MMIO region declared by the UEFI memory map. This SSDT brings back NVRAM support
* True 300 series motherboards(non-Z370) don't declare the FW chip as MMIO in ACPI and so the kernel ignores the MMIO region declared by the UEFI memory map. This SSDT brings back NVRAM support
* Backlight SSDT
* Used for fixing backlight support on laptops
* Used for fixing backlight control support on laptops
* GPIO SSDT
* Used for creating a stub to allow VoodooI2C to connect onto, for laptops only
* XOSI SSDT
* Used for rerouting OSI calls to this SSDT, mainly used for tricking our hardware into thinking its booting Windows so we get better trackpad support. For laptops only
* IRQ SSDT and ACPI patch
* IRQ SSDT and ACPI patches
* Needed for fixing IRQ conflicts within the DSDT, for laptops mainly. SSDTTime exclusive
## What SSDTs do each platform need
@@ -69,6 +70,7 @@ Please see the **specific ACPI section of your config.plist**, all SSDTs needed
**Skylake-X:**
* [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl)
* [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl)
* [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl)
### Laptop

View File

@@ -12,11 +12,11 @@ What this tool does is dumps your DSDT from your firmware, and then creates SSDT
* **Laptop EC fix**:
* This is because you need to use an ACPI rename over an SSDT on laptops
* **SSDT-PNLF**:
* No need to configuration required for most, use prebuilt file [here](https://github.com/khronokernel/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-PNLF.aml)
* Need to be configured to your system
* **SSDT-GPI0**:
* Need to be configured to your system: [SSDT-GPI0.dsl](https://github.com/khronokernel/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPI0.dsl)
* Need to be configured to your system
* **AWAC and RTC0 SSDTs**:
* 300 series intel boards will also need to figure his out(Z390 systems are most common for requiring this but some gigabyte Z370 do as well)
* 300 series intel boards will also need to figure his out(Z390 systems are most common for requiring this but some Gigabyte Z370 do as well)
* **PMC SSDT**:
* For fixing 300 series intel NVRAM
* **USBX SSDT**:
@@ -46,17 +46,17 @@ What we want to do is select option `4. Dump DSDT` first, then select the approp
> What about USBX?
For Skylake+ and AMD, you can grab a prebuilt file here: [SSDT-USBX.aml](https://github.com/khronokernel/Opencore-Vanilla-Desktop-Guide/blob/master/extra-files/SSDT-USBX.aml). This file is plug and play and requires no device configuration, **do not use on Broadwell and older**.
For Skylake and newer plus AMD, you can grab a prebuilt file here: [SSDT-USBX.aml](https://github.com/khronokernel/Opencore-Vanilla-Desktop-Guide/blob/master/extra-files/SSDT-USBX.aml). This file is plug and play and requires no device configuration, **do not use on Broadwell and older**.
**Troubleshooting note**: See [General Troubleshooting](https://khronokernel.github.io/Opencore-Vanilla-Desktop-Guide/troubleshooting/troubleshooting.html) if you're having issues running SSDTTime
## Adding to OpenCore
Don't forget that SSDTs need to be added to Opencore, eminder that .aml is complied, .dsl is code. **Add only the .aml file**:
Don't forget that SSDTs need to be added to Opencore, reminder that .aml is complied, .dsl is code. **Add only the .aml file**:
* EFI/OC/ACPI
* config.plist -> ACPI -> Add
Reminder that Cmd/Crtl+R with ProperTree pointed at your OC folder will add all your SSDTs, kexts and .efi drivers to the config for you. **Do not add your DSDT to OpenCore, its already in your firmware**
Reminder that Cmd/Crtl+R with ProperTree pointed at your OC folder will add all your SSDTs, kexts and .efi drivers to the config for you. **Do not add your DSDT to OpenCore, its already in your firmware**. If you are unsure what this is referring to, go back to the OpenCore guide and select your config based of the architecture of your CPU.
Users of `FixHPET` will also need to merge oc_patches.plist into their config.plist