diff --git a/IOElectrify/IOElectrifyBridge.cpp b/IOElectrify/IOElectrifyBridge.cpp index 75fb1b8..b7e5a49 100644 --- a/IOElectrify/IOElectrifyBridge.cpp +++ b/IOElectrify/IOElectrifyBridge.cpp @@ -66,8 +66,8 @@ bool IOElectrifyBridge::attach(IOService* provider) DebugLog("Provider -> Provider %s\n", mProvider->getProvider()->getName()); - if (strcmp(mProvider->getProvider()->getName(), "RP01")) { - DebugLog("Mismatch %s vs RP01\n", mProvider->getProvider()->getName()); + if (strcmp(mProvider->getProvider()->getName(), "PEG2")) { + DebugLog("Mismatch %s vs PEG2\n", mProvider->getProvider()->getName()); return false; } diff --git a/IOElectrify/Supporting Files/Info.plist b/IOElectrify/Supporting Files/Info.plist index 78a0e0f..2b5291f 100644 --- a/IOElectrify/Supporting Files/Info.plist +++ b/IOElectrify/Supporting Files/Info.plist @@ -47,19 +47,19 @@ IOElectrifyBridge - #CFBundleIdentifier + CFBundleIdentifier org.darkvoid.driver.IOElectrify - #IOClass + IOClass IOElectrifyBridge - #IOProviderClass + IOProviderClass IOPCI2PCIBridge - #IOProbeScore + IOProbeScore 10 - #IOPCIClassMatch + IOPCIClassMatch 0x06040000&0xffff0000 - #IOPCIPrimaryMatch - 0x76158086 - #IOMatchCategory + IOPCIPrimaryMatch + 0x76158086 0x15da8086 + IOMatchCategory IOElectrify diff --git a/SSDT-THUNDERBOLT.aml b/SSDT-THUNDERBOLT.aml new file mode 100644 index 0000000..38f8ec0 Binary files /dev/null and b/SSDT-THUNDERBOLT.aml differ diff --git a/SSDT-THUNDERBOLT.dsl b/SSDT-THUNDERBOLT.dsl new file mode 100644 index 0000000..6391ee5 --- /dev/null +++ b/SSDT-THUNDERBOLT.dsl @@ -0,0 +1,593 @@ +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler version 20170929 (64-bit version)(RM) + * Copyright (c) 2000 - 2017 Intel Corporation + * + * Disassembling to non-symbolic legacy ASL operators + * + * Disassembly of iASL0XGmH4.aml, Sun Nov 19 11:46:57 2017 + * + * Original Table Header: + * Signature "SSDT" + * Length 0x000006DD (1757) + * Revision 0x02 + * Checksum 0xF8 + * OEM ID "hack" + * OEM Table ID "TYPC" + * OEM Revision 0x00000000 (0) + * Compiler ID "INTL" + * Compiler Version 0x20170929 (538380585) + */ +DefinitionBlock ("", "SSDT", 2, "hack", "TYPC", 0x00000000) +{ + External (_SB_.PCI0.PEG2, DeviceObj) // (from opcode) + External (_SB_.PCI0.PEG2.PEGP, DeviceObj) // (from opcode) + + Scope (\_SB.PCI0.PEG2) + { + Name (RTBT, One) + } + + Scope (\_SB.PCI0.PEG2.PEGP) + { + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Device (TBL1) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (Zero) + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b"))) + { + If (LNot (Arg2)) + { + Return (Buffer (One) + { + 0x03 + }) + } + + Store (Package (0x02) + { + "PCIHotplugCapable", + Zero + }, Local0) + Return (Local0) + } + + Return (Zero) + } + + Device (NHI0) + { + Name (_ADR, Zero) // _ADR: Address + Name (_STR, Unicode ("Thunderbolt")) // _STR: Description String + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (Zero) + } + + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If (LNot (Arg2)) + { + Return (Buffer (One) + { + 0x03 + }) + } + + Store (Package (0x03) + { + "power-save", + One, + Buffer (One) + { + 0x00 + } + }, Local0) + Return (Local0) + } + } + } + + Device (TBL2) + { + Name (_ADR, 0x00010000) // _ADR: Address + Name (_SUN, One) // _SUN: Slot User Number + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (Zero) + } + + Device (TBLU) + { + Name (_ADR, Zero) // _ADR: Address + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (TB00) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB03) + { + Name (_ADR, 0x00030000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (TB3U) + { + Name (_ADR, Zero) // _ADR: Address + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (TB30) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + } + } + + Device (TB33) + { + Name (_ADR, 0x00030000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB34) + { + Name (_ADR, 0x00040000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB35) + { + Name (_ADR, 0x00050000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + + Device (TB36) + { + Name (_ADR, 0x00060000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + } + + Device (TB04) + { + Name (_ADR, 0x00040000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (TB4U) + { + Name (_ADR, Zero) // _ADR: Address + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (TB40) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB43) + { + Name (_ADR, 0x00030000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB44) + { + Name (_ADR, 0x00040000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + + Device (DEV0) + { + Name (_ADR, Zero) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + + Device (TB45) + { + Name (_ADR, 0x00050000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + + Device (TB46) + { + Name (_ADR, 0x00060000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + } + + Device (TB05) + { + Name (_ADR, 0x00050000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + + Device (TB06) + { + Name (_ADR, 0x00060000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (One) + } + } + } + } + + Device (TBL3) + { + Name (_ADR, 0x00020000) // _ADR: Address + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + + Method (_RMV, 0, NotSerialized) // _RMV: Removal Status + { + Return (Zero) + } + + Device (TBTU) + { + Name (_ADR, Zero) // _ADR: Address + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake + { + 0x6D, + Zero + }) + Device (RHUB) + { + Name (_ADR, Zero) // _ADR: Address + Method (GPLD, 2, Serialized) + { + Name (PCKG, Package (0x01) + { + Buffer (0x10){} + }) + CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV) + Store (One, REV) + CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI) + Store (Arg0, VISI) + CreateField (DerefOf (Index (PCKG, Zero)), 0x57, 0x08, GPOS) + Store (Arg1, GPOS) + Return (PCKG) + } + + Method (GUPC, 1, Serialized) + { + Name (PCKG, Package (0x04) + { + Zero, + 0xFF, + Zero, + Zero + }) + Store (Arg0, Index (PCKG, Zero)) + Return (PCKG) + } + + Method (TPLD, 2, Serialized) + { + Name (PCKG, Package (0x01) + { + Buffer (0x10){} + }) + CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV) + Store (One, REV) + CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI) + Store (Arg0, VISI) + CreateField (DerefOf (Index (PCKG, Zero)), 0x57, 0x08, GPOS) + Store (Arg1, GPOS) + CreateField (DerefOf (Index (PCKG, Zero)), 0x4A, 0x04, SHAP) + Store (One, SHAP) + CreateField (DerefOf (Index (PCKG, Zero)), 0x20, 0x10, WID) + Store (0x08, WID) + CreateField (DerefOf (Index (PCKG, Zero)), 0x30, 0x10, HGT) + Store (0x03, HGT) + Return (PCKG) + } + + Method (TUPC, 1, Serialized) + { + Name (PCKG, Package (0x04) + { + One, + Zero, + Zero, + Zero + }) + Store (Arg0, Index (PCKG, One)) + Return (PCKG) + } + + Device (UB21) + { + Name (_ADR, One) // _ADR: Address + Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities + { + Return (TUPC (0x09)) + } + + Method (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device + { + Return (TPLD (One, One)) + } + } + + Device (UB22) + { + Name (_ADR, 0x02) // _ADR: Address + Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities + { + Return (GUPC (Zero)) + } + + Method (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device + { + Return (GPLD (Zero, Zero)) + } + } + + Device (UB31) + { + Name (_ADR, 0x03) // _ADR: Address + Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities + { + Return (TUPC (0x09)) + } + + Method (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device + { + Return (TPLD (One, One)) + } + } + + Device (UB32) + { + Name (_ADR, 0x04) // _ADR: Address + Method (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities + { + Return (GUPC (Zero)) + } + + Method (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device + { + Return (GPLD (Zero, Zero)) + } + } + } + } + } + } +} + diff --git a/readme.md b/readme.md index cfb9004..b8264af 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,32 @@ +[![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Fira+Code&pause=1000&width=900&height=70&lines=Welcome+%F0%9F%9B%B8+to+Alienware+%F0%9F%91%BD+Hackintosh+%F0%9F%8D%8E+%E5%A4%96%E6%98%9F%E4%BA%BA+%F0%9F%92%BB+%E9%BB%91%E8%8B%B9%E6%9E%9C+%F0%9F%96%A5+by+RockJesus.cn)](https://rockjesus.cn) + +[![qq](https://img.shields.io/badge/Blog-RockJesus-silver.svg?logo=Blogger)](https://rockjesus.cn) + +[![qq](https://cdn.jsdelivr.net/gh/rockjesus/img/img/17r4.gif)](https://rockjesus.cn) + [![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=rockjesus&theme=radical&show_icons=true&bg_color=end,000000,cccccc&hide_border)](https://rockjesus.cn) + +[![Hardware](https://img.shields.io/badge/Hardware-Alienware-silver.svg?logo=Hackaday)](https://alienware.com) [![Platform](https://img.shields.io/badge/platform-MacOS13~10-red.svg?logo=apple)](https://developer.apple.com/macos) [![Platform](https://img.shields.io/badge/platform-Windows11-blue.svg?logo=windows)](https://www.microsoft.com/en-us/windows/) +[![b](https://img.shields.io/badge/Bootloader-Opencore-silver.svg?logo=OpenCollective)](https://github.com/acidanthera/OpenCorePkg) +[![b](https://img.shields.io/badge/Bootloader-Clover-green.svg?logo=4chan)](https://github.com/CloverHackyColor/CloverBootloader) +[![b](https://img.shields.io/badge/Credits-Acidanthera-purple.svg?logo=Academia)](https://github.com/acidanthera) +[![b](https://img.shields.io/badge/Credits-TonymacX86-green.svg?logo=Tesla)](https://tonymacx86.com) +[![b](https://img.shields.io/badge/Credits-PCbeta-red.svg?logo=PyCharm)](https://bbs.pcbeta.com) +[![b](https://img.shields.io/badge/Credits-黑果小兵-yellow.svg?logo=Babel)](https://blog.daliansky.net/) +[![qq](https://img.shields.io/badge/外星人黑苹果-个人博客Blog-silver.svg?logo=Blogger)](https://rockjesus.cn) +[![qq](https://img.shields.io/badge/外星人黑苹果-QQ群-purple.svg?logo=TencentQQ)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/qq.png) +[![qq](https://img.shields.io/badge/外星人黑苹果-微信公众号-silver.svg?logo=WeChat)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/gzh.jpg) +[![qq](https://img.shields.io/badge/social-tiktok-blue.svg?logo=tiktok)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/dou.png) +[![qq](https://img.shields.io/badge/social-微信视频号-green.svg?logo=AirPlayVideo)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/sph.jpg) +[![qq](https://img.shields.io/badge/social-电影公众号-red.svg?logo=Aparat)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/dy.jpg) + [![zfb](https://img.shields.io/badge/打赏-支付宝-blue.svg?logo=alipay)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/zfb.png) + [![wx](https://img.shields.io/badge/打赏-微信-green.svg?logo=wechat)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/wx.png) + [![zsm](https://img.shields.io/badge/打赏-赞赏码-yellow.svg?logo=wechat)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/zsm.png) + [![qq](https://img.shields.io/badge/黑苹果-远程安装-purple.svg?logo=Atom)](https://gcore.jsdelivr.net/gh/rockjesus/rockjesus/img/az.jpg) + [![Gitter](https://img.shields.io/badge/Chatroom-Gitter-9cf.svg?logo=gitter)](https://gitter.im/Alienware-hackintosh/community) +[![stars](https://img.shields.io/github/stars/rockjesus.svg?logo=ApacheSpark)](https://github.com/RockJesus) +[![followers](https://img.shields.io/github/followers/RockJesus.svg?logo=SouthwestAirlines&color=purple)](https://github.com/RockJesus) + [![download-badge](https://img.shields.io/github/downloads/RockJesus/Alienware-Opencore-Theme/total.svg?logo=DocuSign "Download status")](https://github.com/RockJesus/Alienware-Hackintosh "Download status") + [![visitors](https://visitor-badge.glitch.me/badge?page_id=rockjesus.visitor-badge&left_color=green&right_color=red)](https://rockjesus.cn) # Introduction IOElectrify is a macOS kext which enables always-on power to Intel Thunderbolt hardware. @@ -29,4 +58,4 @@ This can be modified in the `Info.plist` as required. ## Credits * [goodwin_c](https://www.tonymacx86.com/threads/usb-c-hotplug-not-working.223534/page-5#post-1580114): Thunderbolt force-power method -* [IOWMIFamily by dolnor](https://github.com/Dolnor/IOWMIFamily): macOS WMI interface \ No newline at end of file +* [IOWMIFamily by dolnor](https://github.com/Dolnor/IOWMIFamily): macOS WMI interface