xCuri0 / ReBarUEFI

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

Problem that bios is in exe format #103

Closed mojarrah closed 6 months ago

mojarrah commented 6 months ago

System Alienware a51 R4 pc

Hey. Hope you are doing great. I wanted to follow your steps to activate rebar. but I was surprised that dell bios is .exe and not .bin

How can we fix it?

This is the bios link

https://dl.dell.com/FOLDER08945518M/1/Alienware_Area_51_R4_2.0.7.exe

mojarrah commented 6 months ago

There are multiple links for download

Drop the link for the exact one I should use

mojarrah commented 6 months ago

@Electron-PSO got it now and opened successfully The correct version

Moreover, what settings I should check to make it work 100%

image

mojarrah commented 6 months ago

@xCuri0 I flashed it successfully now using fpt win32 version as winpad site suggests. The problem now is if I activate the rebar and reboot screen no longer work. The system boot but their is no screen. I have to reset the bios using the battery to get it working. What is the solution?

Electron-PSO commented 6 months ago

Apologies for the delay,

I was travveling home and had some sleep.

It should be the Aptio V version

Electron-PSO commented 6 months ago

Try a small BAR size first

1GB

Electron-PSO commented 6 months ago

Then check in GPU-Z

mojarrah commented 6 months ago

What number to put in rebar to equal 1gb? @xCuri0 @Electron-PSO

Electron-PSO commented 6 months ago

It is 2^x so for 1GB set it to 10

mojarrah commented 6 months ago

@Electron-PSO it worked!!!!

Now how I can set it to the maximum of what my gpu can handle?

It's a 3090 24gb vram

Electron-PSO commented 6 months ago

You'll need 15 as the bar size to give you 32GB. That will be enough to fit the 24GB VRAM

mojarrah commented 6 months ago

What's the best value?

Electron-PSO commented 6 months ago

Which Intel FPT did you use?

Have a link to it also?

I'm helping someone with a system and they have flashing issues too

mojarrah commented 6 months ago

Will send the link after the pc boot from pc bios reset

Moreover, it isn't working with anything above 1 or 2gb

@xCuri0

Tried multiple values, all of them led to failure!! What should I do?

Electron-PSO commented 6 months ago

Did you apply the patches via UEFI Patch tool ?

https://github.com/xCuri0/ReBarUEFI/wiki/Using-UEFIPatch

Electron-PSO commented 6 months ago

I've just applied the parches to the extracted rom file.

Two patches are applied

These would prevent you from using a 32GB BAR size

PciBus | Don't downgrade 64-bit BARs to 32-bit (Haswell)

3C1DE39F-D207-408A-AACC-731CFB7F1DD7 10 P:833E067506C70604000000833E077506C70605000000:66906690669066906690669066906690669066906690

PciBus | Remove <64GB BAR size limit (Skylake/Kaby Lake/Coffee Lake)

3C1DE39F-D207-408A-AACC-731CFB7F1DD7 10 P:B800000000100000004C3B:B8FFFFFFFFFFFFFF004C3B

mojarrah commented 6 months ago

Good, how to make sure the pad isn't corrupted? I couldn't figure it out

mojarrah commented 6 months ago

Also, should I remove the .patched extension before flashing or what?

mojarrah commented 6 months ago

@Electron-PSO ?

mojarrah commented 6 months ago

@xCuri0

mojarrah commented 6 months ago

@Electron-PSO I am also thinking to reflash the bios using the x64 version of ftp. What do you think? Is there a difference?

Electron-PSO commented 6 months ago

If the 32 bit version worked, keep using it

Steps to take:

you'll get BIOS.ROM then BIOS_ReBAR.ROM then BIOS_ReBAR_Patched.ROM

I like to keep the .ROM extension and only one . in the filename

mojarrah commented 6 months ago

Alright, so when the uefi patch give me bios.rom.patched

I remove the .patched extension?

mojarrah commented 6 months ago

@Electron-PSO @xCuri0 tried it now. It applied two patches by it self when I written the code. I flashed the bios. Put a value of 13 which is 8gb. When it rebooted. It started beeping and I had to flash the bios again!!!!

