devc1 wrote:
Is there anyway to add NvmeDxe driver to my UEFI bootloader, if I enumerate through the block_io protocol I cannot find the NVME Drive.
I use EDK2.
you confused things heavily. your loader is a UEFI application and it should not add any drivers, not to mention Dxe drivers. the latter are part of internal UEFI implementation, that follows the PI specification. BLOCK_IO is produced by the firmware and your loader consumes it. the platform already has NVMe drivers to handle NVMe controllers/storage devices. if you are about to provide your own driver for that, it still should not be part of the loader.
InstallProtocolInterface(), ConnectController() and friends are of your interest if you want to extend the firmware. but it's not about Dxe drivers, it's about UEFI driver model drivers. Dxe is internals, it should be of interest for only those, who participates to EDK2. even extending it implies using UEFI driver model drivers. but it's so far away from the loader... it doesn't need to do all this.
you say, you use EDK2. how? as a consumer/client? then just write your loader and don't get into depths, you don't need to get for this. if you are extending/writing your own firmware, then read above.