blob: 77932984b557d40f32370c7314bb65dccc5adf06 [file] [log] [blame]
AKASHI Takahirofd972f52022-04-28 17:09:39 +09001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * When a boot option does not provide a file path the EFI file to be
4 * booted is \EFI\BOOT\$(BOOTEFI_NAME).EFI. The architecture specific
5 * file name is defined in this include.
6 *
7 * Copyright (c) 2022, Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt13132032022-06-10 18:24:48 +02008 * Copyright (c) 2022, Linaro Limited
AKASHI Takahirofd972f52022-04-28 17:09:39 +09009 */
10
11#ifndef _EFI_DEFAULT_FILENAME_H
12#define _EFI_DEFAULT_FILENAME_H
13
14#include <host_arch.h>
15
16#undef BOOTEFI_NAME
17
Heinrich Schuchardt13132032022-06-10 18:24:48 +020018#ifdef CONFIG_SANDBOX
19
AKASHI Takahirofd972f52022-04-28 17:09:39 +090020#if HOST_ARCH == HOST_ARCH_X86_64
21#define BOOTEFI_NAME "BOOTX64.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020022#elif HOST_ARCH == HOST_ARCH_X86
AKASHI Takahirofd972f52022-04-28 17:09:39 +090023#define BOOTEFI_NAME "BOOTIA32.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020024#elif HOST_ARCH == HOST_ARCH_AARCH64
AKASHI Takahirofd972f52022-04-28 17:09:39 +090025#define BOOTEFI_NAME "BOOTAA64.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020026#elif HOST_ARCH == HOST_ARCH_ARM
AKASHI Takahirofd972f52022-04-28 17:09:39 +090027#define BOOTEFI_NAME "BOOTARM.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020028#elif HOST_ARCH == HOST_ARCH_RISCV32
AKASHI Takahirofd972f52022-04-28 17:09:39 +090029#define BOOTEFI_NAME "BOOTRISCV32.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020030#elif HOST_ARCH == HOST_ARCH_RISCV64
31#define BOOTEFI_NAME "BOOTRISCV64.EFI"
32#else
33#error Unsupported UEFI architecture
AKASHI Takahirofd972f52022-04-28 17:09:39 +090034#endif
35
Heinrich Schuchardt13132032022-06-10 18:24:48 +020036#else
37
38#if defined(CONFIG_ARM64)
39#define BOOTEFI_NAME "BOOTAA64.EFI"
40#elif defined(CONFIG_ARM)
41#define BOOTEFI_NAME "BOOTARM.EFI"
42#elif defined(CONFIG_X86_64)
43#define BOOTEFI_NAME "BOOTX64.EFI"
44#elif defined(CONFIG_X86)
45#define BOOTEFI_NAME "BOOTIA32.EFI"
46#elif defined(CONFIG_ARCH_RV32I)
47#define BOOTEFI_NAME "BOOTRISCV32.EFI"
48#elif defined(CONFIG_ARCH_RV64I)
AKASHI Takahirofd972f52022-04-28 17:09:39 +090049#define BOOTEFI_NAME "BOOTRISCV64.EFI"
Heinrich Schuchardt13132032022-06-10 18:24:48 +020050#else
51#error Unsupported UEFI architecture
AKASHI Takahirofd972f52022-04-28 17:09:39 +090052#endif
53
AKASHI Takahirofd972f52022-04-28 17:09:39 +090054#endif
55
56#endif