[coreboot-gerrit] Change in coreboot[master]: util/intelmetool: Fix crash on strict devmem kernels
Philipp Deppenwiese (Code Review)
gerrit at coreboot.org
Tue Apr 17 00:26:51 CEST 2018
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/25398 )
Change subject: util/intelmetool: Fix crash on strict devmem kernels
......................................................................
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 at 9elements.com>
Reviewed-on: https://review.coreboot.org/25398
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
---
M util/intelmetool/intelmetool.c
M util/intelmetool/me.c
2 files changed, 9 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Paul Menzel: Looks good to me, but someone else must approve
Philipp Deppenwiese: Looks good to me, approved
diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c
index 14cb035..bc5f26c 100644
--- a/util/intelmetool/intelmetool.c
+++ b/util/intelmetool/intelmetool.c
@@ -288,17 +288,21 @@
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();
}
diff --git a/util/intelmetool/me.c b/util/intelmetool/me.c
index 6517022..f14f4cd 100644
--- a/util/intelmetool/me.c
+++ b/util/intelmetool/me.c
@@ -582,7 +582,8 @@
mei_mmap = map_physical(pagerounded, 0x2000);
mei_mmap += mei_base_address - pagerounded;
if (mei_mmap == NULL) {
- printf("Could not map ME setup memory\n");
+ printf("Could not map ME setup memory.\n"
+ "Do you have cmdline argument 'iomem=relaxed' set ?\n");
return 1;
}
--
To view, visit https://review.coreboot.org/25398
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I33c75a7cccb4cefaa26f70aed4bdc4bd620cdad0
Gerrit-Change-Number: 25398
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180416/3e231d9c/attachment.html>
More information about the coreboot-gerrit
mailing list