Skip to content
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

[UEFIExtract] Add support for extracting files from ME region #318

Open
miczyg1 opened this issue Nov 7, 2022 · 2 comments
Open

[UEFIExtract] Add support for extracting files from ME region #318

miczyg1 opened this issue Nov 7, 2022 · 2 comments

Comments

@miczyg1
Copy link

miczyg1 commented Nov 7, 2022

ME region follows its own rules for its filesystem. It is entirely not related to UEFI spec. However, despite it is not UEFI-compliant, UEFITool can parse it with ease. In some cases it may be beneficial to extract single files from ME region, e.g. extracting PCIe 5.0 FW to integrate it in coreboot builds: https://review.coreboot.org/c/coreboot/+/68987

The goal of such a procedure is to avoid PCIe 5.0 malfunction when ME is disabled, e.g. by setting HAP bit. PCIe 5.0 requires fetching the PCIe 5.0 FW from ME through MEI/HECI during BIOS POST, which will become impossible when ME is disabled. However, including the extracted binary allows to workaround the disabled ME problem and keep PCIe 5.0 functional.

Currently, the firmware extraction is possible via UEFITool GUI, however, it would be beneficial to have a scriptable method of extracting such blobs with UEFIExtract for automation purposes.

@NikolajSchlej
Copy link
Collaborator

NikolajSchlej commented Nov 7, 2022

Indeed, my usual method would be to extract everything and then use find or bgrep, but it's certainly not scalable.

  • Add UEFIExtract console UI command to extract an item with a given 'Name' and/or 'Text'.
  • Add UEFIExtract console UI command to extract an item with a given binary pattern (borrow some code from UEFIFind)
  • Improve UEFIExtract usage text to fully explain the possible set of parameters.

@miczyg1
Copy link
Author

miczyg1 commented Nov 7, 2022

Add UEFIExtract console UI command to extract an item with a given 'Name' and/or 'Text'.

it could even be a path if it is nested... However, this would make the whole command too long. Names can sometimes be duplicated inside one image.

@NikolajSchlej NikolajSchlej changed the title Add support to extract files from ME region [UEFIExtract] Add support for extracting files from ME region Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants