Skip to content

Latest commit

 

History

History
executable file
·
70 lines (58 loc) · 3.46 KB

Instructions.md

File metadata and controls

executable file
·
70 lines (58 loc) · 3.46 KB

CPUFriend Installation & Usage

System Requirements

CPUFriend needs macOS v10.8 or greater.

Installation

It's highly recommended to let the bootloader inject CPUFriend, otherwise you'll need LiluFriend to ensure CPUFriend will work properly. Also, theoretically both ACPI_SMC_PlatformPlugin.kext and X86PlatformPlugin.kext should be untouched. You'd better use the original ones. (Well, CPUFriend will hook configResourceCallback(unsigned int, int, void const*, unsigned int, void*) in either ACPI_SMC_PlatformPlugin or X86PlatformPlugin, which parses IOKit personalities from Resources, so no problem to use a modified one if you do not really care for the signature, which will be restored in an upcoming system upgrade anyway)

Available kernel flags

Add -cpufdbg to enable debug logging (ONLY available in DEBUG binaries).

Add -cpufoff to disable CPUFriend entirely.

Add -cpufbeta to enable CPUFriend on unsupported OS versions.

Configuration

Use CPUFriend/ResourceConverter.sh to generate a working copy of either CPUFriendProvider.kext(Easiness preferred) or ssdt_data.dsl(Speed preferred). If you also have a SSDT generated by ssdtPRGen.sh, then you have to merge them. See Combining Data for more details.

Usage of ResourceConverter.sh

--kext /path/to/file Create CPUFriendProvider.kext with information provided by file.

--acpi /path/to/file Create ssdt_data.dsl with information provided by file.

NOTE:

  • The created kext/ssdt is located in the current working directory.
  • file should be a complete plist from /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources or /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources with certain modifications (Otherwise why do you even need CPUFriend?) instead of something like a raw FrequencyVectors entry.

Combining Data

  1. Generate a correct copy of ssdt_data.dsl with ./ResourceConverter.sh --acpi /path/to/file.
  2. Open your SSDT generated by ssdtPRGen.sh, and search for Method (_DSM, 4, NotSerialized) in your editor.
  3. Paste "cf-frequency-data" entry from ssdt_data.dsl to the SSDT generated by ssdtPRGen.sh. It will look like this if everything is done.
        //
        // Context of the SSDT generated by ssdtPRGen.sh
        //
        Method (_DSM, 4, NotSerialized)
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03
                })
            }

            Return (Package () // size removed, just let the compiler fill it up
            {
                "plugin-type", 
                One,
		
                //
                // Paste it from ssdt_data.dsl
                //
                "cf-frequency-data",
                Buffer () // size removed, just let the compiler fill it up
                {
                    // Data from ssdt_data.dsl
                }
            })
        }
	//
	// Context of the SSDT generated by ssdtPRGen.sh
	//
  1. Save changes and enjoy the new SSDT.