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)
## 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.

View File

@@ -1,6 +1,6 @@
# 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.

View File

@@ -36,7 +36,6 @@ Please see the **specific ACPI section of your config.plist**, all SSDTs needed
### Desktop
| 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 |
@@ -44,7 +43,6 @@ Please see the **specific ACPI section of your config.plist**, all SSDTs needed
| **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 |
### High End Desktop
| SSDT | IvyBridge-E | Haswell-E | Broadwell-E | Skylake-X |

View File

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

View File

@@ -22,7 +22,6 @@ So on newer Intel 300 series motherboards, manufactures started pushing for a ne
* 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
## Determining which SSDT you need
@@ -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)
## [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)
### 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:

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)
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
* 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`
* **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:
![](/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)`
```text
External (_PR_.CPU0, ProcessorObj) <- Rename this

View File

@@ -2,7 +2,6 @@
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
* Aids with correct temperature, fan, voltage, ICH, etc readings
* AppleSMBusPCI
@@ -13,7 +12,6 @@ This section of the guide refers to fixing AppleSMBus support in macOS, what is
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:
* [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
```
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)
@@ -41,7 +40,6 @@ Look for the SMBus device under Subclass, then look beside and you'll see the AC
* `/PC00@0/SMBS@1F,4` -> `PC00.SMBS`
Once finished, it'll look something like this:
```text
@@ -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
## [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
* [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
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
```
Now lets break this down into a device ID we can use:
* `1002`: The vendor ID, all AMD devices have this ID
@@ -39,6 +39,7 @@ Buffer (0x04)
0xB0, 0x67, 0x00, 0x00
},
```
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
@@ -56,8 +57,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)
The second "ACPI" is what we care about:
```
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
```
And voila! We've found our ACPI path, now that we have everything we're ready to get cooking
## 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.PEG0.PEGP, DeviceObj)
```
For our example, we'll change all mentions of :
* `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:
**device ID**:
```
"device-id",
Buffer (0x04)
@@ -98,6 +102,7 @@ Buffer (0x04)
```
**Model**:
```
"model",
Buffer ()
@@ -108,6 +113,4 @@ Buffer ()
`"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)

View File

@@ -22,7 +22,6 @@ So to force a VBIOS onto the GPU, we need to find a couple things:
* ACPI Path of the GPU
* [SSDT-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:
@@ -30,23 +29,11 @@ To find a suitable VBIOS, we'll be using [TechPowerUps Video BIOS Collection](ht
```
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*
[Insert magic software to shrink our VBIOS]
## 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:
@@ -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)
The second "ACPI" is what we care about:
```
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
```
And voila! We've found our ACPI path, now that we have everything we're ready to get cooking
## 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.PEG0.PEGP, DeviceObj)
```
For our example, we'll change all mentions of :
* `PCI0` with `PC02`
@@ -92,6 +81,7 @@ Now that the ACPI pathing is correct, we can finally inject our VBIOS!!
So the part we want to change:
**VBIOS**:
```
"ATY,bin_image",
Buffer (0x00010000)
@@ -100,6 +90,4 @@ Buffer (0x00010000)
},
```
## [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.