mirror of
https://github.com/AskDavis/Getting-Started-With-ACPI.git
synced 2026-01-01 05:05:57 -08:00
1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{337:function(e,t,a){e.exports=a.p+"assets/img/nvidia.672e8e16.png"},341:function(e,t,a){e.exports=a.p+"assets/img/amd.acf5492b.png"},481:function(e,t,a){"use strict";a.r(t);var s=a(28),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"renaming-gpus-ssdt-gpu-spoof"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#renaming-gpus-ssdt-gpu-spoof"}},[e._v("#")]),e._v(" Renaming GPUs (SSDT-GPU-SPOOF)")]),e._v(" "),s("p",[e._v("So this is mainly needed for GPUs that are not natively supported out of the box due to their names, most commonly:")]),e._v(" "),s("ul",[s("li",[e._v("R9 290/390")]),e._v(" "),s("li",[e._v("R9 280/380")]),e._v(" "),s("li",[e._v("R7 270/370")]),e._v(" "),s("li",[e._v("R9 260/360")]),e._v(" "),s("li",[e._v("R7 250")]),e._v(" "),s("li",[e._v("R7 240")])]),e._v(" "),s("p",[e._v('Instead, these GPUs need to be "spoofed" or faked into a model that closely matches theirs, generally this will be the "X" variant of the card. For some reason Apple never bothered adding the PCI IDs for these other cards even though their GPU cores are supported by the driver.')]),e._v(" "),s("p",[e._v("So to spoof the GPU, we need to find a couple things:")]),e._v(" "),s("ul",[s("li",[e._v("Suitable PCI ID for the GPU")]),e._v(" "),s("li",[e._v("ACPI Path of the GPU")]),e._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-GPU-SPOOF.dsl.zip",target:"_blank",rel:"noopener noreferrer"}},[e._v("SSDT-GPU-SPOOF"),s("OutboundLink")],1)])]),e._v(" "),s("h2",{attrs:{id:"finding-a-suitable-pci-id"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#finding-a-suitable-pci-id"}},[e._v("#")]),e._v(" Finding a suitable PCI ID")]),e._v(" "),s("h3",{attrs:{id:"web"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#web"}},[e._v("#")]),e._v(" Web")]),e._v(" "),s("p",[e._v("To find a suitable PCI ID, we'll be using "),s("a",{attrs:{href:"https://pci-ids.ucw.cz/read/PC/1002",target:"_blank",rel:"noopener noreferrer"}},[e._v("PCI ID Repository"),s("OutboundLink")],1),e._v(" 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 "),s("a",{attrs:{href:"https://dortania.github.io/GPU-Buyers-Guide/",target:"_blank",rel:"noopener noreferrer"}},[e._v("GPU Buyers Guide"),s("OutboundLink")],1),e._v(". The closest match to this GPU would be the 390X, and looking on that site near the top gives us this:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("Vendor 1002 -> Device 1002:67b0\n")])])]),s("p",[e._v("Now lets break this down into a device ID we can use:")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("1002")]),e._v(": The vendor ID, all AMD devices have this ID")]),e._v(" "),s("li",[s("code",[e._v("67B0")]),e._v(": The device ID, this is what we care about")])]),e._v(" "),s("p",[e._v("So how do we convert this to a fake ID? Well the format of a fake ID:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('"device-id",\nBuffer (0x04)\n{\n 0xB0, 0x67, 0x00, 0x00\n},\n')])])]),s("p",[e._v("As you can see, the bytes are swapped in pairs. Keep this in mind when we make our SSDT")]),e._v(" "),s("p",[e._v("The specifics are due to "),s("a",{attrs:{href:"https://en.wikipedia.org/wiki/Endianness",target:"_blank",rel:"noopener noreferrer"}},[e._v("Endianness"),s("OutboundLink")],1),e._v(" for those who are curious")]),e._v(" "),s("h3",{attrs:{id:"linux"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#linux"}},[e._v("#")]),e._v(" Linux")]),e._v(" "),s("p",[e._v("If you can run Linux, use command "),s("code",[e._v("lspci -vmmnnD -d 1002::0300")])]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("$ lspci -vmmnnD -d 1002::0300\nSlot: 0000:01:00.0\nClass: VGA compatible controller [0300]\nVendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]\nDevice: Oland [Radeon HD 8570 / R7 240/340 / Radeon 520 OEM] [6611]\nSVendor: Micro-Star International Co., Ltd. [MSI] [1462]\nSDevice: Device [3740]\nRev: 87\n")])])]),s("p",[e._v("You can easily get")]),e._v(" "),s("ul",[s("li",[e._v("Slot ID "),s("code",[e._v("0000:01:00.0")]),e._v(", we need it later")]),e._v(" "),s("li",[e._v("Vendor ID "),s("code",[e._v("1002")]),e._v(", all AMD devices have this ID")]),e._v(" "),s("li",[e._v("Device ID "),s("code",[e._v("6611")]),e._v(", this is what we care about")]),e._v(" "),s("li",[e._v("Device name "),s("code",[e._v("Radeon HD 8570 / R7 240/340 / Radeon 520 OEM")]),e._v(", mainly cosmetic")])]),e._v(" "),s("h2",{attrs:{id:"finding-the-acpi-path-of-the-gpu"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#finding-the-acpi-path-of-the-gpu"}},[e._v("#")]),e._v(" Finding the ACPI Path of the GPU")]),e._v(" "),s("h3",{attrs:{id:"windows"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#windows"}},[e._v("#")]),e._v(" Windows")]),e._v(" "),s("p",[e._v("To find the PCI path of a GPU is fairly simple, best way to find it is running Windows:")]),e._v(" "),s("ul",[s("li",[e._v("Open Device Manager")]),e._v(" "),s("li",[e._v("Select Display Adapters, then right click your GPU and select Properties")]),e._v(" "),s("li",[e._v('Under the Details Tab, search for "Location Paths"\n'),s("ul",[s("li",[e._v('Note some GPUs may be hiding under "BIOS device name"')])])])]),e._v(" "),s("p",[s("img",{attrs:{src:a(341),alt:""}})]),e._v(" "),s("p",[s("img",{attrs:{src:a(337),alt:"Credit to 1Revenger1 for the image"}})]),e._v(" "),s("p",[e._v('The second "ACPI" is what we care about:')]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("ACPI(_SB_)#ACPI(PC02)#ACPI(BR2A)#ACPI(PEGP)#PCI(0000)#PCI(0000)\n")])])]),s("p",[e._v("Now converting this to an ACPI path is quite simple, remove the "),s("code",[e._v("#ACPI")]),e._v(" and "),s("code",[e._v("#PCI(0000)")]),e._v(":")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("\\_SB_.PC02.BR2A.PEGP\n")])])]),s("h3",{attrs:{id:"linux-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#linux-2"}},[e._v("#")]),e._v(" Linux")]),e._v(" "),s("p",[e._v("Substitute your SLOTID found above into command "),s("code",[e._v("cat /sys/bus/pci/devices/SLOTID/firmware_node/path")]),e._v(", you cat get")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("$ cat /sys/bus/pci/devices/0000:01:00.0/firmware_node/path\n\\_SB_.PC02.BR2A.PEGP\n")])])]),s("p",[e._v("And voila! We've found our ACPI path, now that we have everything we're ready to get cooking")]),e._v(" "),s("h2",{attrs:{id:"making-the-ssdt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#making-the-ssdt"}},[e._v("#")]),e._v(" Making the SSDT")]),e._v(" "),s("p",[e._v("To start grab our "),s("a",{attrs:{href:"https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-GPU-SPOOF.dsl.zip",target:"_blank",rel:"noopener noreferrer"}},[e._v("SSDT-GPU-SPOOF"),s("OutboundLink")],1),e._v(" and open it up. Here there's a couple things to change:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("External (_SB_.PCI0, DeviceObj)\nExternal (_SB_.PCI0.PEG0.PEGP, DeviceObj)\n")])])]),s("p",[e._v("For our example, we'll change all mentions of :")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("PCI0")]),e._v(" with "),s("code",[e._v("PC02")])]),e._v(" "),s("li",[s("code",[e._v("PEG0")]),e._v(" with "),s("code",[e._v("BR2A")])])]),e._v(" "),s("p",[e._v("Hint: If your ACPI path is a bit shorter than the example, this is fine. Just make sure the ACPI paths are correct to your device.")]),e._v(" "),s("p",[e._v("Now that the ACPI pathing is correct, we can finally apply our fake ID!!!")]),e._v(" "),s("p",[e._v("So the 2 parts we want to change:")]),e._v(" "),s("p",[s("strong",[e._v("device ID")]),e._v(":")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('"device-id",\nBuffer (0x04)\n{\n 0xB0, 0x67, 0x00, 0x00\n},\n')])])]),s("p",[s("strong",[e._v("Model")]),e._v(":")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('"model",\nBuffer ()\n{\n "AMD Radeon R9 390"\n}\n')])])]),s("p",[s("code",[e._v('"device-id"')]),e._v(' will be set to our PCI ID that we found in "Finding a suitable PCI ID" and '),s("code",[e._v('"model"')]),e._v(" is mainly cosmetic")]),e._v(" "),s("h2",{attrs:{id:"now-you-re-ready-to-compile-the-ssdt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#now-you-re-ready-to-compile-the-ssdt"}},[e._v("#")]),e._v(" "),s("RouterLink",{attrs:{to:"/Manual/compile.html"}},[e._v("Now you're ready to compile the SSDT!")])],1)])}),[],!1,null,null,null);t.default=i.exports}}]); |