Jump to content

[UEFIPatch] UEFI patching utility

BIOS patch power management UEFI

  • Please log in to reply
1708 replies to this topic

#141
rocket12

rocket12

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
I stumbled here and I say congratulations for the work!

By cons I have a dual bios Insyde to dump it takes only the first but luckily I had an original bios downloaded from Toshiba :


Platform: Intel® HM70 Express Chipset
Reading HSFSTS register... Flash Descriptor: Valid

--- Flash Devices Found ---
W25Q16BV ID:0xEF4015 Size: 2048KB (16384Kb)
W25Q32BV ID:0xEF4016 Size: 4096KB (32768Kb)

--- Flash Image Information --
Signature: VALID
Number of Flash Components: 2
Component 1 - 2048KB (16384Kb)
Component 2 - 4096KB (32768Kb)
Regions:
Descriptor - Base: 0x000000, Limit: 0x000FFF
BIOS - Base: 0x200000, Limit: 0x5FFFFF
ME - Base: 0x001000, Limit: 0x1FFFFF
GbE - Not present
PDR - Not present
Master Region Access:
CPU/BIOS - ID: 0x0000, Read: 0x0B, Write: 0x0A
ME - ID: 0x0000, Read: 0x0D, Write: 0x0C
GbE - ID: 0x0118, Read: 0x08, Write: 0x08

Total Accessable SPI Memory: 6144KB, Total Installed SPI Memory : 6144KB

FPT Operation Passed



fpt.exe -bios -d PLCSF8dump.fd

Intel ® Flash Programming Tool. Version: 8.1.10.1286
Copyright © 2007 - 2012, Intel Corporation. All rights reserved.

Platform: Intel® HM70 Express Chipset
Reading HSFSTS register... Flash Descriptor: Valid

--- Flash Devices Found ---
W25Q16BV ID:0xEF4015 Size: 2048KB (16384Kb)
W25Q32BV ID:0xEF4016 Size: 4096KB (32768Kb)


- Reading Flash [0x600000] 4096KB of 4096KB - 100% complete.
Writing flash contents to file "PLCSF8dump.fd"...

Memory Dump Complete
FPT Operation Passed


This one from original Toshiba Bios patched and flashed all right :

PMPatch.exe PLCSF8_SLIC.fd PLCSF8_PATCH.fd
PMPatch 0.5.10
PowerManagement modules not found.
AMI nest modules not found.
Trying to apply patch #1
Nested PowerManagement2.efi module at 010368DA not patched: Unknown module state
.
Nested PowerManagement2.efi module at 01238738 patched.
Phoenix nest module at 00222048 patched.
CpuPei modules not found.
Output file generated.

How i can dump bios & me region on one file like original Toshiba bios ?

Because impossible to flash with just bios (4096KB) with insydeflashutile.


fpt.exe -me -d PLCSF8MEdump.fd

Intel ® Flash Programming Tool. Version: 8.1.10.1286
Copyright © 2007 - 2012, Intel Corporation. All rights reserved.

Platform: Intel® HM70 Express Chipset
Reading HSFSTS register... Flash Descriptor: Valid

--- Flash Devices Found ---
W25Q16BV ID:0xEF4015 Size: 2048KB (16384Kb)
W25Q32BV ID:0xEF4016 Size: 4096KB (32768Kb)



Error 26: The host CPU does not have read access to the target flash area. To en
able read access for this operation you must modify the descriptor settings to g
ive host access to this region.

#142
tibou

tibou

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Hi CodeRush,

Thanks for sharing your awesome job!

I have a dell xps 17 702x (with i5 2410M)
I use the 0.5.10 version on bios A19, here's the result :

PowerManagement modules not found.
AMI nest modules not found.
Nested PlatformSetupAdvancedDxe.efi at 00717238 patched.
Trying to apply patch #1
Nested PowerManagement2.efi module at 00CC3F90 patched.
Phoenix nest module at 00622690 patched.
Dell RAW file checksums corrected.
CpuPei modules not found.
Output file generated.

