Skip to contentSkip to conversation

x86: Introduce INTEL_MID quirk option

PATCH New Andy Shevchenko 2 participants 8 messages Feb 17, 2017 – Feb 21, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 x86: Introduce INTEL_MID quirk option

Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.

Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.

Here we introduce specific quirk option for such cases.

It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.

---
 arch/x86/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/x86/Kconfig +14 -0
index 5f9597b230..7abbfd8223 100644
@@ -80,6 +80,20 @@ config VENDOR_INTEL
 
 endchoice
 
+# subarchitectures-specific options below
+config INTEL_MID
+	bool "Intel MID platform support"
+	---help---
+	  Select to build a kernel capable of supporting Intel MID
+	  (Mobile Internet Device) platform systems which do not have
+	  the PCI legacy interfaces.
+
+	  If you are building for a PC class system say N here.
+
+	  Intel MID platforms are based on an Intel processor and
+	  chipset which consume less power than most of the x86
+	  derivatives.
+
 # board-specific options below
 source "board/advantech/Kconfig"
 source "board/congatec/Kconfig"
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 2/3 x86: zImage: add Intel MID platforms support

From: Vincent Tinelli <[email protected]>

Intel MID platform boards have special treatment, such as boot parameter setting.

Assign hardware_subarch accordingly if CONFIG_INTEL_MID is set.

---
 arch/x86/lib/zimage.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/x86/lib/zimage.c +4 -0
index b6b0f2beb3..aafbeb01f9 100644
@@ -246,6 +246,10 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
 			hdr->setup_move_size = 0x9100;
 		}
 
+#if defined(CONFIG_INTEL_MID)
+		hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
+#endif
+
 		/* build command line at COMMAND_LINE_OFFSET */
 		build_command_line(cmd_line, auto_boot);
 	}
Signature · 1 line
2.11.0
#2 lore raw

PATCH v2 2/3 x86: zImage: add Intel MID platforms support

Quoted 7 lines · Andy Shevchenko

From: Vincent Tinelli <[email protected]>

Intel MID platform boards have special treatment, such as boot parameter setting.

Assign hardware_subarch accordingly if CONFIG_INTEL_MID is set.

Quoted 8 lines
---
 arch/x86/lib/zimage.c | 4 ++++
 1 file changed, 4 insertions(+)

applied to u-boot-x86, thanks!

#3 lore raw

PATCH v2 3/3 x86: Intel MID platforms has no microcode update

In reply to Andy Shevchenko

There is no microcode update available for SoCs used on Intel MID platforms.

Use conditional to bypass it.

---
 arch/x86/cpu/mp_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/mp_init.c +1 -1
index 988073cc79..4e2f000f75 100644
@@ -248,7 +248,7 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus)
 	if (!stack)
 		return -ENOMEM;
 	params->stack_top = (u32)(stack + size);
-#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP)
+#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) && !defined(CONFIG_INTEL_MID)
 	params->microcode_ptr = ucode_base;
 	debug("Microcode at %x\n", params->microcode_ptr);
 #endif
Signature · 1 line
2.11.0
#5 lore raw

PATCH v2 3/3 x86: Intel MID platforms has no microcode update

In reply to Andy Shevchenko
Quoted 16 lines · Andy Shevchenko

There is no microcode update available for SoCs used on Intel MID platforms.

Use conditional to bypass it.

---
 arch/x86/cpu/mp_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/mp_init.c +0 -0
index 988073cc79..4e2f000f75 100644

arch/x86/cpu/mp_init.c static int load_sipi_vector(atomic_t **ap_countp, int num_cpus) · line 251

Quoted 5 lines
arch/x86/cpu/mp_init.c +1 -1
@@ -248,7 +248,7 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus)
        if (!stack)
                return -ENOMEM;
        params->stack_top = (u32)(stack + size);
-#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP)
+#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) && !defined(CONFIG_INTEL_MID)

Fixed the "line over 80 characters" warning, and

arch/x86/cpu/mp_init.c static int load_sipi_vector(atomic_t **ap_countp, int num_cpus)

Quoted 4 lines
arch/x86/cpu/mp_init.c +0 -1
        params->microcode_ptr = ucode_base;
        debug("Microcode at %x\n", params->microcode_ptr);
 #endif
--

applied to u-boot-x86, thanks!

#6 lore raw

PATCH v2 1/3 x86: Introduce INTEL_MID quirk option

In reply to Andy Shevchenko

Hi Andy,

Quoted 23 lines · Andy Shevchenko

Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.

Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.

Here we introduce specific quirk option for such cases.

It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.

---
 arch/x86/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/x86/Kconfig +0 -0
index 5f9597b230..7abbfd8223 100644

arch/x86/Kconfig config VENDOR_INTEL · line 86

Quoted 7 lines
arch/x86/Kconfig +4 -0
@@ -80,6 +80,20 @@ config VENDOR_INTEL
 
 endchoice
 
+# subarchitectures-specific options below
+config INTEL_MID
+       bool "Intel MID platform support"
+       ---help---

nits: help to keep consistency in this file

arch/x86/Kconfig config VENDOR_INTEL · line 87

Quoted 1 line
arch/x86/Kconfig +1 -0
+         Select to build a kernel capable of supporting Intel MID

kernel -> U-Boot

arch/x86/Kconfig config VENDOR_INTEL

Quoted 13 lines
arch/x86/Kconfig +9 -1
+         (Mobile Internet Device) platform systems which do not have
+         the PCI legacy interfaces.
+
+         If you are building for a PC class system say N here.
+
+         Intel MID platforms are based on an Intel processor and
+         chipset which consume less power than most of the x86
+         derivatives.
+
 # board-specific options below
 source "board/advantech/Kconfig"
 source "board/congatec/Kconfig"
--

I can fix these when applying.

Regards,
Bin

#7 lore raw

PATCH v2 1/3 x86: Introduce INTEL_MID quirk option

Quoted 57 lines · Bin Meng

Hi Andy,

Quoted 23 lines · Andy Shevchenko

Intel Mobile Internet Device (MID) platforms have special treatment in some cases, such as CPU enumeration or boot parameters configuration.

Besides that several drivers are specifically developed for the IP blocks found on Intel MID platforms. Those drivers will be dependent to this option.

Here we introduce specific quirk option for such cases.

It is supposed to be selected by Intel MID platform boards, for example, Intel Edison.

---
 arch/x86/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/x86/Kconfig +0 -0
index 5f9597b230..7abbfd8223 100644

arch/x86/Kconfig config VENDOR_INTEL · line 86

Quoted 7 lines
arch/x86/Kconfig +4 -0
@@ -80,6 +80,20 @@ config VENDOR_INTEL
 
 endchoice
 
+# subarchitectures-specific options below
+config INTEL_MID
+       bool "Intel MID platform support"
+       ---help---

nits: help to keep consistency in this file

arch/x86/Kconfig config VENDOR_INTEL · line 87

Quoted 1 line
arch/x86/Kconfig +1 -0
+         Select to build a kernel capable of supporting Intel MID

kernel -> U-Boot

arch/x86/Kconfig config VENDOR_INTEL

Quoted 13 lines
arch/x86/Kconfig +9 -1
+         (Mobile Internet Device) platform systems which do not have
+         the PCI legacy interfaces.
+
+         If you are building for a PC class system say N here.
+
+         Intel MID platforms are based on an Intel processor and
+         chipset which consume less power than most of the x86
+         derivatives.
+
 # board-specific options below
 source "board/advantech/Kconfig"
 source "board/congatec/Kconfig"
--
Quoted 1 line

I can fix these when applying.

Fixed these, and

applied to u-boot-x86, thanks!