Jump to content

[UEFIPatch] UEFI patching utility

BIOS patch power management UEFI

  • Please log in to reply
1657 replies to this topic

#1481
Colask8

Colask8

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
  • Gender:Male

Guys, where do i get my bios file to patch? Do i download it from MSI website? Trying to install Mac on MSI H87-G43. 



#1482
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 1,115 posts
  • Gender:Male

Continuing the story started HERE
I've stumbled upon a similar procedure related to bit setting at LPC interface bridge  BIOS_CNTL register (see intel chipset spec) on boards which implement nvram write protection. Namely, the board under exam was GA-Z77X-UD5H. 

The module has GUID of 7B8DB049-C7C7-4D3B-809F-926DEE47CCA2 (SBSMI - Southbridge SMI ?). Since the address of BIOS_CNTL was first mentioned by CodeRush in the aforementioned post, this code snippet looks to be very closely related to the SMI handler which implies the lock we are so desperately trying to get rid of:

00000001800008fe E8410C0000                      call       0x180001544
0000000180000903 41B9DC000000                    mov        r9d, 0xdc
0000000180000909 4533C0                          xor        r8d, r8d
000000018000090c 24FE                            and        al, 0xfe 
000000018000090e B21F                            mov        dl, 0x1f
0000000180000910 33C9                            xor        ecx, ecx
0000000180000912 88442420                        mov        byte [ss:rsp+0x20], al
0000000180000916 E8CD0D0000                      call       0x1800016e8

The crucial byte here with the analogy to aforementioned research is 0xfe (NOT 0x01), which has to be inverted, hence changed to 0xff.

I have no way to personally test this myself as my board doesn't incorporate the lock (yet, lol). This will remove all BIOS region related write restrictions, meaning it would allow to reprogram on ASUS boards. If this fails in regards to nvram lock, there's a good chance that deleting the NvramSmi module completely from the firmware image will lift all the write-related restrictions. 



#1483
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 403 posts
  • Gender:Male
  • Location:Deggendorf, Germany

I must also add that SMM_BWP bit of BIOS_CNTL register must also be set to 0 for the metod above to work properly, as I have previously described, other way the system will hang up after the first try to write something in the SPI chip, but all other things including possible solution of good old NVRAM problem appears to be correct. I can't test it myself because of lack of locked hardware, but you have one - you are wellcome.



#1484
Aigors

Aigors

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 526 posts
  • Gender:Male
  • Location:Italy
  • Interests:RC Model, pc, networking, mechanic electronic

Hi, i have a little problem, i'm playing with a laptop asus p551c i would like pmpatch bios, but it seem that i cant flash it with internal software, the software included in bios, someone knows some way to flash avoiding desoldering bios chip? 

Many thanks 



#1485
ranza

ranza

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
@ CodeRush
 
I need help to patch the bios of my motherboard MSI X79A-GD45 (8d)
Question how can I check if I locked MSR 0xE2
 
Thanks

Attached Files



#1486
tuxuser

tuxuser

    InsanelyMac Protégé

  • Members
  • Pip
  • 45 posts
  • Gender:Male
  • Location:Germany

Are there news regarding Disabling the NVRam protection by any chance?



#1487
cruzin_cruzing

cruzin_cruzing

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

Hi, i have a little problem, i'm playing with a laptop asus p551c i would like pmpatch bios, but it seem that i cant flash it with internal software, the software included in bios, someone knows some way to flash avoiding desoldering bios chip? 

Many thanks 

If your Asus laptop is like mine, you have to use afudos to pull a BIOS backup, patch the backup, and then use the afudos /gan method to flash it as mentioned somewhere in this thread. Unfortunately, this is not working for me as PMPatch is saying that the resulting file after patching is too large after compression. I've heard of others with the same laptop who have used this method with success, however. 



#1488
jamice4u

jamice4u

    InsanelyMac Protégé

  • Donators
  • 15 posts

I have a MSI GE70 2PE 012US laptop. I got a modded bios and disabled the MSR X02 or what ever it is called. I have mavericks installed on my laptop. But I get a lot of error when I try to compile a dsdt file is it because of my bios or after market hardware like ssd, upgraded memory, upgraded wifi card, if so what can I do about it. I system is awesome but my hdmi port doesn't work, audio ports don't work but I can load kext files, ethernet port doesn't work and won't see kext files, camera doesn't work or see kext files, screen brightness doesn't work so my battery is draining like crazy but, mostly everything else works. I even have full graphics acceleration. I just want to be able to compile a dsdt file without 70 errors.



#1489
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,121 posts
  • Gender:Male
  • Location:Brazil

Your post is off topic. We have a whole section here dedicated to DSDT, please post there instead.



#1490
AlexKms

AlexKms

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts

Hi ! I have asrock z87 exreme4 mb with 2.70 bios version. And i can't get output file when run PMPatch.

 

C:\bios>AFUWINx64 bios.bin /o
+---------------------------------------------------------------------------+
| AMI Firmware Update Utility v3.05.04 |
| Copyright ©2013 American Megatrends Inc. All Rights Reserved. |
+---------------------------------------------------------------------------+
Saving current BIOS into file: bios.bin
Reading flash ............... done

C:\bios>PMPatch bios.bin c:\bios\pmbios.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.

C:\bios>

 

Update:

 

Solved! Downgrade to 2.60 version which able to patch. Thanks CodeRush



#1491
tuxuser

tuxuser

    InsanelyMac Protégé

  • Members
  • Pip
  • 45 posts
  • Gender:Male
  • Location:Germany

Some news regarding the nvram "so called" write protection:

 

Not sure if its valid for all mentioned BIOSes

 

http://www.insanelym...osis/?p=2030922



#1492
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 403 posts
  • Gender:Male
  • Location:Deggendorf, Germany

Thanks. I knew it's an OSX issue, but it will not be corrected until Apple implements UEFI 2.3.1C requirement level (i.e. SecureBoot tech support). 

You can also use UEFI shell to read and write runtime variables, it's easier then using Linux and special software. 



#1493
cruzin_cruzing

cruzin_cruzing

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

So I manually patched using UEFITool, no compression errors. 



#1494
ranza

ranza

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
Hello CodeRush

could you help me post 1485

Thanks

#1495
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 403 posts
  • Gender:Male
  • Location:Deggendorf, Germany

Patch tour BIOS manually, link to the guide is in my signature.



#1496
ranza

ranza

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts

Patch tour BIOS manually, link to the guide is in my signature.

Thank you for your reply
can I ask what your signature
Wonder too if you can show it to you, I am a beginner

#1497
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 403 posts
  • Gender:Male
  • Location:Deggendorf, Germany

Here is the link.



#1498
ranza

ranza

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts

Here is the link.

Can I ask you if you can show you this.
Thank you
Question how can I check if I locked MSR 0xE2

#1499
ranza

ranza

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
I tried to use UEFI tool but when I open it I get this error. 
advice
 
2ilbm06.png
 
r7m5a0.png
 
Thanks


#1500
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 403 posts
  • Gender:Male
  • Location:Deggendorf, Germany

This is not a BIOS file, this is install package.







Also tagged with one or more of these keywords: BIOS, patch, power management, UEFI


10 user(s) are reading this topic

2 members, 8 guests, 0 anonymous users


© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy