#include #include #include #include "other.h" void PrintImageAddr(EFI_HANDLE image) { EFI_LOADED_IMAGE *loaded_image = NULL; EFI_STATUS status; status = uefi_call_wrapper(BS->HandleProtocol, 3, image, &LoadedImageProtocol, (void **)&loaded_image); if (EFI_ERROR(status)) { Print(L"handleprotocol: %r\n", status); } Print(L"Image base: 0x%lx\n", loaded_image->ImageBase); } bool AreEqual(void* lhs, void* rhs, uint64_t size) { char* clhs = (char*)lhs; char* crhs = (char*)rhs; bool equal = true; for(int i = 0; i < size; i++) { if(clhs[i] != crhs[i]) { equal = false; } } return equal; }