helloworld.c 556 B

123456789101112131415161718192021222324
  1. /*
  2. * EFI hello world
  3. *
  4. * Copyright (c) 2016 Google, Inc
  5. * Written by Simon Glass <sjg@chromium.org>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.h>
  10. #include <part_efi.h>
  11. #include <efi_api.h>
  12. efi_status_t EFIAPI efi_main(efi_handle_t handle,
  13. struct efi_system_table *systable)
  14. {
  15. struct efi_simple_text_output_protocol *con_out = systable->con_out;
  16. struct efi_boot_services *boottime = systable->boottime;
  17. con_out->output_string(con_out, L"Hello, world!\n");
  18. boottime->exit(handle, 0, 0, NULL);
  19. return EFI_SUCCESS;
  20. }