Jump to content

[UEFIPatch] UEFI patching utility


CodeRush
1,981 posts in this topic

Recommended Posts

Nope, no point at all. Any programmers except cheap 10$ ones from China are OK for modern SPI chips. There are popular ones like EZP2010, but I would buy TL886A because it has much better software support and can flash almost anything. If you only need to flash SPI chips on modern UEFI-based boards and nothing more - buy any breakout board based on FTDI FT232H or FT2232H and use it - it will be much cheaper. RaspberyPI is also on option. SPIPGM too.

Coderush;

 

Thanks so much. I have three devices, an FTDI FT232RL, a USBasp programmer, and a RaspberryPi model B. The first two will probably not work, but RaspberryPi looks like a piece of cake. I will wire up it in the next days, and see if I can read the BIOS chip using flashrom running on the RaspberryPi.

 

What I understand I need to do:

 

1- Read the BIOS chip and save.

2- Run PMPatch on the saved file, or manually modify. (May need some help here.)

3- Write the file back into the chip.

 

Since all the specific details such as MAC address will come from the BIOS chip, everything should be retained. Did I get this right?

 

EDIT: I have located the SPI chip, I believe, with a second slot in tow, but no header.

post-287063-0-60141900-1381702923.png

Link to comment
Share on other sites

careful with asus.. they tendt to brick and ctrl Home wont recover sometimes.. best u make SPI USB programmer backup.bin just in case.

 

i had X53C bricked and recovered 1 time to 2.01 and that was the end of it. no power or led lights.

  • Like 1
Link to comment
Share on other sites

I have just successfully patched my Intel Haswell motherboard's (DH87MC) UEFI BIOS using a RaspberryPi Model B as an SPI programmer based on CodeRush's recommendations. Posting how I did here for other people who may have no option but to go down this path. Warning, this is not for the faint hearted, or people who have no experience in soldering. Unless you know what you are doing, you are very likely to mess up your board.

  • Make sure your motherboard has the BIOS you want to patch.
  • I followed Pacman's instructions from here (or here) very closely. I deviated from his instructions when installing pciutils required a manual download, and make, sudo make installand sudo make install-lib. flashrom also requires manual downloading, makeand sudo make install.
  • I did not remove the BIOS (SPI) chip, instead I soldered very thin wires to it in place. This is not necessarily good practice, but worked for me.
  • I did not remove the motherboard cables (also not necessarily good practice), but I disconnected my computer from all external connections, especially power. 
  • With the main computer unplugged and disconnected from everything external, except the soldered wires from the raspberrypi, I booted the raspberrypi, and executed a "sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r biosbackup.rom". Took at least 5 minutes. Now we have the BIOS in a file named 'biosbackup.rom'.
  • I copied the file biosbackup.rom from the raspberrypi to a Windows 7 VM, and ran PMPatch.exe, naming the output file biosbackup_patched.rom. (I was not able to run on OSX due to Segmentation fault: 11.)
  • After I brought the patched file back to the raspberrypi, and I executed "sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -w biosbackup_patched.rom -V". It also took at least 5 minutes.
  • It came back verified, but before I removed the wires, I ran a second test by executing "sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r biosbackup_patched_reread.rom".
  • I compared the files biosbackup_patched.rom and biosbackup_patched_reread.rom in OSX using Hex Fiend. They were identical.
  • I reset the CMOS by removing the motherboard battery to be on the safe side.
  • Removed the wires from the BIOS SPI chip.
  • Reassembled the computer, and booted successfully.
  • Tested with 10.8.5 and 10.9 DP8 successfully.

Once again, this is your last resort, and is not recommended unless you absolutely know what you are doing. CodeRush and Fix It Felix Jr, thanks for all the support. Much appreciated.

 

EDIT:  If you are going this way, you may want to consider investing in a SOIC8 / SOP8 (or whatever matches your SPI chip) in circuit test clip instead of soldering on to your motherboard. Look for "SOIC8 in circuit" on ebay. They go for about $10.

post-287063-0-74165800-1381806813_thumb.png

post-287063-0-70137300-1381806868_thumb.png

post-287063-0-92423400-1381806889_thumb.png

post-287063-0-02682700-1381806907_thumb.png

post-287063-0-43189700-1381806920_thumb.png

post-287063-0-69441200-1381806931_thumb.png

  • Like 10
Link to comment
Share on other sites

i get this with GA Z87 HD3 

Last login: Tue Oct 15 11:16:51 on console
ham4evers-MacBook-Air:~ ham4ever$ /Users/ham4ever/Desktop/PMPatch /Users/ham4ever/Desktop/mb_bios_ga-z87-hd3_f6.exe /Users/ham4ever/Desktop/mb_bios_Patched.exe  
PMPatch 0.5.13
PowerManagement modules not found.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei modules not found.
ham4evers-MacBook-Air:~ ham4ever$ 


Link to comment
Share on other sites

disassembled Powermanagement
|018|PowerMgmtDxe   |F7731B4C-58A2-4DF4-8980-5645D39ECE58|00202F6D|004585|DRVR|

module attached for review, looks different than usual ;)

     47d:	b9 e2 00 00 00       	mov    $0xe2,%ecx
     482:	48                   	dec    %eax
     483:	8b 10                	mov    (%eax),%edx
     485:	8b 7a 09             	mov    0x9(%edx),%edi
     488:	8b df                	mov    %edi,%ebx
     48a:	83 e7 0f             	and    $0xf,%edi
     48d:	81 e3 f0 0f ff 0f    	and    $0xfff0ff0,%ebx
     493:	f6 42 01 7a          	testb  $0x7a,0x1(%edx)
     497:	75 19                	jne    0x4b2

??? 

 

patching 

 

f6 42 01 7a 75 19 to

f6 42 01 7a eb 19

 

required

 

???

 

DON'T do so, please wait for CodeRush's response.

pm.zip

  • Like 1
Link to comment
Share on other sites

Hi,

 

i always patch the bios with no problem 

today i upgrade my Mobo to the 1301 and i follow the same procedure but no success with the ACPM.kext 

 

this is my out put 

 

 

PMPatch 0.5.13
PowerManagement module at 00C095B8 patched.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 00F90748 not patched: Patch pattern not found.
CpuPei module at 00FD0748 not patched: Patch pattern not found.
Output file generated.
 
 
and i join my original file extracted from DCPIManager 
 
any help or suggestion please 

After PM Patch.rom.zip

post-216126-0-91486900-1381841747_thumb.png

Link to comment
Share on other sites

No! Bad n00b. Go to your room. Are you new to forums in general? That's not how it works. Try again.

 

Consider asking a question rather than making a demand.

Nobody can read your mind, therefore when you ask for help, it is up to you to make it clear exactly what it is you are unsure about.

 

To most people who have visited this topic and successfully patched their BIOS, the first post was good enough, it explains everything.

Nobody knows what you know, or what you don't know, so how could anybody write a personalized tutorial for you? With pictures and video, are you kidding?

 

It works like this, it's very simple:

 

If you are unsure about how to perform a specific step, post a specific question about it.

 

EDIT

 

Is this about the motherboard in your signature?

If yes, what are you even doing here? You don't need to patch your BIOS.

  • Like 3
Link to comment
Share on other sites

Hi I need know this please explan I know this is not pmpatch topic Thank you.

 

My board is p8z77-vpro I try to enable multi monitor primary display with  pcie/Auto how to enable muti monitor nvidia and intel hd 4000 windows worked but not osx

Link to comment
Share on other sites

If you know you are wrong to ask here then why are you doing it? You have been told this before, please start a new topic in post-installation.

 

I have the same board with a 3570k CPU but I don't use the HD4000 and I only have a single display, so, no idea, I can't help you. Look for help in the HD4000 topics, we have several.

  • Like 1
Link to comment
Share on other sites

how to enable muti monitor nvidia and intel hd 4000 windows worked but not osx

In order to use both you need to set the integrated graphics as primary.

OS X will then see both GPUs ;)

Edited by Gringo Vermelho
That's a great tip but...please let's stay on topic.
  • Like 1
Link to comment
Share on other sites

In order to use both you need to set the integrated graphics as primary.

OS X will then see both GPUs ;)

Thank you.

Link to comment
Share on other sites

Asus K55VD Ivy Bridge didn't work here…. (

 

Actual bios is 404, tried to patch bios 411 downloaded from Asus.

 

PMPatch 0.5.13
PowerManagement module at 001A4F08 not patched: Repacked module can't be inserted.
PowerMgmtDxe/PowerManagement2.efi modules not found.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 005A18D8 not patched: Patch pattern not found.
 

  Bios:         American Megatrends Inc.         K55VD.404         08/20/2012          6144 Ko         Floppy Disk, Hard Disk, CD-ROM         Flash BIOS, Shadow BIOS, Selectable Boot, EDD, BBS, Smart Battery         DMI, ACPI         PCI, USB
 

K55VDAS411.zip

Link to comment
Share on other sites

Hi,

I succesfully applied your patch with my previous Bios version and could fix all OSX10.9 related problems thanks to your efforts.  Now there's a new Bios released, and when i try to patch it i get the log in the file attached.

Can you please let me know what i can conclude from it ? (either succesful or not?)

Thank you in advance.

post-946790-0-71939600-1382806836_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...