[Request] HowTo change/set MMIO and MSRs at boot?

hello, can anyone tell me how can i change / set mmio at boot?, i know msrs are stored in siinit but i have no idea where mmio or or how can i set it, goal it to maybe set at boot much at + 0x5f00 sa gatings to 0 or other

Edit by Fernando: Thread title customized

you can set MMIO from BIOS if you build module and insert it into BIOS, at least that’s what i had success with, see Dell Inspiron 5576 4G decode / PCI bug fix - resizable BAR with FX9830P CPU

1 Like

Thanks for answering, do you have bios before and after so i can manually look in hex?, i knew about this method before but i’m kinda confused how it’s done

there’s no point in comparing two BIOS versions because modded one just adds new module, plain bios dump in hex won’t reveal anything either because modules are compressed and you need to use tool specific to your BIOS manufacturer (or 7zip at least)

you can write and build your own module from scratch (needs some knowledge and skills) or use rebardxe (which has build instructions in github wiki) and patch its code with writes to PCI space that you need

rebardxe also need userspace rebarstate executable to set variable values, but this can be patched so the code always runs and no need for rebarstate, and if your board already have resizable bar you can just remove all the rebar related code from rebardxe source and reuse it for your purpose without it messing bar sizes

do you mind sending source code of module you added?

source code is in rebardxe github, read the message i linked there you’ll see difference i added

1 Like