> On Aug 27, 2015, at 9:02 AM, Robinson, Keith <[email protected]> 
> wrote:
> 
> 
> Hello,
> 
> I am trying to determine if it is possible to write a UEFI application that 
> allows the user to swap USB mass storage devices and re-enumerate the new 
> device inserted.
> 

The USB stack is hot plug, and the EFI Driver model is basically hot plug via 
the Driver Binding protocol (Support, Start, and Stop). The USB bus driver will 
call Stop we a device is removed, and Start when a device is added.

Generally the problem is the Application does not follow the EFI Driver Model 
and it end sup hanging on to some protocol that “goes away”.  I think I posted 
an example library, SafeProtocolOpenLib, to the mailing list a while back with 
an example of how to make BlockIo safe. 

Thanks,

Andrew Fish

This is the patch I saw on the mailing list, it should give you and idea on how 
to make it work. 

Contributed-under: TianoCore Contribution Agreement 1.0

> Thanks,
> Keith Robinson
> 
> 
> This email and any files transmitted with it may be confidential, legally 
> privileged and protected in law and are intended solely for the use of the 
> individual to whom it is addressed. Any view or opinions presented are solely 
> those of the author and do not necessarily represent those of ViaSat.   If 
> you have received this Email in error please contact the sender by return and 
> confirm that its contents have been destroyed without further distribution or 
> disclosure. Please email [email protected]<mailto:[email protected]> with 
> any questions relating to this disclaimer.
> 
> ViaSat has Registered Offices at Sandford Lane, Wareham, Dorset BH20 4DY. The 
> company is registered in England and Wales under no: 3007498.
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.01.org_mailman_listinfo_edk2-2Ddevel&d=BQICAg&c=eEvniauFctOgLOKGJOplqw&r=1HnUuXD1wDvw67rut5_idw&m=lhd-QeKHQBrzwGRVPxSPPFCSN9BVBg_a983exHP4Dbc&s=UHJ4jCdyIyGbxE0CUzDLdfsM7KQFwmH1pi46k84eTTo&e=
>  

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to