From 50c71e6043805e4d851f2d28a49b157f5ed71522 Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Mon, 6 May 2019 12:41:18 -0700 Subject: [PATCH] arch/x86: CONFIG_BOOTLOADER_UNKNOWN renamed to CONFIG_X86_MULTIBOOT The only use of the BOOTLOADER_UNKNOWN config option is on x86, where it controls whether a multiboot header is embedded in the output. This patch renames the option to be more descriptive, and makes it an x86-specific option, rather than a Zephyr top-level option. This also enables X86_MULTIBOOT by default, since the header only occupies 12-16 bytes of memory and is (almost always) harmless. Signed-off-by: Charles E. Youse --- Kconfig.zephyr | 9 --------- arch/x86/Kconfig | 10 ++++++++++ arch/x86/core/crt0.S | 4 ++-- soc/x86/apollo_lake/Kconfig.soc | 1 - soc/x86/atom/Kconfig.soc | 1 - soc/x86/ia32/Kconfig.soc | 1 - .../intel_quark/quark_d2000/Kconfig.defconfig.series | 3 +++ soc/x86/intel_quark/quark_se/Kconfig.defconfig.series | 3 +++ soc/x86/intel_quark/quark_x1000/Kconfig.series | 1 - soc/x86/intel_quark/quark_x1000/Kconfig.soc | 1 - 10 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 9ada8a517b1..6b13be986f0 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -392,15 +392,6 @@ config BOOTLOADER_KEXEC This option signifies that Linux boots the kernel using kexec system call and utility. This method is used to boot the kernel over the network. -config BOOTLOADER_UNKNOWN - bool "Generic boot loader support" - depends on X86 - help - This option signifies that the target has a generic bootloader - or that it supports multiple ways of booting and it isn't clear - at build time which method is to be used. When this option is enabled - the board may have to do extra work to ensure a proper startup. - config BOOTLOADER_CONTEXT_RESTORE bool "Boot loader has context restore support" default y diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 587523d076b..33e7658e525 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -11,6 +11,16 @@ menu "X86 Architecture Options" config ARCH default "x86" +config X86_MULTIBOOT + bool "Generate multiboot header" + default y + help + Embed a multiboot header in the output executable. This is used + by some boot loaders (e.g., GRUB) when loading Zephyr. It is safe + to leave this option on if you're not sure. It only expands the + text segment by 12-16 bytes and is typically ignored if not needed. + + source "arch/x86/core/Kconfig" # diff --git a/arch/x86/core/crt0.S b/arch/x86/core/crt0.S index 40fd37ffaf4..71f87c2b636 100644 --- a/arch/x86/core/crt0.S +++ b/arch/x86/core/crt0.S @@ -466,7 +466,7 @@ z_x86_idt: .long _idt_base_address /* physical start address */ -#ifdef CONFIG_BOOTLOADER_UNKNOWN +#ifdef CONFIG_X86_MULTIBOOT /* Multiboot header definition is needed for some bootloaders */ /* @@ -495,7 +495,7 @@ z_x86_idt: */ .long -(0x1BADB002 + 0) -#endif /* CONFIG_BOOTLOADER_UNKNOWN */ +#endif /* CONFIG_X86_MULTIBOOT */ #ifdef CONFIG_SET_GDT diff --git a/soc/x86/apollo_lake/Kconfig.soc b/soc/x86/apollo_lake/Kconfig.soc index 1f1f7bee286..b34093f0fa0 100644 --- a/soc/x86/apollo_lake/Kconfig.soc +++ b/soc/x86/apollo_lake/Kconfig.soc @@ -7,7 +7,6 @@ config SOC_APOLLO_LAKE bool "Intel Apollo Lake Soc" select CPU_APOLLO_LAKE - select BOOTLOADER_UNKNOWN select HAS_I2C_DW select PCI select PCI_ENUMERATION diff --git a/soc/x86/atom/Kconfig.soc b/soc/x86/atom/Kconfig.soc index eee8145c379..879df621f3b 100644 --- a/soc/x86/atom/Kconfig.soc +++ b/soc/x86/atom/Kconfig.soc @@ -3,6 +3,5 @@ config SOC_ATOM bool "Intel ATOM SoC" select CPU_ATOM - select BOOTLOADER_UNKNOWN select X86_MMU select ARCH_HAS_USERSPACE diff --git a/soc/x86/ia32/Kconfig.soc b/soc/x86/ia32/Kconfig.soc index e1958c91d3d..7015497a151 100644 --- a/soc/x86/ia32/Kconfig.soc +++ b/soc/x86/ia32/Kconfig.soc @@ -3,4 +3,3 @@ config SOC_IA32 bool "Generic IA32 SoC" select CPU_MINUTEIA - select BOOTLOADER_UNKNOWN diff --git a/soc/x86/intel_quark/quark_d2000/Kconfig.defconfig.series b/soc/x86/intel_quark/quark_d2000/Kconfig.defconfig.series index cd2e58ff3d0..8d58a6d5cb1 100644 --- a/soc/x86/intel_quark/quark_d2000/Kconfig.defconfig.series +++ b/soc/x86/intel_quark/quark_d2000/Kconfig.defconfig.series @@ -12,6 +12,9 @@ config SOC_SERIES config X86_IAMCU default y +config X86_MULTIBOOT + default n + config SYS_CLOCK_HW_CYCLES_PER_SEC default 32000000 diff --git a/soc/x86/intel_quark/quark_se/Kconfig.defconfig.series b/soc/x86/intel_quark/quark_se/Kconfig.defconfig.series index 5f1f5f37a13..57e89a5c2c9 100644 --- a/soc/x86/intel_quark/quark_se/Kconfig.defconfig.series +++ b/soc/x86/intel_quark/quark_se/Kconfig.defconfig.series @@ -12,6 +12,9 @@ config SOC_SERIES config X86_IAMCU default y +config X86_MULTIBOOT + default n + config X86_NO_MELTDOWN default y diff --git a/soc/x86/intel_quark/quark_x1000/Kconfig.series b/soc/x86/intel_quark/quark_x1000/Kconfig.series index ceae260a50b..d5473f9948f 100644 --- a/soc/x86/intel_quark/quark_x1000/Kconfig.series +++ b/soc/x86/intel_quark/quark_x1000/Kconfig.series @@ -5,7 +5,6 @@ config SOC_SERIES_QUARK_X1000 select CPU_MINUTEIA select CPU_HAS_FPU select HPET_TIMER - select BOOTLOADER_UNKNOWN select PCI select PCI_ENUMERATION select PCIE diff --git a/soc/x86/intel_quark/quark_x1000/Kconfig.soc b/soc/x86/intel_quark/quark_x1000/Kconfig.soc index c5439f6a8f0..98cb9df990f 100644 --- a/soc/x86/intel_quark/quark_x1000/Kconfig.soc +++ b/soc/x86/intel_quark/quark_x1000/Kconfig.soc @@ -5,7 +5,6 @@ config SOC_QUARK_X1000 select CPU_MINUTEIA select CPU_HAS_FPU select HPET_TIMER - select BOOTLOADER_UNKNOWN select PCI select PCI_ENUMERATION select PCIE