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

Hello everyone! Here’s another X79 success story, parts and software used:
- Rampage IV Extreme mobo
- Asus Hyper M.2 Mini X4 PCIe -> M.2 adapter
- Samsung PM961 256GB M.2 NVMe
- 4901 BIOS (Modded with latest Intel Microcode and NVMe module injected)
- Samsung NVMe W10 driver

The settings that ended up working in BIOS to get the SSD to boot:
- CSM Disabled (if I turn it on the system doesn’t boot and I need to remove the PCIe -> M.2 adapter to recover)
- Fastboot ON
- C-states AUTO
- Partial SATA boot initialization (have 4x standard SATA SSD’s on the system)

She’s chooching mighty fine!

[[File:2018-04-16 (2).png|none|auto]][[File:2018-04-16 (1).png|none|auto]]

2018-04-16 23.53.54.png

2018-04-16 (2).png

2018-04-16 (1).png

@Tonico :
Welcome to the Win-RAID Forum and thanks for your report!
Which NVMe module did you insert into the BIOS?
Enjoy the performance of your NVMe SSD!
Dieter (alias Fernando)

@Fernando :
Thank you for the mod!
I used the uncompressed NvmExpressDxe_3 module, however I’m planning on switching to the uncompressed small version today if that will decrease the boot time.

EDIT by Fernando: Unneeded fully quoted post replaced by directly addressing (to save space)

Switched to the Uncompressed Small version of the module instead of the full version, CSM must still be disabled when the PCIe -> M.2 adapter is installed or the system refuses to post.

NVMe booting still works however the BIOS no longer recognizes the model name of the SSD when using the Small version, now the BIOS only says Windows Boot Manager under the list of bootable UEFI devices without any kind of model code.

Didn’t notice much of a difference in the boot time, but I’ll keep using the Small version for testing.


Edit: Went back to the full NvmExpressDxe_3 module, here’s the BIOS difference:

Uncompressed Small module

small.jpg



Uncompressed NvmExpressDxe_3 module

full.jpg

@Tonico :
NvmExpressDxe_Small has component name protocol (including model name) support removed that results in a size reduction of multiple kilobytes.

Note that community members with very few space in their UEFI BIOS image prefer size over features.

Would you be interested in a new build of NvmExpressDxe that has all the bug fixes and performance improvements from UDK2018 but is also larger than NvmExpressDxe_3?

@Ethaniel

Sure! There’s plenty of space left in the UEFI image, I don’t mind testing a larger module.

@Tonico :
Please try the attached NvmExpressDxe_4 driver.
Could you please attach a screen shot similar to the previous ones.

Changes:
- Based on UDK2018
- Applied simple bug fixes and performance improvements from NvmExpressDxe_Small
- More user friendly model name and serial number format
- Has more features than NvmExpressDxe_3 but is smaller because of the above optimizations

NvmExpressDxe_4.zip (32.8 KB)

@Ethaniel

Works great, thank you! :slight_smile:

Used the uncompressed NvmExpressDxe_4 module, here’s a shot of the BIOS:

dxe4.jpg

@Tonico :
Thank you for the screenshot, looks good to me.

@Ethaniel ,
@Tonico ,

I have an already modded BIOS for ASUS P8Z77 up and running well with the “small” nvme module.
I have modded again this modded BIOS to replace the small nvme bios module with NVmExpressDxe_4 module you offered.
At the end of the modding operation I have this screenshot, it’s like good for me:

Replace_is_done_18april18.PNG



Do you think it is OK before I flash it ?

What performance improvment do you think ? Is it only when booting ?
I don’t think the NVMe module is used after W10 is booted and so we can’t expect any storage performance improvment.

@100PIER :

Your screenshot looks good to me.

You are correct, the NvmExpressDxe is used for booting only, so should not have any performance effects (positive or negative) after the operating system takes over early on, while the boot screen is still displayed.

