Misc lint'ing

This commit is contained in:
Mykola Grymalyuk
2020-04-30 09:40:37 -06:00
parent 37c3a68375
commit 46110a598e
14 changed files with 105 additions and 69 deletions

View File

@@ -1,7 +1,7 @@
# Fixing Embedded Controller (Desktop) # Fixing Embedded Controller (Desktop)
## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page. ## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page
What we'll be doing is hiding our actual EC and creating a fake Embedded Comtroller for macOS to play with. What we'll be doing is hiding our actual EC and creating a fake Embedded Comtroller for macOS to play with.

View File

@@ -1,6 +1,6 @@
# Fixing Embedded Controller (Laptop) # Fixing Embedded Controller (Laptop)
## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page. ## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page
To fix the ECs found in laptops, we'll be renaming them to look like the ones macOS expects. The reason for this is that many laptops break when you turn off their EC with an SSDT. So this is why we can't use the fancy SSDTTime to make a patch for us. To fix the ECs found in laptops, we'll be renaming them to look like the ones macOS expects. The reason for this is that many laptops break when you turn off their EC with an SSDT. So this is why we can't use the fancy SSDTTime to make a patch for us.

View File

@@ -67,4 +67,4 @@ So if you're still having issues enabling your trackpad in macOS, you can try re
| Count | Number | 0 | | Count | Number | 0 |
| Limit | Nuber | 0 | | Limit | Nuber | 0 |
| Find | Data | 5f4f5349 | | Find | Data | 5f4f5349 |
| Replace | Data | 584f5349 | | Replace | Data | 584f5349 |

View File

@@ -12,9 +12,9 @@ You can read more about ACPI and it's spec here: [ACPI 6.3 Manual](https://uefi.
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: 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) * Embedded controllers(EC)
* All semi-modern intel machines have an EC (usually called H\_EC, ECDV, EC0, etc...) exposed in their DSDT, with many AMD systems also having it exposed. These controllers are generally not compatible with macOS and can cause panics, so then need to be hidden from macOS. macOS Catalina requires a device named `EC` to be present though, so a dummy EC is created. * All semi-modern intel machines have an EC (usually called H\_EC, ECDV, EC0, etc...) exposed in their DSDT, with many AMD systems also having it exposed. These controllers are generally not compatible with macOS and can cause panics, so then need to be hidden from macOS. macOS Catalina requires a device named `EC` to be present though, so a dummy EC is created.
* With laptops, the actual embedded controller still needs to be enabled for battery and hotkeys to work, and renaming the EC can additionally cause issues with windows, so creating a fake EC without disabling the real embedded controller is preferable to renaming. * With laptops, the actual embedded controller still needs to be enabled for battery and hotkeys to work, and renaming the EC can additionally cause issues with windows, so creating a fake EC without disabling the real embedded controller is preferable to renaming.
* Plugin type * Plugin type
* This allows the use of XCPM providing 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 the use of XCPM providing 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. * AWAC system clock.
@@ -22,13 +22,13 @@ macOS can be very picky about the devices present in the DSDT and so our job is
* NVRAM SSDT * NVRAM SSDT
* 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 * 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 * Backlight SSDT
* Used for fixing backlight control support on laptops * Used for fixing backlight control support on laptops
* GPIO SSDT * GPIO SSDT
* Used for creating a stub to allow VoodooI2C to connect onto, for laptops only * Used for creating a stub to allow VoodooI2C to connect onto, for laptops only
* XOSI SSDT * 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. This is a very hacky solution known for breaking Windows boot, use the GPIO SSDT instead. Usage of XOSI will not be covered in this guide * 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. This is a very hacky solution known for breaking Windows boot, use the GPIO SSDT instead. Usage of XOSI will not be covered in this guide
* IRQ SSDT and ACPI patches * IRQ SSDT and ACPI patches
* Needed for fixing IRQ conflicts within the DSDT, for laptops mainly. SSDTTime exclusive * Needed for fixing IRQ conflicts within the DSDT, for laptops mainly. SSDTTime exclusive
## What SSDTs do each platform need ## What SSDTs do each platform need
@@ -36,21 +36,19 @@ Please see the **specific ACPI section of your config.plist**, all SSDTs needed
### Desktop ### Desktop
| SSDT | IvyBridge | Haswell/Broadwell | Skylake | KabyLake | CoffeeLake | CometLake | AMD(15/16/17h) | | SSDT | IvyBridge | Haswell/Broadwell | Skylake | KabyLake | CoffeeLake | CometLake | AMD(15/16/17h) |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **CPU** | [CPU-PM](https://github.com/Piker-Alpha/ssdtPRGen.sh)(Run in Post-Install) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | N/A | | **CPU** | [CPU-PM](https://github.com/Piker-Alpha/ssdtPRGen.sh)(Run in Post-Install) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | N/A |
| **EC** | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | | **EC** | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) |
| **AWAC** | N/A | N/A | N/A | N/A | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | N/A | | **AWAC** | N/A | N/A | N/A | N/A | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | N/A |
| **NVRAM** | N/A | N/A | N/A | N/A | [SSDT-PMC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PMC.dsl) | [SSDT-PMC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PMC.dsl) | N/A | | **NVRAM** | N/A | N/A | N/A | N/A | [SSDT-PMC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PMC.dsl) | [SSDT-PMC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PMC.dsl) | N/A |
### High End Desktop ### High End Desktop
| SSDT | IvyBridge-E | Haswell-E | Broadwell-E | Skylake-X | | SSDT | IvyBridge-E | Haswell-E | Broadwell-E | Skylake-X |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **CPU** | [CPU-PM](https://github.com/Piker-Alpha/ssdtPRGen.sh)(Run in Post-Install) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | | **CPU** | [CPU-PM](https://github.com/Piker-Alpha/ssdtPRGen.sh)(Run in Post-Install) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) |
| **EC** | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | | **EC** | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) |
| **AWAC** | N/A | N/A | N/A | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | | **AWAC** | N/A | N/A | N/A | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) |
### Laptop ### Laptop

