diff --git a/NootedRed/HDMI.cpp b/NootedRed/HDMI.cpp index 9d00f6ca..c1fb7f58 100644 --- a/NootedRed/HDMI.cpp +++ b/NootedRed/HDMI.cpp @@ -7,19 +7,15 @@ #include static const char *pathAppleGFXHDA = "/System/Library/Extensions/AppleGFXHDA.kext/Contents/MacOS/AppleGFXHDA"; -static const char *pathAppleHDA = "/System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA"; static KernelPatcher::KextInfo kextAppleGFXHDA {"com.apple.driver.AppleGFXHDA", &pathAppleGFXHDA, 1, {true}, {}, KernelPatcher::KextInfo::Unloaded}; -static KernelPatcher::KextInfo kextAppleHDA {"com.apple.driver.AppleHDA", &pathAppleHDA, 1, {true}, {}, - KernelPatcher::KextInfo::Unloaded}; HDMI *HDMI::callback = nullptr; void HDMI::init() { callback = this; lilu.onKextLoadForce(&kextAppleGFXHDA); - lilu.onKextLoadForce(&kextAppleHDA); } bool HDMI::processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t slide, size_t size) { @@ -54,16 +50,6 @@ bool HDMI::processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t slid PANIC_COND(!LookupPatchPlus::applyAll(patcher, patches, slide, size), "AGFXHDA", "Failed to apply patches"); } - return true; - } else if (kextAppleHDA.loadIndex == id) { - LookupPatchPlus patches[] = { - {&kextAppleHDA, kAHDACreate1Original, kAHDACreate1Patched, 2}, - {&kextAppleHDA, kAHDACreate2Original, kAHDACreate2OriginalMask, kAHDACreate2Patched, - kAHDACreate2PatchedMask, 2}, - {&kextAppleHDA, kAHDACreate3Original, kAHDACreate3Mask, kAHDACreate3Patched, 2}, - }; - PANIC_COND(!LookupPatchPlus::applyAll(patcher, patches, slide, size), "AHDA", "Failed to apply patches"); - return true; } diff --git a/NootedRed/HDMI.hpp b/NootedRed/HDMI.hpp index b043f5ee..7e1333e8 100644 --- a/NootedRed/HDMI.hpp +++ b/NootedRed/HDMI.hpp @@ -59,18 +59,3 @@ static const UInt8 kCreateAppleHDA2Original[] = {0x3D, 0xF8, 0xA0, 0x00, 0x00, 0 static const UInt8 kCreateAppleHDA2OriginalMask[] = {0xFF, 0xFF, 0xF0, 0xFF, 0xFF, 0xFF, 0x00}; static const UInt8 kCreateAppleHDA2Patched[] = {0x66, 0x90, 0x66, 0x90, 0x90, 0xEB, 0x00}; static const UInt8 kCreateAppleHDA2PatchedMask[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00}; - -//! TODO: Provide an explanation here. -static const UInt8 kAHDACreate1Original[] = {0x87, 0xAA, 0x00, 0x00, 0x0F, 0x8F}; -static const UInt8 kAHDACreate1Patched[] = {0x66, 0x90, 0x66, 0x90, 0x48, 0xE9}; - -//! TODO: Provide an explanation here. -static const UInt8 kAHDACreate2Original[] = {0x83, 0x00, 0x38, 0x77, 0x00, 0xB0}; -static const UInt8 kAHDACreate2OriginalMask[] = {0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xF0}; -static const UInt8 kAHDACreate2Patched[] = {0x66, 0x90, 0x90, 0xEB, 0x00, 0x00}; -static const UInt8 kAHDACreate2PatchedMask[] = {0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00}; - -//! TODO: Provide an explanation here. -static const UInt8 kAHDACreate3Original[] = {0xD8, 0xAA, 0x00, 0x00, 0x75, 0x00}; -static const UInt8 kAHDACreate3Mask[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00}; -static const UInt8 kAHDACreate3Patched[] = {0x66, 0x90, 0x66, 0x90, 0x66, 0x90};