]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Move microcode code to a common location
authorSimon Glass <sjg@chromium.org>
Sat, 12 Mar 2016 05:06:54 +0000 (22:06 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 17 Mar 2016 02:27:24 +0000 (10:27 +0800)
This code is used on several Intel CPUs. Move it into a common location.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/intel_common/Makefile
arch/x86/cpu/intel_common/car.S
arch/x86/cpu/intel_common/microcode.c [moved from arch/x86/cpu/ivybridge/microcode_intel.c with 98% similarity]
arch/x86/cpu/ivybridge/Makefile
arch/x86/cpu/ivybridge/cpu.c
arch/x86/include/asm/microcode.h [moved from arch/x86/include/asm/arch-ivybridge/microcode.h with 100% similarity]

index 5dd95739a0996be4d5af5a1c2a4af87d8ec85f6c..ca4e171d20ca9b10bb74d446391a1b0a9bfdfb80 100644 (file)
@@ -5,3 +5,6 @@
 #
 
 obj-$(CONFIG_HAVE_MRC) += car.o
+ifndef CONFIG_TARGET_EFI
+obj-y += microcode.o
+endif
index 1defabf91f07fbe2c549102261b655a3e1a1c83a..81ac976ddd5bafcd7feb8e6307de7e7fdac4df5c 100644 (file)
  */
 
 #include <common.h>
+#include <asm/microcode.h>
 #include <asm/msr-index.h>
 #include <asm/mtrr.h>
 #include <asm/post.h>
 #include <asm/processor.h>
 #include <asm/processor-flags.h>
-#include <asm/arch/microcode.h>
 
 #define MTRR_PHYS_BASE_MSR(reg) (0x200 + 2 * (reg))
 #define MTRR_PHYS_MASK_MSR(reg) (0x200 + 2 * (reg) + 1)
similarity index 98%
rename from arch/x86/cpu/ivybridge/microcode_intel.c
rename to arch/x86/cpu/intel_common/microcode.c
index 2440a97c484ba801698f2cf1003b924d06161b3b..3054fabfde6a4fe3775c4b50f186479c5fa922b3 100644 (file)
 #include <fdtdec.h>
 #include <libfdt.h>
 #include <asm/cpu.h>
+#include <asm/microcode.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/processor.h>
-#include <asm/arch/microcode.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 /**
  * struct microcode_update - standard microcode header from Intel
index b117f0deb294a7f2db86cdb015a84b0432b5e6d6..78006f12b39252a7dca024ee85448862644e72b1 100644 (file)
@@ -13,7 +13,6 @@ obj-y += gma.o
 obj-y += lpc.o
 obj-y += me_status.o
 obj-y += model_206ax.o
-obj-y += microcode_intel.o
 obj-y += northbridge.o
 obj-y += report_platform.o
 obj-y += sata.o
index 5d839a7e1befae9f0355194e7c8771cca65bcddb..f0e733bc33101e1c798f5e258548f184b08ce8e9 100644 (file)
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/lapic.h>
+#include <asm/microcode.h>
 #include <asm/msr.h>
 #include <asm/mtrr.h>
 #include <asm/pci.h>
 #include <asm/post.h>
 #include <asm/processor.h>
 #include <asm/arch/model_206ax.h>
-#include <asm/arch/microcode.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/sandybridge.h>