[if !mso]>[if gte mso 9]>

[edk2] crash while Status = gBS->LocateHandleBuffer(AllHandles,

Subject: [edk2] crash while Status = gBS->LocateHandleBuffer(AllHandles,

From: <Parmeshwr_Prasad@Dell.com>

To: <edk2-devel@lists.sourceforge.net>

Date: 2013-09-23 12:55:44

Dell - Internal Use - Confidential


Hi All,


Below is my code when I run this on my machine it crashes.




// Connect All Handles Example

// The following example recusively connects all controllers in a platform.


        EFI_STATUS Status;


        UINTN HandleCount;

        EFI_HANDLE *HandleBuffer;

        UINTN HandleIndex;

        gST->ConOut->OutputString (gST->ConOut, L"Code started\n");


// Retrieve the list of all handles from the handle database


        Status = gBS->LocateHandleBuffer(AllHandles,


                                         NULL, &HandleCount, &HandleBuffer);

        gST->ConOut->OutputString (gST->ConOut, L"After locate handler\n");

        if (!EFI_ERROR(Status)) {

                gST->ConOut->OutputString (gST->ConOut, L"Got error\n");

                for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {

                        Status =


                                                   NULL, NULL, TRUE);






Any Idea why it crashed ??



Best Regards,

Parmeshwr Prasad

Tel : +91-9743262018