View File

@@ -5,6 +5,7 @@
* [SSDTs: Long Way](ssdt-long.md) * [SSDTs: Long Way](ssdt-long.md)
## Manual ## Manual
* [Dumping the DSDT](/Manual/dump.md) * [Dumping the DSDT](/Manual/dump.md)
* [Decompiling and Compiling](/Manual/compile.md) * [Decompiling and Compiling](/Manual/compile.md)
@@ -20,7 +21,7 @@
## Universal ## Universal
* [Embedded Controller ](/Universal/ec-fix.md) * [Embedded Controller](/Universal/ec-fix.md)
* [Plugin type](/Universal/plug.md) * [Plugin type](/Universal/plug.md)
* [AWAC vs RTC](/Universal/awac.md) * [AWAC vs RTC](/Universal/awac.md)
* [NVRAM PMC](/Universal/nvram.md) * [NVRAM PMC](/Universal/nvram.md)

View File

@@ -10,18 +10,17 @@
* Z370 (Gigabyte and AsRock boards with newer BIOS versions) * Z370 (Gigabyte and AsRock boards with newer BIOS versions)
* Z390 * Z390
* 400 series (Cometlake) * 400 series (Cometlake)
* 495 series (Icelake) * 495 series (Icelake)
So on newer Intel 300 series motherboards, manufactures started pushing for a new type of system clock: **AWAC**( **A** **W**eird **A**ss **C**lock). One small problem, macOS doesn't know what the hell an AWAC clock is instead only familiar with the legacy **RTC**(**R**eal **T**ime **C**lock). So we need to figure out how to bring back the old clock, thats where `SSDT-AWAC` and `SSDT-RTC0` come in: So on newer Intel 300 series motherboards, manufactures started pushing for a new type of system clock: **AWAC**( **A** **W**eird **A**ss **C**lock). One small problem, macOS doesn't know what the hell an AWAC clock is instead only familiar with the legacy **RTC**(**R**eal **T**ime **C**lock). So we need to figure out how to bring back the old clock, thats where `SSDT-AWAC` and `SSDT-RTC0` come in:
* [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) * [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl)
* Disables AWAC and enables RTC * Disables AWAC and enables RTC
* In your DSDT, there's a variable called `STAS` used for holding either a `One` or `Zero` to determine which clock to use(`One` for RTC and `Zero` for AWAC) * In your DSDT, there's a variable called `STAS` used for holding either a `One` or `Zero` to determine which clock to use(`One` for RTC and `Zero` for AWAC)
* [SSDT-RTC0](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-RTC0.dsl)
* Used for creating a fake RTC device for macOS to play with
* In very rare circumstances, some DSDTs may not have a legacy RTC to fall back on. When this happens, we'll want to create a fake device to make macOS happy
* [SSDT-RTC0](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-RTC0.dsl)
* Used for creating a fake RTC device for macOS to play with
* In very rare circumstances, some DSDTs may not have a legacy RTC to fall back on. When this happens, we'll want to create a fake device to make macOS happy
Note: AWAC actually stands for ACPI Wake Alarm Counter/Clock for those curious, though I'll forever know it as A Weird Ass Clock ;p Note: AWAC actually stands for ACPI Wake Alarm Counter/Clock for those curious, though I'll forever know it as A Weird Ass Clock ;p
@@ -43,5 +42,4 @@ By default the SSDT uses `LPCB`, you can check what your system uses by just sea
![](/images/Universal/awac-md/lpc.png) ![](/images/Universal/awac-md/lpc.png)
## [Now you're ready to compile the SSDT!](/Manual/compile.md) ## [Now you're ready to compile the SSDT!](/Manual/compile.md)

