xCuri0 / ReBarUEFI

Resizable BAR for (almost) any UEFI system
MIT License
1.48k stars 68 forks source link

Uefitool output not allowing post, mmtool missing PciBus filename #239

Closed AbdullahMPrograms closed 2 weeks ago

AbdullahMPrograms commented 1 month ago

System

Description I'm currently trying to use uefitool to add the rebardxe driver to my dumped stock T7920 bios (dumped via ch341, have verified this bios works by itself). When using uefitool to add the rebardxe driver, the T7920 will not post, instead it displays a bios recovery "please flash your bios" light code. Removing the rebardxe driver from the modified bios via uefitool (essentially reverting it to stock) and flashing that also gives the same issue, this leads me to believe the issue is caused by uefitool. I've tried using mmtool, but it seems I am missing the "PciBus" filename (or any filename actually), thus I am unable to proceed. Uefipatch was not used as there were no patches to apply and dsdt patching is not needed. Any suggestions would be appreciated.

Image of mmtool output: image

ZOXZX commented 1 month ago

Is that a dual Xeon platinum? Anyway, just checked bin dump and all names are listed. Maybe try to use newer version of MMTool?

AbdullahMPrograms commented 1 month ago

Its dual xeon 4110's, I also tried MMTool 5.007 and it was the same thing.

I see you were able to see the file names, can you confirm which version of mmtool you are using? Its possible Im just missing something on my side.

ZOXZX commented 1 month ago

MMv5 (opens both Aptio 4 and 5), dump from Haswell system (aptio 5 I believe) ... Does uefitool show correct entries? Send the file to have a look ...

AbdullahMPrograms commented 1 month ago

Heres the file: https://drive.google.com/file/d/1qOOfHJmvMQnGFX1pzJjn-6fJqe9byrGO/view?usp=sharing

Searching via guid in uefitool does bring up a volume so I believe all is good on that side

ZOXZX commented 1 month ago

Entries can't be seen in any version of uefitool/mmtool, except 7 unrelated drivers. BTW, BIOS is bootguard protected: https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/010/boot-guard-technology/

It is a fairly modern system, maybe you should contact the DELL for support ...

AbdullahMPrograms commented 1 month ago

That’s unfortunate, I doubt Dell would be of any help here. Are there any other options to getting the rebar driver on the bios?

ZOXZX commented 1 month ago

Are you sure you don't have BIOS option - by a different name maybe? That workstation class supports multiple GPUs and is not cheap so don't hesitate to ask for their support. Any newer BIOS revisions?

AbdullahMPrograms commented 1 month ago

No newer bios revisions, what do you mean by BIOS option by a different name?

ZOXZX commented 1 month ago

I see that you have Above 4G decoding available. This rebar version is not tested with dual socket boards AFAIK and the author said it probably won't work. @xCuri0 has some shenanigans to enable rebar (only for Linux I believe), but In your place I would contact Dell first and if they decline your request, ask xCurio to see if he is willing/able to help.

AbdullahMPrograms commented 1 month ago

I see, I did see that one user was able to enable rebar on a Dell t7810 which is also dual CPU. I'll try reaching out to Dell to see what they say.

xCuri0 commented 1 month ago

Some systems with Bootguard still have a small DXE region which can be manipulated, I think UEFITool NE can show it.

AbdullahMPrograms commented 1 month ago

oh? would that allow me to add the ReBarDxe on the bootguard bios?

xCuri0 commented 1 month ago

Most likely yes

AbdullahMPrograms commented 3 weeks ago

@xCuri0 do you know what this manipulatable dxe region would look like in uefitool or any identifiers I can use to find this region?

xCuri0 commented 3 weeks ago

The first page of the wiki says how to locate it, your problem might be that the bios image has some sort of compression/encryption which isn't uncommon on prebuilts.

It's best to use a BIOS dump when modding these systems.

AbdullahMPrograms commented 3 weeks ago

Yes, I'm working with a dumped bios via a CH341a. I'm currently looking at the bios in uefitool and have noticed that the only regions denoted with a yellow marker are the volume free spaces, would I even be able to insert the dxe region in these locations? The volume containing the pcibus header is entirely cyan which I believe is causing the bootguard issue.

xCuri0 commented 3 weeks ago

@AbdullahMPrograms Hi read this https://medium.com/firmware-threat-hunting/bypass-intel-boot-guard-cc05edfca3a9

It explains what the colours displayed by UEFITool NE mean at the end.

AbdullahMPrograms commented 3 weeks ago

I tried adding the dxe driver to a volume denoted with yellow but that lead to a bootloop, is there any specific address I should be looking to place the dxe driver in? dumped bin file in case its helpful

xCuri0 commented 3 weeks ago

That article says you need to add it to a white area because they don't have bootguard

AbdullahMPrograms commented 3 weeks ago

I see, in that case would I be able to insert the dxe driver in say this region? image

xCuri0 commented 3 weeks ago

Probably, but you will have to try and see to know if it will actually work

AbdullahMPrograms commented 3 weeks ago

@xCuri0 unfortunately this resulted in another bootloop, at this point I'm quite desperate to try anything. Do you possibly know of any other way to find which volume I can put the dxe driver into to avoid bootloops? it appears that placing the dxe driver in any volume other then the volume containing the pcibus header causes bootloops

xCuri0 commented 3 weeks ago

Try other uncolored volumes maybe (they should have no bootguard) ? I wouldn't be suprised if it still didn't work though because the whole point of bootguard is so that no one can add or modify UEFI modules

AbdullahMPrograms commented 2 weeks ago

in case it doesnt work, I see above it was mentioned there is a way to enable rebar exclusively in linux. Luckily I only plan to use linux on this PC, how would I go about this linux method?

xCuri0 commented 2 weeks ago

@AbdullahMPrograms For AMD all you need to do is enable 4G decode

I think NVIDIA drivers on Linux need some option enabled so it can do the resizing but it does work.

AbdullahMPrograms commented 2 weeks ago

Sorry just to confirm, do you mean that it is possible to run ReBarState on linux whilst only requiring above 4G decode? I intend to set a max rebar size of 32.

AbdullahMPrograms commented 2 weeks ago

Answering my question above, yes its as easy as building and running ReBarState and setting a rebar size of 32. I now have all of my P40's running. Thank you for the support!