It's seems to work. I didn't try to install osx eversince. I'm new and next time I'm gonna try to understand better what I'm doing...

Tschüs!

#143
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 412 posts
  • Gender:Male
  • Location:Deggendorf, Germany
@rocket12, have you tried to flash patched BIOS file with native tools? Can you flash the image dumped with fpt.exe -bios -d image.bin to SPI chip using fpt -bios -f image.bin? If so, patch that image.bin with PMPatch and flash it back.

@tibou, all things look good, you can flash this modified BIOS and use native CPUPM in OS X. But if you don't have one and don't plan to install it - no patching is required. BTW, thanks for testing.

@all, I have found some interesting info on unlocking access to all regions on HP Elitebook 8560p. Thanks to Thomas S. from [H].

I have an HP Elitebook (Probook) 8560p (i5 and QM67).
On this NB is an descriptor lock and so you can't access the whole BIOS chip.
But there is an "hotkey" to remove the lock:

1. Set boot device to USB (and have an USB-Stick with the tools plugged in)
2. Shut down NB. For save work use both line power and battery
3. press the WIN | left arrow | right arrow button (all three together and hold them)
4. power on the NB
5. on the first message on the display release the buttons.

You see then an new message on the first line:
HDA_SDO. To lock SPI, do global reset or remove AC & DC then boot after updating SPI.

Well, thats it: full dump of BIOS chip is possible, FPT reported no error..
I have not tested full access to flash it Posted Image (don't want to brick my NB)



#144
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 1,148 posts
  • Gender:Male
Ive mentioned this earlier in the thread.

#145
oswaldini

oswaldini

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 144 posts
  • Gender:Male
  • Location:Cracow, Poland
@CodeRush is it possible to put inside UEFI BIOS HFSPlus.efi driver ? Can you made option like that for PMPatch ?

#146
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 458 posts
  • Gender:Male
Coderush - thanks for all your hard work here. I will be testing this on the MSI Z77MA-G45 and the MSI B75MA-P45 over the next few days, and will post back here just to confirm those specific models.

Just to be clear, this patch eliminates the need for one of http://biosrepo.wordpress.com/ solutions, correct? Rather than repackaging a specific BIOS (say, 1.4) it actually modifies the latest BIOS (say, 1.7)?

#147
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida

Hey Coderush!

I have an ASUS p8z77-v LX2.

I have patched the bios but i think that my board don't have the USB FLASHBACK


PMPatch 0.5.10
PowerManagement module at 003FC7C0 patched.
AMI nest modules not found.
Phoenix nest modules not found.
CpuPei module at 007910E8 not patched: Patch pattern not found.
CpuPei module at 007D10E8 not patched: Patch pattern not found.
Output file generated.

I have tried with DCPimanager but it return and error.

Can u help me?

Thank you in advance!!!


from DOS with FLASHROM.exe works.

with this commands in P8Z77-v LX
i made a backup first (bkup.bat) with:
flashrom -p internal:laptop=this_is_not_a_laptop -r backup.rom

flash with Mod.bat contents:
flashrom -p internal:laptop=this_is_not_a_laptop -w mod.rom

i have SPI USB programmer if anyone needs to recover and bootblock recovery is not working.. u can send chip to me and i send chip back flashed in Tampa, FL USA

#148
CodeRush

CodeRush

    InsanelyMac Sage

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

@CodeRush is it possible to put inside UEFI BIOS HFSPlus.efi driver ? Can you made option like that for PMPatch ?

It is possible but it's harder then a simple patch. If I will work on it, it will be another project. I'm not a fan of do-all-you-can-imagine kind of utilities, because they are hard to code and debug.

Just to be clear, this patch eliminates the need for one of http://biosrepo.wordpress.com/ solutions, correct? Rather than repackaging a specific BIOS (say, 1.4) it actually modifies the latest BIOS (say, 1.7)?

The patch tries to unpack, patch and repack an input file and write a result to output file. It can be 1.4, 1.7, X.Y or even BIOS dump made by FPT or flashrom. Yes, it eliminates a need of BIOSes provided by BiosRepo.

#149
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 458 posts
  • Gender:Male

The patch tries to unpack, patch and repack an input file and write a result to output file. It can be 1.4, 1.7, X.Y or even BIOS dump made by FPT or flashrom. Yes, it eliminates a need of BIOSes provided by BiosRepo.


Excellent! Only the latest BIOS from MSI supports my RAM, but BiosRepo has one from a couple versions ago. I'll test and post results, vielen dank für deine arbeit!

#150
CodeRush

CodeRush

    InsanelyMac Sage

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

from DOS with FLASHROM.exe works

This method isn't good enough on ASUS P8xxx boards because of individual data loss. FTK is mush better. Please read the guide linked in my signature to know more the whole situation with BIOS recovery and data recovery on ASUS P8xxx boards.

#151
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 458 posts
  • Gender:Male
Would you mind adding a step-by-step guide?

I've opened Terminal, dragged PMPatch in, followed by the BIOS file, and had it output to newbios.180 (BIOS file had .180 extension), but do I need to rename it to something specific, or will that work?

#152
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 412 posts
  • Gender:Male
  • Location:Deggendorf, Germany
I think that the name of BIOS file means anything only for ASUS USB BIOS Flashback technology.
I can't add a guide because it's highly vendor-specific, and I have only ASUS Maximus IV Gene-Z. But I heard that there are no problems with flashing patched BIOSes on MSI boards with MSI BIOS update solutions.

#153
fatez

fatez

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
  • Gender:Male
  • Location:Italy - Bolzano
AsRock Z77e-Itx Patched successful to 1.80 !


./PMPatch Z77EI1.80 ./Z77E-Patch1.80
PMPatch 0.5.10
PowerManagement modules not found.
Trying to apply patch #1
Nested PowerManagement module at 01A5A3AC patched.
AMI nest module at 00247100 patched.
Phoenix nest modules not found.
CpuPei module at 00759E08 not patched: Patch pattern not found.
Output file generated.


#154
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
if u remove first 1000h of asus bios it wont fail with security msg.

#155
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 458 posts
  • Gender:Male
Confirmed working on:
MSI Z77MA-G45
MSI B75MA-P45

For anyone with an MSI board:

1) Download latest BIOS from MSI website, you should have a folder with three files.
2) Do the following in a new terminal window (change "media" to your username, you can just drag the patch and bios file in):

