blob: 5ec57aba0248c3c0d0233b5d8626171ff897bad9 [file] [log] [blame]
Heinrich Schuchardte3cde3a2018-01-19 19:01:05 +01001/*
2 * efi_selftest_miniapp_exit
3 *
4 * Copyright (c) 2018 Heinrich Schuchardt
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 *
8 * This EFI application is run by the StartImage selftest.
9 * It uses the Exit boot service to return.
10 */
11
12#include <common.h>
13#include <efi_api.h>
14
15/*
16 * Entry point of the EFI application.
17 *
18 * @handle handle of the loaded image
19 * @systable system table
20 * @return status code
21 */
22efi_status_t EFIAPI efi_main(efi_handle_t handle,
23 struct efi_system_table *systable)
24{
25 struct efi_simple_text_output_protocol *con_out = systable->con_out;
26
Heinrich Schuchardt4795aa72018-01-21 20:30:57 +000027 con_out->output_string(con_out, L"EFI application calling Exit\n");
Heinrich Schuchardte3cde3a2018-01-19 19:01:05 +010028
29 /* The return value is checked by the calling test */
30 systable->boottime->exit(handle, EFI_UNSUPPORTED, 0, NULL);
31
32 /*
33 * This statement should not be reached.
34 * To enable testing use a different return value.
35 */
36 return EFI_SUCCESS;
37}