Very simple UEFI program as such:
LocateHandleBuffer()
always returns 8000000000000002
which is "Invalid Parameter. EFI docs say that the only reason for that should be if one of the two pointers I am passing are NULL, which they are clearly not.
It can't get much simpler than this. I originally tried with ByProtocol
with a speicifc GUID - but it always fails with the same error.
Any idea what the issue could be?
#include <efi.h>
#include <efilib.h>
EFI_STATUS EFIAPI efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
EFI_STATUS Status;
UINTN HandleCount;
EFI_HANDLE *HandleBuffer;
EFI_BOOT_SERVICES *gBS = SystemTable-> BootServices;
InitializeLib(ImageHandle, SystemTable);
Print(L"test2 built on " __DATE__ " at " __TIME__ "\n");
Status = gBS->LocateHandleBuffer (
AllHandles, NULL, NULL,
&HandleCount, &HandleBuffer);
Print(L"Test AllHandles returned status %llx count %d\n",Status,HandleCount);
return (Status);
}