
On Wed, Dec 31, 2014 at 2:45 PM, Bin Meng bmeng.cn@gmail.com wrote:
Hi Simon,
On Sun, Dec 28, 2014 at 10:20 AM, Simon Glass sjg@chromium.org wrote:
At present the normal update (which happens much later) does not work. This seems to have something to do with the 'no eviction' mode in the CAR, or at least moving the microcode update after that causes it not to work.
For now, do an update early on so that it definitely works. Also refuse to continue unless the microcode update check (later in boot) is successful.
Signed-off-by: Simon Glass sjg@chromium.org
arch/x86/cpu/ivybridge/car.S | 14 ++++++++++++++ arch/x86/cpu/ivybridge/cpu.c | 2 +- arch/x86/cpu/ivybridge/microcode_intel.c | 9 +++++++-- arch/x86/dts/link.dts | 3 --- 4 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/arch/x86/cpu/ivybridge/car.S b/arch/x86/cpu/ivybridge/car.S index 6e7e1e4..95da087 100644 --- a/arch/x86/cpu/ivybridge/car.S +++ b/arch/x86/cpu/ivybridge/car.S @@ -45,6 +45,14 @@ car_init: movl $0xFEE00300, %esi movl %eax, (%esi)
/* TODO: Load microcode later - the 'no eviction' mode breaks this */
movl $0x79, %ecx
Replace 0x79 to MSR_IA32_UCODE_WRITE from msr-index.h
xorl %edx, %edx
movl $_dt_ucode_base_size, %eax
movl (%eax), %eax
addl $0x30, %eax
And here 0x30 to something like MICROCODE_HEADER_LEN.
I realized UCODE_HEADER_LEN might be better. At least shorter than microcode :-), and is consistent with the MSR_IA32_UCODE_WRITE.
[snip]
Regards, Bin