Mercurial > hg > Members > taiki > EFITest
view bootx64.c @ 6:3b3650b792e3
add make clean
author | taiki |
---|---|
date | Wed, 26 Mar 2014 08:51:13 +0900 |
parents | 14b7a92d960b |
children | 7047eac9c44e |
line wrap: on
line source
#include <efi.h> #include <efilib.h> #include "registers.h" EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) { InitializeLib(image, systab); Print(L"Test start.\n"); UINTN map_size, cookie, size, version; map_size = EFI_PAGE_SIZE * 2; EFI_MEMORY_DESCRIPTOR *md; Print(L"AlocatePool\n"); EFI_STATUS status = uefi_call_wrapper(BS->AllocatePool, 3, EfiLoaderData, map_size, &md); if (EFI_ERROR(status)) { Print(L"error 'allocate pool' %r \n", status); } status = uefi_call_wrapper(BS->GetMemoryMap, 5, &map_size, md, &cookie, &size, &version); if (EFI_ERROR(status)) { Print(L"error 'get memory map' %r \n", status); } Print(L"Exit Boot Services\n"); status = uefi_call_wrapper(BS->ExitBootServices, 2, image, cookie); if (EFI_ERROR(status)) { Print(L"error 'exit boot services' %r \n", status); } return EFI_SUCCESS; }