Matt DeVillier (matt.devillier@gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17782
-gerrit
commit 5d07b9b29158b924ae029d87b36e3fcbf7091eda Author: Matt DeVillier matt.devillier@gmail.com Date: Fri Dec 9 18:09:12 2016 -0600
ec/chromeec: 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().
Change-Id: I4fdbf97e9b75030374dffc99a954dd9faa6a5209 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- src/ec/google/chromeec/acpi/battery.asl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index f61e882..2ed4468 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -114,9 +114,9 @@ Device (BAT0) Store (Local2, Index (PBIF, 6))
// Get battery info from mainboard - Store (ToString(BMOD), Index (PBIF, 9)) - Store (ToString(BSER), Index (PBIF, 10)) - Store (ToString(BMFG), Index (PBIF, 12)) + Store (ToString(Concatenate(BMOD, 0x00)), Index (PBIF, 9)) + Store (ToString(Concatenate(BSER, 0x00)), Index (PBIF, 10)) + Store (ToString(Concatenate(BMFG, 0x00)), Index (PBIF, 12))
Return (PBIF) } @@ -145,9 +145,9 @@ Device (BAT0) Store (BTCC, Index (PBIX, 8))
// Get battery info from mainboard - Store (ToString(BMOD), Index (PBIX, 16)) - Store (ToString(BSER), Index (PBIX, 17)) - Store (ToString(BMFG), Index (PBIX, 19)) + Store (ToString(Concatenate(BMOD, 0x00)), Index (PBIX, 16)) + Store (ToString(Concatenate(BSER, 0x00)), Index (PBIX, 17)) + Store (ToString(Concatenate(BMFG, 0x00)), Index (PBIX, 19))
Return (PBIX) }