#include #include EFI_STATUS EFIAPI efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { EFI_LOADED_IMAGE *loaded_image = NULL; EFI_STATUS status; InitializeLib(ImageHandle, SystemTable); Print(L"Hello, world!\n"); status = uefi_call_wrapper(SystemTable->BootServices->HandleProtocol, 3, ImageHandle, &LoadedImageProtocol, (void **)&loaded_image); if (EFI_ERROR(status)) { Print(L"handleprotocol: %r\n", status); } Print(L"Image base: 0x%lx\n", loaded_image->ImageBase); DEBUG((D_ERROR, "AllocatePool: out of pool %x\n", status)); volatile int wait = 1; while(wait) { __asm__ __volatile__("pause"); } return EFI_SUCCESS; }