diff options
author | Regina König | 2020-07-30 02:42:40 +0200 |
---|---|---|
committer | Regina König | 2020-07-30 02:42:40 +0200 |
commit | 6dc837c8c76c18516a752f2415b21d7924e89d64 (patch) | |
tree | 477bfc9bf21f254f110b6969745e396c051f9269 /memtestEDK | |
parent | changed format type from %s to %a. Now logger prints messages to screen (diff) | |
download | memtest86-6dc837c8c76c18516a752f2415b21d7924e89d64.tar.gz memtest86-6dc837c8c76c18516a752f2415b21d7924e89d64.tar.xz memtest86-6dc837c8c76c18516a752f2415b21d7924e89d64.zip |
searching for FILE access protocol
Diffstat (limited to 'memtestEDK')
-rw-r--r-- | memtestEDK/Memtest/ProtocolInformation/ProtocolInformation.c | 73 | ||||
-rwxr-xr-x | memtestEDK/Memtest/run.sh | 2 |
2 files changed, 38 insertions, 37 deletions
diff --git a/memtestEDK/Memtest/ProtocolInformation/ProtocolInformation.c b/memtestEDK/Memtest/ProtocolInformation/ProtocolInformation.c index 20ac4bc..c60fbbd 100644 --- a/memtestEDK/Memtest/ProtocolInformation/ProtocolInformation.c +++ b/memtestEDK/Memtest/ProtocolInformation/ProtocolInformation.c @@ -12,52 +12,53 @@ UefiMain ( IN EFI_SYSTEM_TABLE *SystemTable ) { -/* - EFI_STATUS efiStatus; + EFI_STATUS efiStatus; EFI_BOOT_SERVICES* bs = SystemTable->BootServices; - EFI_GUID sfspGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; + //EFI_GUID sfspGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; EFI_HANDLE* handleBuffer = NULL; UINTN handleCount = 0; - UINTN HandleIndex; + UINTN handleIndex; EFI_GUID **ProtocolGuidArray; UINTN ArrayCount; - UINTN ProtocolIndex; - EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfo; - UINTN OpenInfoIndex; - UINTN OpenInfoCount; + //UINTN ProtocolIndex; + //EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfo; + //UINTN OpenInfoIndex; + //UINTN OpenInfoCount; efiStatus = bs->LocateHandleBuffer ( AllHandles, NULL, NULL, - handleCount, + &handleCount, &handleBuffer ); - Print(L"Number of handles found: %d\n", handleCount); + Print(L"EFI_STATUS after LocateHandleBuffer: %r\n", efiStatus); + Print(L"Number of handles found: %d\n", handleCount); // Last time: 182 if (!EFI_ERROR (efiStatus)) { - for (HandleIndex = 0; HandleIndex < handleCount; HandleIndex++) { + for (handleIndex = 0; handleIndex < handleCount; handleIndex++) { // // Retrieve the list of all the protocols on each handle // - efiStatus = bs->ProtocolsPerHandle ( - handleBuffer[HandleIndex], - &ProtocolGuidArray, - &ArrayCount - ); + efiStatus = bs->ProtocolsPerHandle ( + handleBuffer[handleIndex], + &ProtocolGuidArray, + &ArrayCount + ); - Print(L"Number of Protocols per Handle: %d\n", ArrayCount); + Print(L"EFI_STATUS after ProtocolsPerHandle: %r\n", efiStatus); + Print(L"Number of Protocols per Handle: %d\n", ArrayCount); - if (!EFI_ERROR (efiStatus)) { - for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) { +/* if (!EFI_ERROR (efiStatus)) { +*/ /*for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) { // // Retrieve the protocol instance for each protocol // efiStatus = bs->OpenProtocol ( - handleBuffer[HandleIndex], + handleBuffer[handleIndex], ProtocolGuidArray[ProtocolIndex], NULL, ImageHandle, @@ -68,35 +69,35 @@ UefiMain ( // Retrieve the list of agents that have opened each protocol // efiStatus = bs->OpenProtocolInformation ( - handleBuffer[HandleIndex], + handleBuffer[handleIndex], ProtocolGuidArray[ProtocolIndex], &OpenInfo, &OpenInfoCount - ); - if (!EFI_ERROR (efiStatus)) { + );*/ + /* if (!EFI_ERROR (efiStatus)) { for (OpenInfoIndex=0;OpenInfoIndex<OpenInfoCount;OpenInfoIndex++) { // - // HandleBuffer[HandleIndex] is the handle + // HandleBuffer[handleIndex] is the handle // ProtocolGuidArray[ProtocolIndex] is the protocol GUID // Instance is the protocol instance for the protocol // OpenInfo[OpenInfoIndex] is an agent that has opened a protocol // - } - if (OpenInfo != NULL) { + }*/ + /*if (OpenInfo != NULL) { bs->FreePool(OpenInfo); - } - } - } - if (ProtocolGuidArray != NULL) { + }*/ + /* } + }*/ + /* if (ProtocolGuidArray != NULL) { bs->FreePool(ProtocolGuidArray); - } - } - if (handleBuffer != NULL) { + }*/ +/* }*/ + /*if (handleBuffer != NULL) { bs->FreePool (handleBuffer); - } - } + }*/ + } } -*/ + /* efiStatus = bs->LocateHandleBuffer(ByProtocol, &sfspGuid, NULL, diff --git a/memtestEDK/Memtest/run.sh b/memtestEDK/Memtest/run.sh index f9a3f01..6d98a65 100755 --- a/memtestEDK/Memtest/run.sh +++ b/memtestEDK/Memtest/run.sh @@ -3,7 +3,7 @@ (cd ..;. edksetup.sh BaseTools; build -a X64 -p MdeModulePkg/MdeModulePkg.dsc) if [ $? -ne 0 ]; then exit 1; fi -(cd ..; cp Build/MdeModule/DEBUG_GCC5/X64/GetRootSystemDescriptionPointer.efi ../../git/working_dir/memtest86/test_code/hda-contents/) +(cd ..; cp Build/MdeModule/DEBUG_GCC5/X64/ProtocolInformation.efi ../../git/working_dir/memtest86/test_code/hda-contents/) if [ $? -ne 0 ]; then exit 1; fi (cd ../../../git/working_dir/memtest86/test_code; sudo ./run.sh ) |