summaryrefslogtreecommitdiff
path: root/util/intelmetool/intelmetool.c
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2018-02-01 16:12:47 +0100
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2018-04-16 22:26:46 +0000
commitaac3b31dbbc5b46aeb9393fb5594f0271d50a007 (patch)
tree0b0adc6d364b3a7c4f77b29c31820ffe62e72246 /util/intelmetool/intelmetool.c
parent44ad86a723b365f597a3a0243783c8fd05837250 (diff)
downloadcoreboot-aac3b31dbbc5b46aeb9393fb5594f0271d50a007.tar.xz
util/intelmetool: Fix crash on strict devmem kernels
Don't crash if mapping MEI PCI memory fails. This can happen if CONFIG_STRICT_DEVMEM is enabled. Change-Id: I33c75a7cccb4cefaa26f70aed4bdc4bd620cdad0 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/25398 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'util/intelmetool/intelmetool.c')
-rw-r--r--util/intelmetool/intelmetool.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c
index 14cb035a1f..bc5f26c4b5 100644
--- a/util/intelmetool/intelmetool.c
+++ b/util/intelmetool/intelmetool.c
@@ -288,17 +288,21 @@ static void dump_me_info(void)
printf("ME: has a broken implementation on your board with"
"this firmware\n");
- intel_mei_setup(dev);
+ if (intel_mei_setup(dev))
+ goto out;
usleep(ME_COMMAND_DELAY);
mei_reset();
usleep(ME_COMMAND_DELAY);
- mkhi_get_fw_version(&ME_major_ver, &ME_minor_ver);
+ if (mkhi_get_fw_version(&ME_major_ver, &ME_minor_ver))
+ goto out;
usleep(ME_COMMAND_DELAY);
mei_reset();
usleep(ME_COMMAND_DELAY);
- mkhi_get_fwcaps();
+ if (mkhi_get_fwcaps())
+ goto out;
usleep(ME_COMMAND_DELAY);
+out:
rehide_me();
}