Universal IFR Extractor
In case you didn’t already know, the Extensible Firmware Infrastructure’s Human Interface Infrastructure uses Internal Forms Representation protocol to display things like your setup utility’s menu. By having access to the Internal Forms Representation, we can know everything about a menu which can assist us immensely when modding bios. I’ll also be using this application in a few of the tutorials I write, so get used to using it now π
I was getting tired of all the requests to expand EFI IFR Dumper to include support for UEFI’S IFR protocol, and as a result I decided that now is a better time than any to update my program. So here’s Universal IFR Extractor, the successor to EFI IFR Dumper. Designed to easily extract and convert the Internal Forms Representation used in EFI modules into a human readable format. Now supports both EFI and UEFI IFR protocols, so it should work with all cases π
In additional, Universal IFR Extractor now has a graphics user interface to make it easier to use. It’ll quickly tell you what protocol a selected module uses so that you’ll be able to know what protocol format you should know in order to modify the forms. Intel has great documentation on how EFI and UEFI IFR is formatted, so it should be too hard to start modifying it after reading through those. I’ll also create a tutorial on how to preform simple modifications, like how to unsuppress hidden options, so stay tuned. Hope you all enjoy! Download it here π
Very useful project, but it crashes on my Dell Vostro 3360 A18 BIOS.
Can I do something to prevent the crash?
Good to see someone appreciate this π
It’s designed to work on individual modules instead of the entire rom. Generally there’s a lot of modules that contain useless IFR, so I though it’d be better to only focus on the module that’s currently being worked on. (And I have no idea why it detects your entire rom as EFI when it opens it. That shouldn’t be happening)
And it does work for your A18 bios. I can’t believe that its menu is broken up into so many different modules. Just as a few examples, here’s the DellSetupAdvancedDxe, PlatformHiiAdvancedDxe, and SystemBootMenuDxeMb3 modules extracted directly from your rom and their corresponding IFR. This was all done using UEFITool and Universal IFR Extractor.
bios-mods.com/pub/donovan6000/Temp/IFR%20Example.zip
And you’ll immediatley notice how weird UEFI’s IFR is. They commonly have ‘if statement blocks’ that contain nothing. And they also do sneaky things. Like in your Advanced menu, you’ll see: Suppress If: 64 Bit Unsigned Int: 0x1. Which just means always hide the following.
Thanks, now I figured it out. π
I’m thinking of buying USB debug dongle like AMI DebugRx or PLC NET20DC to debug modified PEI and DXE drivers and hidden “USB Debug” option in DSA may be handy.
I know about that hidden options in DSA (actually, that was TimaWalker who pointed me to them, and PMPatch have special routine to unlock hidden DSA settings since version 0.3.0), but reading a well-formatted text file is much easier then raw binary, so I say many thanks for your useful tool.
I didn’t even know external bios debuggers existed. They seem really useful, but I don’t think many bios are released with debug options.
I’m about to start working on a cpu emulator designed to assist in bios debugging. It’s still mostly an idea right now, so it’ll be awhile to release a stable version.
I can’t say they are special BIOS debuggers (extended functions of DebugRx are meant for that, but it costs too much for a hobbyist), more like USB PostCode readers, but it will be enough for my needs now.
Many components can be debugged by integrating them into VMWare’s or VirtualBox’es UEFI, or by starting them in UEFI shell, but special utility can also be handy.
hey man do you know of a way where i can modify the uefi gui options menu? so i can add extra menus etc??
This is very interesting. Last time I googled uefi mods was a few months ago, and I recognize that CodeRush avatar from some mac hacks.
I’m personally curious about the possibility of embedding a tiny linux kernel in UEFI flash or GRUB perhaps. Perhaps you have some input? Here’s a rather long-winded manifesto on my my understanding of the subject matter:
http://www.coreboot.org/pipermail/coreboot/2013-October/076442.html
( NOTE: That was actually sent to the official kernel UEFI gmane list; I guess it was forwarded to coreboot…)
-Mike
Unfortunatley stuff like that goes out of my area of expertise. It would be awesome through if it could be accomplished in a modular way. I have seen a lot of work go into CoreBoot and TianoCore to make an opensource bios alternative. Here’s a video from one of the devleopers showing something similar to what you want.
http://www.youtube.com/watch?v=HKdLhbmjrDI
It’s definitely possible and, IMO, not a hard task at all to insert EFI-stubbed kernel into BIOS image, but we have 3 problems here:
1. BIOS chip has not enough free space to insert a kernel and useful initrd image, and this free space is scattered across all volumes.
2. If we aim to integrate kernel image only and get initrd form storage device, why bother integrating at the first place, we can just use EFI system partition on this device to boot.
3. Updates will become pain in the a*s, both BIOS and kernel. Bigger BIOS chip won’t be good either, because there be much work on original BIOS images (http://forums.mydigitallife.info/threads/33818-Can-I-use-a-larger-capacity-bios-chip-than-the-original-that-came-with-my-motherboard?p=866356&viewfull=1#post866356) to make them work in larger chip.
My opinion for that: possible, but pointless, booting from USB-flash is better in 99% cases.
[…] ΠΎΠΏΠΈΡΠ°Π½Π½ΠΎΠΌΡ Π² Π²ΡΡΠ΅ΡΠΏΠΎΠΌΡΠ½ΡΡΠΎΠΉ ΡΡΠ°ΡΡΠ΅, ΠΈΠ»ΠΈ ΡΡΠΈΠ»ΠΈΡΠ΅ Universal IFR Extractor, ΠΊΠΎΡΠΎΡΡΡ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π½Π°ΡΡΠ°Π²ΠΈΡΡ Π½Π° ΠΈΠ·Π²Π»Π΅ΡΠ΅Π½Π½ΡΠ΅ ΠΈΠ· […]
Very interesting posts. Coderush certainly covers a lot there. If anyone’s curious, you can find his two posts about UEFI modding here. They’re in Russian, so use Google Translator if you want English:
http://habrahabr.ru/post/211574/
http://habrahabr.ru/post/211879/