[HowTo] Get full NVMe Support for all Systems with an AMI UEFI BIOS

@MKS-DXB - What is the motherboard model? Please attach your mod BIOS in a zip

@MKS-DXB as was said to me by @Lost_N_BIOS , the Bios file name needs to be exactly the same as the original bios name. font, size and letter for letter to be nothing different from the original bios name. the only thing that is different is the bios edit. For example the motherboard i have is .F3 so i have to retain the same .F3 extension in order for the Bios flash to be successful. and my edit and flash of the bios went successful. it is the same for all motherboards.

i am still using my new NVMe M.2. performance has increased.

Motherboard: Gigabyte GA-990FXA-UD5 R5

i am using maximus v formula

MAXIMUS-V-FORMULA-ASUS-1903.rar (4.1 MB)

@MKS-DXB - You should have extracted body from capsule first, then did your mod, then put back into capsule (This done with UEFITool and hex editor)
What did you use to mod this BIOS? It looks OK and is in signed capsule already, that’s why I asked. You just need to rename this to >> M5F.CAP
Then you can USB Flashback the mod BIOS

As long as you don’t flash another BIOS without NVMe EFI module, you will have full NVMe support.

@Lost_N_BIOS
i used the UEFITool 0.28.0
when i save the image file it saves as .rom file and my mother board needs a .CAP file
i renamed it to .CAP but the usb flash doesnt respond.
when i use the original bios source file in M5F.CAP it flashes
but when i rename the modified .rom file to .CAP file it doesn’t respond
how to use the hex editor?

@MKS-DXB - First, use UEFITool on the stock.CAP BIOS to extract the body >> Right click AMI Aptio Capsule and choose extract body, Then do NVME mod to that bin/rom
This is how you should do that >> open stock.CAP in Hex editor and go to offset 800. Open mod bios rom/bin in second tab of hex editor, select all and copy, then paste at offset 800 in stock.cap, then save this file as M5F.CAP

Extension name does not matter so much when saving, I mean you can easily rename, but how the BIOS is created and it’s contents are what matters.
Your mod BIOS is in a capsule, but named rom/bin, renaming should have been OK but it’s probably not accepted due to how you did the mod with capsule included while editing.

If you need me to do for you I can, just let me know

Can you give me the detailed steps for this please. lost with the steps
i do the mod first with UEFITool
save the image file
than use the hex editor
----------------

yes please if its not too much
thanks a ton

I gave the steps in order above, it would be same if I broke that down into numbered step-by-step instructions. But, see below, I have now did just that, and added images etc

1. Use UEFITool on the stock.CAP BIOS to extract the body >> Right click AMI Aptio Capsule and choose extract body, save as bin/rom does not matter.

Capsule-ExtractBody.png



2. Then do NVME mod to that bin/rom (body file) per the guide at post #1 of this thread

3. Then open your stock .CAP BIOS in UEFITool, expand “AMI Aptio Capsule” and check to see what is the starting offset of the “Body” of the Capsule is, this is the actual start of the “BIOS Image” itself (Rom/Bin)
The offset which body of BIOS starts depends on your particular Asus BIOS and how large it’s capsule is, example of how to tell and both sizes is shown below, the capsule size is usually 800h or 1000h (2KB/4KB)
This applies to AMD as well as Intel, so pay no attention that both of these happen to be Intel BIOS For Intel it will show “Intel Image” for AMD it will show “UEFI Image”

BIOSStartOffset.png



3a. If using regular UEFITool versions (ie 25-2x), not NE Alpha (ie 51-5x), then you need to select AMI Aptio Capsule, then look at "Header Size" as shown in the image below.
Header size is the size of the actual capsule, and this tells you the BIOS starts after this at 800 or 1000 (generally). That will be your starting point of the "BIOS Image" itself

Header-Size.png



4. Then open stock BIOS .CAP in Hex editor and go to offset 800h or 1000h offset depending on your original stock.CAP BIOS, this is the end of the capsule, and the start of the actual BIOS

StartBIOSHex.png



5. Open mod bios rom/bin (body) in second tab of hex editor, select all and copy

SelectAllCopy.png



6. Then paste into stock BIOS .CAP at offset 800h or 1000h, depending on your BIOS starting offset after capsule ends as noted in step #3 above

PasteIntoCapsuleNew.png



7. Then save this file as USB Flashback Name - You can get this by dropping BIOS onto FD44Editor if you are not already sure of the BIOS USB Flaskback name, it’s called “Recovery Name” in FD44Editor

USBFlashbackName.png



@MKS-DXB - - Here is mod BIOS for you in case you don’t want to do yourself, I made fresh from stock BIOS and use UEFITool 25.0 - Flash via USB Flashback ONLY, this is stock modified BIOS
https://ufile.io/vfim10gn

@MKS-DXB @Lost_N_BIOS
Please consider, that this thread is already very voluminous and not appropriate for off-topic discussions. >Here< is the matching thread about how to flash a modded AMI UEFI BIOS. Users with special problems while trying to get the NVMe module properly inserted should better start a new thread within >this< Sub-Forum.
Thanks for your understanding!

@Fernando I had started my own thread with this thread linked because i knew it was going to be more than this thread had room for (i agree). is it possible to put back what i had started in the thread i had?

@Fernando - Our discussion is 100% on topic, all about creating proper NVME Mod BIOS, see step #2 in my outline (do NVME mod). Additionally, this topic covers “Flashing of the mod BIOS” at post #1 step #3
Our discussion was not necessarily about “how to flash a mod BIOS” as I see it, but more about “how to make a NVME Mod BIOS for Asus” since it was not outlined clearly for that user in the guide, and discussions to sort it all out should not be split into 2-3 topics all to accomplish one task
I feel all that info, and or something like that should be added at post #1 for ALL Asus users knowledge, because all those steps, or similar needs to be done for anyone doing a NVME mod to an encapsulated Asus NVME BIOS and then using USB Flashback.
Without this, the guide is not complete for Asus users, and this question will continue to be asked over and over again. His NVME mod was done properly, but the BIOS was not proper overall due to the guide leaving out stuff he needed to do per his specific brand/BIOS.

