.. while I can remember .. Under OVMF (would guess it's using shared code
others would be), if you have a EFI_SIMPLE_FILE_SYSTEM_PROTOCOL you want to
try and coexist with direct access to drive in a way safe from hot-swap
there are issue.  If you attempt to open that device path (returned with
LocateHandleBuffer searching for Block IO devices) in BY_DRIVER|EXCLUSIVE
under driver model, it will disappear and that protocol can no longer be
found.    Same occurs if you open Block IO2 exclusive or Block IO
exclusive.  If you exit the app and from the shell try map -r, it also
can't find it.  Seems no way to get it back except to reboot.   If you
don't try to do things in a hot-swap safe way then there are no problems
(expect of course if a drive is "open" and the block io protocol is being
used and the drive is removed, that protocol (memory structure) is no
longer valid and everything crashes).  It be nice if everything could just
get along...


On Mon, Sep 16, 2013 at 6:26 PM, David F. <df7...@gmail.com> wrote:

> Hi,
>
> I open exclusive access to the device path for a given block io device.  I
> want to ensure the structure (protocol) doesn't go away while in a
> routine.  Meanwhile a support routine will take a handle to a mounted file
> system on that same block io device and attempt to use the
> DevicePathFromHandle support routine which uses HandleProtocol but it fails
> with INVALID_PARAMETER.   The two protocols have nothing to do with each
> other other than the same device, so why would it fail to get the device
> path of the file system (different handles)?  If I change it to not be
> exclusive but to be BY_HANDLE_PROTOCOL on the block io device then the
> DevicePathFromHandle will return the device path to the partition.
>
>
>
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to