Jump to content
InsanelyMac Forum
CodeRush

[UEFIPatch] UEFI patching utility

Recommended Posts

lunux, this patch is useful only for X58/x6x/x7x-based boards.

Atom is definitely not an option, it has different MSR layout and I not supported by vanilla AppleIntelCPUPowerManagement.kext at all.

You don't need to flash that modified BIOS, because that modification will bring nothing.

Another 30 minutes of digging deep into disassembled listings down the drain. :(

 

To all, to prevent situations like this from happening, please include a report made by AIDA64 or DarwinDumper to your next "PMPatch doesn't work in my case" message.

I spent a whole evening lurking into binary code and that was almost unneeded in one case and totally unneeded in another. Please try to save my evening next time. :)

Share this post


Link to post
Share on other sites
Advertisement

lunux, this patch is useful only for X58/x6x/x7x-based boards.

Atom is definitely not an option, it has different MSR layout and I not supported by vanilla AppleIntelCPUPowerManagement.kext at all.

You don't need to flash that modified BIOS, because that modification will bring nothing.

Another 30 minutes of digging deep into disassembled listings down the drain. :(

 

ok so I cant backup bios using FTK ?

Share this post


Link to post
Share on other sites

You can't backup with FPT on this platform. Your previous backup was fine, BTW.

I wasn't sure my patch will work at the first place, but I'm sure it will not work now. Don't even try it, use your system in it's current state, no further BIOS patches can do something with PM.

Share this post


Link to post
Share on other sites

You can't backup with FPT on this platform. Your previous backup was fine, BTW.

I wasn't sure my patch will work at the first place, but I'm sure it will not work now. Don't even try it, use your system in it's current state, no further BIOS patches can do something with PM.

 

 

Thanks for all your cooperation, it is a real disillusion for me bu anyway ....it was interesting

Share this post


Link to post
Share on other sites

CodeRush,

Am I correct in thinking that Gigabyte EFI based motherboards do not need to be patched as the MSR is already unlocked ?

Share this post


Link to post
Share on other sites

how convinient this tool is ?!

 

i have a samsung laptop (300e4a-s0esa) with intel hm65 uefi phoenix v2 bios ( uefi default setting is disabled in bios , when enabled it causes too much problems with samsung prgrams on windows 7 ) but sadly i have never changed a bios chip before ,,,, ( recently updated my bios to the latest rev q07a and problem still occurs )

i still havent patched this apple kext but anyway the problem with my graphic card is not fixed ( nvidia 520mx only is recognized after the first cold boot and still no driver inside mac os x 10.8.3 for it , after reboot i cant see the nvidia on nither windows 7 nor mac , completly dissappering until i shutdown mac and boot windows then shutdown windows , booting windows afterwards to see my nvidia card working again ! )

 

can this mod help me with this major problem ?! ,,,, thanks anyway

Share this post


Link to post
Share on other sites

Hello, I have been helping you CodeRush CodeRush wanted to tell everyone to the patch file Power management I assure you it works quite well. I do not have any at all.

Thanks CodeRush. :thumbsup_anim: :thumbsup_anim: :thumbsup_anim: :thumbsup_anim:

Share this post


Link to post
Share on other sites

sniper9911, it's just a small patch for unlocking write access to 0xE2 MSR register, it has nothing to do with graphic cards and can't magically make your GeForce 100% compatible.

If you haven't patched your AICPM.kext, you must have used NullCPM.kext, that prevents system from working on other C-states then maximal and sleep mode from working normally.

Only this problem can be solved by this patch, not a single other one.

 

naidb, viidee, thanks for testing and reporting.

Share this post


Link to post
Share on other sites

Then this utility should work on desktops, too? If one has an Ivy or Sandy board with UEFI of course.

Share this post


Link to post
Share on other sites

xtraa, sure, it was meant for ASUS desktop boards at the beginning of development, and now tested on many boards from all first tier vendors: ASUS, Asrock, MSI. There is no need to apply this patch on Gigabyte.

Boards from second tier vendors like Foxconn, Biostar, Sapphire are tested only 'virtually' (patcher produces modified BIOS file, but noone has a board to test if it works or not.) Only Zotac and ECS boards of that kind are really tested.

 

Legionario, thank you too. :)

Share this post


Link to post
Share on other sites

Hi, I have ans Asus P8H61-M LX R20, bios can be downloaded from here http://www.asus.com/Motherboards/P8H61M_LX_R20/#support_Download

