Mercurial > hg > Members > taiki > EFIKernel
view boot/bootx64.c @ 8:d390aa667e3c
program test.
author | taiki |
---|---|
date | Wed, 26 Dec 2012 14:40:17 +0900 |
parents | c778c27450cc |
children | e6715e03b87a |
line wrap: on
line source
#include <efi.h> #include <efilib.h> EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *system_table) { InitializeLib(image, system_table); /* EFI_LOADED_IMAGE *loaded_image = NULL; EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL; EFI_STATUS status; uefi_call_wrapper(BS->SetWatchdogTimer, 4, 0, 0x0, 0, NULL); status = uefi_call_wrapper( system_table->BootServices->HandleProtocol, 3, image, &loaded_image_protocol, (void **) &loaded_image); if (EFI_ERROR(status)) { Print(L"handleprotocol: %r\n", status); } Print(L"Image base: %lx\n", loaded_image->ImageBase); Print(L"Image size: %lx\n", loaded_image->ImageSize); Print(L"Image file: %s\n", DevicePathToStr(loaded_image->FilePath)); */ return EFI_SUCCESS; }