<p>Matt DeVillier has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21579">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/quanta/it8518: correct ACPI battery data fed into ToString()<br><br>ToString() requires the input buffer data to be null-terminated,<br>but the data returned by the EC is not, leading Windows to fail<br>to report any battery data at all.  Correct this by concatenating<br>a null terminator (0x00) to the end of the buffer data before<br>inputting to ToString() where needed<br><br>TEST: boot Windows on google/stout, observe battery data<br>reported correctly.<br><br>Change-Id: I974afcd6ff1c617301d0897d6bd1fe14200aa3b9<br>Signed-off-by: Matt DeVillier <matt.devillier@gmail.com><br>---<br>M src/ec/quanta/it8518/acpi/battery.asl<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/21579/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl<br>index 1f37f13..862e907 100644<br>--- a/src/ec/quanta/it8518/acpi/battery.asl<br>+++ b/src/ec/quanta/it8518/acpi/battery.asl<br>@@ -185,7 +185,7 @@<br>            //<br>            //  Battery Type - Device Chemistry<br>           //<br>-           Store (ToString (SBCH), Index (PBIF, 11))<br>+            Store (ToString (Concatenate(SBCH, 0x00)), Index (PBIF, 11))<br> <br>               //<br>            // Information ID 5 -<br>@@ -196,7 +196,7 @@<br>            //<br>            // OEM Information - Manufacturer Name<br>                //<br>-           Store (ToString (SBMN), Index (PBIF, 12))<br>+            Store (ToString (Concatenate(SBMN, 0x00)), Index (PBIF, 12))<br> <br>               //<br>            // Information ID 6 -<br>@@ -207,7 +207,7 @@<br>            //<br>            // Model Number - Device Name<br>                 //<br>-           Store (ToString (SBDN), Index (PBIF, 9))<br>+             Store (ToString (Concatenate(SBDN, 0x00)), Index (PBIF, 9))<br> <br>                Return (PBIF)<br>         }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21579">change 21579</a>. To unsubscribe, 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/21579"/><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: I974afcd6ff1c617301d0897d6bd1fe14200aa3b9 </div>
<div style="display:none"> Gerrit-Change-Number: 21579 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Matt DeVillier <matt.devillier@gmail.com> </div>