And the code is passing in a garbage handle.
Sent from my iPhone
> On Sep 25, 2013, at 7:21 AM, "Carsey, Jaben" <jaben.car...@intel.com> wrote:
>
> 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
> <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
------------------------------------------------------------------------------
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