View File

@@ -96,7 +96,7 @@ When this happens you need to figure out which is the main and which is not, it'
Note if you have an STA Method as well, see below: [STA Edge Case](/Desktops/desktop-ec.md#sta-edge-case) Note if you have an STA Method as well, see below: [STA Edge Case](/Desktops/desktop-ec.md#sta-edge-case)
### What happens if no `PNP0C09` show up? ### What happens if no `PNP0C09` show up
This means you only need to fake an Embedded Controller rather so that AppleBusPowerController will load and handle USB power properly and continue booting. To make the actual SSDT, its *almost* plug and play as no uncommenting needed. The main thing that needs to be changed: This means you only need to fake an Embedded Controller rather so that AppleBusPowerController will load and handle USB power properly and continue booting. To make the actual SSDT, its *almost* plug and play as no uncommenting needed. The main thing that needs to be changed:

View File

@@ -8,14 +8,14 @@ This SSDT is required for all "true" 300 series motherboards and newer(Z370 is e
* H370 * H370
* Z390 * Z390
* 400 series (Cometlake) * 400 series (Cometlake)
* 495 series (Icelake) * 495 series (Icelake)
By default it uses `PCI0.LPCB` for the PCI and LowPinCount path. The device names can vary between `PC00` and `PCI0` for PCI path and `LPCB`, `LBC` and `LBC0` for LowPinCount path. To see what you have: By default it uses `PCI0.LPCB` for the PCI and LowPinCount path. The device names can vary between `PC00` and `PCI0` for PCI path and `LPCB`, `LBC` and `LBC0` for LowPinCount path. To see what you have:
* Finding the LowPinCount path: * Finding the LowPinCount path:
* Intel: Search `Name (_ADR, 0x001F0000)` * Intel: Search `Name (_ADR, 0x001F0000)`
* Finding the PCI path: * Finding the PCI path:
* Intel: Search `PNP0A08` (If multiple show up, use the first one) * Intel: Search `PNP0A08` (If multiple show up, use the first one)
![](/images/Universal/nvram-md/lpc.png) ![](/images/Universal/nvram-md/lpc.png)

View File

@@ -4,13 +4,15 @@ CPU naming is fairly easy to figure out as well, open your decompiled DSDT and s
![](/images/Universal/plug-md/processor.png) ![](/images/Universal/plug-md/processor.png)
As we can see, the first processor in our list is `PR00`. This is what we'll be applying the `plugin-type=1` property too. Now grab [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) and replace the default `CPU0` with our `PR00`. There's a couple things to note: As we can see, the first processor in our list is `PR00`. This is what we'll be applying the `plugin-type=1` property too. Now grab [SSDT-PLUG](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-PLUG.dsl.zip) and replace the default `CPU0` with our `PR00`. There's a couple things to note:
* There's 2 mentions of CPU0 to change * There's 2 mentions of CPU0 to change
* The `PR` path may need to be changed, in our example we can see that our `PR00` has `SB` in front. * The `PR` path may need to be changed, in our example we can see that our `PR00` has `SB` in front.
So in our final example, we'd have `_SB_.PR00` and `\_SB.PR00` So in our final example, we'd have `_SB_.PR00` and `\_SB.PR00`
* **Note**: If you're having issues, see the [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) provided by Acidanthera for example on what other ACPI paths may look like.
There are also some edge cases with `Processor`, specifically on HEDT series like X79, X99 and X299. This edge case is that the ACPI path is much longer and not so obvious: There are also some edge cases with `Processor`, specifically on HEDT series like X79, X99 and X299. This edge case is that the ACPI path is much longer and not so obvious:
![](/images/Universal/plug-md/processor-2.png) ![](/images/Universal/plug-md/processor-2.png)
@@ -21,7 +23,6 @@ If we then search for instances of `CP00` we find that it's ACPI path is `SB.SCK
So for this X299 board, we'd change `\_PR.CPU0` with `\_SB.SCK0.CP00` and `External (_PR_.CPU0, ProcessorObj)` with `External (_SB_.SCK0.CP00, ProcessorObj)` So for this X299 board, we'd change `\_PR.CPU0` with `\_SB.SCK0.CP00` and `External (_PR_.CPU0, ProcessorObj)` with `External (_SB_.SCK0.CP00, ProcessorObj)`
```text ```text
External (_PR_.CPU0, ProcessorObj) <- Rename this External (_PR_.CPU0, ProcessorObj) <- Rename this

View File

@@ -2,18 +2,16 @@
This section of the guide refers to fixing AppleSMBus support in macOS, what is AppleSMBus? Well this mainly handles the System Management Bus, which has many functions like: This section of the guide refers to fixing AppleSMBus support in macOS, what is AppleSMBus? Well this mainly handles the System Management Bus, which has many functions like:
* AppleSMBusController * AppleSMBusController
* Aids with correct temperature, fan, voltage, ICH, etc readings * Aids with correct temperature, fan, voltage, ICH, etc readings
* AppleSMBusPCI * AppleSMBusPCI
* Same idea as AppleSMBusController except for low bandwidth PCI devices * Same idea as AppleSMBusController except for low bandwidth PCI devices
* Memory Reporting * Memory Reporting
* Aids in proper memory reporting and can aid in getting better kernel panic details if memory related * Aids in proper memory reporting and can aid in getting better kernel panic details if memory related
* Other things SMBus does: [SMBus wiki](https://en.wikipedia.org/wiki/System_Management_Bus) * Other things SMBus does: [SMBus wiki](https://en.wikipedia.org/wiki/System_Management_Bus)
For install purposes, this SSDT isn't needed but for post-install it's recommended to put the final touches on your hack. For install purposes, this SSDT isn't needed but for post-install it's recommended to put the final touches on your hack.
So to get started, we'll want to grab our SMBus SSDT: So to get started, we'll want to grab our SMBus SSDT:
* [SSDT-SBUS-MCHC.dsl](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-SBUS-MCHC.dsl) * [SSDT-SBUS-MCHC.dsl](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-SBUS-MCHC.dsl)
@@ -34,6 +32,7 @@ Scope (_SB.PCI0) <- Rename this
Device (_SB.PCI0.SBUS.BUS0) <- Rename this Device (_SB.PCI0.SBUS.BUS0) <- Rename this
``` ```
To find the correct pathing for your devices, grab [Hackintool](https://www.tonymacx86.com/threads/release-hackintool-v3-x-x.254559/) ([Github link](https://github.com/headkaze/Hackintool)) and head to the PCI tab: To find the correct pathing for your devices, grab [Hackintool](https://www.tonymacx86.com/threads/release-hackintool-v3-x-x.254559/) ([Github link](https://github.com/headkaze/Hackintool)) and head to the PCI tab:
![](/images/Universal/smbus-md/pci.png) ![](/images/Universal/smbus-md/pci.png)
@@ -41,14 +40,13 @@ Look for the SMBus device under Subclass, then look beside and you'll see the AC
* `/PC00@0/SMBS@1F,4` -> `PC00.SMBS` * `/PC00@0/SMBS@1F,4` -> `PC00.SMBS`
Once finished, it'll look something like this: Once finished, it'll look something like this:
```text ```text
External (_SB_.PC00, DeviceObj) <- Renamed External (_SB_.PC00, DeviceObj) <- Renamed
External (_SB_.PC00.SMBS.BUS0, DeviceObj) <- Renamed External (_SB_.PC00.SMBS.BUS0, DeviceObj) <- Renamed
Scope (_SB.PC00) Scope (_SB.PC00)
{ {
Device (MCHC) Device (MCHC)
{ {
@@ -65,5 +63,4 @@ For those having issues, you can also check Device Manager -> CPU -> BIOS device
**Note**: The MCHC is actually the DRAM controller, similar idea to SMBus for fixing memory reporting **Note**: The MCHC is actually the DRAM controller, similar idea to SMBus for fixing memory reporting
## [Now you're ready to compile the SSDT!](/Manual/compile.md)
## [Now you're ready to compile the SSDT!](/Manual/compile.md)

View File

@@ -17,7 +17,6 @@ So to spoof the GPU, we need to find a couple things:
* ACPI Path of the GPU * ACPI Path of the GPU
* [SSDT-GPU-SPOOF](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPU-SPOOF.dsl.zip) * [SSDT-GPU-SPOOF](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPU-SPOOF.dsl.zip)
## Finding a suitable PCI ID ## Finding a suitable PCI ID
To find a suitable PCI ID, we'll be using [PCI ID Repository](https://pci-ids.ucw.cz/read/PC/1002) which has a full database of all AMD GPUs. For this example, we'll be creating a Spoof SSDT for the R9 390. For a full list of supported GPUs, please see the [GPU Buyers Guide](https://dortania.github.io/GPU-Buyers-Guide/). The closest match to this GPU would be the 390X, and looking on that site near the top gives us this: To find a suitable PCI ID, we'll be using [PCI ID Repository](https://pci-ids.ucw.cz/read/PC/1002) which has a full database of all AMD GPUs. For this example, we'll be creating a Spoof SSDT for the R9 390. For a full list of supported GPUs, please see the [GPU Buyers Guide](https://dortania.github.io/GPU-Buyers-Guide/). The closest match to this GPU would be the 390X, and looking on that site near the top gives us this:
@@ -25,6 +24,7 @@ To find a suitable PCI ID, we'll be using [PCI ID Repository](https://pci-ids.uc
``` ```
Vendor 1002 -> Device 1002:67b0 Vendor 1002 -> Device 1002:67b0
``` ```
Now lets break this down into a device ID we can use: Now lets break this down into a device ID we can use:
* `1002`: The vendor ID, all AMD devices have this ID * `1002`: The vendor ID, all AMD devices have this ID
@@ -39,25 +39,26 @@ Buffer (0x04)
0xB0, 0x67, 0x00, 0x00 0xB0, 0x67, 0x00, 0x00
}, },
``` ```
As you can see, the bytes are swapped in pairs. Keep this in mind when we make our SSDT As you can see, the bytes are swapped in pairs. Keep this in mind when we make our SSDT
The specifics are due to [Endianness](https://en.wikipedia.org/wiki/Endianness) for those who are curious The specifics are due to [Endianness](https://en.wikipedia.org/wiki/Endianness) for those who are curious
## Finding the ACPI Path of the GPU ## Finding the ACPI Path of the GPU
To find the PCI path of a GPU is fairly simple, best way to find it is running Windows: To find the PCI path of a GPU is fairly simple, best way to find it is running Windows:
* Open Device Manager * Open Device Manager
* Select Display Adapters, then right click your GPU and select Properties * Select Display Adapters, then right click your GPU and select Properties
* Under the Details Tab, search for "Location Paths" * Under the Details Tab, search for "Location Paths"
* Note some GPUs may be hiding under "BIOS device name" * Note some GPUs may be hiding under "BIOS device name"
![](/images/Desktops/amd.png) ![](/images/Desktops/amd.png)
![Credit to 1Revenger1 for the image](/images/Desktops/nvidia.png) ![Credit to 1Revenger1 for the image](/images/Desktops/nvidia.png)
The second "ACPI" is what we care about: The second "ACPI" is what we care about:
``` ```
ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000) ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000)
``` ```
@@ -67,6 +68,7 @@ Now converting this to an ACPI path is quite simple, remove the `#ACPI` and `#PC
``` ```
`_SB_.PC02.BR2A.PEGP `_SB_.PC02.BR2A.PEGP
``` ```
And voila! We've found our ACPI path, now that we have everything we're ready to get cooking And voila! We've found our ACPI path, now that we have everything we're ready to get cooking
## Making the SSDT ## Making the SSDT
@@ -77,6 +79,7 @@ To start grab our [SSDT-GPU-SPOOF](https://github.com/dortania/Getting-Started-W
External (_SB_.PCI0, DeviceObj) External (_SB_.PCI0, DeviceObj)
External (_SB_.PCI0.PEG0.PEGP, DeviceObj) External (_SB_.PCI0.PEG0.PEGP, DeviceObj)
``` ```
For our example, we'll change all mentions of : For our example, we'll change all mentions of :
* `PCI0` with `PC02` * `PCI0` with `PC02`
@@ -89,6 +92,7 @@ Now that the ACPI pathing is correct, we can finally apply our fake ID!!!
So the 2 parts we want to change: So the 2 parts we want to change:
**device ID**: **device ID**:
``` ```
"device-id", "device-id",
Buffer (0x04) Buffer (0x04)
@@ -98,6 +102,7 @@ Buffer (0x04)
``` ```
**Model**: **Model**:
``` ```
"model", "model",
Buffer () Buffer ()
@@ -106,8 +111,6 @@ Buffer ()
} }
``` ```
`"device-id"` will be set to our PCI ID that we found in "Finding a suitable PCI ID" and `"model"` is mainly cosmetic `"device-id"` will be set to our PCI ID that we found in "Finding a suitable PCI ID" and `"model"` is mainly cosmetic
## [Now you're ready to compile the SSDT!](/Manual/compile.md) ## [Now you're ready to compile the SSDT!](/Manual/compile.md)

View File

@@ -9,7 +9,7 @@ So this is mainly needed for GPUs that are not natively supported out of the box
* HIS * HIS
* VisionTek * VisionTek
Instead, these GPUs need to be flashed to a model that works best in macOS which gernally being Sapphire. This is the brand that AMD uses for making their reference cards and what Apple bases a lot of their GPU logic off of. Instead, these GPUs need to be flashed to a model that works best in macOS which gernally being Sapphire. This is the brand that AMD uses for making their reference cards and what Apple bases a lot of their GPU logic off of.
One small problem, flashing VBIOSes can be a bit dangerous and can even brick a card. So for us, we'll be injecting one via an SSDT that will only load in macOS. This means 2 things: One small problem, flashing VBIOSes can be a bit dangerous and can even brick a card. So for us, we'll be injecting one via an SSDT that will only load in macOS. This means 2 things:
@@ -22,7 +22,6 @@ So to force a VBIOS onto the GPU, we need to find a couple things:
* ACPI Path of the GPU * ACPI Path of the GPU
* [SSDT-VBIOS]() * [SSDT-VBIOS]()
## Finding a suitable VBIOS ## Finding a suitable VBIOS
To find a suitable VBIOS, we'll be using [TechPowerUps Video BIOS Collection](https://www.techpowerup.com/vgabios/) which has a full database of basically all GPU VBIOSes. For this example, we'll be creating a VBIOS SSDT for the XFX RX 560 4GB. Now lets pull up the [Sapphire RX 560 4GB](https://www.techpowerup.com/vgabios/192320/sapphire-rx560-4096-170419) and download the VBIOS linked at the bottom: To find a suitable VBIOS, we'll be using [TechPowerUps Video BIOS Collection](https://www.techpowerup.com/vgabios/) which has a full database of basically all GPU VBIOSes. For this example, we'll be creating a VBIOS SSDT for the XFX RX 560 4GB. Now lets pull up the [Sapphire RX 560 4GB](https://www.techpowerup.com/vgabios/192320/sapphire-rx560-4096-170419) and download the VBIOS linked at the bottom:
@@ -30,26 +29,14 @@ To find a suitable VBIOS, we'll be using [TechPowerUps Video BIOS Collection](ht
``` ```
Sapphire.RX560.4096.170419.rom Sapphire.RX560.4096.170419.rom
``` ```
Now we have 1 small issue, our VBIOS must be padded to 65536 bytes(64KB). And our VBIOS is 262KB... *Shit* Now we have 1 small issue, our VBIOS must be padded to 65536 bytes(64KB). And our VBIOS is 262KB... *Shit*
[Insert magic software to shrink our VBIOS] [Insert magic software to shrink our VBIOS]
## Finding the ACPI Path of the GPU ## Finding the ACPI Path of the GPU
To find the PCI path of a GPU is fairly simple, best way to find it is running Windows: To find the PCI path of a GPU is fairly simple, best way to find it is running Windows:
* Open Device Manager * Open Device Manager
* Select Display Adapters, then right click your GPU and select Properties * Select Display Adapters, then right click your GPU and select Properties
@@ -59,8 +46,8 @@ To find the PCI path of a GPU is fairly simple, best way to find it is running W
![Credit to 1Revenger1 for the image](/images/Desktops/nvidia.png) ![Credit to 1Revenger1 for the image](/images/Desktops/nvidia.png)
The second "ACPI" is what we care about: The second "ACPI" is what we care about:
``` ```
ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000) ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000)
``` ```
@@ -70,6 +57,7 @@ Now converting this to an ACPI path is quite simple, remove the `#ACPI` and `#PC
``` ```
`_SB_.PC02.BR2A.PEGP `_SB_.PC02.BR2A.PEGP
``` ```
And voila! We've found our ACPI path, now that we have everything we're ready to get cooking And voila! We've found our ACPI path, now that we have everything we're ready to get cooking
## Making the SSDT ## Making the SSDT
@@ -80,6 +68,7 @@ To start grab our [SSDT-VBIOS]() and open it up. Here there's a couple things to
External (_SB_.PCI0, DeviceObj) External (_SB_.PCI0, DeviceObj)
External (_SB_.PCI0.PEG0.PEGP, DeviceObj) External (_SB_.PCI0.PEG0.PEGP, DeviceObj)
``` ```
For our example, we'll change all mentions of : For our example, we'll change all mentions of :
* `PCI0` with `PC02` * `PCI0` with `PC02`
@@ -92,14 +81,13 @@ Now that the ACPI pathing is correct, we can finally inject our VBIOS!!
So the part we want to change: So the part we want to change:
**VBIOS**: **VBIOS**:
``` ```
"ATY,bin_image", "ATY,bin_image",
Buffer (0x00010000) Buffer (0x00010000)
{ {
// Put your VBIOS here // Put your VBIOS here
}, },
``` ```
## [Now you're ready to compile the SSDT!](/Manual/compile.md) ## [Now you're ready to compile the SSDT!](/Manual/compile.md)

50
extra-files/SSDT-PLUG.dsl Normal file
View File

@@ -0,0 +1,50 @@
/*
* XCPM power management compatibility table.
*/
DefinitionBlock ("", "SSDT", 2, "Dortania", "CpuPlug", 0x00003000)
{
External (_PR_.CPU0, ProcessorObj) // Rename this
Scope (\_PR.CPU0) // Rename this
{
Method (DTGP, 5, NotSerialized)
{
If ((Arg0 == ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
{
If ((Arg1 == One))
{
If ((Arg2 == Zero))
{
Arg4 = Buffer (One)
{
0x03 // .
}
Return (One)
}
If ((Arg2 == One))
{
Return (One)
}
}
}
Arg4 = Buffer (One)
{
0x00 // .
}
Return (Zero)
}
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
Local0 = Package (0x02)
{
"plugin-type",
One
}
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}

Binary file not shown.