Jump to content

[UEFIPatch] UEFI patching utility


CodeRush
1,981 posts in this topic

Recommended Posts

Thanks for the fast replies k3nny and CodeRush!

 

@k3nny: that's what I thought, too. But for some odd reason, flashing a whole BIOS with FTK gives me those extra menus. Flashing my BIOS using the "gan" switch did nothing - I got the Updating BIOS notice and success messages after flashing my modded BIOS with afuwinx64. However, after a reboot (full shutdown, 30sec wait, boot), there were absolutely no changes. Verifying the BIOS by reading it with afuwinx64 and patching it again with PMPatch showed me, that nothing was changed (no "Nothing to do" message). Additionally, in RWEverything, MSR 0xE2 Bit 15 was set. So definitely nothing changed. My motherboard seems really "special"...

 

@CodeRush: flashing BIOS with FTK gives me a weird outcome. Will this procedure also work or will it probably brick my board?

1. Flash 3010 - BIOS Lock removed

2. AMIBCP - unlock Stock 3601's BIOS Security Menu

3. Flash modified 3601 BIOS using FTK and disable 3601's BIOS Lock

4. Modify another copy of a stock (.CAP file, not read via afuwinx64) 3601 BIOS with PMPatch

5. Flash MSR 0xE2 unlocked BIOS CAP file via afuwinx64 under Windows (flashrom under Arch Linux, if afuwinx64 doesn't work again)

 

I'd really like to avoid those unfunctional menus, which occured after flashing my BIOS with FTK. I think there are some minor incompabilities between FTK and my mainboard.

Link to comment
Share on other sites

You can't flash anything modified with AMI tools, regardless of BIOS Lock switch, but you can dump your "normal" BIOS with FTK, patch it and then flash back by FTK on BIOS with disabled locks, that way you will have normal but patched BIOS.

Link to comment
Share on other sites

Thanks for the fast replies k3nny and CodeRush!

 

5. Flash MSR 0xE2 unlocked BIOS CAP file via afuwinx64 under Windows (flashrom under Arch Linux, if afuwinx64 doesn't work again)

 

 

Flashing a ROM with capsule header using flashrom? Not recommended from my point of view.

Better dump, patch, flash with flashrom if it works, but starting flashrom -p internal -v >access.txt will produce

a nice file showing us if a flashrom flash would be potentially succesful.

Link to comment
Share on other sites

Hi all,

 

Firstly I would just like to say a big thank you to CodeRush for the great effort in constructing this program and taking the time to help us all with our related problems. I am hopeful the he or someone else here can help me solve mine. 
 
I am not usually one to ask for help, preferring to work things out on my own through searches, other people's responses and good old trial and error but this has had be stumped for a few days now and its driving me mad!!!  I feel like a bit of a goose as I know this should be so simple but I am just missing something and once you all tell me what it is I will kick myself over how silly it was I am sure.
 
Now I know this has been covered a few times already in this thread and the one over at tonymacx and I believe I have followed them down to the letter but to no avail... I have also look through the guide at biosrepo.wordpress.com too.
 
I simply can not get the bios to be patched using PMPatch at all.  Every time I follow the instructions of "Usage: pmpatch /path/to/original.bios /path/to/patched.bios" I have the command prompt report that " 'PMPatch is not recognized as an internal or external command, operable program or batch file."
 
 
Here is the question: How can I get command prompt to recognize the command?
 
I have downloaded the compiled PMPatch from here, extracted it and placed it on my desktop along with the bios file.
 
I then enter the following:
 

C:\Users\Steve>PMPatch C:\Users\Steve\Desktop\P8Z77I-I-DELUXE-SI-1103.CAP C:\Users\Steve\Desktop\P8Z77I-I-DELUXE-SI-1103_PATCHED.CAP

Hit enter and get the PMPatch is not recognized response. So what am I missing/doing wrong?
 
I read the the most recent bios releases were further locked down so also tried with an older 801 bios I had saved but the command is still not recognized.  I don't think it's the file though as the command is not being recognized in the first place.
 
When I drag and drop the PMPatch application in to the command prompt window and hit enter it returns the PMPatch version number, tells me about the program and gives me the "Usage: PMPatch INFILE OUTFILE" to which I believe I have followed correctly but obviously haven't as the command is not not recognized.
 
I have even tried in OSX as outlined in the biosrepo guide but get "cannot execute binary file"
 
I am just about to give up on this as I am tearing my hair out. Please if anyone can help explain to me at what part I am am going wrong it would be greatly appreciated.
 
Many thanks,
Steve

Link to comment
Share on other sites

Name the unpatched BIOS old.cap (it's easier to type)

 

1) Place the pmpatch executable and old.cap in the same folder.

 

2) Hold shift and right-click the folder, then click "Open command window here".

 

3) Enter pmpatch old.cap patched.cap

 

4) Watch the same messages that confuse the hell out of everybody who hasn't read the first post properly.

 

...

 