Performance improvements are in the form of more fine-grained waiting for I/O operations, avoiding unnecessary operations and simpler algorithms for the same task. All of these resulted in smaller code in NvmExpressDxe_Small. I have applied some of these changes that are simple enough to NvmExpressDxe_4 so that it is mostly the same as the UDK2018 version.

UDK2018 also has a fix that enables direct memory access (DMA) for writes that should improve write performance, but that is usually not used during the operating system boot process.

My current recommendation is using NvmExpressDxe_4 when you have enough space and using NvmExpressDxe_Small otherwise because these are the most up-to-date versions of the TianoCore NvmExpressDxe driver.

NVMe is already extremely fast, so in most cases I don’t really expect any noticeable performance changes.

In my experience HDDs have the highest impact on boot time, but even the initialization of a discrete graphics card takes longer than that of an NVMe SSD.

You can measure NVMe boot performance by removing all expansion cards, unplugging all storage devices (SSD, HDD, DVD, etc.), unplugging all peripherals, disabling on-board devices, configuring UEFI BIOS to perform only minimal initialization, and only having a graphics card, an NVMe SSD, a display, a keyboard and a mouse attached to your computer, and performing a reboot.

Thanks you very much for your comments. I let you know the tests results with the new flashed BIOS on my old P8Z77 PC.

@Ethaniel :
On behalf of all users, who are interested to get full NVMe support with their old AMI UEFI BIOS system, I want to thank you again for your successful and extremely useful efforts to optimize the related NVMe EFI modules.

I followed your recommendation and have already updated the start post of this thread.

@all:
Update of the start post
Changelog:

  • new: uncompressed “NvmExpressDxe_4” module (dated 04/18/2018)
    This module has been compiled by our Forum member Ethaniel and successfully tested by our Forum member Tonico (look >here<).
  • removed: formerly offered NvmExpress_3 and pre-compressed modules (seem to be not required anymore)
A big thankyou goes to Ethaniel for his brilliant work and to Tonico for having tested the new NvmExpressDxe_4 module!

Enjoy it!
Dieter (alias Fernando)

@Fernando :
Thank you for updating the start post.

Unfortunately I have seen UEFI BIOS images on this forum with extremely low DXE volume free space, lowest I can recall is 5136 bytes, that is less than the size of NvmExpressDxe_Small.ffs.

Considering this you may want to continue offering the compressed modules for the benefit of forum members with extremely low DXE volume free space.

@Ethaniel :
Although you are certainly right regarding your proposal, I want to let it be as simple as possible (the more modules I am offering, the more questions I expect regarding the advantages/disadvantages).
Best option: NvmExpressDxe_4
If not enough space: NvmExpressDxe_Small
If not even enough space for the “Small” module: Ask for a solution.

@ Strikerrocket,
nice to see your motherboard is same to me (asus z9pa-d8). I t’ve modded the bios by adding the NVME drive but cannot success. It happen during flashing the bios and showed “security verification failed” . Could you mind tell me the technique need to take care during flashing? Or if possible can you share your bios file have a trial?

Thanks in advance!!

EDIT by Fernando: Unneeded fully quoted post removed (to save space)

@Narakindi :
Welcome to the Win-RAID Forum!
Your problem is not how to get full NVMw support, but how to get the modified BIOS properly flashed.
For users like you I have started >this< thread. Please read the start post of it and follow my advices.
Regards
Dieter (alias Fernando)

Hi
My Asus Rampage IV Extreme and Samsung Sm951 M2 NVMe 256GB Lives.
Thank you for helping Tonico !

Its my transfer on Windows 10 Pro

20180422_192933.jpg

@zanet :
Welcome to the Win-RAID Forum and thanks for your feedback!
Which NVMe module did you insert into the BIOS?
Regards
Dieter (alias Fernando)

Hi
Tonico used your files?
I got a ready bios from him.
Uncompressed NvmExpressDxe_3 module ?

Thank you very much for help