RE: [tip:x86/microcode] x86/microcode_intel_early.c: Early update ucode on Intel's CPU

From
Yu, Fenghua <hidden>
Date
2012-12-11 17:26:46
Reply to
Yinghai Lu, 2012-12-11
-----Original Message-----
From: <redacted> [mailto:<redacted>] On Behalf Of
Yinghai Lu
Sent: Tuesday, December 11, 2012 9:16 AM
To: Borislav Petkov; Yinghai Lu; H. Peter Anvin; Yu, Fenghua;
mingo@kernel.org; linux-kernel@vger.kernel.org; tglx@linutronix.de;
hpa@linux.intel.com; linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/microcode] x86/microcode_intel_early.c: Early
update ucode on Intel's CPU

On Tue, Dec 11, 2012 at 9:06 AM, Borislav Petkov [off-list ref] wrote:
quoted
On Tue, Dec 11, 2012 at 09:00:55AM -0800, Yinghai Lu wrote:
quoted
ok, then next question is how early it should be.

before early_cpu_init/early_identify_cpu

or just before check_bugs/identify_cpu
Read the code. It's in x86_64_start_kernel on 64-bit.
No, that is not right place. initrd could be loaded anywhere like way
high by bootloader.

to make code simple, we should have following sequence in setup_arch

early_ioremap_init()
early_update_microcode()...
early_cpu_init()

early_update_microcode could use early_ioremap to access initrd ramdisk
area.
The problem is mainly from 32-bit. We need to load microcode before paging is enabled (I'm changing load_ucode_intel_ap to be called before paging as well). That makes the coding not simple. It's better to load ucode as early as possible in 64-bit as well. I don't want to have two totally different sets of early loading ucode for 64-bit and 32-bit. 

Thanks.

-Fenghua
Thread (126 messages) 126 messages, 6 authors, last reply 2012-12-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help