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

Thanks Fernando. I will get to that on Sunday/Monday. I’m literally heading out the door right now for some vacation time! :slight_smile:

i think that as soon as possible i prefer to send you the lastest bios of my mainboard, so you could modify the BIOS for me ?

We are writing guides and trying to help, but we do not modify any BIOS upon request.

@e.v.o :
Thanks for detailing the proper way to mod efi files into ffs. Was just looking through the EDK2 2015 nvmexpress.c source code and found this:
"Device->Media.WriteCaching = FALSE; ". Wonder if its worth turning that value onto TRUE, recompile and see what happens?

I am tempted to try.

EDIT by Fernando: Fully quoted post replaced by directly addressing to the author (to save space)

Hey Fernando.

This is the non-modded BIOS from laptop. I started following the instructions again and opened up this Bios file in the UEFItool and I couldn’t even find the region. To start all this. This is the latest BIOS for this lap top. I must be missing something. I remember last time i tried this was several months ago and I kept getting the 'file exceeds error" so I tried the second FFS file and it never worked.

Anyway this is the unmodded file, if you can look at it and let me know what I’m missing it would be appreciated.

EDIT * - So when I go into my BIOS I’m seeing UEFI instead of Intel Image and I’m not seeing anything that says BIOS region. I did the search for DXE and once again what I’m seeing on the screen is NOTHING like I’m expecting. I honestly remembering it was much easier the first time and I have got to be missing something simple. I flashed back to the previous BIOS so when I do get this working it will be for the latest version and I won’t get the “old build” error. I"m really not sure what i’m missing at this point.

The other thing I noticed is the extension of the file is .211. I’m used to Asus having a .CAP file extension and using the EZ flash port, but this is a laptop and doesn’t have that. option so I have to go through the EZ flash utility in BIOS. So this isn’t a uefi BIOS it is the Aptio one from Megatrends so this may not even work. I would have sworn it was a UEFI BIOS… I know my USB has the GPT format and have used it to install the UEFI version on my x99. I just find it weird that somehow 6 months ago i was finding and editing all this stuff in that BIOS version .211.

It also looks like someone else tried it with the Asus g751jt and couldn’t get it to work here: [Guide] How to get full NVMe support for all Systems with an AMI UEFI BIOS (39) back in Feb 2016. I’m not sure if anything has changed since then.

G751JTAS.zip (2.3 MB)

Contrary to you I had no problem to find the "DXE driver" section within your attached BIOS.
Look here:



Maybe someone could have a look at the source. I just had a quick look and from my understanding this acts just as some sort of template that get’s overwritten on runtime but i can be wrong :smiley:

Well… if you really wanna try it out then i could compile a version for you to test.



Since there is no official UEFITool thread i am posting this here:
With the UEFITool New Engine branch it is possible to load a GUID database file. I made a file that contains all "official" (extracted from the EDK2 source) and other GUIDs i found on the interwebs. This database will convert all known GUIDs to their real name. So "5BE3BDF4-53CF-46A3-A6A9-73C34A6E5EE3" becomes "NvmExpressDxe". Just load your UEFI file with the newest UEFITool version from the new branch, click on "File > Load GUID database" and load the new database. Be sure to rename the file extension from .CSV to .GDB. ^^

- UEFI_AIO_GUIDs.csv
- UEFITool latest release (you need at least version A40 from the "NE" (New Engine) branch)

If anyone wants to know excatly how this was done: https://github.com/LongSoft/UEFITool/iss…mment-297584194

There are still some duplicates in the file and some names are not "correct" (eg "EfiExtendedSalStatusCodeServicesProtocol" should be "ExtendedSalStatusCodeServicesProtocol") but it’s a start :slight_smile:

@e.v.o

Thanks for offer but I can compile my own no problem. Will test it out later today on a duet bootable USB stick just to be safe. Bet you the write scores go up. Thanks.

@e.v.o

Hi,

Compiled the 2017 EDK2-UDK version of NVMExpress.efi and reran some benchmarks against the older nvme efi driver I use to have and saw like 10-15 percent improvement in scores. Not sure if it was because I disabled that write-cache setting within the nvme driver source code or not. Will have to recompile a fresh copy with it at default settings and get back to you but heres a comparison:


Of course I don’t have write cache enabled as I do not own a UPS though have tested with it on within Windows device manager and with it on theres a 3X fold increase in score.

Thanks

EDIT: Added Comparison of Old Driver with Windows Writecaching policy on:



To New EDK2-UDK 2017 NVME driver with Windows Writecaching policy on:


