I have setup the UDK2014 and EDK2 source and am successfully building an EFI application that runs fine in the SecMain emulator. However when I transfer the application to a real UEFI system and run it the system hangs. I've tried just a simple application that prints hello world:
#include <Uefi.h>
#include <Library/PcdLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
SystemTable->ConOut->OutputString(SystemTable->ConOut, (CHAR16*)L"Hello World22\r\n");
SystemTable->ConOut->OutputString(SystemTable->ConOut, SystemTable->FirmwareVendor);
return EFI_SUCCESS;
}
It is a UEFI 32 bit system that I'm testing on, and I'm targeting 32 bit in my UDK/EDK2 build.
Do I need to do anything special to build for targeting a real system versus the SecMain test environment that comes with UDK/EDK2?