]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Convert microcode format to device-tree-only
authorSimon Glass <sjg@chromium.org>
Wed, 17 Dec 2014 07:50:37 +0000 (15:50 +0800)
committerSimon Glass <sjg@chromium.org>
Fri, 19 Dec 2014 00:26:06 +0000 (17:26 -0700)
To avoid having two microcode formats, adjust the build system to support
obtaining the microcode from the device tree, even in the case where it
must be made available before the device tree can be accessed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Makefile
arch/x86/cpu/queensbay/tnc_car.S
arch/x86/dts/crownbay.dts

index 1560bff2d881db51e356715ded5d4d1c25247e8a..bda8222af438178d4f9e5d12cf6179dd3731b68a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -947,7 +947,9 @@ ifneq ($(CONFIG_X86_RESET_VECTOR),)
 rom: u-boot.rom FORCE
 
 IFDTOOL=$(objtree)/tools/ifdtool
 rom: u-boot.rom FORCE
 
 IFDTOOL=$(objtree)/tools/ifdtool
-IFDTOOL_FLAGS  = -w $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-dtb.bin
+IFDTOOL_FLAGS  = -f 0:$(objtree)/u-boot.dtb
+IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1)
+IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin
 IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
 
 ifneq ($(CONFIG_HAVE_INTEL_ME),)
 IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
 
 ifneq ($(CONFIG_HAVE_INTEL_ME),)
index 6834a6413d37cd231556f85966d3459d32919ba8..2e9139eb8c2fc69ff201a9f6ac2819ca86d1cb16 100644 (file)
@@ -116,12 +116,9 @@ temp_ram_init_romstack:
        .long   temp_ram_init_ret
        .long   temp_ram_init_params
 temp_ram_init_params:
        .long   temp_ram_init_ret
        .long   temp_ram_init_params
 temp_ram_init_params:
-       .long   ucode_start             /* microcode base */
-       .long   ucode_size              /* microcode size */
+_dt_ucode_base_size:
+       /* These next two fields are filled in by ifdtool */
+       .long   0                       /* microcode base */
+       .long   0                       /* microcode size */
        .long   CONFIG_SYS_MONITOR_BASE /* code region base */
        .long   CONFIG_SYS_MONITOR_LEN  /* code region size */
        .long   CONFIG_SYS_MONITOR_BASE /* code region base */
        .long   CONFIG_SYS_MONITOR_LEN  /* code region size */
-
-       .balign 4
-ucode_start:
-       .include "arch/x86/cpu/queensbay/M0220661105.inc"
-ucode_size = ( . - ucode_start)
index 399dafb822eb4beeea2abf3a25ab8e53e95f4357..3f43f3ca372b46484fa8cbfa85e8ef24159bf3be 100644 (file)
                        memory-map = <0xffe00000 0x00200000>;
                };
        };
                        memory-map = <0xffe00000 0x00200000>;
                };
        };
+
+       microcode {
+               update@0 {
+#include "microcode/m0220661105_cv.dtsi"
+               };
+       };
+
 };
 };