New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UEFITool not working for newer Lenovo images #120
Comments
The image seems to be corrupted around that file. There is a UI and version section a little later for "MrcOemHooksPeim" but the preceding data with the file body seems to be missing. Maybe the image works by accident (i.e. the modules in the corrupted area are not critical so the boot succeeds). I think something went wrong when the image was built. |
It's not only this image but some others, too. I can't believe they're all corrupted... but maybe something went terribly wrong at lenovo.. |
Actually there is some interesting text at the start:
and it is followed by some table of possibly flash block offsets (?). So maybe it needs to be reassembled from pieces or something. PFAT is "Platform Firmware armoring technology" and is better known under the brand name "BIOS Guard" (NB! different from Boot Guard). Maybe @matrosov knows something... |
MMTool says "Image is corrupt", too |
@skochinsky Looks like you are right.
|
UEFITool does not detect PFAT/AMI Bios Guard. So far we have seen two AMI PFAT revisions: 1 and 2. The Header is unique, 0x8 in size and consists of Size (0x4) + Checksum (0x4). --- Start of 1st Section --- After the Header, we have PFAT Revision (0x4) + Platform (0x10). Then the PFAT Block which is 0x1C in size and consists of Unknown1 (0x4) + Unknown2 (0x4) + Block Size (0x4, from Block Start) + Image Size (0x4, from Block End) + Unknown3 (0x4) + Unknown4 (0x4) + Unknown5 (0x4). When you go to Image End (Block End + Image Size), you'll find an RSA Block which is 0x20C in size and consists of Signature (0x4) + Flags (0x4) + RSA Public Key (0x100) + RSA Exponent (0x4) + RSA Signature (0x100). --- Start of 2nd Section --- After the 1st Section End (RSA Block), we have PFAT Revision (0x4) followed by Platform (0x10). etc (loop over all sections and append each Image Block to a new unpacked SPI image) |
I believe with AMI BIOS Guard Extractor v1.0 (binaries) by @platomav available, there is little reason for us to reimplement such functionality in UEFITool. After all, it is quite vendor specific. |
UEFITool has problems with (some) newer Lenovo UEFI images.
Examples:
ThinkStation P920: https://download.lenovo.com/pccbbs/thinkcentre_bios/s05j319usa.zip
ThinkStation P410/P510: https://download.lenovo.com/pccbbs/thinkcentre_bios/s00j356usa.zip
some others like P720, P520, P520c
P320 works...: https://download.lenovo.com/pccbbs/thinkcentre_bios/s06jt29usa.zip
P900 works, too.
Extracting a LZMA-Section with dd and unpacking it with unlzma or even edk2 decompress does not work, too... "Corrupt data."
Screenshot (P920):
The text was updated successfully, but these errors were encountered: