OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:13 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 3:14 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
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.


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 3:54 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
It should be possible, but the only way I know how to do it is to add a driver entry to the boot manager and then reboot.


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 3:58 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
what do you mean boot manager ? Is it the thing that I read in the UEFI spec that windows creates in the System Partition and names "bootmgr.efi" or bootmgfw.efi ?


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 4:10 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
I'm talking about the UEFI boot manager, not the Windows boot manager.


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 4:12 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
I added the NvmExpressDxe.efi driver to the boot maintenance manager in QEMU but it still doesn't detect the nvme drive.

It adds the driver to the driver order but after restart nothing appears there.


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 5:56 pm 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 640
Location: Ukraine, Bachmut
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.

_________________
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).


Top
 Profile  
 
 Post subject: Re: How to add NVME Driver to UEFI Bootloader
PostPosted: Mon Mar 20, 2023 10:35 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
It's because I have an old pc and to use my nvme drive I have the clover bootloader on the hdd that automaticly runs windows on my nvme. And in order for clover to support nvme you just need to add NvmExpressDxe.efi in the driver directory and it can detect windows inside the nvme drive.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot] and 72 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group