arch/x86: add support for Intel X1000
authorRay Kinsella <ray.kinsella@intel.com>
Mon, 19 Oct 2015 11:02:52 +0000 (11:02 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 20 Oct 2015 08:04:52 +0000 (10:04 +0200)
The Intel X1000 is the Pentium class microprocessor that ships with
Galileo Gen 1/2. This patch adds changes to arch and toolchain-wrapper
to omit the lock prefix for the X1000.

[Thomas: tweak commit log and Config.in help text.]

Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
arch/Config.in.x86
toolchain/toolchain-wrapper.c
toolchain/toolchain-wrapper.mk

index 43f6abc3427cb55db9d9350295012b37ae8bc815..dca30dade7dbe3c916ad4af4f3be0a96e6235edd 100644 (file)
@@ -34,6 +34,16 @@ config BR2_x86_i486
 config BR2_x86_i586
        bool "i586"
        depends on !BR2_x86_64
+config BR2_x86_x1000
+       bool "x1000"
+       depends on !BR2_x86_64
+       help
+         The Intel X1000 is a Pentium class microprocessor in the
+         Quark (sub-Atom) Product Line. The X1000 has a bug on the
+         lock prefix requiring that prefix must be stripped at build
+         time.
+
+         See https://en.wikipedia.org/wiki/Intel_Quark.
 config BR2_x86_i686
        bool "i686"
        depends on !BR2_x86_64
@@ -202,6 +212,7 @@ config BR2_ARCH
        default "i386"          if BR2_x86_i386
        default "i486"          if BR2_x86_i486
        default "i586"          if BR2_x86_i586
+       default "i586"          if BR2_x86_x1000
        default "i586"          if BR2_x86_pentium_mmx
        default "i586"          if BR2_x86_geode
        default "i586"          if BR2_x86_c3
@@ -240,6 +251,7 @@ config BR2_GCC_TARGET_ARCH
        default "i386"          if BR2_x86_i386
        default "i486"          if BR2_x86_i486
        default "i586"          if BR2_x86_i586
+       default "i586"          if BR2_x86_x1000
        default "pentium-mmx"   if BR2_x86_pentium_mmx
        default "i686"          if BR2_x86_i686
        default "pentiumpro"    if BR2_x86_pentiumpro
index 16a3d7852f28405f5f96873017bdd8f33bd954f3..887058f699af12656259b5cbdb6c107b62810a3a 100644 (file)
@@ -63,6 +63,9 @@ static char *predef_args[] = {
 #ifdef BR_64
        "-m64",
 #endif
+#ifdef BR_OMIT_LOCK_PREFIX
+       "-Wa,-momit-lock-prefix=yes",
+#endif
 #ifdef BR_BINFMT_FLAT
        "-Wl,-elf2flt",
 #endif
index c78363a2ed3e81e9173bfd81bcd300859718cebe..eba2b381e9d51e7407c554858c5a5a3c4f92c36f 100644 (file)
@@ -20,6 +20,10 @@ ifeq ($(BR2_CCACHE),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
 endif
 
+ifeq ($(BR2_x86_x1000),y)
+TOOLCHAIN_WRAPPER_ARGS += -DBR_OMIT_LOCK_PREFIX
+endif
+
 ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
 endif