Tried using the PMPatch and flashed the newly generated file, but failed due to signing.

 

Here is the output of PMPatch:

 

 

PMPatch 0.5.11

PowerManagement module at 003F8AE0 patched.

AMI nest modules not found.

Phoenix nest modules not found.

CpuPei module at 00790B68 not patched: Patch pattern not found.

CpuPei module at 007D0B68 not patched: Patch pattern not found.

Output file generated.

 

Can anyone shed light on this please. Thanks!

Share this post


Link to post
Share on other sites

Hi,

I downloaded a new bios version (1002) for my P8B75-M LX, flashed it and afterwards patched with PMPatch and installed the patched bios with fpt.exe. Then I tried to boot OSX86 with original nullcpu kext but all I got was a kernel panic :( I ensured that my bios was patched (dump bios and try to patch, which apparently failed, because it was already patched)

 

This is the link to the bios file: http://dlcdnet.asus....X-ASUS-1002.zip

 

I would appreciate any help :)

 

edit: Nevermind, I followed the guide in your signature and everything works fine now :) Thanks for this great tool =)

Share this post


Link to post
Share on other sites

Here is the output of PMPatch:

PMPatch 0.5.11

PowerManagement module at 003F8AE0 patched.

...

Here is the message about patched module. If output file is generated, all things are in order.

Share this post


Link to post
Share on other sites

coderush--thanks for your hard work and willingness to help us all!

 

i have an MSI H61M-P31 (G3). i am trying to Clover UEFI boot with an i3-2125. i can boot "legacy" but when i try UEFI the boot hangs just before the OS X boot message about IOAPIC should appear.

 

i applied PMPatch (successfully, i think) to my bios

 

 

PMPatch 0.5.11

PowerManagement module at 002A92D0 patched.

AMI nest modules not found.

Phoenix nest modules not found.

CpuPei module at 003C3890 not patched: Patch pattern not found.

Output file generated.

 

however, UEFI boot still hangs.

 

i assume this patch is not meant to solve my problem.

 

thanks

Share this post


Link to post
Share on other sites

faithie999, you need to add OsxAptioFixDrv.efi to your drivers64UEFI folder to address your problem. This patch is about using vanilla AppleIntelCPUPowerManagement.kext, nothing more, nothing less.

Share this post


Link to post
Share on other sites

As I have posted two weeks ago, I'm working on new program, codenamed "PMPatch done right". The real name is now "Universal UEFI BIOS Patcher", but it can be changed to anything any second. :)

I have been convinced by other people, who uses PMPatch as part of their software, not to use GUI as primary interface, so C++/Qt is not needed too.

What is done:

1. Compression code refactored.

2. All patches and modules to patch are stored in patches.ini file and read after execution, it is easy to add, modify or remove any particular patch for any particular module.

Here is an example of file, that implements all PMPatch 0.5.11 functions + patch for Intel EFI, which is not implemented in PMPatch yet.

