1 #include <efi.h> 2 #include <efilib.h> 3 4 static CHAR16 * 5 a2u (char *str) 6 { 7 static CHAR16 mem[2048]; 8 int i; 9 10 for (i = 0; str[i]; ++i) 11 mem[i] = (CHAR16) str[i]; 12 mem[i] = 0; 13 return mem; 14 } 15 16 EFI_STATUS 17 efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab) 18 { 19 SIMPLE_TEXT_OUTPUT_INTERFACE *conout; 20 21 InitializeLib(image_handle, systab); 22 conout = systab->ConOut; 23 uefi_call_wrapper(conout->OutputString, 2, conout, (CHAR16 *)L"Hello World!\n\r"); 24 uefi_call_wrapper(conout->OutputString, 2, conout, a2u("Hello World!\n\r")); 25 26 return EFI_SUCCESS; 27 } 28