xCuri0 commented 6 months ago

You have to enable 4G decoding and disable csm

On Wed, Dec 13, 2023, 3:18 PM Mohammad Jarrah @.***> wrote:

@Electron-PSO https://github.com/Electron-PSO @xCuri0 https://github.com/xCuri0 tried it now. It applied two patches by it self when I written the code. I flashed the bios. Put a value of 13 which is 8gb. When it rebooted. It started beeping and I had to flash the bios again!!!!

— Reply to this email directly, view it on GitHub https://github.com/xCuri0/ReBarUEFI/issues/103#issuecomment-1853588203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBJLVKF6LCK3RNHRWYNTJTYJF2WNAVCNFSM6AAAAABAOPZDSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGU4DQMRQGM . You are receiving this because you were mentioned.Message ID: @.***>

mojarrah commented 6 months ago

@xCuri0

Csm is disabled and 4g decoding enabled

Also, I have a skylake processor. And I flashed the bios with win32 version of the tool

And I didn't change anything in patches.txt, I just applied the code as is

image

mojarrah commented 6 months ago

@xCuri0 so what do you think?

mojarrah commented 6 months ago

This is what It shows when I use uefipatch with this code:

.\uefipatch .\rebar.bin

image

mojarrah commented 6 months ago

@xCuri0 @Electron-PSO adding to the above

Why there are 3 bars showing in gpuz

BAR0 BAR1 BAR2

Electron-PSO commented 6 months ago

It is like this on Nvidia cards

BAR1 is the VRAM BAR0 are Registers BAR2 is something else

🤣

Electron-PSO commented 6 months ago

So, even with the patches you can't use BAR greater than 2GB?

mojarrah commented 6 months ago

Yes, I applied the patches but it still won't boot after using big value. Tried 4, 8, 32 nothing worked

mojarrah commented 6 months ago

Also, right now, I tried 11. Which means 2gb and it is also not working

Only 1gb working!!!!

What is going on?!!!

@Electron-PSO @xCuri0

mojarrah commented 6 months ago

@xCuri0 @Electron-PSO

This is the raw working bios

backup2.zip

Electron-PSO commented 6 months ago

That file is only 12MB

It should be 16MB for a full chip

Electron-PSO commented 6 months ago

Have you got the file you want to flash into the chip?

mojarrah commented 6 months ago

This is the file I read from the chip. And it's the raw version

It's 12mb

The one we get from .exe gives error if you remember from the first time we tried

image

Electron-PSO commented 6 months ago

The 16MB file from the exe extraction gives an error?

mojarrah commented 6 months ago

Gives an error when trying with afu

Haven't tried with ftp yet

I am afraid it could brick my bios

mojarrah commented 6 months ago

@Electron-PSO what do you think I should Do?

mojarrah commented 6 months ago

@Electron-PSO That what it gives when I try to flash it using fpt

image

mojarrah commented 6 months ago

@Electron-PSO The 16mb one I mean

Electron-PSO commented 6 months ago

OK

So you have a 32MB Flash chip

I do love these Dell boards

Always good fun working with them

Electron-PSO commented 6 months ago

Have you flashed the board with the latest BIOS using the normal update tool?

Electron-PSO commented 6 months ago

So it looks like the 12MB file you read out is the option to use.

Update to the latest bios version and then read out the file.

Perform the mods

Flash mod file.

Reboot

Electron-PSO commented 6 months ago

I think the 16MB file we got from the EXE is 12MB with some padding at the end

mojarrah commented 6 months ago

Yes, I did all of this process on the latest bios version already.

Moreover, I have no problem in downgrading. And I have an older bios version .exe file. But how can extract the 12mb Rom from it?

Electron-PSO commented 6 months ago

You could just flash the older version then read out the "Bios" part with FMT.

Electron-PSO commented 6 months ago

This Dell stuff geeez

If x299 boards were not so expensive, I would recommend just replacing the board with an ASUS alternative.

mojarrah commented 6 months ago

It doesn't allow me to downgrade to older version when using the .exe

mojarrah commented 6 months ago

How to get the 12mb version from the exe?