Rules to modding IFR "Suppress If" and "Gray Out If" operations

It’s rather simple to change Suppress If True (0A 82 46 02) to Suppress If False (0A 82 47 02). However, I’m running into issues changing the more complicated Suppress If and Gray Out If ops that have multiple questions or instructions such as

Screenshot 2021-06-09 164434.jpg

and

Screenshot 2021-06-09 164952.jpg

. I was wondering if someone could guide me in maybe some basic rules for changing EFI_IFR_EQ_ID_VAL_OP 0x12, EFI_IFR_AND_OP 0x15, EFI_IFR_OR_OP 0x16, and EFI_IFR_NOT_OP 0x17 to EFI_IFR_FALSE_OP 0x47. I’m trying to gain access to form id 401 and not having any success. I’ve attached my SetupPrep IFR file as well as the SetupPrep.ffs for anyone to see what I’m trying to overcome here. Thank you in advance for any help

File_DXE_driver_Setup_SetupPrep IFR.txt (567 KB)

File_DXE_driver_Setup_SetupPrep.rar (97.9 KB)

On first example ,you could try to modify with this way and this way ,we don’t consider Gray Out suppress at this stage.

@genuis239- ok, I was hoping for a way simplify it and reduce unnecessary operations to speed things as well as unlock. Would something along these lines work you think? https://imgbox.com/zupmo7om If not, I think the second link you posted might just do the trick.

1)
Your ideas looks like great ,but it will changes the size of setup module ,it’s not a good thing. I ever edit a external module and changes its size and also fixed its checksum ,but i can’t extract it again via ifr extractor ,so i would not to changes the module size when i edit bios .

They are only some logical expressions , not a trick ,as long as you let their result to false(0) ,then the "suppress if " will unavailable.

I think my two way both available ,as i don’t know the current value of 0x3c1 ,but i can do a suppose ,so i provided you two ideas. (You can get value of 0x3c1 by grub shell or ru.efi…etc)

2)
Use amibcp to unlock items is the fastest way i thought.

Excuse me, are you sure?

oK~i don’t see that screenshot of ifr file carefully ,as long as module size were not changes ,this way is feasible , but i more like to solve the boolean expression.

Thanks for the reminder.

@genius239 : Unfortunately, AMIBCP doesn’t show the setup tabs due to some strings exceeding the maximum length (0x400) and I’ve yet to find a solution for that. I’ve seen talk of one existing, but never actually found anything.

I tried both of your suggestions and everything still boots and works correctly, but still hidden in the bios screen. I’ve also tried https://imgbox.com/KTjPw69D and https://imgbox.com/Xj6fy92B. Both of those result in a brick that I have to use the programmer to get out of.

AMIBCP fix.

From my bad experience, I can say not to use this for AMI BIOS.

@CivicObligation

I’ve finally remembered you’re the dell e5530 laptop owner ,here is e5530 's structure in amibcp and you need to unlock tab under blue line to get more options ,it’s a option collection depot. On ifr file ,it’s start from 0x57F52 and end at 0x57F6D.

@Sweet_Kitten yikes, that will take forever to figure out which module, or modules are causing the error.

@genius239 yep, tis I. I come back to this every now and then when I get bored. How did you get it to show up in AMIBCP? What did you remove? Yes, I had been trying to figure out the lines ahead of it for the “AMT Config” and thought I’d get it next. Are you saying I should address unhiding Form ID 401 first and it will unhide the rest?

Why? This error is an unnecessary system hang protection in AMIBCP itself. We can simply increase the limit in AMIBCP (from 400h to FFFFFFh, as I did in the screenshot), regardless of the source of the problem.

@Sweet_Kitten How do I do that for AMIBCP v4.55 without IDApro? I’m not a programmer or coder by any means. I quickly realized I was in over my head with IDA and got rid of it. I’m just a lowly mechanic who just can’t leave things as boring as they come from the factory.

@CivicObligation , 4.55? Take it, just patched it.

AMIBCP_4.55.0.70.zip (309 KB)

@Sweet_Kitten thank you sir. I looked though it with a hex editor before and never saw anything that stuck out to me.