- Joined
- May 22, 2023
- Messages
- 8
- Motherboard
- auss
- CPU
- intel gen 3
- Graphics
- hd4000
- OS X/macOS
- 12.x
- Bootloader
- OpenCore (UEFI)
- Mac
- MacBook Air
- Mobile Phone
- Android
Become a Premium Member for $25/year with no ads to improve your community experience. Upgrade to Pro Account for faster response and no wait times!
Currently, we have no ETA.How long will it take you to finish the guide?
Quick Note: (USB Mapping)no I just want to practice my DSDT patching skills. I don't have any problems with hackintool
Quick Note: (USB Mapping)
There are a few ways to go about this
(1) If U are booting with DSDT (2)If you are using only SSDT to boot
Since You say "Im not a beginner I have been doing Hacks For awhile"
Well Ok -> thats Cool, Then i will provide a way to go about that manually using DSDT Only.. based off of Your SSDT
1)Open your config.plist to section "Delete" under ACPI right click and create a new blank entry
2)Open You DSDT with MaciASL. In the menu at the top choose "File", "NewFromACPI", "Grab Your "SSDT-3-xh_cfht4" open it
and copy you OEM Table ID. Keep it for reference. This case it is xh_cfht4
3)open Hackintool and open "Calculator" in the ASCII paste in your OEM ID that you gad just copied above.
The Hexadecimal Value is what we want. Man were all prone to making mistakes or oversights..so just double
check and make sure that you entered the "correct lettering, numerics, case sensitive", one wrong,space or mosprint here
will panic the system on boot /or will boot but things will not work as intended.
So take the Hexadecimal Value and Store it somewhere for later use. We will need it shortly.
WITH ALL THAT OUT OF THE WAY--NOW WE PROCEED--
RULE 1)Do Not Exceed The 15 Port Limit per Controller,we want to stay under it. I have no idea exactly
what ports you have enabled by default , so im going to use mine that I have enabled and use those in this
reference. You can use ioReg to find your USB Ports: simply plugin a USB 2.0 Stick into a port and ioRegistry
will light Up with the details and so on. After You do tHe USB2 Use a USB 3.0 Stick and do the same.
USB Naming System is For USB 2.0 = Zero | For USB 3.0 = 0x03 | For Internal Ports = 0xFF | USBC = 0x09 0x0A
4 Methods (GUPC) (GPLD) Generally handle the USB 3.0 USBC Etc
AND (TPLD) (TUPC) (Generally will handle USB 2.0 USB 1.0 Etc
Since We are using my hardware as example things such as USBC I dont have those ports on this machine so i wont make mention of them.
You should not have any caveats, if its USBC on your end just adjust values 0x09
In these 4 Methods the two methods AS EXAMPLE SHOWN BELOW:
Scope (\_SB.PCI0.XHC)
{
Device (RHUB)
{
Name (_ADR, Zero) // _ADR: Address
// Assuming we have our methods already in place here under RHUB Device
Device (HS05)
{
Name (_ADR, 0x05) // _ADR: Address
Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities
{
Return (TUPC (One (Zero))
// Where (One) Tells OS That the port is available and turned on
// Where (Zero) next to it tells the OS That its Type (USB2)
}
Method (_PLD, 0, NotSerialized) // _PLD: Physical Location Of Device
{
Return (One (0x05))
// where (One) tells the OS the Port is active and its location is 0x05
// corresponding to Device (HS05)
}
}
}
GUPC and GPLD (Same as above)concerning the meanings of the values IN _UPC and _PLD
So here we are with all those definitions out of the way open you config.plist and add the
Hex Values into the correct area in the Delete section Under ACPI if Using OpenCore.
That will completely drop the OEM SSDT with the XHC Information in it to bot load at boot time.
And so it is Up To yOU AT tHis Point to provide the info, so using mine as example, just adjust accordingly
for your active and non-Actibe Ports cause im sure yours will ve different.
Mapping Ports Manually:
STEP 1:Open your DSDT and hit CMD + A and open your favorite TextEditor and use whatever coding language
you like, Ilike to use "JavaScript", only cause i like the wide choice of Syntax Colors available. If You
domt like all that Color Shit, I understand, just leave it as DSDT.txt.
IN Your DSDY The XHC and all things attached are different the mine , but similar, so
you can either follow along here in my cosmetic arrangement or just add the methods to the RHUB
Device and So On. This area is "Fickle" and leaving out the wrong thing cam cause it not to boot after
modification . So with that in mind try and stay as trye to the letter as possible. Some shit
you dont need if your not usiong windows on the hack which most of mine i dp noe use windows.
So mine may seem samll compared tp yours thats foound in your DSDT.
Ok enough (If you list a _PRW IN THE FORM OF STATIC VALUES using Name (_PRW, Package (0x02) etcmake sure
that you list it also in the corresponding Scope (\_GPE)
If You have OSDW Method added tp Yout DSDT whuch you should have the the Method (_PRW, 0, NotSerialized) you can
regerence the OSDW method in there or if you dont wanna use USDW, THEM IN THE _PRW MEthod (Switch it to
OK DONE WITH ALL THAT I HOPE I DIDNT LEAVE ANYTHING OUT Just Follow This Format below for Your Own
XHC Device Make sure and Include the _DSM Method along with the DTGP Method as well and if you
dont have DTGP then you can add it to your DSDT by placing the code in there yourself.
If You dont want to mess with DTGP Then OK Great, thenwe will ADD IT THE GHETTO WAY--
MIGHT WORK MIGHT NOT, So if You boot up and ot panics well thats possible cultit, mayne who knows,
could be several other things, Point Is that a Method (Descibing the Power Values for the Ports needs to be presenty,
The Options Are _DSM Method / Or a interesting alternative for nopt only just here but other places
is _DSD (We would Use Name (_DSD) Not Method (_DSD) Amyway im starting to get out there, so ill shut up
follow the format down below, the full implementation will be in the Attached ZIP. The one on display
here is a regerence for the format, or if I get excited iLL Just type the whole thing out here, Damn the Autism (Lol)
cosmtics, arrangement what ever you wanna call it.
You know I just wanna to say any critics be respectful, im a humble Guy and capable of learning because I do not know it all
-> And this area here USB is a lil tricky per system and so this is not a easy thing to try and
NOTE compile it all into a few paragraphs like i have. A person could actually write a small book on it
-> the XHC Alone not to mention the EHC1 EHC2 Anyhow here it is
---------------------------------------------------------------------------------------------------------------------------------
Method (1) Manual Entry into DSDT and the Recompile with IASL or MacIasl should be no errorsanyways.
Assuming the Other Hardware is Presentin the PCI0 device
Scope (_SB)
{
Device (PCI0)
{
/* yOUR HardwaRE iMPLEMENTATIONS ALREADY ARE IN HERE AND SO ON, SO THE XHC Device Placement
should be after the PCI0 has exhausted itself, mainly anywhere after the IGPU Device You can plave the XHC Device */
/* Ending Section of Method (_OSC, 4, Serialized) placement is referencing a bookmark
to show where the XHC Device Goes */
Else
{
CDW1 = 0x04
Return (Local0)
}
}
Scope (\_SB.PCI0)
{
Device (IGPU)
{
Name (_ADR, 0x00020000) // _ADR: Address
}
}
/* Anywhere from here down and also The placement Of Ports HS11 HS12 HS13 HS14 SubScoped such as
Scope (_SB.PCI0.XHC.RHUB)
{
Device (HS11) { Name (_ADR, 0x0B) }
Device (HS12) { Name (_ADR, 0x0C) }
Device (HS13) { Name (_ADR, 0x0D) }
Device (HS14) { Name (_ADR, 0x0E) }
}
Do not do that place all in same folder XHC THAT Above example there is wack, has caused all
kinds of problems and really doesnt even make any sense why that was done in the first. IMO I think thats stupid. */
Device (XHC)
{
Name (_ADR, 0x00140000) // _ADR: Address
OperationRegion (XPRT, PCI_Config, Zero, 0x0100)
Field (XPRT, DWordAcc, NoLock, Preserve)
{
DVID, 16
}
Field (XPRT, ByteAcc, NoLock, Preserve)
{
Offset (0x75),
PMEE, 1,
, 6,
PMES, 1
}
Method (GPEH, 0, NoSerialized) // Either Use the method in the GPE or dont its optional way not mandatory
{
If ((DVID == 0xFFFF))
{
Return (Zero)
}
Local0 = PMES
PMES = One
If ((PMEE && Local0))
{
Notify (XHC, 0x02) // Device Wake
Notify (PWRB, 0x02) // Device Wake
}
}
Method (SSPA, 0, Serialized)
{
If ((PCHV () == PCHH))
{
Return (0x11)
}
Else
{
Return (0x0D)
}
}
Device (RHUB)
{
Name (_ADR, Zero) // _ADR: Address
Method (TUPC, 2, Serialized)
{
Name (PCKG, Package (0x04)
{
One, Zero, Zero, Zero
})
Return (PCKG) /* \_SB_.PCI0.XHC_.RHUB.YPLD.PCKF */
}
Method (TPLD, 2, Serialized)
{
Name (PCKG, Package (0x01)
{
Buffer (0x10){}
})
CreateField (DerefOf (PCKG [Zero]), Zero, 0x07, REV) REV = One
CreateField (DerefOf (PCKG [Zero]), 0x40, One, VISI) VISI = Arg0
CreateField (DerefOf (PCKG [Zero]), 0x57, 0x08, GPOS) GPOS = Arg1
CretaeField (DerefOf (PCKG [Zero]), 0x4A, 0x04, SHAP) SHAP = One
CreateField (DerefOf (PCKG [Zero]), 0x20, 0x10, WID) WID = 0x08
CreateField (DerefOf (PCKG [Zero]), 0x30, 0x10, HGT) HGT = 0x03
Return (PCKG) /* \_SB_.PCI0.XHC_.RHUB.TPLD.PCKG */
}
Method (GUPC, 2, Serialized)
{
Name (PCKG, Package (0x04)
{
0xFF, 0x03, Zero, Zero
})
Return (PCKG) /* \_SB_.PCI0.XHC_.RHUB.GUPC.PCKG */
}
Method (GPLD, 0, Serialized)
{
Name (PCKG, Package (0x01)
{
Buffer (0x10){}
})
CreateField (DerefOf (PCKG [Zero]), Zero, 0x07, REV) REV = One
CreateField (DerefOf (PCKG [Zero]), 0x40, One, VISI) VISI = Arg0
CreateField (DerefOf (PCKG [Zero]), 0x57, 0x08, GPOS) GPOS = Arg1
Return (PCKG) /* \_SB_.PCI0.XHC_.RHUB.GPLD.PCKG */
}
Device (HS01)
{
Name (_ADR, One) // _ADR: Address
Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilitoes
{
Return (TUPC (One, Zero))
}
Method (_PLD, 0, NotSerialized) // _PLD: Physical Location Of Device
{
Return (TPLD (One, One))
}
}
Device (HS02)
{
Name (_ADR, 0x02) // _ADR: Address
Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilitoes
{
Return (TUPC (One, Zero))
}
Method (_PLD, 0, NotSerialized) // _PLD: Physical Location Of Device
{
Return (TPLD (One, 0x02))
}
}
/* Continue with other HubPorts */
Device (SS01)
{
Method (_ADR, 0, NotSerialized) // _ADR: Address
{
Return (SSPA () + Zero)
}
Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilitoes
{
Return (GUPC (One, 0x03))
}
Method (_PLD, 0, NotSerialized) // _PLD: Physical Location Of Device
{
Return (GPLD (One, 0x16))
}
}
Device (SS02)
{
Method (_ADR, 0, NotSerialized) // _ADR: Address
{
Return (SSPA () + One)
}
Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilitoes
{
Return (GUPC (One, 0x03))
}
Method (_PLD, 0, NotSerialized) // _PLD: Physical Location Of Device
{
Return (GPLD (One, 0x16))
}
}
/* Continue On with The Rest of the SS0? Devices Ports */
}
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If ((Arg0 == ToUUID ("a0b5b7c6-1318-441c-b0c9-fe69t5eaf949b") /* Unknown UUID */))
{
Local0 = Package ()
{
"AAPL,current-available",
0x0834,
"AAPL,current-extra",
0x0A8C,
"AAPL,current-extra",
0x0A8C,
"AAPL,max-port-current-in-sleep",
0x0834,
Buffer (One)
{
0x00
}
}
DTGP (Arg0, Arg1, Arg2, RefOf (Local0))
Return (Local0)
}
}
Method (_PRW, 0, NotSerialized) // _PRW: Power Resoiurces Fir Wake
{
If (OSDW ())
{
Return (Package (0x02)
{
0x6D,
0x04
})
}
Else
[
Rerturn (PackaGE (0X04)
{
0x6D,
0x03
})
}
}
}
}
}
Scope (_GPE)
{
Method (_L6D, 0, NotSerialized) // _Lxx: Level-Triggered GPE,xx=0x00-0xFF
{
Notify (\_SB_.PCI0.XHC, 0x02) // Device Wake
}
}
}
Hopefully This is Not confusing and is helpful (Improvementrs On the Article) Let me know
what they are , or if i left out something and I will update the whole thing Thank You!
Also The ways to do this in the DSDT vs SSDT Are different. This way is Just inject properties into you already patched functional DSDT
If Your Interested In the SSDT way i can also show that as well, and above is just example of how to set uo the
Methods GUPC GPLD TUPC TPLD for each port, yOu can find out which ports are actube by pluggin in a USB Stick with
IO Registry Open with Active Update Enabled and it will show you what and where they are located when you do that .
The attached Zip is my DSDT you can look at it and see how its structured. On that system My bluetooth happens to be intel
related and os on port HS03, Alot of other systems ive had or done i had use the other Brcm but anway hope this helps ya out.