[Tool] Flashrom v1.2 [DOS]

For the latest flashrom version you should better look >here<.
By the way - what has the tool to do with the CH341A programmer?

because it works with the ch341a programmer. I have seen but there is nothing.

Do you have Flashrom v1.3 compiled version


I’ve compiled flashrom version 1.4 and flashprog version 1.1, using MSYS2 and DJGPP (12.2.0 Standalone as per i write this, since i use MSYS2 instead of MinGW), based from information in this page, and sourced from both github page respectively (Flashrom | Flashprog), using pciutils 3.13.0 instead 3.5.6, and used CWSDPMI.EXE from pciutils-3.12.0-djgpp instead. Commands remain the same.

Both natively support Promontory AM4. Could be used on MS-DOS and FreeDOS. Since i use B550M Pro4 with 5700X, i couldn’t dump or flash/write due to im using AGESA 1.2.0.C and it does have AmdSpiRomProtectDxe, but the tool are able to detect my bios chip (Winbond W25Q256JW, i didnt know what my chip before i use this) and the platform i use.

Here are the files: Flashrom v1.4 DOS | Flashprog v1.1 DOS (CWSDPMI.EXE v3.12.0 included) (280.6 KB)

As always, DWYOR.

1 Like

Thanks for the new/updated Flashrom version.
I will test it with my AMD X570 chipset system as soon as possible.

1 Like

Thanks, i recommend bios agesa or below, since your bios on last post (4.20) doesnt have AmdSpiRomProtectDXE, which is the reason why it could run flashrom.

Currently i am a bit interested in this but since i dont have ryzen 3100 (the minimum it could run on release bios), i got to halt my progress, or maybe trying to find a way to flash using CH341A on SPI_TPM_J1 once i have the jumper and 1.8v converter.

The plan is to flash on agesa older than 1.2.x.x, removing the protection DXE of latest bios for my board (ver L3.41), flash using either flashrom/flashprog, and test it. Or maybe if i could able to hot flash it i could just dump the latest bios, remove the protect dxe, then hotflash the protection-removed bios.

By any chance, do you know which Hex/GUID was used for asrock protection that you mentioned here?

I am trying to find a way possible to access the bios without hardware meddling (also if possible, removing the secure flash check), since the bios chip is WSON8 config. Does the UBU method did not work? Like if i were to dump my stock flashed bios with internal update from bios > remove protectdxe + use UBU remove secure flash check > flash the modded apr_bios.rom, would it remove the secure flash check from bios, so that i wont need to use flashrom/prog (since if i update the bios from old bios to new stock unflashed bios it might remove UUID). For 32MB asrock bioses ofc.

EDIT: It looks that emptying SubGUID 5A88641B-BBB9-4AA6-80F7-498AE407C31F leaving hex E4 07 C3 1F only, might disable it (based on Lost_n_Bios Screenshots)? I’ve been reading this post from lordkag, wondering if it is appliable to amd bioses.

There are 2 of the mentioned SubGUID in recent asrock bioses, the idea is “what if” both SubGUID is filled with FF but leaving the hex E4 07 C3 1F only intact? Would it Disable it? Like if you’re able to pull your bios using Flashrom > make a copy of the dump > edit both subguid to FF’s but leaving hex E4 07 C3 1F still there, save it, flash the "FWCapsule “removed” " Bios > Download latest bios, do the same fill both SubGUID Mentioned with FF’s leaving hex E4 07 C3 1F only + remove AmdSpiRomProtectDXE in the latest stock bios, so that now you have the latest bios with "FWCapsule “removed” " Bios and the RomProtectDXE removed > Flash that bios > Now your board could accept modded bios either using flashrom/prog or using instant tool IF it actually succeed.

TL;DR: Dump current bios without RomProtectDXE> Edit HEX on mentioned SubGUIDs > flash that modded current bios > download the latest bios and do the same with HEX, but also remove RomProtectDXE > flash that latest modified bios (verify if instant flash is bypassed) > verify if Internal Flasher in the latest-modiied bios are able to flash modded bios.

If it is able to, then everytime a bios is modded they must do that HEX method but also remove the RomProtectDXE, if they want the convinient bios update without worrying the UUID, SN, MAC, etc getting removed each time they want to update, since flashrom flashes the bios as-is, which is a bit inconvinient unless it is the dump of the flahshed latest bios/the bios they desire and they use that dump to modify anything, they wont lose the data.

The currently latest BIOS for my mainboard has AGESA 1.2.0.C. So the Flashrom tool may not work with it.
By the way - don’t expect this month any test results from my side.

1 Like

Hello @Fernando , I successfully remove the AmdSpiRomProtectDXE from my bios dump using ch341a, and i could confirm that, official bios → flashed to board using instant flash → dump that bios from bios chip (i use SPI_TPM_J1 + CH341A for it) → remove the dxe = Flashprog/Flashrom is working again, and yes im on agesa 1.2.0.C, so it is really the dxe that prevents it, and yours are able to be used without any modification (supposedly). Below i attach some success:






I didn’t include the flashrom pic in write part, but i did test it and it was the same as flashprog. I personally recommends Flashprog as it does maintained and the author keeping it up to date.

1 Like

Since I am back home now, I have done the promised test using your freshly compiled Flashrom v1.4 (as flashrom.exe).
As you can see here, the new flashrom tool was able to create successfully a backup of my ASRock X570 mainboard’s SP1:

Now I am rather unsure whether I should try to flash a modded BIOS (my recently flashed original BIOS v5.61 Beta runs fine and doesn’t need any modification).

If you want to flash the latest beta bios, you could just

  1. download the stock bios

  2. remove all AmdSpiRomProtect GUIDs on that stock fresh beta bios using uefitool and then save it

  3. and then use flashprog to flash it (Flashp~1 -p internal -w biosname.rom), Make sure you flash the removed AmdSpiRomProtect bios or else you need to use spi_tpm_j1 header to flash a modded bios.

In my testing somehow Flashprog is a bit faster, so i do recommend flashprog if you want to test. Also, as long as AmdSpiRomProtect GUIDs, flashrom/prog are able to read and write your SPI, you could confirm this after you flash the removed AmdSpiRomProtect GUIDs Latest Beta Bios by running the same command to backup your spi using flashprog (parameters are the same as flashrom),

1 Like

Thanks for your advices, but I cannot find any BIOS module named AmdSpiRomProtect within the stock BIOS named L5.61 [Beta] for my Asrock X570 Pro4.

Last time i checked there is AmdSpiRomProtectDXE, maybe i would check it in 3 hrs or less.

ok i just checked the latest beta bios, there is no AmdSpiRomProtect modules and i think it should be a green light to test it. Or maybe you could just instant flash it and use flashprog to see if it’s still doable.

Finally I was brave enough to execute the requested test:

  1. As first step I modified the latest BIOS 5.61 by using the UBU tool v1.80.01 (offered by Michael_Code). These were the changes I had chosen:
    a) Update of 2 offered, but obviously not needed/used AMD Microcodes
    b) Update of the not used OROM AMD RAIDXpert2-Fxx
    Result: Everything worked fine.

  2. Then I prepared the USB Flash drive containing the new flashrom.exe v1.4 and the old CWSDPMI.EXE by using Rufus 3.15 portable.

  3. After having enabled CSM within the BIOS I booted off the USB Flash Drive and let the Flashrom v1.4 do the BACKUP of the SPI. The operation was successful.

  4. Now I tried to flash the modded BIOS by using the flashrom tool v1.4.
    Result: Failure!
    Here are the pictures:

  5. Due to the reported failure of flashing the modded BIOS I tried to recover my previous SPI by flashing the BACKUP.
    Result: Failure!
    Here are the related pictures:

  6. Despite the warning I powered off the PC.

  7. Surprisingly I was able to restart the PC, to enter the BIOS, to disable CSM and then to restart the PC.

Everything works as before. I have no idea why…

Try to use flashprog with the included CWSDPMI.EXE in the package i did post here

What lets you think, that I will succeed this way?
a) With flashrom 1.2 I had never a problem to get a modded ASRock X570 Pro4 BIOS properly flashed.
b) The currently latest BIOS for my mainboard doesn’t contain any AmdSpiRomProtect module.
Question to you: Why got I a flash failure now?

I’m not a professional at this problem, but i think probably it might be because of the usage of old CWSDPMI.EXE instead of using the one included in the package. I did obtain CWSDPMI.EXE from here so there is nothing suspicious. But also i had the tought of it is something in the bios chip itself that prevents it? Because i just tested both flashrom and flashprog last night and it worked fine in my B550M Pro4.

Probably if i were on that position, i would re-do instant flash of bios 4.30 (since you did make a backup of a normal flashed 5.61 using instant flash), and after the flash, make sure you’re able to go to bios, shut down the pc while in bios, unplug psu power cord and cmos battery, press and hold power + reset button for about 11 seconds, release, and put everything back in and try flashrom/prog again.

I mainly use flashprog instead of flashrom, so it is a bit of my own preference for it.

Your suspicion is wrong. I definitely have used the CWSDPMI.EXE file, which was within the package named “Flashrom v1.4 and Flashprog v1.1 DOS” you have offered within >this< post.
By the way: The file named CWSDPMI.EXE is dated 07.01.2010 and absolutely identical with the file of the old “Flashrom v1.2 Utitilies”, which are attached since several years to the start post of >this< thread.

1 Like

So this does happen on the latest bios, but the flashrom works on bios ver 4.30? Or did you have tried to downgrade it to 4.30 and it still wont work? I’ve Updated both Flashrom and Flashprog from the latest commit of both respective git page, and using pciutils 3.13.0, but it might not make any differences. Feel free to try :smiley:

I haven’t yet tested your flashrom v1.4 with a downgraded BIOS and I will not do it, because I am just happy, that I can still use my standard PC after the BIOS read and write failures by using that tool.

  1. The file named CWSDPMI.EXE is missing within your freshly linked package.
  2. A v3.12.0 of that file never existed.