;---------------------------------------------------------------------------------------------
; PATCHES
;---------------------------------------------------------------------------------------------
; Found by RevoGirl. RIP, young genius.
[PMPatch_PowerManagement]
type = patch
find = 75080FBAE80F89442430
replace = EB089090909090909090
; Found by Donovan6000 on InsanelyMac.
[PMPatch_SmmPlatform]
type = patch
find = 480FBAE00F7212480FBAE80FB9E2000000
replace = 480FBAE00FEB1290909090909090909090
; A bit better CpuPei patch for old AMI BIOSes
[PMPatch_CpuPei_common]
type = patch
find = 0D00800018EB050D00800000
replace = 0D00000018EB050D00000000
; Special CpuPei patch for old AMI BIOSes on ECS boards
[PMPatch_CpuPei_ECS]
type = patch
find = 81CE00800018EB0681CE00800000
replace = 81CE00000018EB0681CE00000000
; Patch for Intel EFI on server boards
[PMPatch_MpCpuX64]
type = patch
find = B9E2000000480FBAE80F488BD0
replace = B9E2000000480FBAE00F488BD0
;---------------------------------------------------------------------------------------------
; GAP MODULES
;---------------------------------------------------------------------------------------------
; Gap modules can be used as free space and for maintaining BIOS structure after modifications
;---------------------------------------------------------------------------------------------
[Gap module]
type = gap
guid = E4536585-7909-4A60-B5C6-ECDEA6EBFB54
;---------------------------------------------------------------------------------------------
; IGNORE MODULES
;---------------------------------------------------------------------------------------------
; Occurence of any other module will be ignored, if it is found inside this type of modules
;---------------------------------------------------------------------------------------------
[statusCodeReport module]
type = ignore
guid = 987EA6EA-FBFD-4273-B819-A7210ADF6760
;---------------------------------------------------------------------------------------------
; CHECKSUM MODULES
;---------------------------------------------------------------------------------------------
; Modules for checksum recalculation
;---------------------------------------------------------------------------------------------
[Dell RAW file]
type = checksum
guid = F33E367F-41D2-4201-9CB7-AFA63DCCEEC9
;---------------------------------------------------------------------------------------------
; NEST MODULES
;---------------------------------------------------------------------------------------------
; Modules that have another modules inside, packed or not
;---------------------------------------------------------------------------------------------
[AMI nest]
type = nest
guid = AE717C2F-1A42-4F2B-8861-78B79CA07E07
[Phoenix/Insyde nest]
type = nest
guid = 4A538818-5AE0-4EB2-B2EB-488B23657022
;---------------------------------------------------------------------------------------------
; MODULES FOR PATCHING
;---------------------------------------------------------------------------------------------
[PowerManagement]
type = module
guid = 8C783970-F02A-4A4D-AF09-8797A51EEC8D
patch = PMPatch_PowerManagement
[PowerManagement2.efi]
type = module
guid = F7731B4C-58A2-4DF4-8980-5645D39EC358
patch = PMPatch_PowerManagement
[CpuPei]
type = module
guid = 2BB5AFA9-FF33-417B-8497-CB773C2B93BF
patch = PMPatch_CpuPei_common,PMPatch_CpuPei_ECS
[smmPlatform]
type = module
guid = 99C20A37-042A-46E2-80F4-E4027FDBC86F
patch = PMPatch_SmmPlatform
[MpCpuX64]
type = module
guid = 62D171CB-78CD-4480-8678-C6A2A797A8DE
patch = PMPatch_MpCpuX64

 

What to do:

1. EFI filesystem traversal instead of pattern matching. Will be implemented in one of future version, because it's rather hard to implement a routine, that will work on any UEFI BIOS. (Hello to Phoenix developers :)). But Andy have done it right in PhoenixTool, so I know it's possible.

2. Actual patching code, I'm working on it right now.

3. A pair of minor ideas, which I will describe later, after first version will be ready.

 

The code will be available on GitHub under BSD, as usual.

If you have an idea or feature request - tell me now, before it's too late. That is why I'm writing this post, actually. :)

Share this post


Link to post
Share on other sites

coderush--thanks for your hard work and willingness to help us all!

 

i have an MSI H61M-P31 (G3). i am trying to Clover UEFI boot with an i3-2125. i can boot "legacy" but when i try UEFI the boot hangs just before the OS X boot message about IOAPIC should appear.

 

i applied PMPatch (successfully, i think) to my bios

 

 

PMPatch 0.5.11

PowerManagement module at 002A92D0 patched.

AMI nest modules not found.

Phoenix nest modules not found.

CpuPei module at 003C3890 not patched: Patch pattern not found.

Output file generated.

 

however, UEFI boot still hangs.

 

i assume this patch is not meant to solve my problem.

 

thanks

 

HI I also tried on my Asus rampage III gene (X58) (AMI)

and get following:

 

 

PMPatch 0.5.11

PowerManagement modules not found.

AMI nest modules not found.

Phoenix nest modules not found.

CpuPei modules not found.

 

I also tried to open with the BIOS.ROM file

with FD44Editor (Mac) and get this:

 

 

Error parsing BIOS data.

$BOOTEFI$ signature not found.

Please open correct ASUS BIOS file.

 

Probably my board is a no go.

Any way thank you a lot for sharing

:mellow:

Share this post


Link to post
Share on other sites

tried on my Asus rampage III gene (X58) (AMI)

This isn't an UEFI BIOS, so the utility can't patch it, sorry.

Share this post


Link to post
Share on other sites

