blob: 77932984b557d40f32370c7314bb65dccc5adf06 [file] [log] [blame]
AKASHI Takahiro4e65ca02022-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 Schuchardt3a0654e2022-06-10 18:24:48 +02008 * Copyright (c) 2022, Linaro Limited
AKASHI Takahiro4e65ca02022-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 Schuchardt3a0654e2022-06-10 18:24:48 +020018#ifdef CONFIG_SANDBOX
19
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090020#if HOST_ARCH == HOST_ARCH_X86_64
21#define BOOTEFI_NAME "BOOTX64.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020022#elif HOST_ARCH == HOST_ARCH_X86
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090023#define BOOTEFI_NAME "BOOTIA32.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020024#elif HOST_ARCH == HOST_ARCH_AARCH64
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090025#define BOOTEFI_NAME "BOOTAA64.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020026#elif HOST_ARCH == HOST_ARCH_ARM
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090027#define BOOTEFI_NAME "BOOTARM.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020028#elif HOST_ARCH == HOST_ARCH_RISCV32
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090029#define BOOTEFI_NAME "BOOTRISCV32.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020030#elif HOST_ARCH == HOST_ARCH_RISCV64
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090031#define BOOTEFI_NAME "BOOTRISCV64.EFI"
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020032#else
33#error Unsupported UEFI architecture
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090034#endif
35
Heinrich Schuchardt3a0654e2022-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)
49#define BOOTEFI_NAME "BOOTRISCV64.EFI"
50#else
AKASHI Takahiro4e65ca02022-04-28 17:09:39 +090051#error Unsupported UEFI architecture
52#endif
53
54#endif
Heinrich Schuchardt3a0654e2022-06-10 18:24:48 +020055
56#endif