the amount of statically allocated space in the image made available
for storing memory region descriptors' metadata.
-if ARCH_X86_64 || (KVM_BOOT_EFI_STUB && ARCH_ARM_64)
+if ARCH_X86_64 || (KVM_BOOT_PROTO_EFI_STUB && ARCH_ARM_64)
config UKPLAT_ACPI
bool "Enable parsing of ACPI structures"
help
Linux 64-bit Boot Protocol
-config KVM_BOOT_PROTOCOL_QEMU_VIRT
+config KVM_BOOT_PROTO_QEMU_VIRT
bool "QEMU virt"
depends on KVM_VMM_QEMU && !KVM_VMM_FIRECRACKER && ARCH_ARM_64
help
Default QEMU virt environment
-config KVM_BOOT_EFI_STUB
+config KVM_BOOT_PROTO_EFI_STUB
bool "EFI stub"
depends on KVM_VMM_QEMU && !KVM_VMM_FIRECRACKER
depends on OPTIMIZE_PIE
depends on !OPTIMIZE_PIE && !KVM_VMM_FIRECRACKER
endchoice
-if KVM_BOOT_EFI_STUB
+if KVM_BOOT_PROTO_EFI_STUB
-config KVM_BOOT_EFI_STUB_DEBUG
+config KVM_BOOT_PROTO_EFI_STUB_DEBUG
bool "Enable EFI stub crash messages"
default n
-config KVM_BOOT_EFI_STUB_CMDLINE_FNAME
+config KVM_BOOT_PROTO_EFI_STUB_CMDLINE_FNAME
string "Name of the command line arguments file"
default "$(UK_NAME).cmdl"
-config KVM_BOOT_EFI_STUB_INITRD_FNAME
+config KVM_BOOT_PROTO_EFI_STUB_INITRD_FNAME
string "Name of the initial RAM disk file"
default "$(UK_NAME).initrd"
-config KVM_BOOT_EFI_STUB_DTB_FNAME
+config KVM_BOOT_PROTO_EFI_STUB_DTB_FNAME
string "Name of the Devicetree Blob file"
default "$(UK_NAME).dtb"
-config KVM_BOOT_EFI_STUB_RST_ATK_MITIGATION
+config KVM_BOOT_PROTO_EFI_STUB_RST_ATK_MITIGATION
bool "TCG Reset Attack Mitigation"
default n
help
ELF64_TO_32 = y
else ifeq ($(CONFIG_KVM_BOOT_PROTO_LXBOOT),y)
KVM_LDFLAGS-y += -Wl,--entry=_lxboot_entry
-else ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+else ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
KVM_LDFLAGS-y += -Wl,--entry=uk_efi_entry64
KVM_LDFLAGS-y += -Wl,-m,elf_x86_64
endif
KVM_LDFLAGS-y += -Wl,--entry=_libkvmplat_entry
KVM_LDFLAGS-y += -Wl,-m,aarch64elf
KVM_LINK_LIBGCC_FLAG := -lgcc
-else ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+else ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
KVM_LDFLAGS-y += -Wl,--entry=uk_efi_entry64
KVM_LDFLAGS-y += -Wl,-m,aarch64elf
KVM_LINK_LIBGCC_FLAG := -lgcc
ifeq ($(ELF64_TO_32),y)
$(call build_elf64_to_32,$@)
endif
-ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
$(call build_efi,$@)
endif
else ifeq ($(CONFIG_KVM_BOOT_PROTO_LXBOOT),y)
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/lxboot.S|x86
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/lxboot.c
-else ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+else ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/efi_entry64.S|x86
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/efi_post.c
endif
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(UK_PLAT_COMMON_BASE)/arm/lcpu_start.S
endif
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(LIBKVMPLAT_BASE)/arm/bpt64.S|arm
-ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(LIBKVMPLAT_BASE)/arm/efi_post.c
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(LIBKVMPLAT_BASE)/arm/efi_entry64.S|arm
else
LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/memory.c|common
LIBKVMPLAT_SRCS-y += $(UK_PLAT_KVM_DEF_LDS)
LIBKVMPLAT_SRCS-$(CONFIG_UKPLAT_ACPI) += $(UK_PLAT_COMMON_BASE)/acpi.c|common
-ifeq ($(CONFIG_KVM_BOOT_EFI_STUB),y)
+ifeq ($(CONFIG_KVM_BOOT_PROTO_EFI_STUB),y)
LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/efi.c|common
endif
#define UK_EFI_ABS_FNAME(f) "\\EFI\\BOOT\\"f
#define UK_EFI_SURPLUS_MEM_DESC_COUNT 10
+#define EFI_STUB_CMDLINE_FNAME CONFIG_KVM_BOOT_PROTO_EFI_STUB_CMDLINE_FNAME
+#define EFI_STUB_INITRD_FNAME CONFIG_KVM_BOOT_PROTO_EFI_STUB_INITRD_FNAME
+#define EFI_STUB_DTB_FNAME CONFIG_KVM_BOOT_PROTO_EFI_STUB_DTB_FNAME
+
void uk_efi_jmp_to_kern(void) __noreturn;
/* Overlysimplified conversion from ASCII to UTF-16 */
sizeof(reset_data), (void *)reset_data);
}
-#ifdef CONFIG_KVM_BOOT_EFI_STUB_DEBUG
+#ifdef CONFIG_KVM_BOOT_PROTO_EFI_STUB_DEBUG
#define UK_EFI_MAX_CRASH_STR_LEN 256
/* UEFI for proper \n, we must also use CRLF */
#define uk_efi_crash(str) \
/* We can either have the command line provided by the user when this
* very specific instance of the image was launched, in which case this
* one takes priority, or we can have it provided through
- * CONFIG_KVM_BOOT_EFI_STUB_CMDLINE_PATH as a path on the same device.
+ * CONFIG_KVM_BOOT_PROTO_EFI_STUB_CMDLINE_PATH as a path on the same
+ * device.
*/
if (uk_img_hndl->load_options && uk_img_hndl->load_options_size) {
len = (uk_img_hndl->load_options_size >> 1) + 1;
if (unlikely(len == __SZ_MAX))
uk_efi_crash("Conversion from UTF-16 to ASCII of cmdl "
"overflowed. This shouldn't be possible\n");
- } else if (sizeof(CONFIG_KVM_BOOT_EFI_STUB_CMDLINE_FNAME) > 1) {
+ } else if (sizeof(EFI_STUB_CMDLINE_FNAME) > 1) {
uk_efi_read_file(uk_img_hndl->device_handle,
- UK_EFI_ABS_FNAME(CONFIG_KVM_BOOT_EFI_STUB_CMDLINE_FNAME),
+ UK_EFI_ABS_FNAME(EFI_STUB_CMDLINE_FNAME),
(char **)&cmdl, &len);
}
__sz len;
int rc;
- if (sizeof(CONFIG_KVM_BOOT_EFI_STUB_INITRD_FNAME) <= 1)
+ if (sizeof(EFI_STUB_INITRD_FNAME) <= 1)
return;
uk_img_hndl = uk_efi_get_uk_img_hndl();
uk_efi_read_file(uk_img_hndl->device_handle,
- UK_EFI_ABS_FNAME(CONFIG_KVM_BOOT_EFI_STUB_INITRD_FNAME),
+ UK_EFI_ABS_FNAME(EFI_STUB_INITRD_FNAME),
(char **)&initrd, &len);
mrd.pbase = (__paddr_t)initrd;
__sz len;
int rc;
- if (sizeof(CONFIG_KVM_BOOT_EFI_STUB_DTB_FNAME) <= 1)
+ if (sizeof(EFI_STUB_DTB_FNAME) <= 1)
return;
uk_img_hndl = uk_efi_get_uk_img_hndl();
uk_efi_read_file(uk_img_hndl->device_handle,
- UK_EFI_ABS_FNAME(CONFIG_KVM_BOOT_EFI_STUB_DTB_FNAME),
+ UK_EFI_ABS_FNAME(EFI_STUB_DTB_FNAME),
(char **)&dtb, &len);
mrd.pbase = (__paddr_t)dtb;
*/
static void uk_efi_reset_attack_mitigation_enable(void)
{
-#ifdef CONFIG_KVM_BOOT_EFI_STUB_RST_ATK_MITIGATION
+#ifdef CONFIG_KVM_BOOT_PROTO_EFI_STUB_RST_ATK_MITIGATION
/* The UTF-16 encoding of the "MemoryOverwriteRequestControl" string */
char var_name[] = "M\0e\0m\0o\0r\0y\0O\0v\0e\0r\0w\0r\0i\0t\0e\0R\0e"
"\0q\0u\0e\0s\0t\0C\0o\0n\0t\0r\0o\0l\0";
static void cpu_halt(void) __noreturn;
-#ifdef CONFIG_KVM_BOOT_EFI_STUB
+#ifdef CONFIG_KVM_BOOT_PROTO_EFI_STUB
static void uk_efi_rs_reset_system(enum uk_efi_reset_type reset_type)
{
const char reset_data[] = "UK EFI SYSTEM RESET";