diff options
author | Simon Glass <sjg@chromium.org> | 2016-07-25 18:58:58 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-08-30 09:26:05 +0800 |
commit | e6294e0579897a682a823aefc99fe416c78aaf6e (patch) | |
tree | c035da6c35b1033956df02fdb509ce32a933a342 /arch | |
parent | fda4fa8195bab36879272e92973a7ef39e759795 (diff) | |
download | u-boot-e6294e0579897a682a823aefc99fe416c78aaf6e.tar.gz |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/cpu/intel_common/microcode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c index daf0d69494..eac5b781e9 100644 --- a/arch/x86/cpu/intel_common/microcode.c +++ b/arch/x86/cpu/intel_common/microcode.c @@ -43,7 +43,7 @@ static int microcode_decode_node(const void *blob, int node, { update->data = fdt_getprop(blob, node, "data", &update->size); if (!update->data) - return -EINVAL; + return -ENOENT; update->data += UCODE_HEADER_LEN; update->size -= UCODE_HEADER_LEN; @@ -145,6 +145,16 @@ int microcode_update_intel(void) } 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) { debug("%s: Unable to decode update: %d\n", __func__, ret); |