mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
x86: ivybridge: Allow microcode to be collated
Generally the microcode is combined into a single block only (and removed from the device tree) when there are multiple blocks. But this is not a requirement. Adjust the ivybridge code to avoid assuming this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
fda4fa8195
commit
e6294e0579
1 changed files with 11 additions and 1 deletions
|
@ -43,7 +43,7 @@ static int microcode_decode_node(const void *blob, int node,
|
||||||
{
|
{
|
||||||
update->data = fdt_getprop(blob, node, "data", &update->size);
|
update->data = fdt_getprop(blob, node, "data", &update->size);
|
||||||
if (!update->data)
|
if (!update->data)
|
||||||
return -EINVAL;
|
return -ENOENT;
|
||||||
update->data += UCODE_HEADER_LEN;
|
update->data += UCODE_HEADER_LEN;
|
||||||
update->size -= UCODE_HEADER_LEN;
|
update->size -= UCODE_HEADER_LEN;
|
||||||
|
|
||||||
|
@ -145,6 +145,16 @@ int microcode_update_intel(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = microcode_decode_node(blob, node, &update);
|
ret = microcode_decode_node(blob, node, &update);
|
||||||
|
if (ret == -ENOENT && ucode_base) {
|
||||||
|
/*
|
||||||
|
* The microcode has been removed from the device tree
|
||||||
|
* in the build system. In that case it will have
|
||||||
|
* already been updated in car_init().
|
||||||
|
*/
|
||||||
|
debug("%s: Microcode data not available\n", __func__);
|
||||||
|
skipped++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (ret) {
|
if (ret) {
|
||||||
debug("%s: Unable to decode update: %d\n", __func__,
|
debug("%s: Unable to decode update: %d\n", __func__,
|
||||||
ret);
|
ret);
|
||||||
|
|
Loading…
Add table
Reference in a new issue