Tested on Zotac Z77ITX v0.10 by myself, works normally. I have spotted some bugs in v0.10 and sent it to Zotac BIOS developers, so I hope a new version will be out soon.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



  • Similar Content

    • By notacone
      These are the Original iMac17,1 Firmware 0105_B20 ACPI Tables.
      They have been extracted from the firmware file provided in 10.12.4 update, so they are clean and unloaded.
      All tables are available in hex cut/new file/paste order so they are untouched and unloaded.
      I believe these files can serve to better study Skylake architecture implementation in Sierra.
      10.12.4-10.12.6 : IM171_0105_B20-10.12.4.firmware update ACPI Tables.zip
      10.13.0+ : IM171_0110_B00 10.13.0GM ACPI Tables.zip
    • By partha.slg123
      Hackintosh High Sierra 10.13.3 USB Installer Boot Into USB DIrectly Enter Exit Option Menu. Clover Boot Menu Not Showing. Plz Help .................
       

       
      My System Specification :

      CPU : Core i5 6400
      MB : Asus H110M-CS
      RAM : 8GB DDR 4
      HDD : WD 1TB For Windows And WD 500 GB For Hackintosh
      Bootloader : Clover
    • By gorans
      Hi,
       
      after updating HS my WOL stopped working. It worked for sure in El Capitan, not sure in what version of HS stopped to work. I'm using Ozmosis as bootloader and IntelMausiEthernet (in S/L/E) for network. I created ssdt.aml with ssdtPRGen, and put it in EFI/Oz/Acpi/Load/.
      WOL is enabled in BIOS, wake for network access is checked
      pmset -g System-wide power settings: DestroyFVKeyOnStandby 0 Currently in use: standby 0 Sleep On Power Button 1 womp 1 hibernatefile /var/vm/sleepimage powernap 0 networkoversleep 1 disksleep 10 sleep 15 autopoweroffdelay 28800 hibernatemode 0 autopoweroff 0 ttyskeepawake 1 displaysleep 15 standbydelay 10800 If I put machine to sleep, WOL works for a short time, but not working if I let it sleep for a while.
       
      I deleted Ethernet in Network, rebooted and recreated it, but still the same.
       
      Hardware:
      MOBO:     Gigabyte Z97-D3H rev 1.1
      processor:    i5-4460 Haswell
      graphic:    Gigabyte GeForce GT 740 OC GDDR5 2GB (GV-N740D5OC-2GI)
      memory:    2 x 8GB Kingston
      disks:    Samsung SSD 850 EVO 120GB
              Seagate 2TB
              LG DVD±RW
      Sound:     VoodooHDA
      Network:    IntelMausiEthernet.kext
       
      Any advice?
       
      Best regards,
      Goran
    • By M3G4DR01D
      Hello everyone, I have an Asus gl502vmk (i7 kabylake + GTX 1060 6 gb) laptop and I tried all the patches/kexts to get the brightness with fn keys/touchpad (I2C ELAN 1200 works with VooDoo I2C kext v1.0 but no gestures/preference pane)/Keyboard backlight to work but no success so far, any help would be appreciated, thanks in advance.
      [EDIT] (10/04/2018)
      Battery status now works, thanks to @RehabMan turned out to be incorrect SMBIOS (used iMac instead of Mbp) lol, but it drains crazy fast (~1.5 - 2 hours while on standby (all apps quited!), on windows 10 it lasts 4 - 5 hours, and on linux it lasts 6 ~ 7 hours!)
      And with VoodooI2C v2.0.1 + VoodooI2CHID kext and patched DSDT, the touchpad is now detected in the sys pref pane but still no input.
      Sound works with VoodooHDA v2.9.1, but the only issue is that the jack sense isn't working (the output device doesn't auto switch to headphone when connected)
       
      [EDIT 2] (11/04/2018)
      The system brightness now works thanks to @onejay09 but I have no brightness slider, and there are 4 extra brightness levels (brightness stops increasing after 12 levels)  and the brightness keys are not mapped correctly, plus the brightness decreases when I plug in the ac adapter, then increases if I unplug it???, the brightness level isn't also saved after reboot.
      battery still drains crazy fast (~1.5 - 2 hours, even with brightness at 50%, so apparently it is a power management issue).
      and I also have shutdowns while in sleep mode (I tried darkwake=10 and darkwake-0 and darkwake=no)
       
      P.S. I have uploaded my new report files, thanks!
       
      Latest report files (11/04/2018): https://www95.zippyshare.com/v/AMOpP0AY/file.html
    • By liuhongxin1993
      ASUS X99-E-10G WS
      I76950X
      Request to optimize
      Sleep/Wake issues, CPU Power States


      origin.zip
      ioregMac Pro.zip
      config.plist
      kexts.zip
×