diff --git a/arch/x86/core/prep_c.c b/arch/x86/core/prep_c.c index 630a9735c08..5fca80069cf 100644 --- a/arch/x86/core/prep_c.c +++ b/arch/x86/core/prep_c.c @@ -39,7 +39,7 @@ FUNC_NORETURN void z_x86_prep_c(void *arg) x86_64_irq_init(); #endif -#ifdef CONFIG_MULTIBOOT_INFO +#if defined(CONFIG_MULTIBOOT_INFO) && !defined(CONFIG_BUILD_OUTPUT_EFI) z_multiboot_init(info); #else ARG_UNUSED(info); diff --git a/tests/arch/x86/info/CMakeLists.txt b/tests/arch/x86/info/CMakeLists.txt index a6c41c64c9f..3c0718d389a 100644 --- a/tests/arch/x86/info/CMakeLists.txt +++ b/tests/arch/x86/info/CMakeLists.txt @@ -8,6 +8,6 @@ project(x86_info) target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/timer.c) -target_sources(app PRIVATE src/memmap.c) target_sources_ifdef(CONFIG_ACPI app PRIVATE src/acpi.c) target_sources_ifdef(CONFIG_MULTIBOOT app PRIVATE src/multiboot.c) +target_sources_ifdef(CONFIG_X86_MEMMAP app PRIVATE src/memmap.c) diff --git a/tests/arch/x86/info/prj.conf b/tests/arch/x86/info/prj.conf index 1cf566c6016..c867855a08e 100644 --- a/tests/arch/x86/info/prj.conf +++ b/tests/arch/x86/info/prj.conf @@ -4,3 +4,4 @@ CONFIG_MULTIBOOT_MEMMAP=y CONFIG_MULTIBOOT_FRAMEBUF=y CONFIG_COUNTER=y CONFIG_COUNTER_CMOS=y +CONFIG_X86_MEMMAP=y diff --git a/tests/arch/x86/info/src/main.c b/tests/arch/x86/info/src/main.c index b5ac0186e3c..7fb52e01f5d 100644 --- a/tests/arch/x86/info/src/main.c +++ b/tests/arch/x86/info/src/main.c @@ -11,6 +11,11 @@ __weak void multiboot(void) printk("MULTIBOOT: Not supported in this build.\n\n"); } +__weak void memmap(void) +{ + printk("MEMMAP: Not supported in this build.\n\n"); +} + __weak void acpi(void) { printk("ACPI: Not supported in this build.\n\n");