Posted Image

You will now have a patched BIOS file in the location you specified.
3) Delete original BIOS file from downloaded MSI folder, rename patched BIOS to the exact name of the original, and replace in folder.
4) Place entire folder on the root of a FAT32 USB Drive (i.e. no subfolders), and use MSI's BIOS update function in the BIOS.
5) Done!

A huge thanks to CodeRush for bringing us all one step closer to an even smoother hack!

#156
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 458 posts
  • Gender:Male
Any idea why I'm getting this when I boot?

Posted Image

#157
DAXGr

DAXGr

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
  • Gender:Male
  • Location:Thessaloniki - Greece
  • Interests:C#, Game development and hobbyist automation.
Anyone knows if this would work on a Gigabyte GA-X79-UD3? It has DualUEFI BIOS so I can test test builds.

#158
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida

Anyone knows if this would work on a Gigabyte GA-X79-UD3? It has DualUEFI BIOS so I can test test builds.

if im correct gigabytes dont have it locked or broken

#159
CodeRush

CodeRush

    InsanelyMac Sage

  • Developers
  • 412 posts
  • Gender:Male
  • Location:Deggendorf, Germany
@LatinMcG, you are correct, there is no need to patch Gigabyte BIOSes with this patch.

@WhatTheTech, thank you for testing. I don't have this line in my boot log, so I don't know why it presents. Is PM works normally with patched BIOS on your boards?

#160
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,643 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Any idea why I'm getting this when I boot?

Posted Image

Do you have some form of disabler (nullcpupowermanagement / custom kernel for example)
It seems your powermanagement doesn't get loaded...





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


2 user(s) are reading this topic

0 members, 2 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