Partition driver in fact consuming BlockIo, BlockIo2, DiskIo and DevicePath. Why some of them are opened with BY_DRIVER and others are opened with GET_PROTOCOL is because of EDKII concrete implementation.
Partition driver would use Parent Device Path info to create child's device path. And the "parent" device paths, created by AtaBus or ScsiBus for their enumerated childs, now aren't opened by lower layer driver with BY_DRIVER, so we could open it like that. Another sample is in AtaBus & ScsiBus. You can see DevicePath is opened by AtaBus with OPEN_PROTOCOL but by ScsiBus with BY_DRIVER. It's just due to AtaBus was developed after ScsiBus and we want to layer them above AtaAtapiPassThru driver to manage ATA devices and ATAPI devices separately. -----Original Message----- From: Ramesh R. [mailto:[email protected]] Sent: Thursday, July 18, 2013 01:39 To: [email protected] Subject: [edk2] Partition Driver Hi All, Partition driver consuming only the DiskIO , so it should be doing the EFI_OPEN_PROTOCOL_BY_DRIVER attribute only for the DiskIO protocol. Is there any reason why Partition driver does EFI_OPEN_PROTOCOL_BY_DRIVER attribute for the DevicePath protocol? Status = gBS->OpenProtocol ( ControllerHandle, &gEfiDevicePathProtocolGuid, (VOID **) &ParentDevicePath, This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER ); Thanks, Ramesh ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