Second edit: Reran 3rd test for accuracy and no seems like theres a statistical tie…

@davidm71 :
Thanks for having tested the new NvmExpressDxE module.
My comment:
The WRITE scores of your benchmark test results are not realistic at all. You should enable both Policies options after having done a right-click onto the related Disk Drive from within the Device Manager.

@Fernando , @e.v.o

2017 EDK2 Windows Write Cache ON - Sourcecode WriteCaching:FALSE


2017 EDK2 Windows Write Cache ON - Sourcecode WriteCaching:TRUE


2017 EDK2 Windows Write Cache OFF - Source Code Write Caching TRUE:


2017 EDK2 Windows Write Cache OFF - Source Code Write Caching FALSE:


So it would seem that modifying the source code to turn on the Media.Writecaching Key may not do anything and in fact result in slightly lower scores
for both when write cache is turned on or off in device manager. However the new EDK2017 driver is definitely faster than the old one!

Thanks

Hmm. I’ll look again. I"m looking for that 8c8ce line to do my work in…

Updated my benchmarks and corrected any statistical errors and reran tests for accuracy. My results show no real advantage over the old Nvme efi driver and the new 2017 edk driver. At least on my system which is on an X58 EVGA Classified loading the Plextor M8PeY through a Duet bootloader so there could be a bottleneck effect limiting my scores or any advantages fwiw. Anyhow here is a link to the new 2017 edk2 nvme drivers in Efi form if anyone wants to use them. They still need to be converted to ffs for insertion in ones bios.

@davidm71 :
Thank you very much for having tested the new “EDK2017” NVMe EFI modules, for having published the results and for having uploaded the 2 *.efi files you have used.
Which one of them would you propose for being offered within the start post of this thread?

Off topic:

Your screenshots look much better, if you take them by hitting ALT+PRINT, run MS Paint, hit “Paste”, then hit “Crop” and save it somewhere as *.png or *.jpg file.
The easiest way to insert them is by using the Forum Software (look >here<).

Thanks @Fernando ,

I would suggest the non modded Writecaching Off version because it seemed like the scores were slightly worse with writecaching on though could be statistically the same but my scores showed an advantage to the normal version which would be as the author of the driver intended its use as in that form. I can’t say what if turning on writecaching in the efi driver would do or if it would be safe,

Thanks

@e.v.o :
@davidm71 :
On behalf of all interested NVMe SSD users I want to thank you for your work on the newest NVMe EFI module and for your recent contributions within this thread.

After having compared the body code of the files, which were uploaded by you both, I found huge differences. So I do not really know which one should be presented by me.
Furthermore I think, that the new module should have been successfully tested by someone, who has an Intel Chipset system with an AMI Aptio UEFI BIOS and a modern NVMe SSD like the Samsung 960 Series, before I am going to replace the 100% working NVMe module, which is currently offered within the start post.

I have the April Bios and I have a ready to go Samsung 950 pro ready to go. I was going to try and test it later this evening but if you or someone else wants to add the new module to the BiOs I uploaded here feel free and I can test it. Otherwise I will tinker with it later. I’m 99% positive I will have to remove something to keep the size under the limit. I will follow the guide on what possible things I can take out.

Of course I was going to use the module from page one.

No, you should do it yourself. We generally do not modify any BIOS upon request.

Yes, I have just tested it and removed the module named Udp6Dxe according CodeRush’s advice (look >here<). After having done that I had no problem to insert the uncompressed NvmExpressDxE_2.ffs module.

@Fernando ,

Was just having fun. Thank you for your comments. Got something else in the works. Thanks.

Well here is my attempt. Everything looks right but when I tried to flash it gave me invalid BIOS file. I have tried it both with the extensions of .211 (which is how it is straight from Asus) and as .ROM. Neither works. It looks to be the same size as the original so I didn’t get a size error.

I went ahead and added the .ffs file and got no size error so I don’t think I need to take anything out.

The actual file name straight from Asus has an extension of .211 which is the bios revision. The previous version was .210 so there is no .ROM or .CAP. I can update from version .210 to .211 and back with no issues so I’m missing something. :frowning:

Suggestions?

EDIT ** Looking at the different ways to ‘flash’ a bios I see that Asus has instructions for .Rom/.CAP and Gigabyte has instructions for the APTIO MB. I have an Asus Aptio with EZ Flash in the BIOS which has worked and is the preferred method. Is there a BIOS flash right up for Asus APTIO mbs?

G751JTAS.rar (2.18 MB)