<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25400">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/intelmetool: Fix bootguard dump<br><br>* Fix broken bootguard report on Intel ME 9.5+<br>* Fix broken debug statement<br>* Add additional rehide_me()<br>* Move last rehide_me()<br><br>Tested on Lenovo T470p. It shows correct BootGuard state:<br>Verified & Measured Boot.<br><br>Tested on Lenovo T430. It shows correct BootGuard state: Disabled.<br><br>Change-Id: Ib6c49ee39dd9962a4981e7de19b1c98c753f2944<br>Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com><br>---<br>M util/intelmetool/intelmetool.c<br>1 file changed, 9 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/25400/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c</span><br><span>index 4c74a0a..b87a53b 100644</span><br><span>--- a/util/intelmetool/intelmetool.c</span><br><span>+++ b/util/intelmetool/intelmetool.c</span><br><span>@@ -322,7 +322,7 @@</span><br><span> {</span><br><span> struct pci_dev *dev;</span><br><span> char namebuf[1024];</span><br><span style="color: hsl(0, 100%, 40%);">- const char *name;</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *name = NULL;</span><br><span> uint64_t bootguard = 0;</span><br><span> </span><br><span> if (pci_platform_scan())</span><br><span>@@ -342,16 +342,10 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (debug) {</span><br><span style="color: hsl(0, 100%, 40%);">- printf("BootGuard MSR Output: 0x%" PRIx64 "\n", bootguard);</span><br><span style="color: hsl(0, 100%, 40%);">- bootguard &= ~0xff;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> /* ME_major_ver is zero on some platforms (Mac) */</span><br><span> if (ME_major_ver &&</span><br><span> (ME_major_ver < 9 ||</span><br><span style="color: hsl(0, 100%, 40%);">- (ME_major_ver == 9 && ME_minor_ver < 5) ||</span><br><span style="color: hsl(0, 100%, 40%);">- !BOOTGUARD_CAPABILITY(bootguard))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ (ME_major_ver == 9 && ME_minor_ver < 5))) {</span><br><span> print_cap("BootGuard ", 0);</span><br><span> printf(CGRN "\nYour system isn't bootguard ready. You can "</span><br><span> "flash other firmware!\n" RESET);</span><br><span>@@ -362,15 +356,22 @@</span><br><span> if (msr_bootguard(&bootguard, debug) < 0) {</span><br><span> printf("ME Capability: %-43s: " CCYN "%s\n" RESET,</span><br><span> "BootGuard Mode", "Unknown");</span><br><span style="color: hsl(120, 100%, 40%);">+ rehide_me();</span><br><span> return;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (debug) {</span><br><span style="color: hsl(120, 100%, 40%);">+ printf("BootGuard MSR Output: 0x%" PRIx64 "\n", bootguard);</span><br><span style="color: hsl(120, 100%, 40%);">+ bootguard &= ~0xff;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> print_cap("BootGuard ", 1);</span><br><span> if (pci_read_long(dev, 0x40) & 0x10)</span><br><span> printf(CYEL "Your southbridge configuration is insecure!! "</span><br><span> "BootGuard keys can be overwritten or wiped, or you are "</span><br><span> "in developer mode.\n"</span><br><span> RESET);</span><br><span style="color: hsl(120, 100%, 40%);">+ rehide_me();</span><br><span> </span><br><span> switch (bootguard) {</span><br><span> case BOOTGUARD_DISABLED:</span><br><span>@@ -399,7 +400,6 @@</span><br><span> "firmware.\n" RESET);</span><br><span> break;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- rehide_me();</span><br><span> }</span><br><span> </span><br><span> static void print_version(void)</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25400">change 25400</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/25400"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib6c49ee39dd9962a4981e7de19b1c98c753f2944 </div>
<div style="display:none"> Gerrit-Change-Number: 25400 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com> </div>