To execute pmpatch (and other binaries that aren't in /usr/bin) from terminal on OS X you need to do ./pmpatch

  • Like 1
Link to comment
Share on other sites

Hi there! I saw a few posts ago that you are looking at developing a different utility to replace this but I thought I would go ahead and post my "PMPatch didn't work for me".

 

The motherboard is an MSi X79A-GD45 Plus, here is the output;

 

PMPatch 0.5.14
PowerManagement module at 00572030 not patched: Patch pattern not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 007A34E8 not patched: Patch pattern not found.

I have attached the stock BIOS and the AIDA report on my board. Let me know if I can provide you with anymore information  :)

 

MSi X79A-GD45 Plus.htm

E7760IMS.zip

Link to comment
Share on other sites

@bavarianblessed:

 

Use RWEverything instead. Take a look at the CPU MSR window and add register 0xE2. If bit 15 is 1, then you have a lock. If it is 0, you are lucky and won't need PMPatch.

  • Like 1
Link to comment
Share on other sites

@bavarianblessed:

 

Use RWEverything instead. Take a look at the CPU MSR window and add register 0xE2. If bit 15 is 1, then you have a lock. If it is 0, you are lucky and won't need PMPatch.

I'll give it a go. Thanks k3nny  :)

 

I honestly have no idea if I'm looking at this properly but am I correct in assuming I'm good without PMPatch?

 

rweverything.png

 

 

Link to comment
Share on other sites

@bavarianblessed:

 

Your 0xE2 register value is 0x8400. That means bit 15 is set and you need a patch.

It is the same code sequence as CodeRush wrote in this post. He also posted a patch several posts further. I attached a patched version of the BIOS you posted earlier.

E7760IMS_PM.zip

  • Like 1
Link to comment
Share on other sites

Ah I see, so I was reading it wrong. Thanks for the guidance and even more for the patched BIOS, k3nny! So I'm not derailing this thread further, could you recommend a reference site or forum for working with and understanding RWEverything? Their site is down at the moment.  

Link to comment
Share on other sites

Name the unpatched BIOS old.cap (it's easier to type)

 

1) Place the pmpatch executable and old.cap in the same folder.

 

2) Hold shift and right-click the folder, then click "Open command window here".

 

3) Enter pmpatch old.cap patched.cap

 

4) Watch the same messages that confuse the hell out of everybody who hasn't read the first post properly.

 

...

 

