Re: [PATCH] x86: Unbreak early processor microcode loading

From: Henrique de Moraes Holschuh
Date: Wed Apr 29 2015 - 14:24:05 EST


On Thu, 19 Mar 2015, Borislav Petkov wrote:
> On Thu, Mar 19, 2015 at 03:30:23PM +0800, Daniel J Blueman wrote:
> > Neat; I added the 'amd-ucode/' directory prefix to the string and adjusted
> > the buffer size, and the microcode is loaded,
>
> We shouldn't need to do that though for obvious reasons.
>
> IOW, you need to type in only the filenames of the microcode blobs in Kconfig
> option:
>
> CONFIG_EXTRA_FIRMWARE="microcode_amd.bin microcode_amd_fam15h.bin microcode_amd_fam16h.bin"
>
> and then add the absolute path to them with:
>
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/amd-ucode"
>
> That worked here yesterday.

I apologise for the late reply. Please disregard it if it is outdated.

That would obviously work, but people often have other firmware
built-in, so the likehood of CONFIG_EXTRA_FIRMWARE_DIR pointing to the
root of a linux-firmware work tree or to "/lib/firmware" is not low at
all.

In fact, it is natural to expect that CONFIG_EXTRA_FIRMWARE should point
to something that will result in the same filenames as the kernel would
want to use for regular firmware loading. The current text of the
Kconfig help for CONFIG_EXTRA_FIRMWARE even says so.

So, FWIW, I do think we should always use the same path for builtin and
regular firmware requests, based on the least-surprise principle.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
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/