I do know and understand how much you dislike general or expanded discussion in a thread, but stuff like this can’t be strictly limited while you are working things out on a mod BIOS, or split into multiple threads etc, that makes a confusing mess at the time and for anyone reading in the future.

@PsyberBill :
Although it would be not a big problem to move all your posts (and the direct replies given by someone else) from this thread into a separate one, such action would induce other problems (wrong links to specific posts etc.).
Another option would be to create a new thread about the same topic, to start it with an up-to-date guide (hopefully written by someone else), to close this thread and mark it as being outdated. This way no information will get lost for the Forum members and visitors.

@Lost_N_BIOS :
You are right - it is nearly impossible to keep a very popular thread like this one strictly on-topic, but I do not 100% agree with your statement, that the recent discussion with MKS-DXB has been completely topic-related.
This is what I have written into my guide (= start post of this thread):

Nevertheless our Forum Member MKS-DXB started the recent discussion with this post:

It turned out, that he didn’t know how to flash an ASUS *.CAP BIOS by using the ASUS USB Flashback feature.

Hi, first, thank you for creating this guide.

I used it to mod and flash my Asus G751JT BIOS. I used the MMTool to insert NvmExpressDxe_Small (as is, i.e. uncompressed) because the non-small version was too big both uncompressed and compressed.
However, I am not able to boot from my NVMe SSD. I disabled secure boot and enabled CSM option, but I don’t see PATA nor PATA SS as boot options in BIOS.
The current BIOS file I extracted using AFUWIN is in the attachment.

I suspect that the problem might be with my SSD itself, but if someone could look into the BIOS and tell me does it seem fine, that would be appreciated, thank you.

afuwin.zip (2.31 MB)

@DarkLunaPhantom :
Welcome to the Win-RAID Forum!
To be able to verify the usability of your modded BIOS, I need the original BIOS as well. Please attach it or give me the link to the related BIOS version.
Questions:
1. Which NVMe SSD are you using (manufacturer and model)?
2. How did you flash the modded BIOS and what makes you sure, that it has been flashed properly?
Regards
Dieter (alias Fernando)

The original BIOS is in the attachment.

1. I am using Kingston A2000 NVMe PCIe SSD 1TB.
2. I used AFUWIN to flash the modded BIOS. Using AFUWIN again to extract the current BIOS gave me the same file I flashed (I compared MMTool reports). Is there any other way I could use to check that it was flashed properly?

afuwin.zip (2.31 MB)

@DarkLunaPhantom :
Thanks for the original BIOS.
After having compared it with your modded BIOS I found out the following:
1. You have inserted the small NVMe module absolutely correctly.
2. Nevertheless your modded BIOS may have become unusable due to the fact, that the MMTool additionally has inserted a natively not present Pad-file.
3. By using the UEFITool v0.26.0 I was able to insert the small NVMe module without adding the unwanted Pad-file.
Here are the related pictures showing just the downmost end of the "DXE Driver Volume":
1. Original BIOS:

Original BIOS.png


2. Your modded BIOS:

BIOS mod by user.png


3. My modded BIOS:

BIOS mod by Fernando.png



Attached is the BIOS, which has been modded by me. Try it at own risk and report, whether it worked or not.
Good luck!

EDIT: The attached BIOS file has been removed by me on 10/27/2020

Nevertheless our Forum Member MKS-DXB started the recent discussion with this post:

It turned out, that he didn’t know how to flash an ASUS *.CAP BIOS by using the ASUS USB Flashback feature.




I do see what you mean, but the last part is what I was getting at. He knew how to flash it via USB Flashback, had used before with stock BIOS, but his NVME mod BIOS was not prepared properly due to following this guide the steps I mentioned were not addressed within the guide.
So, he ended up with an NVME mod encapsulated improperly because none of that is discussed as part of the NVME mod process. Sure this could be taken as a flashing problem, but it shouldn’t have to be (our discussion about on/off-topic posts aside), this should all be covered in this guide here

My main point was all that about capsule, editing BIOS outside of capsule and putting back into capsule, should really be part of the guide, something to cover that for all Asus users.
Otherwise all Asus users are instantly stuck with invalid mod BIOS as soon as they follow the guide, and then either have to ask for help to redo here, or another thread, or make a new thread etc
This shouldn’t happen by following a guide to mod a BIOS, unless addendum is added "Asus users - Please start a new thread of your own, or ask "here (at link)" for help how to fix your NVME BIOS once done with this guide - see what I mean?

And my apologies if anything I said in previous reply sounded rough, I was very sick, head pounding, and stomach swirling, and so I was trying to hurry my way through that reply so I could go toss-it-up

hi to all, thanks for the support, you can help me? i have an error when i reopen modded bios on UEFITool, error says "parseFile: invalid data checksum 5Ah, should be AAh"

i attach the bios file that i created, my motherboard is a z77a-g43

biosmod_2.zip (5.41 MB)

@Matiux14 - That is normal for your BIOS, stock BIOS says same, I checked version 2D
* Edit - I checked your BIOS, and I would not flash that, it may brick! NVME is inserted in wrong location (should be at end, after last DXE entry - MFlash) and padding file is missing at end of main DXE volume (volume you are editing in)
You need to redo the mod, using a different tool (ie use MMTool 4.50 instead). Once done, rename back to stock name.extension and M-Flash it