Jump to content

[UEFIPatch] UEFI patching utility


CodeRush
1,981 posts in this topic

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. :)

  • Like 1
Link to comment
Share on other sites

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 ?

Link to comment
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.

Link to comment
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

  • Like 1
Link to comment
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

Link to comment
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:

  • Like 1
Link to comment
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.

Link to comment
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. :)

  • Like 1
Link to comment
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!

Link to comment
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 =)

  • Like 1
Link to comment
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.

Link to comment
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

Link to comment
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. :)

Link to comment
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:

Link to comment
Share on other sites

×
×
  • Create New...