From 6e6aa171ff6c8a48507c32ce1fcadbd51ba96587 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Feb 2024 16:34:49 +0100 Subject: Fix build with APIC without SMP --- i386/i386/cpuboot.S | 2 ++ i386/i386at/model_dep.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'i386') diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index 3e4d5420..7e6c4770 100644 --- a/i386/i386/cpuboot.S +++ b/i386/i386/cpuboot.S @@ -15,6 +15,7 @@ * along with this program. If not, see . */ +#if NCPUS > 1 #include #include #include @@ -241,3 +242,4 @@ gdt_tmp: _apbootend: apbootend: +#endif diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index a8f9b866..edb5b48b 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -215,7 +215,7 @@ void machine_init(void) pmap_unmap_page_zero(); #endif -#ifdef APIC +#if NCPUS > 1 /* * Patch the realmode gdt with the correct offset and the first jmp to * protected mode with the correct target. -- cgit v1.2.3