My first reaction is that passthrough should be a pointer to EFI_SCSI_IO_PROTOCOL, not an instance of that structure.
But you're crashing because This is uninitialized and you dereference it. Maybe you want the gImageHandle you can get from a standard library? -Jaben From: parmeshwr_pra...@dell.com [mailto:parmeshwr_pra...@dell.com] Sent: Wednesday, September 25, 2013 6:15 AM To: edk2-devel@lists.sourceforge.net Subject: [edk2] error in uefi application Dell - Internal Use - Confidential Hi All, I have developed below code, it is crashing the system, can anybody tell me why ? what is solution ? EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE * SystemTable) { EFI_STATUS Status; EFI_SCSI_IO_PROTOCOL passthrough; EFI_DRIVER_BINDING_PROTOCOL *This; gST->ConOut->OutputString(gST->ConOut, L"Mirror started\n"); Print(L"ParamTest\n\r"); Status = gBS->OpenProtocol(ImageHandle, &gEfiScsiIoProtocolGuid, (VOID **) & passthrough, This->DriverBindingHandle, NULL, EFI_OPEN_PROTOCOL_BY_DRIVER); if (EFI_ERROR(Status)) { gST->ConOut->OutputString(gST->ConOut, L"Error\n"); Print(L"Error !!!!!!!\n"); return Status; } Print(L"ParamTest\n\r"); Best Regards, Parmeshwr Prasad Tel : +91-9743262018 [cid:image002.png@01CE781A.38F61FE0]
<<inline: image001.png>>
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel