Re: [tip:x86/microcode] x86/microcode_intel_early.c: Early updateucode on Intel's CPU

From: Yinghai Lu
Date: Mon Dec 10 2012 - 22:55:35 EST


On Mon, Dec 10, 2012 at 7:41 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 12/10/2012 06:39 PM, Yinghai Lu wrote:
>>
>> No, you should not copy that several times.
>>
>> just pre-allocate some kbytes in BRK, and copy to there one time.
>>
>
> He doesn't copy it several times. He just saves an offset into the
> initrd blob.

ucode is together with initrd blob, and code scan that blob, and save
the pointer about ucode,
then BSP use it, and APs use it
after that when initrd get freed, that ucode is copied to somewhere...

and his patch missed initrd could be get relocated for 64bit and 32bit.
So AP would not find that saved ucode.

After i pointed that, he said he will update the pointer when relocate
the initrd for AP.

And my suggestion is: after scan and find the ucode, save it to BRK,
so don't need to adjust
pointer again, and don't need to copy the blob and update the pointer again.

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/