#define EFI_DIRNAME "/EFI/BOOT/"
-static int get_efi_pxe_arch(void)
-{
- /* http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml */
- if (IS_ENABLED(CONFIG_ARM64))
- return 0xb;
- else if (IS_ENABLED(CONFIG_ARM))
- return 0xa;
- else if (IS_ENABLED(CONFIG_X86_64))
- return 0x6;
- else if (IS_ENABLED(CONFIG_X86))
- return 0x7;
- else if (IS_ENABLED(CONFIG_ARCH_RV32I))
- return 0x19;
- else if (IS_ENABLED(CONFIG_ARCH_RV64I))
- return 0x1b;
- else if (IS_ENABLED(CONFIG_SANDBOX))
- return 0; /* not used */
-
- return -EINVAL;
-}
-
static int get_efi_pxe_vci(char *str, int max_len)
{
int ret;
- ret = get_efi_pxe_arch();
+ ret = efi_get_pxe_arch();
if (ret < 0)
return ret;
ret = get_efi_pxe_vci(str, sizeof(str));
if (ret)
return log_msg_ret("vci", ret);
- ret = get_efi_pxe_arch();
+ ret = efi_get_pxe_arch();
if (ret < 0)
return log_msg_ret("arc", ret);
arch = ret;
*/
const char *efi_get_basename(void);
+/**
+ * efi_get_pxe_arch() - Get the architecture value for PXE
+ *
+ * See:
+ * http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
+ *
+ * Return: Architecture value
+ */
+int efi_get_pxe_arch(void);
+
#endif /* _LINUX_EFI_H */
#include <linux/libfdt.h>
#include <linux/list.h>
+#undef BOOTEFI_NAME
+
#ifdef CONFIG_SANDBOX
#if HOST_ARCH == HOST_ARCH_X86_64
return BOOTEFI_NAME;
}
+int efi_get_pxe_arch(void)
+{
+ /* http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml */
+ if (IS_ENABLED(CONFIG_ARM64))
+ return 0xb;
+ else if (IS_ENABLED(CONFIG_ARM))
+ return 0xa;
+ else if (IS_ENABLED(CONFIG_X86_64))
+ return 0x6;
+ else if (IS_ENABLED(CONFIG_X86))
+ return 0x7;
+ else if (IS_ENABLED(CONFIG_ARCH_RV32I))
+ return 0x19;
+ else if (IS_ENABLED(CONFIG_ARCH_RV64I))
+ return 0x1b;
+ else if (IS_ENABLED(CONFIG_SANDBOX))
+ return 0; /* not used */
+
+ return -EINVAL;
+}
+
/**
* efi_create_current_boot_var() - Return Boot#### name were #### is replaced by
* the value of BootCurrent