diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2017-09-17 14:24:31 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-09-19 14:11:20 +0000 |
commit | 6781648054cbabfe7642692fb080f908e95c31f3 (patch) | |
tree | 29f8719b0764871e32c52afd8579840aa0e5bf2f | |
parent | f11d0c341490bd484c0e8afd6a0730ae9e0ac0b7 (diff) | |
download | coreboot-6781648054cbabfe7642692fb080f908e95c31f3.tar.xz |
ec/quanta/it8518: correct ACPI battery data fed into ToString()
ToString() requires the input buffer data to be null-terminated,
but the data returned by the EC is not, leading Windows to fail
to report any battery data at all. Correct this by concatenating
a null terminator (0x00) to the end of the buffer data before
inputting to ToString() where needed
TEST: boot Windows on google/stout, observe battery data
reported correctly.
Change-Id: I974afcd6ff1c617301d0897d6bd1fe14200aa3b9
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/21579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | src/ec/quanta/it8518/acpi/battery.asl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl index 1f37f130c9..862e907772 100644 --- a/src/ec/quanta/it8518/acpi/battery.asl +++ b/src/ec/quanta/it8518/acpi/battery.asl @@ -185,7 +185,7 @@ Device (BATX) // // Battery Type - Device Chemistry // - Store (ToString (SBCH), Index (PBIF, 11)) + Store (ToString (Concatenate(SBCH, 0x00)), Index (PBIF, 11)) // // Information ID 5 - @@ -196,7 +196,7 @@ Device (BATX) // // OEM Information - Manufacturer Name // - Store (ToString (SBMN), Index (PBIF, 12)) + Store (ToString (Concatenate(SBMN, 0x00)), Index (PBIF, 12)) // // Information ID 6 - @@ -207,7 +207,7 @@ Device (BATX) // // Model Number - Device Name // - Store (ToString (SBDN), Index (PBIF, 9)) + Store (ToString (Concatenate(SBDN, 0x00)), Index (PBIF, 9)) Return (PBIF) } |