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

QUESTION ReBar setting in BIOS #203

Open
xtomasnemec opened this issue Apr 10, 2024 · 5 comments
Open

QUESTION ReBar setting in BIOS #203

xtomasnemec opened this issue Apr 10, 2024 · 5 comments

Comments

@xtomasnemec
Copy link

Is there a way of adding the ReBar setting to the BIOS (AMI) trough AMIBCP?

@xCuri0
Copy link
Owner

xCuri0 commented Apr 10, 2024

Not to my knowledge but it should be technically possible.

You will first need to modify ReBarDxe to read an offset in the Setup variable which will be the easiest part.

The hard part will be modifying the UEFI Internal Form Representation (IFR) to add an entry for Resizable BAR that controls the offset at in the Setup variable that you previously set. But no such IFR editor currently exists

@NikolajSchlej I've seen your work on IFR Extractor and UEFITool do you think it would be possible to modify the UEFI IFR structures to add (or replace if size limitation) a new entry ?

@NikolajSchlej
Copy link

Not via AMIBCP, no, but a DXE driver can indeed publish its own HII structures without a need to modify anything. Intel RAID OROMs do so, so do network card drivers and some other stuff. You can add this to ReBarDxe by reading this part of Driver Writers Guide: https://github.com/tianocore-docs/edk2-UefiDriverWritersGuide/tree/master/12_uefi_driver_configuration

@NikolajSchlej
Copy link

This assumes that ReBarDxe can be loaded before BIOS Setup is shown, which can be achieved by either adding it to DXE volume, or using DriverXXXX mechanism to load it in early BDS.

@xCuri0
Copy link
Owner

xCuri0 commented Apr 10, 2024

@NikolajSchlej Didn't know this existed thanks for sharing. Would have gone with this method instead of current NVRAM variable if I knew at the start

And yes it's loaded very early during boot before PCI resources are even allocated

@xtomasnemec
Copy link
Author

Thanks for the info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants