Hello, everyone.
First, I would like to thank you for the helpful information I managed to find here.
I have an Asus Zephyrus M16 2021 GU603HM notebook with the latest BIOS version 315.
I’ve been trying to reflash the BIOS region, but I always get error 167.
I’ve tried using setup_var.efi/ru.efi and other tools to disable the BIOS lock, guard, protection flags, and anything else I could find in the Setup menu, but nothing helped.
I’m making a dump (success) and trying to immediately rewrite it, but I’m getting error 167.
I really don’t want to resort to using flashers, so I’m seeking help and assistance.
I would be happy to “buy coffee” for anyone who can help.
It looks like you have come across a very common issue with Asus motherboards - multiple protections and locks that prevent you from flashing the BIOS using software tools.
Can I ask what the specific problem is with the notebook that has caused you to want to re-flash the BIOS?
Also, how did you make the BIOS dump and are you 100% sure that it is complete? Some notebooks will have the firmware split across two EEPROMs, you will also want to make sure that the UUID and serial number are present in the dump as it can be painful to restore them if erased/overwritten.
I would recommend using a hardware programmer on any Asus motherboard (as you can waste a lot of time on attempting to bypass the protections and end up buying a programmer anyway).
My case is a bit specific. My laptop has two NVMe M.2 ports, and one of them (PEG0, PCIe Root Port #0) is used via OcuLink for an external graphics card (RX 6800 XT). Everything works perfectly in Windows/Linux.
However, Resizable BAR only works for the integrated graphics card (PEG1, PCIe Root Port #1, RXT 3060).
All the settings are enabled, and in theory, it should work, but it doesn’t. I even managed to disable the entire PCIe Root Port #1 using setup_var.efi, but it still didn’t work. Perhaps there is simply no logic in the BIOS to enable resizing for that specific port.
By the way, in Linux, I can easily enable it using “pci=realloc” or manually configuring BAR 0/2.
@sieskei Can you please provide a link to the 315 BIOS for your specific notebook model on Asus site and also upload your BIOS dump?
The user Kuri0 on these forums can possibly answer your questions about whether a BIOS mod for rebar is possible as they are the person that created ReBarUEFI on the github page you linked.
I would suggest tagging Kuri0 when you have uploaded the two BIOS I requested above so you can get an answer about the BIOS mod (and then look into flashing the modified BIOS afterwards).
Just remember that there is always risk when flashing any BIOS and that risk increases when you do any modification. Therefore you must be 100% sure that you can recover from a failed flash or bricking the notebook, which is only possible using a hardware programmer if the system won’t POST.
Using FPT to test a BIOS mod is not a good idea, I would highly recommend that you consider purchasing a hardware programmer so you can recover the notebook should you brick it.
@sieskei Do you have a complete SPI dump? You may not be able to flash only the modified BIOS region on TGL platform.
@Kuri0 Could you please have a look at this BIOS/OcuLink issue that is blocking access to Resizable BAR with external AMD GPU? Thanks in advance.
[Edit] You posted just as I was replying, so to answer your question - a hardware programmer can bypass all software locks.
The CH341A is not the best but is the cheapest, which is why many people use it.
The main problem with the CH341A is that you need to find a version of the software that supports your specific BIOS chip (WinBond 25R128JVSQ) and supplies the correct voltage.
I use an SP8-F programmer as it gets regular software updates to support new BIOS chips, and is capable of in-system programming, which means I can flash the BIOS EEPROM without desoldering it in most cases.
It also detects and visually shows pin contact (one of the biggest problems when using SOP-8 test clips) and has over-current and ESD protection.
@chinobino
Oops, last night I forgot to upload it. I have the whole dump, yes, it was read with FPT - ME, DESC, BIOS regions. But I’m at the office right now, and I’ll upload it a bit later.
I haven’t tried rewriting the entire dump, only the BIOS region.
@Kuri0 I thank you too. I have written on the GitHub page asking if it’s possible to create an EFI tool (equivalent to Linux realloc) specifically for this reason, as I cannot add it to the BIOS region.
Thank you for the clarification. This “in-system programming” feature sounds critical to me as I definitely wouldn’t want to remove it from the motherboard. Does FlyPro in combination with SP8-F support my 25R128JVSQ chip?
@sieskei I did mention a method that could be tried (safeboot-loader). I’ve tried making an EFI tool to resize BARs before and I got it working but wouldn’t show enabled in driver, only in GPU-Z.
Try getting safeboot-loader working on your system, can assist you from there if you get it booting.
Best way would be using ReBarUEFI UEFI mod though.
Also have you checked hidden BIOS settings using IFR Extractor ?
You will need to remove any power source (AC Power, DC battery and CMOS battery) and peripherals from the notebook motherboard, then use a USB port on a second PC/laptop to supply the hardware programmer with power for programming the BIOS chip.
In some situations there may be a voltage drop that stops you from programming in-circuit, it is difficult to know if this will occur as motherboard circuit designs differ so much.
Also, some motherboards have a SPI (Serial Peripheral Interface) header that you can connect to specifically for in-system programming. It’s usually located near the BIOS chip so you need to check that it isn’t a similar looking TPM header.