From 7209aa98d02c7e4733019aa408ea93bfb62196f4 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sat, 1 May 2021 08:52:26 -0600 Subject: [PATCH] Append 0x2 for NVMe PM --- README.md | 2 +- Resources/Build.py | 8 ++++++-- docs/DEBUG.md | 2 +- docs/START.md | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0214a8e4e..57b5eb576 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Since this patcher tricks macOS into thinking you're running a newer Mac, certai ## Support -To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub: +To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub: * [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues) diff --git a/Resources/Build.py b/Resources/Build.py index 2da8c6988..d177e8f87 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -143,6 +143,10 @@ class BuildOpenCore: for i in nvme_devices: nvme_vendor = self.hexswap(binascii.hexlify(i["vendor-id"]).decode()[:4]) nvme_device = self.hexswap(binascii.hexlify(i["device-id"]).decode()[:4]) + nvme_aspm = i["pci-aspm-default"] + # Check if 0x2 is already present. If not, append + if not nvme_aspm & 2: + nvme_aspm |= 2 print(f'- Found 3rd Party NVMe SSD ({x}): {nvme_vendor}:{nvme_device}') self.config["#Revision"][f"Hardware-NVMe-{x}"] = f'{nvme_vendor}:{nvme_device}' @@ -152,8 +156,8 @@ class BuildOpenCore: nvme_path_parent = "/".join(nvme_path.split("/")[:-1]) print(f"- Found NVMe ({x}) at {nvme_path}") #print(f"- Found NVMe({x}) Parent at {nvme_path_parent}") - self.config["DeviceProperties"]["Add"][nvme_path] = {"pci-aspm-default": 2} - self.config["DeviceProperties"]["Add"][nvme_path_parent] = {"pci-aspm-default": 2} + self.config["DeviceProperties"]["Add"][nvme_path] = {"pci-aspm-default": nvme_aspm} + self.config["DeviceProperties"]["Add"][nvme_path_parent] = {"pci-aspm-default": nvme_aspm} except IndexError: print(f"- Failed to find Device path for NVMe {x}") diff --git a/docs/DEBUG.md b/docs/DEBUG.md index 930a46d54..79fb5d0e1 100644 --- a/docs/DEBUG.md +++ b/docs/DEBUG.md @@ -2,7 +2,7 @@ For those who've hit an odd bug and unsure if it's user error or patcher, the below will tell you how to get more verbose debug information as well as logs to help [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues) -* For users who are less experienced, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E) for help. +* For users who are less experienced, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help. ## Debugging yourself diff --git a/docs/START.md b/docs/START.md index 68e1e67a8..cc1ce36d2 100644 --- a/docs/START.md +++ b/docs/START.md @@ -8,7 +8,7 @@ This is a sophisticated boot loader used to inject and patch data in memory, ins While many PC users from the Hackintosh community are familiar with OpenCore, OpenCore was designed as Mac and PC agnostic ensuring both platforms can use it easily. And with OpenCore Legacy Patcher, we help automate the process making running with OpenCore that much easier. -For advanced troubleshooting, we highly recommend users check out the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E) as this is generally the quickest way to get a hold of us developers and get help from the community. +For advanced troubleshooting, we highly recommend users check out the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) as this is generally the quickest way to get a hold of us developers and get help from the community. For those who wish to support this patcher, please see the [Supporting the Patcher page](./DONATE.md)