To execute pmpatch (and other binaries that aren't in /usr/bin) from terminal on OS X you need to do ./pmpatch

 

Thanks very much for this Gringo it worked perfectly!!

 

Shift right click "Open command window here" is the key step I was missing as I had already taken to the name shorting of the files after retyping so many times, I just displayed it like that in my post for completeness.

 

I wasn't confused by those messages, I knew the only one that mattered was "Output file generated" which I now have.

 

Many thanks again!!

  • Like 1
Link to comment
Share on other sites

Hi,

 

I've got a problem with my motherboard Gigabyte GA-X79-UP4 (v1.1) bios F7.

It looks like the MSR E2 bit 15 is locked when everybody says Gigabyte bios are not locked !

Here is my AICPUPMI's output:

AICPUPMI: MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x8407

AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x0
AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x0
AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0

 

Unfortunately, I don't have any windows installed, so if somebody could PMPatch this bios for me, it would be really kind of you.

Thanks.

X79UP4.F7.zip

Link to comment
Share on other sites

Hey,

 

I'm trying to patch my bios but the outputs keeps saying the the file is too big after compression. Can anyone help me out? 

PMPatch 0.5.14
PowerManagement modules not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
Trying to apply patch #1
Nested PowerMgmtDxe/PowerManagement2.efi module at 001D0224 patched.
Patched module too big after compression.
Trying to apply patch #2
Nested PowerMgmtDxe/PowerManagement2.efi module at 001D0224 patched.
Patched module too big after compression.
Trying to apply patch #3
Nested PowerMgmtDxe/PowerManagement2.efi module at 001D0224 patched.
Patched module too big after compression.
Trying to apply patch #4
Nested PowerMgmtDxe/PowerManagement2.efi module at 001D0224 patched.
Patched module too big after compression.
Trying to apply patch #5
Nested PowerMgmtDxe/PowerManagement2.efi module at 001D0224 patched.
Patched module too big after compression.
AMI nest module at 00080848 not patched: Repacked module can't be inserted.
Phoenix nest modules not found.
CpuPei module at 005ADA00 not patched: Patch pattern not found.

Thanks!

G750JWAS208.zip

Link to comment
Share on other sites

Hi,

 

I've got a problem with my motherboard Gigabyte GA-X79-UP4 (v1.1) bios F7.

It looks like the MSR E2 bit 15 is locked when everybody says Gigabyte bios are not locked !

Here is my AICPUPMI's output:

AICPUPMI: MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x8407

AICPUPMI: MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x0

AICPUPMI: MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x0

AICPUPMI: MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0

 

Unfortunately, I don't have any windows installed, so if somebody could PMPatch this bios for me, it would me really kind of you.

Thanks.

 

Hi,

I've installed windows and tried to PMPatch my bios (Gigabyte GA-X79-UP4), but PMPatch doesn't find any pattern to patch.

I'm really stuck on this problem. I use clover as bootloader.

Any idea would be appreciate.

Thanks

PMPatch_0.5.14.exe X79UP4.F7 X79UP4.PATCH.F7
PMPatch 0.5.14
PowerManagement module at 0044DC00 not patched: Patch pattern not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 007E1A50 not patched: Patch pattern not found.
Link to comment
Share on other sites

I am trying to patch the latest 4804 BIOS for my Asus Rampage IV Gene but I am getting the following:

> PMPatch_0.5.14.exe Rampage-IV-Gene-ASUS-4804.CAP R4G.CAP

PMPatch 0.5.14
PowerManagement module at 004A9680 not patched: Patch pattern not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 0079FDA8 not patched: Patch pattern not found.
CpuPei module at 007DFDA8 not patched: Patch pattern not found.

What am I doing wrong? Can anyone help?

Rampage-IV-Gene-ASUS-4804.zip

Link to comment
Share on other sites

@CodeRush, @LightServer and @k3nny: Thank you for your support! I've finally managed to have a clean BIOS update. I've followed LightServer's guide from January 2014, where he described disabling BIOS Lock / SMI Lock / BIOS Interface Lock via NVRAM / AMISCE tool. This went easy as butter. After that, I've created a full backup using latest FTK8 v0.11, modified it with AMIBCP (making BIOS Security Menu available, for future updates) and PMPatched the result. The 15th bit of MSR 0xE2 is now disabled, so everything worked! Woohoo!

 

I couldn't believe, that the NVRAM method actually worked, but that's really a headache-free and fast way of bypassing the BIOS lock, crazy stuff! The result is now a super-clean flash, security-unlocked BIOS and MSR 0xE2 unlocked - I'm stunned! Great work guys!

 

Just for future searchers: this was all done on an ASUS P8C WS, not supporting ASUS USB Flashback method. It had BIOS Lock enabled by default for BIOS versions > 3108 (it could be bypassed by downgrading to 3108 and flashing patched 3601 directly via FTK, resulting in messy flashes) and "afuwinx64 /gan" method also didn't work. The chipset is C216 and everything went smooth. I've used AMISCE Utility. Ver 2.02.1036, FTK8 v0.11 and latest 3601 stock BIOS, bypassing BIOS Lock without downgrading. Good luck!

  • Like 1
Link to comment
Share on other sites

Hi,

 

I am trying to patch my bios with pmpatch for a hackintosh. Even though I have succeeded in the past, this time around I am not able to patch it. Could I therefore kindly ask for assistance on this?

 

My motherboard is MSI Mpower Max Z87 and the bios (latest version:1.7) is E1785IMS.170 which I have attached to this post

 

Thanks a lot ! :)

Link to comment
Share on other sites

Hi folks,

Sorry if I'm a little dense here, not my first Hackintosh but it's my first UEFI system.  And I'm still learning, as I used "censored" site last time.

 

I'm using an Asus Z97I-PLUS.  I patched the UEFI BIOS kind of blindly when I was setting things up, it worked fine.  Well, another new BIOS version came out in the past day or so, and I decided "what they hay, I'll try it unpatched"

 

OS X seems to work just fine?  No panics.  Sleep/wake works.  HWMonitor says my CPU is idling at 792MHz (x8.0) like it did before, CPU package total ~7W and cores ~1W... so presumably that means the CPU power saving is working.  

 

Is there any reason I should bother with this patch, then, or don't I need it, how do I tell?

Link to comment
Share on other sites

Anyone ever try to patch a SUPERMICRO board BIOS?

 

I just built a mini-itx rig using a Supermicro X10LSV board. The stock BIOS is version 1.00, with a build date of 09/09/2013.

 

Everything is running fine but the rig won't be ready for prime time until I get sleep working. Right now it's not waking up. I'm using stock AICPM.

Link to comment
Share on other sites

Trying to patch mine after a update i did ages ago 

but no go 

 

U:\Users\Graham Green\Desktop\AfuWin64>pmpatch bios.bin bios-pmpatched.bin
PMPatch 0.5.14
PowerManagement modules not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
Trying to apply patch #1
Nested PowerMgmtDxe/PowerManagement2.efi module at 001DB704 not patched: Patch p
attern not found.
AMI nest module at 000571C0 not patched: PowerManagement modules not found in ne
sted module.
Phoenix nest modules not found.
CpuPei module at 00560200 not patched: Patch pattern not found.
 
 
does not even create the patched file 
Link to comment
Share on other sites

If you are trying to patch gigabyte bios, you dont need to, gigabyte bios dont need to be patched, some version of x79 chipset from asrock, dont need to be patched, for what i see your bios dont need to be patched

Link to comment
Share on other sites

×
×
  • Create New...